IP routing is the process of moving packets from one network to another network using routers. Once all routers know about all networks, a routed protocol can be used to send user data (packets) through the established enterprise. Routed protocols are assigned to an interface and determine the method of packet delivery. Examples of routed protocols are IP and IPv6. If a change occurs in the network, the dynamic routing protocols automatically inform all routers about the event. If static routing is used, the administrator is responsible for updating all changes by hand onto all routers. Typically, in a large network, a combination of both dynamic and static routing is used.

In above example 1, what happens when Host A sends data to HTTP Server.

  • The destination address of a frame, from Host A, will be the MAC address of the Fa0/0 interface of the Router A.
  • The destination address of a packet will be the IP address of the network interface card (NIC) of the HTTP server.
  • The destination port number in the segment header will have a value of 80.

In above example 2, How Host 4 communicate with Sales server?

  • In order to begin communicating with the Sales server, Host 4 sends out an ARP request. How will the devices exhibited in the topology respond to this request?
  • Host 4 has received an ARP reply. Host 4 will now build a packet, then place this packet in the frame. What information will be placed in the header of the packet that leaves Host 4 if Host 4 is going to communicate to the Sales server?
  • At last, the Lab A router has received the packet and will send it out Fa0/0 onto the LAN toward the server. What will the frame have in the header as the source and destination addresses?
  • Host 4 is displaying two web documents from the Sales server in two browser windows at the same time. How did the data find its way to the correct browser windows.

Configuring IP Routing

— System Configuration Dialog —

Would you like to enter the initial configuration dialog? [yes/no]: n

Press RETURN to get started!

Router>en

Router#config t

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

Router(config)#hostname Corp

Corp(config)#enable secret net

Corp(config)#interface vlan 1

Corp(config-if)#description Switch Card to Core Network

Corp(config-if)#ip address 10.1.1.1 255.255.255.0

Corp(config-if)#no shutdown

Corp(config-if)#int f1/0

Corp(config-if)#description Switch Port connection to WWW Server

Corp(config-if)#no shutdown

Corp(config-if)#int f1/1

Corp(config-if)#description Switch port connection to Email Server

Corp(config-if)#no shut

Corp(config-if)#int f1/2

Corp(config-if)#description Switch port connection to DNS Server

Corp(config-if)#no shut

Corp(config-if)#int s0/0/0

Corp(config-if)#description 1st Connection to R1

Corp(config-if)#ip address 10.1.2.1 255.255.255.0

Corp(config-if)#no shut

Corp(config-if)#int s0/0/1

Corp(config-if)#description 2nd Connection to R1

Corp(config-if)#ip address 10.1.3.1 255.255.255.0

Corp(config-if)#no shut

Corp(config-if)#int s0/1/0

Corp(config-if)#description Connection to R2

Corp(config-if)#ip address 10.1.4.1 255.255.255.0

Corp(config-if)#no shut

Corp(config-if)#int fa0/0

Corp(config-if)# description Connection to R3

Corp(config-if)# ip address 10.1.5.1 255.255.255.0

Corp(config-if)#no shut

Corp(config-if)#line con 0

Corp(config-line)#password console

Corp(config-line)#login

Corp(config-line)#logging synchronous

Corp(config-line)#exec-timeout 0 0

Corp(config-line)#line aux 0

Corp(config-line)#password aux

Corp(config-line)#login

Corp(config-line)#exit

Corp(config)#line vty 0 ?

<1-15> Last Line number

<cr>

Corp(config)#line vty 0 15

Corp(config-line)#password telnet

Corp(config-line)#login

Corp(config-line)#exit

Corp(config)#no ip domain lookup

Corp(config)#banner motd # This is my Corp 2811 ISR Router #

Corp(config-if)#^Z

Corp#copy running-config startup-config

Destination filename [startup-config]?[enter]

Building configuration…

[OK]

Corp#

R1#erase start

% Incomplete command.

R1#erase startup-config

Erasing the nvram filesystem will remove all configuration files!

Continue? [confirm][enter]

[OK]

Erase of nvram: complete

R1#reload

Proceed with reload? [confirm][enter]

[output cut]

%Error opening tftp://255.255.255.255/network-confg (Timed out)

