Apr 262012
 

ICMP redirect messages are used by routers to inform hosts in the broadcast domain that a better path exists to the destination. It happens when a router has to switch a packet out of the same interface it received it to reach the destination.

To understand this let’s look at the following topology

The host H1 access internet through its default gateway of 10.0.12.1, which is router R1. The host does not have any other routes other than the default route (gateway). If H1 wants to access the server at 10.0.23.3, it will send the packet to its gateway (10.0.12.1). Router R1 finds that to reach the destination it has to send the packet to R2. R2 is also in the same broadcast domain as the host.
Continue reading »

Apr 252012
 

Scenario:

If the DHCP server (Pri_DHCP) at Site A fails, the clients must get IP address from DHCP server (Bck_DHCP) at Site B. The backup DHCP must only be used in case the primary fails.

Logic: To solve this puzzle, there must be some kind of monitoring mechanism to figure out if the primary DHCP is available. For example we could use IP SLA monitor operation to check if the DHCP Service is working at the Primary DHCP Server.

A static route is attached to a tracking object which installs a route to null accordingly. The router R1 will not sent the DHCP requests to the ‘ip helper-address’ because of the lack of route to it. Now let’s try implementing it.

First we configure the IP SLA rule
Continue reading »

Apr 232012
 

When testing with QOS we need to send packets with different markings. There is a trick to find out the corresponding value for the extended ping command.

First create a class-map. Then make a matching with dscp.

R3(config)#class-map test
R3(config-cmap)#match dscp ?
     Differentiated services codepoint value
  af11     Match packets with AF11 dscp (001010)
  af12     Match packets with AF12 dscp (001100)
  af13     Match packets with AF13 dscp (001110)
  af21     Match packets with AF21 dscp (010010)
  af22     Match packets with AF22 dscp (010100)
  af23     Match packets with AF23 dscp (010110)
  af31     Match packets with AF31 dscp (011010)
  af32     Match packets with AF32 dscp (011100)
  af33     Match packets with AF33 dscp (011110)
  af41     Match packets with AF41 dscp (100010)
  af42     Match packets with AF42 dscp (100100)
  af43     Match packets with AF43 dscp (100110)
  cs1      Match packets with CS1(precedence 1) dscp (001000)
  cs2      Match packets with CS2(precedence 2) dscp (010000)
  cs3      Match packets with CS3(precedence 3) dscp (011000)
  cs4      Match packets with CS4(precedence 4) dscp (100000)
  cs5      Match packets with CS5(precedence 5) dscp (101000)
  cs6      Match packets with CS6(precedence 6) dscp (110000)
  cs7      Match packets with CS7(precedence 7) dscp (111000)
  default  Match packets with default dscp (000000)
  ef       Match packets with EF dscp (101110)

Continue reading »

Apr 232012
 

The Null0 interface is used to drop packets. Often routes to Null0 interfaces are generated as part of summarization in order to avoid routing loops.

Let’s assume the following situation:

R1 has a default route towards R2. R2 and R3 has a summary route for 10.0.0.0/22 towards R1. R3 has also a route to 10.0.12.0/24 pointing to R2.

R1 losses connectivity to the network 10.0.0.0/24. In this case if R2 receives a packet for the ip 10.0.0.1. The packet will be forwarded to R1 because of the summarized route. Then R1 will check for an entry in its RIB and that only match the default route to R2 because the interface is down.

So now the packet loops between the routers.

To simulate this the interface loopback 0 on R1 is shutdown. Then a trace route will show that the packet loops between R1 and R2.
Continue reading »