RIPv2: Unicast update using NAT

RIPv2 enabled router can send multicast (default) / unicast / broadcast updates to its neighbor. To configure RIP unicast, we can simply add a neighbor statement to point to the router in which RIP updates are to be sent and can use the passive-interface command to prevent RIP multicast/broadcast from being sent to that neighbor. But for some season if we are not allowed to use neighbor command we can still use NAT as a workaround to translate multicast update to unicast update.

Here, RIP is enabled between R1 and R2. R1 is advertising its loopback interface Lo0 – 190.1.0.1/24 to R2. Lets take a quick look at the initial configuration on these two routers:

Rack1R1#sh runn int lo0
Building configuration…

Current configuration : 84 bytes
!
interface Loopback0
ip address 190.1.0.1 255.255.255.0
ip rip advertise 10
end

Rack1R1#sh runn int fa0/0
Building configuration…

Current configuration : 116 bytes
!
interface FastEthernet0/0
ip address 160.1.12.1 255.255.255.0
ip rip advertise 10
duplex auto
speed auto
end

Rack1R1#sh runn | sec router
router rip
version 2
timers basic 10 60 60 80
passive-interface default
no passive-interface FastEthernet0/0
network 160.1.0.0
network 190.1.0.0
no auto-summary

Rack1R2#sh run int fa0/0
Building configuration…

Current configuration : 116 bytes
!
interface FastEthernet0/0
ip address 160.1.12.2 255.255.255.0
ip rip advertise 10
duplex auto
speed auto
end

Rack1R2#sh run | sec router
router rip
version 2
timers basic 10 60 60 80
passive-interface default
no passive-interface FastEthernet0/0
network 160.1.0.0
no auto-summary

Rack1R2#sh ip route rip
190.1.0.0/24 is subnetted, 1 subnets
R 190.1.0.0 [120/1] via 160.1.12.1, 00:00:08, FastEthernet0/0

From the above output, we can see that R2 is learning R1’s loopback subnet via RIP. A quick debug on R2 will reveal the multicast RIP update from R1:

Rack1R2#debug ip packet detail
…..
IP: s=160.1.12.1 (FastEthernet0/0), d=224.0.0.9, len 52, rcvd 2
UDP src=520, dst=520
IP: s=160.1.12.1 (FastEthernet0/0), d=224.0.0.9, len 52, rcvd 2
UDP src=520, dst=520
…..

Now using NAT we can configure R1 to send unicast update to R2 instead of multicast.

Rack1R1(config)#ip nat outside source static udp 160.1.12.2 520 224.0.0.9 520 extendable
Rack1R1(config)#int fa0/0
Rack1R1(config-if)#ip nat outside

Rack1R1#sh ip nat trans
Pro Inside global Inside local Outside local Outside global
udp — — 224.0.0.9:520 160.1.12.2:520
udp 160.1.12.1:520 160.1.12.1:520 224.0.0.9:520 160.1.12.2:520

On R2, we will run the same debug as before:

Rack1R2#debug ip packet detail
…..
IP: tableid=0, s=160.1.12.1 (FastEthernet0/0), d=160.1.12.2 (FastEthernet0/0), routed via RIB
IP: s=160.1.12.1 (FastEthernet0/0), d=160.1.12.2 (FastEthernet0/0), len 52, rcvd 3
UDP src=520, dst=520
IP: tableid=0, s=160.1.12.1 (FastEthernet0/0), d=160.1.12.2 (FastEthernet0/0), routed via RIB
IP: s=160.1.12.1 (FastEthernet0/0), d=160.1.12.2 (FastEthernet0/0), len 52, rcvd 3
UDP src=520, dst=520
…..

We can do the same configuration on R2 to accomplish the same result 🙂

 

Courtesy ::  http://blog.zakir.net/index.php?/archives/25-RIPv2-Unicast-update-using-NAT.html

www.pdf24.org    Send article as PDF   

RIP Basic Configuration

R1 (s1/0)  ———————- (s1/0)R2(s1/1)  ——————————- (s1/0)R3                         (lo 0 : X.X.X.X/24)

192.168.1.0/30                                                  192.128.1.0/30

 

R1

interface Loopback0
ip address 1.1.1.1 255.255.255.0
interface Serial1/0
ip address 192.168.1.1 255.255.255.252
router rip
version 2
network 1.0.0.0
network 192.168.1.0

 

R2
interface Loopback0
ip address 2.2.2.2 255.255.255.0
interface Serial1/0
ip address 192.168.1.2 255.255.255.252

interface Serial1/1
ip address 192.168.2.2 255.255.255.252

version 2
network 2.0.0.0
network 192.168.1.0
network 192.168.2.0

R3

interface Loopback0
ip address 3.3.3.3 255.255.255.0
interface Serial1/0
ip address 192.168.2.1 255.255.255.252
router rip
version 2
network 3.0.0.0
network 192.168.2.0

 

 

 

www.pdf24.org    Send article as PDF