%Error opening tftp://255.255.255.255/cisconet.cfg (Timed out)

— System Configuration Dialog —

Would you like to enter the initial configuration dialog? [yes/no]: n

I want to point out is that the output tells us the router is looking for a TFTP host to see if it can download a configuration. When that fails, it goes straight into setup mode.

Press RETURN to get started!

Router>en

Router#config t

Router(config)#hostname R1

R1(config)#enable secret net

R1(config)#int s0/0/0

R1(config-if)#ip address 10.1.2.2 255.255.255.0

R1(config-if)#Description 1st Connection to Corp Router

R1(config-if)#no shut

R1(config-if)#int s0/0/1

R1(config-if)#ip address 10.1.3.2 255.255.255.0

R1(config-if)#no shut

R1(config-if)#description 2nd connection to Corp Router

R1(config-if)#int f0/0

R1(config-if)#ip address 192.168.10.1 255.255.255.0

R1(config-if)#description Connection to Finance PC

R1(config-if)#no shut

R1(config-if)#int f0/1

R1(config-if)#ip address 192.168.20.1 255.255.255.0

R1(config-if)#description Connection to Marketing PC

R1(config-if)#no shut

R1(config-if)#line con 0

R1(config-line)#password console

R1(config-line)#login

R1(config-line)#logging synchronous

R1(config-line)#exec-timeout 0 0

R1(config-line)#line aux 0

R1(config-line)#password aux

R1(config-line)#login

R1(config-line)#exit

R1(config)#line vty 0 ?

<1-807> Last Line number

<cr>

R1(config)#line vty 0 807

R1(config-line)#password telnet

R1(config-line)#login

R1(config-line)#banner motd # This is my R1 Router #

R1(config)#no ip domain-lookup

R1(config)#exit

R1#copy run start

Destination filename [startup-config]?[enter]

Building configuration…

[OK]

R1#show ip route

10.0.0.0/24 is subnetted, 4 subnets

  • 1.3.0 is directly connected, Serial0/0/1
  • 1.2.0 is directly connected, Serial0/0/0
  • 168.20.0 is directly connected, FastEthernet0/1
  • 168.10.0 is directly connected, FastEthernet0/0

R1#10.1.2.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.2.1, timeout is 2 seconds:

!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

R1#

Corp#sh ip route

10.0.0.0/24 is subnetted, 4 subnets

10.1.3.0 is directly connected, Serial0/0/1

10.1.2.0 is directly connected, Serial0/0/0

192.168.20.0 is directly connected, FastEthernet0/1

192.168.10.0 is directly connected, FastEthernet0/0

R1#10.1.2.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.2.1, timeout is 2 seconds:

!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

R1#

Corp#sh ip route

[output cut]

10.0.0.0/24 is subnetted, 4 subnets

10.1.3.0 is directly connected, Serial0/0/1

10.1.2.0 is directly connected, Serial0/0/0

10.1.1.0 is directly connected, Vlan1

Remember that you don’t need to use the clock rate command in production. ISR routers will auto-detect a DCE-type cable and automatically configure the clock rate 2000000.

Router>en

Router#config t

Router(config)#hostname R2

R2(config)#enable secret net

R2(config)#int s0/0/0

R2(config-if)#ip address 10.1.4.2 255.255.255.0

R2(config-if)#description Connection to Corp Router

R2(config-if)#no shut

R2(config-if)#int f0/0

R2(config-if)#ip address 192.168.30.1 255.255.255.0

R2(config-if)#description Connection to Sales PC

R2(config-if)#no shut

R2(config-if)#int f0/1

R2(config-if)#ip address 192.168.40.1 255.255.255.0

R2(config-if)#description Connection to HR PC

R2(config-if)#no shut

R2(config-if)#line con 0

R2(config-line)#password console

R2(config-line)#login

R2(config-line)#logging sync

R2(config-line)#exec-timeout 0 0

R2(config-line)#line aux 0

R2(config-line)#password aux

R2(config-line)#login

R2(config-line)#exit

R2(config)#line vty 0 807

R2(config-line)#password telnet

R2(config-line)#login

R2(config-line)#exit

R2(config)#banner motd # This is my R2 Router #

R2(config)#no ip domain-lookup

R2(config)#^Z

R2#copy run start

