Finding a Host’s Switchport

In this post I will demonstrate how we can find out which of SW3’s switchports PC1 is connected to in the topology diagram below. To make things more fun though I’ll begin my search from R1.

Note that apart from R1 and PC1’s IP addresses, we do not have nor need any other information such as intermediate device IPs or port numbers in order to get started. Also note that the diagram is only used to show you, the reader what the topology looks like. As explained below, when doing this in a real topology you do not need a topology diagram to be able to successfully locate the host’s corresponding switchport.

top1 Continue reading

Shape Average Vs Shape Peak – Part 3

In my previous post in this series I covered the difference between Shape Average, Shape Peak and Shape with no Excess. Now that that’s out of the way, let’s get down to configuration examples. I’ll use similar specifications to the ones I used last time:

  • CIR = 512kbps (512,000 bps)
  • Bc = 5,120 bps
  • Tc = 10ms (0.001 seconds)
  • Be = 5,120 bps for Shape Average and Shape Peak. (Shaping with no Excess will be covered in my next post).

Shape Average

Below is a basic Shape Average policy map with a 512kb shaper applied.

R1(config)#policy-map ShapeAverage-512k
R1(config-pmap)# class class-default
R1(config-pmap-c)#shape average 512000
R1(config-pmap-c)#interface fa0/0
R1(config-if)#service-policy output ShapeAverage-512k
R1(config-if)#do sh policy-map int f0/0

 FastEthernet0/0

  Service-policy output: ShapeAverage-512k

    Class-map: class-default (match-any)
      0 packets, 0 bytes
      5 minute offered rate 0 bps, drop rate 0 bps
      Match: any
      Traffic Shaping
           Target/Average   Byte   Sustain   Excess    Interval  Increment
             Rate           Limit  bits/int  bits/int  (ms)      (bytes)
           512000/512000    3200   12800     12800     25        1600

        Adapt  Queue     Packets   Bytes     Packets   Bytes     Shaping
        Active Depth                         Delayed   Delayed   Active
        -      0         0         0         0         0         no

Continue reading

MTU Vs MSS – Part Two

A little while back I posted an entry called MTU Vs MSS – Part One. At the time the plan was to follow it up with Part Two a short time later, however, here it comes over a year late :) I do apologise for that.

What prompted me to get back to writing Part Two was an e-mail from a reader who asked how I came to the conclusion that using the “ip tcp adjust-mss” command affects a SYN packet’s MSS regardless of whether it is applied to the inbound or outbound interface. The reader also asked if I have any links to documentation that describes this. The way in which I came to the conclusion was by labbing it up. Unfortunately though I do not have any documentation that backs me up.

This blog post will demonstrate the lab I used to come to the above conclusion.

Here is the topology that I used. I have marked each link with a letter to mark the points at which the proceeding packet captures were done. (Note that PC1 and PC2 are GNS3 routers with their icons changed).

topology

Continue reading

MTU Vs MSS – Part One

Have you ever seen the below configuration and wondered what these commands do? And why the MSS value always seems to be 40 bytes lower than the MTU?

interface Dialer1
 ip mtu 1440
 ip tcp adjust-mss 1400

Well, over the course of my next couple of blog entries, I plan to tell you all about them.

From my countless number of Google searches, the best information I could find was:

  • TCP MSS operates at Layer 4. It is 40 bytes lower than the IP MTU as it does not take headers in to consideration (20 byte IP and 20 byte TCP).
  • IP MTU operates at Layer 3. It is the maximum size a packet can be before it needs to be fragmented (or dropped if the df-bit is set).
  • Ethernet MTU (Layer 2) – 1500 bytes, excluding the header and trailer.

This is good information, but it doesn’t tell you why you need to set both the MSS and the MTU.

Continue reading

GNS3 Duplex Mismatch Messages

When Cisco devices are connected to one another and CDP is enabled (which it is by default), if one port is configured as full duplex but the other is configured as half duplex, the two devices will log “duplex mismatch” messages.

This can be very helpful in the real world. However, when using GNS3 these messages can appear for no reason at all, and they will constantly reappear, over and over again. Things get worse when you’ve got one router connected to two others, as was the case in the example below:

01:43:20.579: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/0 (not half duplex), with R1 FastEthernet0/0 (half duplex).
01:43:20.911: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/1 (not half duplex), with R2 FastEthernet0/0 (half duplex).
01:44:20.839: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/1 (not half duplex), with R2 FastEthernet0/0 (half duplex).
01:45:20.567: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/0 (not half duplex), with R1 FastEthernet0/0 (half duplex).
01:45:20.971: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/1 (not half duplex), with R2 FastEthernet0/0 (half duplex).
01:46:20.607: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/0 (not half duplex), with R1 FastEthernet0/0 (half duplex).
01:46:20.935: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/1 (not half duplex), with R2 FastEthernet0/0 (half duplex).
01:47:20.579: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/0 (not half duplex), with R1 FastEthernet0/0 (half duplex).
01:47:20.983: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/1 (not half duplex), with R2 FastEthernet0/0 (half duplex).

Continue reading

The “do” Command

Don’t you just hate it when your in the middle of implementing a new configuration but then decide you’d like to issue a “show” or “ping” command so you drop down to privileged EXEC mode? For example:

You could always use “Control” + “Z”, however, you still lose your current “spot” in your configuration hierarchy. In the example above, in order to get back to your original configuration mode, you’d need to issue the following commands:

If you need to do this several times, for example, to test ping connectivity, it can be quite time consuming. To save time you could employ the use of the “do ping” command, as per the example below:

Continue reading

Dangers of the EIGRP “Neighbor” Command

I have touched on EIGRP a few times before and here we are again.

In my EIGRP Route Advertising post I explained how EIGRP neighbor relationships can be created using the “network” command. In this post I will explain how they can be formed using the “neighbor” command and the dangers of using it as well.

To do this, I’ll be using the following topology:

topology
To get started, let’s create a “normal” EIGRP network on all of the routers using the “network” command.

Continue reading

EIGRP No Auto Summary Command, Part 1

In my previous post about EIGRP Route Advertisements I touched on the “no auto-summary” command, but did not delve in to the details of what this command actually does, so today I will.

In a nutshell (see Part 2 for a more detailed explanation), when using EIGRP the “auto-summary” command (which is enabled by default), what happens is that the router automatically creates summary routes for all of the networks which you specify in your EIGRP configuration (with the “network” command). And these aren’t good summary routes either – they are routes which are summarised to their classful boundary.

For example, if you issue the following command:

network 10.45.100.0 0.0.0.255

Instead of advertising the network as 10.45.100.0 /24, the router will advertise the entire 10.0.0.0 /8 network instead. To prevent this from happening (which just about everyone does these days), you must issue the following command:

no auto-summary

To see what type of “damage” can be caused by leaving the default “auto-summary” command enabled, please read on.

Here is the topology I’ll be using to demonstrate:

topology Continue reading