Static route pointing to an interface

From: Ernst Pelser (e.pelser@infosecureltd.com)
Date: Tue Apr 22 2008 - 08:36:29 ART


Hi All
Just been reading the following relating to static routes in the DocCD.

Static routes that point to an interface will be advertised via RIP, EIGRP,
and other dynamic routing
protocols, regardless of whether redistribute static router configuration
commands were specified for
those routing protocols. These static routes are advertised because static
routes that point to an interface
are considered in the routing table to be connected and hence lose their
static nature. However, if you
define a static route to an interface that is not one of the networks
defined in a network command, no
dynamic routing protocols will advertise the route unless a redistribute
static command is specified for
these protocols.

However, when I lab this up, I don't get the results as described above.

As a basic test I have R5 and R1 via S0/0. There are other devices in the
network but these should not affect this test. My config are below.

R5
router ospf 1
 router-id 150.1.5.5
 log-adjacency-changes
 passive-interface Loopback0
 network 0.0.0.0 255.255.255.255 area 0
 neighbor 155.1.0.1

ip route 160.1.1.0 255.255.255.0 Loopback0

interface Loopback0
 ip address 150.1.5.5 255.255.255.0
!
interface Serial0/0
 ip address 155.1.0.5 255.255.255.0
 encapsulation frame-relay
 frame-relay map ip 155.1.0.1 501
 frame-relay map ip 155.1.0.4 504
 no frame-relay inverse-arp

R1
router ospf 1
 router-id 155.1.1.1
 log-adjacency-changes
 passive-interface Loopback0
 network 155.1.0.1 0.0.0.0 area 0

interface Loopback0
 ip address 150.1.5.5 255.255.255.0

!interface Serial0/0
 ip address 155.1.0.5 255.255.255.0
 encapsulation frame-relay
 frame-relay map ip 155.1.0.1 501
 frame-relay map ip 155.1.0.4 504
 no frame-relay inverse-arp

R5 show commands
Gateway of last resort is not set

     155.1.0.0/24 is subnetted, 2 subnets
O IA 155.1.146.0 [110/65] via 155.1.0.1, 00:35:03, Serial0/0
C 155.1.0.0 is directly connected, Serial0/0
     160.1.0.0/24 is subnetted, 1 subnets
S 160.1.1.0 is directly connected, Loopback0
     150.1.0.0/16 is variably subnetted, 4 subnets, 2 masks
C 150.1.5.0/24 is directly connected, Loopback0
O IA 150.1.6.6/32 [110/66] via 155.1.0.1, 00:35:03, Serial0/0
O IA 150.1.4.4/32 [110/65] via 155.1.0.4, 00:35:03, Serial0/0
O IA 150.1.1.1/32 [110/65] via 155.1.0.1, 00:35:04, Serial0/0

R5#sh ip ospf nei

Neighbor ID Pri State Dead Time Address Interface
155.1.1.1 0 FULL/DROTHER 00:01:57 155.1.0.1 Serial0/0
150.1.4.4 0 FULL/DROTHER 00:01:36 155.1.0.4 Serial0/0

R1 show commands
Neighbor ID Pri State Dead Time Address Interface
150.1.5.5 1 FULL/DR 00:01:51 155.1.0.5 Serial0/0
150.1.4.4 1 FULL/DR 00:00:31 155.1.146.4
FastEthernet0/0
150.1.6.6 2 FULL/BDR 00:00:31 155.1.146.6
FastEthernet0/0

R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static
route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     155.1.0.0/24 is subnetted, 2 subnets
C 155.1.146.0 is directly connected, FastEthernet0/0
C 155.1.0.0 is directly connected, Serial0/0
     150.1.0.0/16 is variably subnetted, 4 subnets, 2 masks
C 150.1.1.0/24 is directly connected, Loopback0
O 150.1.6.6/32 [110/2] via 155.1.146.6, 00:37:19, FastEthernet0/0
O 150.1.5.5/32 [110/65] via 155.1.0.5, 00:12:39, Serial0/0
O 150.1.4.4/32 [110/2] via 155.1.146.4, 00:37:19, FastEthernet0/0
R1#
R1#sh ip ospf data
R1#sh ip ospf database

            OSPF Router with ID (155.1.1.1) (Process ID 1)

                Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count
150.1.4.4 150.1.4.4 1167 0x80000003 0x003F30 1
150.1.5.5 150.1.5.5 1114 0x80000003 0x004D6B 2
155.1.1.1 155.1.1.1 242 0x80000003 0x000D67 1

                Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
155.1.0.5 150.1.5.5 367 0x80000003 0x00B55B

                Summary Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
150.1.1.1 150.1.4.4 402 0x80000002 0x00A750
150.1.1.1 155.1.1.1 242 0x80000002 0x003DC5
150.1.4.4 150.1.4.4 1167 0x80000002 0x0004F7
150.1.4.4 155.1.1.1 242 0x80000002 0x0008F3
150.1.6.6 150.1.4.4 1167 0x80000002 0x003EAF
150.1.6.6 155.1.1.1 242 0x80000002 0x00DD1A
155.1.146.0 150.1.4.4 1169 0x80000004 0x002140
155.1.146.0 155.1.1.1 244 0x80000004 0x00C0AA

                Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count
150.1.4.4 150.1.4.4 1168 0x80000004 0x0029A6 2
150.1.6.6 150.1.6.6 1041 0x80000003 0x003E85 2
155.1.1.1 155.1.1.1 244 0x80000004 0x008A59 2

                Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum
155.1.146.4 150.1.4.4 403 0x80000003 0x009FDF

                Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum
150.1.5.5 150.1.4.4 1168 0x80000002 0x007148
150.1.5.5 155.1.1.1 244 0x80000002 0x006B4F
155.1.0.0 150.1.4.4 1168 0x80000004 0x008B32
155.1.0.0 155.1.1.1 244 0x80000002 0x008937
R1#
R1#

Could anyone explain why this route (160.1.1.0) is not being advertised or
is this a mistake in the documentation?

Thanks for your assistance.

Regards, Ernst

Pass the CCIE in six weeks, Guaranteed!
http://www.certscience.com/CCIE



This archive was generated by hypermail 2.1.4 : Thu May 01 2008 - 08:25:51 ART