Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 545
  • Last Modified:

no static routes in sh ip route

I have a 2811 running (C2800NM-SPSERVICESK9-M), Version 12.4(10b), RELEASE SOFTWARE (fc3)
I'm using it for MPLS with BGP4.  I have a few static routes on the router and these statics are not getting advertised over BGP.  I also notice that when I do a sh ip route, these static routes are not listed.  Here are the relevant parts of the config and the sh ip routes and sh ip bgp.

interface FastEthernet0/0
 description LAN
 ip address 192.168.101.37 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0/0:1
 bandwidth 1536
 ip address x.x.x.66 255.255.255.252
 no ip redirects
 encapsulation ppp
 no peer neighbor-route
 no cdp enable
!
interface Serial0/0/1:1
 no ip address
 shutdown
!
router bgp 65004
 no synchronization
 bgp log-neighbor-changes
 network 192.168.100.0
 network 192.168.101.0
 network 192.168.102.0
 network 192.168.106.0
 network 192.168.121.0
 network 192.168.134.0
 neighbor x.x.x.65 remote-as 7018
 no auto-summary
!
ip route 0.0.0.0 0.0.0.0 192.168.101.251
ip route 192.168.100.0 255.255.255.0 192.168.100.5
ip route 192.168.101.0 255.255.255.0 192.168.101.251
ip route 192.168.102.0 255.255.255.0 192.168.102.251
ip route 192.168.106.0 255.255.255.0 192.168.106.251
ip route 192.168.121.0 255.255.255.0 192.168.121.251
ip route 192.168.134.0 255.255.255.0 192.168.134.1

hostname#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 192.168.101.251 to network 0.0.0.0

     10.0.0.0/16 is subnetted, 2 subnets
B       x.x.0.0 [20/0] via x.x.x.65, 00:31:37
B       x.x.0.0 [20/0] via x.x.x.65, 00:31:37
     x.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
B       x.x.x.56/30 [20/0] via x.x.x.65, 00:31:37
C       x.x.x.64/30 is directly connected, Serial0/0/0:1
B       x.x.x.0/24 [20/0] via x.x.x.65, 00:31:37
     x.x.0.0/29 is subnetted, 2 subnets
B       x.x.x.56 [20/0] via x.x.x.65, 00:31:37
B       x.x.x.152 [20/0] via x.x.x.65, 00:31:37
C    192.168.101.0/24 is directly connected, FastEthernet0/0
S*   0.0.0.0/0 [1/0] via 192.168.101.251

#sh ip bgp
BGP table version is 72, local router ID is 192.168.101.37
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> x.x.0.0/16                 x.x.x.65                            0 7018 65008 i
*> x.x.0.0/16                 x.x.x.65                            0 7018 65008 i
*> x.x.x.0/24                 x.x.x.65                            0 7018 2386 i
*> x.x.x.56/30               x.x.x.65              0             0 7018 ?
r> x.x.x.64/30               x.x.x.65              0             0 7018 ?
*> x.x.x.56/29               x.x.x.65                            0 7018 2386 i
*> x.x.x.152/29             x.x.x.65                            0 7018 2386 i
*> 192.168.101.0    0.0.0.0                  0         32768 i

Thanks ... appreciate the help.
0
slazarus227
Asked:
slazarus227
1 Solution
 
nodiscoCommented:
hi

the reason is that you don't have any source routes for the statics that are not working
e.g.

ip route 0.0.0.0 0.0.0.0 192.168.101.251 - This one works as 192.168.101.0/24 is a connected interface
ip route 192.168.100.0 255.255.255.0 192.168.100.5
ip route 192.168.101.0 255.255.255.0 192.168.101.251 - This is unnecessary as its a connected interface
ip route 192.168.102.0 255.255.255.0 192.168.102.251
ip route 192.168.106.0 255.255.255.0 192.168.106.251
ip route 192.168.121.0 255.255.255.0 192.168.121.251
ip route 192.168.134.0 255.255.255.0 192.168.134.1

The remainder will not work for this reason:
take 192.168.100.0 - you have it routed over 192.168.100.5.  You cannot route a subnet to itself - the reason your are putting in the route is to tell the router how to get to this network.  But the gateway address is in the network you are trying to route - and the router does not know how to get there.

thats why its not working.  But to fix it - we need to work out how these networks actually connect to your router in question.  Can you create a diagram showing how these networks interconnect (showing the private ips of the interfaces of the routers) these networks need to meet your router at some place - and that is what we use as the gateway for the static ip routes

hth
0
 
slazarus227Author Commented:
Duh!!! thanks... i believe i can take it from here.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now