Latest

CCNA: IP Routing

CCNA: IP Routing (Communication between two different networks)

In this article, we are going to talk about IP routing which is a process of communication between two different networks. This communication could be between two different VLANs in a switching environment. In one of the articles, we talk about layer 2 switching where switches build the MAC address table to decide where to forward frame based on the destination MAC address.

Here we’ll see how a layer 3 switch or a router transmit packets between different networks using the layer 3 destination address. IP layer assign an identifier or an address to all the endpoints on the network. This address is called the layer 3 address or IP address. This needs to be unique in a network to avoid any unpredictable behavior.

A process to analyze the layer 3 header and taking the forwarding decision based on the destination address is called the routing. Routing is performed by routers, firewalls, multi-layer switches and gateways. They not just forward the traffic based on the destination IP address but select the best path to reach to the destination.

It may look simple in words but in actual it required a deep thought process to understand the routing & switching under the hood. We’ll be assuming all the prerequisite are in place and traffic is through from Host A to Host B. Now let’s look at using an example of a network and communication between devices.

CCNA : IP Routing

Let’s say Host A (10.10.10.10) on Network 1 wants to communicate to Host B (10.10.30.10) on Network 3. To make this communication happen both routing and switching works together.

IP network must have unique IP address assigned to each device in the network and you can see all the devices are configured with unique IP address. This is the first prerequisite in IP routing.

Now Host A creates a packet with source IP (10.10.10.10 /24) and destination IP address (10.10.30.10 /24). This packet is handed over to NIC card to perform the lookup. It is confirmed that the Host B is not in the same network (10.10.10.0/24). Any host that is not part of the source device network can be reached through the default router or gateway. An administrator configures default gateway configuration manually while configuring the system on the LAN or it can be configured automatically using the DHCP protocol. From this configuration, NIC of a device know it’s default gateway to forward traffic to another network.

This packet is encapsulated in Ethernet frame and using the ARP entries on the Host A it forwards the frame to the default gateway on the network. Frame is received by Router 1 on Eth1 interface. Router extract the layer 3 packet and checks the destination IP address in the routing table. Routing table assist a layer 3 device where to forward the packet towards the destination using the next-hop information for each route entry. In our example, router sees destination address (10.10.30.10 /24) can be reached through (10.10.20.2) that is on Eth 2 it switches the packet to Eth2 of Router 1.

Now Eth 2 interface is connected to Eth 1 Interface of Router 2 and packet is extracted by router 2. Router 2 observes the destination address (10.10.30.10), it comes to know that this network address is locally configured on once of the interfaces (Eth 2). Router 2 handover the packet to Ethernet 2.

Now the packet is received on the destination network (10.10.30.0 /24) and the Host B must exist on this network. Router finds the MAC address of the Host B from the ARP table maintained in RAM and hand over traffic to Host B.

Routing table is build using two ways – either it is configured by administrator manually by typing the destination network, subnet mask and next-hop address. Or it is built automatically by using the different routing protocols such as OSPF, BGP, RIP etc. Hope you find this article informative!

 Continue Reading...