RIPv2 (Routing Information Protocol) – Basics Part 1

In order to have packets flowing through the modern network you need Physical Equipment (Layer 1), you need aggregated devices such as switches for quick transport (layer 2), and finally you need routers/layer 3 switches that can route traffic on an ip network (layer 3). Each hop or interface along a path needs to have a layer 3 ip address IPv4 or IPv6 in order for the packet to traverse the ip network. The way that all layer 3 devices make decisions to forward traffic is a routing table. The three ways a layer 3 devices learns and adds routes to its routing table are:

  1. Connected interfaces
  2. Static routes
  3. Dynamic routing protocols

Connected Interfaces

As I mentioned earlier, in order for a packet to traverse the layer 3 network you need ip addresses assigned to physical/virtual interfaces or in other words “connected interface.”:

Example#show running-config interface ethernet 0/0
interface Ethernet0/0
ip address 192.168.1.1 255.255.255.252
end

Looking at the routing table we can see that ip address 192.168.1.1 was added to the table after we applied the configuration on the physical interface and we now know that our layer 3 device knows how to route traffic to that ip on interface Ethernet 0/0:

Example#show ip route
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.1.0/30 is directly connected, Ethernet0/0
L        192.168.1.1/32 is directly connected, Ethernet0/0

Static Route

We can also create static routes that will allow our layer 3 devices to know where to send traffic for a specific subnet. Below you can see the static route I built in the router for this example:

Example#show run | i ip route
ip route 192.168.99.0 255.255.255.0 192.168.1.2

We can see that the routing table now knows about the 192.168.99.0/24 network:

Example#show ip route
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.1.0/30 is directly connected, Ethernet0/0
L        192.168.1.1/32 is directly connected, Ethernet0/0
S     192.168.99.0/24 [1/0] via 192.168.1.2

Dynamic Routing Protocol

Our third and last way of getting routes into the routing table is by using “Dynamic Routing Protocols.” A few examples of the most common dynamic routing protocols are:

  • RIP or RIPv2
  • IGRP or EIGRP
  • OSPF
  • IS-IS
  • BGP

Below I will use RIPv2 as an example to demonstrate how a dynamic routing protocol like RIPv2 allows us to advertise, learn, and route ip traffic. For this example I will need to use two routers (SEA & LA) which will be connected directly to each other. I will be advertising the following subnets 192.168.254.0/24 & 192.168.255.0/24 respectfully using RIPv2. I won’t get into too much detail for the RIP config, I will have a separate post for that later.

RIP Config for SEA:

SEA#show run | b rip
router rip
version 2
network 192.168.1.0
network 192.168.254.0

RIP Config for LA:

router rip
version 2
network 192.168.1.0
network 192.168.255.0

Routing table output for both routers:

SEA#show ip route
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.1.0/30 is directly connected, Ethernet0/0
L        192.168.1.1/32 is directly connected, Ethernet0/0
S     192.168.99.0/24 [1/0] via 192.168.1.2
192.168.254.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.254.0/24 is directly connected, Loopback1
L        192.168.254.1/32 is directly connected, Loopback1
R     192.168.255.0/24 [120/1] via 192.168.1.2, 00:03:04, Ethernet0/0
LA#show ip route
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.1.0/30 is directly connected, Ethernet0/1
L        192.168.1.2/32 is directly connected, Ethernet0/1
R     192.168.254.0/24 [120/1] via 192.168.1.1, 00:00:26, Ethernet0/1
192.168.255.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.255.0/24 is directly connected, Loopback1
L        192.168.255.1/32 is directly connected, Loopback1

As our networks grow dynamic routing protocols save us a lot of time and give us the ability to have greater ability to manage our ip networks. I will have a second post soon which will give more depth to RIPv2.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s