Destination filename [startup-config]?[enter]

Building configuration…

[OK]

R2#sh ip route

10.0.0.0/24 is subnetted, 3 subnets

192.168.30.0 is directly connected, FastEthernet0/0

192.168.40.0 is directly connected, FastEthernet0/1

10.1.4.0 is directly connected, Serial0/0/0

Router>en

Router#config t

Router(config)#hostname R3

R3(config)#enable secret net

R3(config)#int f0/0

R3(config-if)#ip address 10.1.5.2 255.255.255.0

R3(config-if)#description Connection to Corp Router

R3(config-if)#no shut

R3(config-if)#int dot11radio0/0/0

R3(config-if)#ip address 172.16.10.1 255.255.255.0

R3(config-if)#description WLAN for Mobile User

R3(config-if)#no shut

R3(config-if)#ssid ADMIN

R3(config-if-ssid)#guest-mode

R3(config-if-ssid)#authentication open

R3(config-if-ssid)#infrastructure-ssid

R3(config-if-ssid)#exit

R3(config-line)#line con 0

R3(config-line)#password console

R3(config-line)#login

R3(config-line)#logging sync

R3(config-line)#exec-timeout 0 0

R3(config-line)#line aux 0

R3(config-line)#password aux

R3(config-line)#login

R3(config-line)#exit

R3(config)#line vty 0 807

R3(config-line)#password telnet

R3(config-line)#login

R3(config-line)#exit

R3(config)#banner motd # This is my R3 Router #

R3(config)#no ip domain-lookup

R3(config)#^Z

R3#copy run start

Destination filename [startup-config]?[enter]

Building configuration…

[OK]

R3(config-if)#int dot11radio0/0/0

R3(config-if)#ip address 172.16.10.1 255.255.255.0

R3(config-if)# description WLAN for Mobile User

R3(config-if)#no shut

R3(config-if)#ssid ADMIN

R3(config-if-ssid)#guest-mode

R3(config-if-ssid)#authentication open

R3(config-if-ssid)#infrastructure-ssid

Configuring DHCP on our Router

To create the DHCP server on a router, you just create the pool name, add the network/subnet and the default gateway, and exclude any addresses you don’t want handed out (like the default gateway address), and you’d usually add a DNS server as well.

R3#config t

R3(config)#ip dhcp pool Admin

R3(dhcp-config)#network 172.16.10.0 255.255.255.0

R3(dhcp-config)#default-router 172.16.10.1

R3(dhcp-config)#ip name-server 172.16.10.4

R3(dhcp-config)#exit

R3(config)#ip dhcp excluded-address 172.16.10.1 172.16.10.10

R3(config)#

R3#sh ip dhcp binding

IP address        Client-ID/Hardware address

172.16.10.11    0001.96AB.8538

PC>ipconfig /all

Configuring IP Routing in Our Network

Static Routing – Static routing has the following benefits:

  • There is no overhead on the router CPU, which means you could possibly buy a cheaper router than you would use if you were using dynamic routing.
  • There is no bandwidth usage between routers, which means you could possibly save money on WAN links.
  • It adds security because the administrator can choose to allow routing access to certain networks only.

Static routing has the following disadvantages:

  • The administrator must really understand the internetwork and how each router is connected in order to configure routes correctly.
  • If a network is added to the internetwork, the administrator has to add a route to it on all routers—by hand.
  • It’s not feasible in large networks because maintaining it would be a full-time job in itself.

ip route [destination_network] [mask] [next-hop_address or exitinterface] [administrative_distance]

AS (Autonomous system) no.ISP must have officially registered AS no. by IANA (internet assigned no. authority). It is 16-bit no. (65536 no.) ASN 0 (identify non-routed network) and ASN 65535 are reserved. ASN 64496-64511 reserved for use in documentation and sample code. ASN 64512-65534 for private purpose.

Metric –Lower cost means faster (shortest path). E.g. BGP uses weight, local preference aggregate, AS-path length, origin type for cost.

Classfull and Classless routing protocol

 

Feature Classless Classfull
1.      Support VLSM Y N
2.      Sends subnet mask in routing updates. Y N
3.      Supports manual route summarization Y N

Distance vector vs link state routing protocol

