Solving routing loop problem due to poorly configured redistribution

The diagram

routing-loops

Routing loop when vIOS2 (R2) is trying to reach 1.1.1.1 in vIOS1 (R1)


R2#traceroute 1.1.1.1 numeric
Type escape sequence to abort.
Tracing the route to 1.1.1.1
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.23.3 4 msec 4 msec 5 msec
2 192.168.34.4 4 msec 8 msec 5 msec
3 192.168.24.2 2 msec 4 msec 3 msec
4 192.168.23.3 10 msec 6 msec 4 msec
5 192.168.34.4 7 msec 8 msec 6 msec
6 192.168.24.2 7 msec 6 msec 6 msec
7 192.168.23.3 9 msec 7 msec 7 msec
8 192.168.34.4 9 msec 8 msec 11 msec
9 192.168.24.2 8 msec 8 msec 10 msec
10 192.168.23.3 14 msec 9 msec 10 msec
11 192.168.34.4 12 msec 13 msec 12 msec
12 192.168.24.2 11 msec 9 msec 11 msec
13 192.168.23.3 12 msec 11 msec 14 msec
14 192.168.34.4 16 msec 13 msec 11 msec
15 192.168.24.2 10 msec 13 msec 11 msec
16 192.168.23.3 13 msec 14 msec 7 msec
17 192.168.34.4 16 msec 18 msec 10 msec
18 192.168.24.2 12 msec 14 msec 13 msec
19 192.168.23.3 14 msec 15 msec 12 msec
20 192.168.34.4 13 msec 18 msec 19 msec
21 192.168.24.2 19 msec 18 msec 18 msec
22 192.168.23.3 16 msec 16 msec 14 msec
23 192.168.34.4 17 msec 17 msec 16 msec
24 192.168.24.2 17 msec 20 msec 17 msec
25 192.168.23.3 20 msec 23 msec 19 msec
26 192.168.34.4 24 msec 24 msec 18 msec
27 192.168.24.2 20 msec 17 msec 18 msec
28 192.168.23.3 19 msec 23 msec 19 msec
29 192.168.34.4 21 msec 23 msec 23 msec
30 192.168.24.2 22 msec 29 msec 18 msec
R2#

Route tagging

The logic is not to redistribute prefix that is tagged, if the prefix is not tag; tag it.

R3(config)#route-map distribution-tag deny 1
R3(config-route-map)#match tag 666
R3(config-route-map)#exit
R3(config)#route-map distribution-tag permit 2
R3(config-route-map)#set tag 666
R3(config-route-map)#exit
R3(config)#router rip
R3(config-router)#redistribute ospf 1 metric 1 route-map distribution-tag
R3(config-router)#router ospf 1
R3(config-router)#redistribute rip subnets route-map distribution-tag
R3(config-router)#end


R4#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#route-map distribution-tag deny 1
R4(config-route-map)#match tag 666
R4(config-route-map)#exit
R4(config)#route-map distribution-tag permit 2
R4(config-route-map)#set tag 666
R4(config-route-map)#exit
R4(config)#router rip
R4(config-router)#redistribute ospf 1 metric 1 route-map distribution-tag
R4(config-router)#exit
R4(config)#router ospf 1
R4(config-router)#redistribute rip subnets route-map distribution-tag

Traceroute


R2#traceroute 1.1.1.1 numeric
Type escape sequence to abort.
Tracing the route to 1.1.1.1
VRF info: (vrf in name/id, vrf out name/id)
1 192.168.12.1 4 msec * 6 msec
R2#

Advertisements
This entry was posted in Route and tagged , , . Bookmark the permalink.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s