Routing loop due to Static pointing to not directly connected IP

May 31, 2010 at 11:16 pm | Posted in Blogroll | Leave a comment

Static routes that point to an IP that is not locally connected are hidden bombs that can explode any time. This is because this sort of static routes do not show up in the routing table if the next hop is not routable or routed via default route. In order for the static route to be install in the routing table, the next hop need to be routed via a more specific route than the default route.

As a result, these sort of static routes (pointing to nowhere, or I call it “pointing to hell”) may bite you at a later stage, even when you make an unlikely related change.

This example show that the routing loop starts to kick in, once we add a summary route somewhere else.

PE1#    

interface Serial1/1
 description Connection to PE3
 ip address 13.0.0.1 255.255.255.0

ip route 123.123.123.0 255.255.255.0 3.3.3.1 name Static_to_Hell

router bgp 13
 network 123.123.123.0 mask 255.255.255.0
 redistribute static
 neighbor 13.0.0.3 remote-as 13
 neighbor 13.0.0.3 next-hop-self

PE3#
!
interface Serial1/2
 description Connection to PE1
 ip address 13.0.0.3 255.255.255.0
!
interface Serial1/3
 description Connection to iNET2
 ip address 23.0.0.3 255.255.255.0
!
interface Loopback333
 description Just to similate specific of aggregation route
 ip address 3.3.3.3 255.255.255.255

router bgp 13
 no synchronization
 bgp log-neighbor-changes
 network 3.3.3.3 mask 255.255.255.255
 aggregate-address 3.3.3.0 255.255.255.0
 redistribute connected
 neighbor 13.0.0.1 remote-as 13
 neighbor 13.0.0.1 next-hop-self
 neighbor 23.0.0.2 remote-as 2
 no auto-summary

iNET2#sh run int s1/1
Building configuration...

Current configuration : 86 bytes
!
interface Serial1/1
 description Connection to PE3
 ip address 23.0.0.2 255.255.255.0

router bgp 2
 no synchronization
 bgp log-neighbor-changes
 neighbor 23.0.0.3 remote-as 13
 neighbor 23.0.0.3 default-originate
 no auto-summary

PE1#sh ip route 123.123.123.0
Routing entry for 123.123.123.0/24
  Known via "static", distance 1, metric 0
  Redistributing via bgp 13
  Advertised by bgp 13
  Routing Descriptor Blocks:
  * 3.3.3.1
      Route metric is 0, traffic share count is 1

PE3#sh ip route 123.123.123.0 
Routing entry for 123.123.123.0/24
  Known via "bgp 13", distance 200, metric 0, type internal
  Last update from 13.0.0.1 00:01:32 ago
  Routing Descriptor Blocks:
  * 13.0.0.1, from 13.0.0.1, 00:01:32 ago
      Route metric is 0, traffic share count is 1
      AS Hops 0

iNET2#traceroute 123.123.123.123 ttl 1 10

Type escape sequence to abort.
Tracing the route to 123.123.123.123

  1 23.0.0.3 36 msec 12 msec 16 msec
  2 13.0.0.1 [AS 13] 20 msec 72 msec 12 msec
  3 13.0.0.3 [AS 13] 24 msec 44 msec 68 msec
  4 13.0.0.1 [AS 13] 48 msec 44 msec 64 msec
  5 13.0.0.3 [AS 13] 16 msec 48 msec 76 msec
  6 13.0.0.1 [AS 13] 96 msec 60 msec 52 msec
  7 13.0.0.3 [AS 13] 80 msec 140 msec 80 msec
  8 13.0.0.1 [AS 13] 76 msec 88 msec 72 msec
  9 13.0.0.3 [AS 13] 100 msec 76 msec 116 msec
 10 13.0.0.1 [AS 13] 32 msec 120 msec 128 msec

PE3#c
Enter configuration commands, one per line.  End with CNTL/Z.
PE3(config)#router bgp 13
PE3(config-router)# no aggregate-address 3.3.3.0 255.255.255.0
PE3(config-router)#end

PE1#sh run | in ip route
ip route 123.123.123.0 255.255.255.0 3.3.3.1 name Static_to_Hell

PE1#sh ip route 123.123.123.0
% Network not in table

NO MORE LOOPING

iNET2#traceroute 123.123.123.123 ttl 1 10

Type escape sequence to abort.
Tracing the route to 123.123.123.123

  1  *  *  *
  2  *  *  *
Advertisements

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

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

Create a free website or blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: