Monthly Archives: November 2012

IP Routing Process – A Short and Sweet Guide

So , I’ve always wondered what exactly is IP Routing all about? I mean what exactly does each layer do? So I sneaked around , saw the bits move , saw the payload put inside a container with some buddy bits , who were in turn put inside another container with some other buddies upto 4 layers.

This is the INCEPTION of Networking.

Yo Dawg , I heard you like INCEPTION.

Anway , so this is how it’s done.

 

Topology

Configurations

PC0

Static IP Set : 172.16.10.2 | 255.255.255.0 . Default Gateway : 172.16.10.1

 

PC1

Static IP Set : 172.16.20.2 | 255.255.255.0 . Default Gateway : 172.16.20.1

 

Router Config

Router>en

Router#config t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#int fa0/0

Router(config-if)#ip address 172.16.10.1 255.255.255.0

Router(config-if)#no shutdown

 

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

 

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

 

Router(config-if)#exit

Router(config)#int fa1/0

Router(config-if)#ip address 172.16.20.1 255.255.255.0

Router(config-if)#no shutdown

 

%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

 

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up

 

—————————————————————–

  • ICMP creates an echo request payload which is alphabet in data field.
  • ICMP hands the payload to IP(Internet Protocol) , which creates a Packet.
  • After the packet is created , IP determines whether the destination is local or remote.
  • If the network is external (remote)  , the Widows Registry is parsed to find the configured default gateway.
  • PC0 (172.16.10.2) is configured on 172.16.10.0 network. PC1(172.16.20.2) is configured on 172.16.20.0 network.
    • if(Packet = free)
    •    { hand packet to the Data Link Layer for framing : ARP has worked}
    • if(Packet != free)
      { ARP Broadcast is sent to all local machines to search for hardware address of 172.16.10.1}
    • if(Packet != free)
    •    { ARP Broadcast is sent to all local machines to search for hardware address of 172.16.10.1}

Address Resolution Protocol (ARP) cache of the host is check to see if the IP Address of the default gateway is resolved to MAC Address.

  • Once the data link layer has Packet and Destination Hardware access , LAN Driver is used to provide LAN Media Access (eg Ethernet). A Frame is generated.
  • Once  completed , the frame is handed down to the Physical Layer to be put on Physical Medium (Cable , Wireless etc)
  • Every device on the Collision Domain gets the bits . If CRC matches , we got the match. If CRC does not match, frame is discarded.
  • Packet is pulled from the frame and handed over to the protocol specified in the ETHER type field.
  • IP gets the packet , checks IP Destination address . Packet does not have the address configured on router , the router looks for Destination address on the routing table.
    • Routing Protocol is “rip”
  • Routing table must have 172.16.20.0 or packet will be discarded and an unreachable host (ICMP) will be issued.
    • Sending updates every 30 seconds, next due in 17 seconds
    • Invalid after 180 seconds, hold down 180, flushed after 240
    • Redistributing: rip
    • Default version control: send version 1, receive any version
    •   Interface             Send  Recv  Triggered RIP  Key-chain
    •   FastEthernet0/0       1     2 1
    •   FastEthernet1/0       1     2 1
    • Automatic network summarization is in effect
    • Maximum path: 4
    • Routing for Networks:
    •                 172.16.0.0
    • Passive Interface(s):
    • Routing Information Sources:
    •                 Gateway         Distance      Last Update
    • Distance: (default is 120)
  • If entry is found , packet is switched to exit interface.
  • Ethernet 1 buffer has the packet . It now checks for PC1 MAC Address using ARP.
  • The data link layer creates a frame with the destination source (MAC) + FCS + Ether type field. This is sent to PC2.
  • PC2 checks for CRC Verification . PASSED! (Surprise Surprise!) . Packet is sent to the network layer.
  • Network layer IP Checks destination IP Match  – Device whom the payload should be give to.
  • Payload is handed to ICMP. It now understands this is an echo request.

This is how the entire routing process takes place.

ICMP