Distance vector routing protocol Link state routing protocol
1.      Entire routing table is sent as an update. 1.      Updates are incremental & Entire routing table is not sent as an update.
2.      Send periodic (every 30 or 90 s) update 2.      Update are triggered, not periodic.
3.      Update are broadcasted (not in RIP v2) so more BW used. 3.   Updates are multicasted.
4.      Updates are sent to directly connected neighbour.       4.   Updates are sent to entire network.
5.      Routers don’t have visibility of entire network.       5.   Routers have visibility of entire network of that area only.
6.      Prone to routing loops.       6.    No routing loops.
7.      No. of host is cost.       7.    BW is the cost.

Routing protocol – RIP v1 & RIP v2. OSPF, IS-IS. Cisco’s routing protocol- IGRP, EIGRP, BGP.

Routed protocol – IP, Novell IPx, DEC net, AppleTalk, Banyan Vines, Xerox network system.

RIP
  • RIP uses UDP port no. 520 for route updates.
  • Metric is hop count. Max. hop 15. Hop 16 means not reached on network.
  • It is open standard so called IP RIP.
  • Periodic 30s updates by default & send full information to neighbour RIP.
  • RIP takes some times to convergence, but it uses less CPU Power.
  • It is distance vector routing protocol.

Difference between RIP v1 & RIP v2

RIP v1 RIP v2
1.      Class full routing and VLSM not supported. 1.      Classless routing and VLSM supported.
2.      Update message is sent to local subnet broadcast address 255.255.255.0 So congestion problem came.       2.    Update message is sent to multicast address 224.0.0.9
3.      No authentication support.       3.   Support plain text & MD5 authentication.
4.      No route tags added.       4.   Route tags added.

RIP ng – It is extension of RIP v2. It supports IPv6. It sends updates on UDP port no 521. Multicast group is FF02::9.

A(config)# router rip

A(config-router)# version 2

A# show ip protocols

Sending          Receiving

2                       2

2                       2

RIP timer

  • Update timer (30s)
  • Invalid timer (30*6=180s) – Router B wait for 180s, if update from router A not came then Router B considered invalid or non-reachable.
  • Hold down timer (180s) – It is used for prevent loops. After invalid timer, no router will receive router A information.
  • Flush timer (180+60=240s) – After 240 all RIP speaking router removes entry of router A.
  • A# show ip protocolsRouting updates 30sInvalid update 180sHold down update 180s

    Flush update 240s.

    A(config)# router rip

    A(config-router)# timer basic 40 100 100 150

Routing loops prevention

  • Route poisoning
  • Split horizon
  • Triggered update
  • Poison reverse
  • Hold down timer

EIGRP

  • Cisco proprietary.
  • Hybrid routing protocol.
  • Metric – By default BW, delay, load reliability
  • Here used DUAL (diffusing-update algorithm) formula.
  • Packet delivered is handled using – RTP (Reliable transport protocol) and Reliable multicast address 224.0.0.10
  • Classless routing and VLSM support.

Advantage

  • Simplicity (command like RIP)
  • Keep backup route (but OSPF don’t keep backup route)
  • Fast convergence.
  • Route summarization (In OSPF summarization occur on ABR router).
  • Load balancing – unequal cost.
  • Support multiple routed protocols (IP, IPx, Novel, AppleTalk).

Best route calculation

K1 – BW           K2 – Delay        K3 – Load       K4 – reliability

Metric = ((107/least BW in kbps) + Cumulative delay) *256

OSPF
  • It is link state routing protocol.
  • It is open standard so very popular.
  • Use IP protocol 89.
  • Link state routing algorithm or Dijkstra’algorithm.
  • Support VLSM/classless.
  • Metric is cost (based on BW).
  • Update multicast on 224.0.0.5 (all SPF router) and 224.0.0.6 (all designated router).

Router ID – Unique identifier for each network. It is like IP address. So default router id = Maximum IP address of router’s interfaces.

LSA

  • Router send LSA to each other.
  • LSA held in link state database (LSDB) memory.
  • It is data structure name. It holds topology information.
  • In LSA, router ID, sequence no. and age (in second).
  • Types of LSA – Router LSA, network LSA, Area summary LSA, ASBR summary LSA, external LSA type 1, external LSA type 2.