Cisco CCNA IP Routing

cisco-ccna-routing-1

In this chapter, we’re to discuss the IP routing process.

This is an important subject to understand since it pertains to all routers and configurations that use IP.

IP routing is the process of moving packets from one network to another network using routers. And by routers, we mean Cisco routers, of course!

 

Cisco CCNA What is Routing?

cisco-ccna-routing-2

Once you create an internetwork by connecting your WANs and LANs to a router, you then need to configure logical network addresses, such as IP addresses, to all hosts on the internetwork so that they can communicate across that internetwork.

The term routing is used for taking a packet from one device and sending it through the network to another device on a different network. Routers don’t care about hosts—they only care about networks and the best path to each network.

The logical network address of the destination host is used to get packets to a network through a routed network, then the hardware address of the host is used to deliver the packet from a router to the correct destination host.

 

Cisco CCNA Basic Path Selectioin

cisco-ccna-routing-3

The router will send the packet out Fastethernet 0/0.  The first thing a Cisco router looks at when trying to find a match in the routing table is the longest match.  In this case all subnets have a 24 bit mask.  The next thing is looks at is lowest Administrative Distance (AD).  AD is the believability of the route.  Different routing protocols as well as static and connected routes have different ADs.  In this case, all routes are connected routes so the AD is the same.

 

Cisco CCNA Longest Match Rule

cisco-ccna-routing-4

Ping to 10.1.1.9 would be sent out of E0

Ping to 10.4.4.4 would be sent out of E1

Ping to 10.1.4.7 would be sent out of E2

Ping to 209.41.3.7 would be sent out of E3

Don’t confuse this with Administrative Distance.  Administrative Distance is how the best routes are selected for the route table when multiple routing protocols have routes to the same destination.  In this case the route with the lowest Administrative Distance is placed in the routing table.

If there are multiple entries to the same network, the longest match rule always wins.  Look at the prefix.

 

Cisco CCNA Simple IP Routing

cisco-ccna-routing-5

The IP routing process is fairly simple and doesn’t change, regardless of the size of network you have.

We’ll describe step by step what happens when Host A wants to communicate with Host B on a different network.

In this example, a user on Host A pings Host B’s IP address.  Host A should have a default gateway configured and set to 172.16.2.1 (e0 interface of Router A).  If Host A does not have an ARP entry for 172.16.2.1 it will sent an ARP request to resolve the MAC address of Router A’s e0 interface and will receive an ARP reply from Route A.  Once that is complete, Host A sends an IP packet with a source IP of 172.16.2.2 and a destination IP of 172.16.1.2.  It will have a source MAC of Host A and a destination MAC of Router A.  When Router A receives the packet it strips off the ethernet header, decrements the TTL and looks up the destination IP in the routing table to determine where to forward the packet.  In this case the routing table has it out interface s0 to Router B.  The ethernet header is modified to have a source MAC of Router A and a destination MAC of Router B.  When Router B receives the packet it performs the same tasks as Router A did ultimately forwarding the packet to Host B.

The same process is performed in reverse for Host B to send IP packets to Host A.

 

Cisco CCNA show ip arp

cisco-ccna-routing-6

Answer on next slide

 

Cisco CCNA Answer to Previous Slide

cisco-ccna-routing-7

Router1 will strip off the source MAC address and replace it with the MAC address 0000.0c36.6965

Router1 will strip off the destination MAC address and replace it with the MAC address 0000.0c07.4320

Router1 will decrement the Time To Live (TTL)

Router1 will forward the data packet out interface F0/2

Remember, the source and destination MAC changes as each router hop along with the TTL being decremented but the source and destination IP address remain the same from source to destination.

 

Cisco CCNA How will the frames sent from Host A be Addressed when the frames reach Host B?

cisco-ccna-routing-8

Initial Frame sent by Host A

Source MAC = 00a0.3d3a.66bc

Destination MAC = 00c0.6ae6.eaef

Source IP = 192.168.23.2

Destination IP – 192.168.20.6

Final Frame received by Host B

Source MAC = 00c0.0c36.f892

Destination MAC = 00a0.3C22.1122

Source IP = 192.168.23.2

Destination IP – 192.168.20.6

Again, remember source and destination MAC addresses change at each router hop while source and destination IP addresses remain the same.

 

Cisco CCNA Host A is sending to Host B

cisco-ccna-routing-9

Since the ARP cache is fully populated on Router 1, it will forward the data out Fa0/2 to Host B.

The packet will include the following:

Source MAC = 0000.0c63.6965

Destination MAC = 0000.0c07.4320

Source IP = 192.168.20.5

Destination IP = 192.168.40.5