cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6781
Views
9
Helpful
10
Replies

How to set static routes to active

vtran
Level 1
Level 1

Hi all.  I have a couple of 1921 routers.  I've set up static routes on them using the "ip route <dest> <mask> <next hop>" command.  When I do "show ip route", nothing shows up.  However, when I do "show ip static route", they are there, but each of the route has a [N] next to it, indicating that the route is non-active.  How do I make them change to active?

Thanks.

P.S. I am using Cisco IOS 15.1(2)T.

1 Accepted Solution

Accepted Solutions

mlund was right. Your router doesn't know how to get to its next hop i.e. the next hop of all your static routes 192.168.10.2.

So is your int g0/1 up?

Can you ping 192.168.10.2?

192.168.10.2 should show up in your routing table as connected.

Also if you turn on routing....

(conf t)#ip routing

In your config it is still turned off! That should solve it.

View solution in original post

10 Replies 10

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

Can you explain and/or draw your design and what you are trying to accomplish?

Reza

Hi,

Post your sanitized config and the output of the previous commands.

Regards.

Alain.

Don't forget to rate helpful posts.

show run
Building configuration...

Current configuration : 1391 bytes
!
! Last configuration change at 19:50:39 UTC Fri May 27 2011
!
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname cisco-r2
!
boot-start-marker
boot system flash:c1900-universalk9-mz.SPA.151-2.T1.bin
boot-end-marker
!
!
enable secret 5
enable password
!
no aaa new-model
!
no ipv6 cef
ip source-route
no ip routing
no ip cef
!
!
!
!
!
multilink bundle-name authenticated
!
crypto pki token default removal timeout 0
!
!
license udi pid
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0
no ip route-cache
duplex auto
speed auto
no mop enabled
!
interface GigabitEthernet0/1
ip address 192.168.10.1 255.255.255.0
no ip route-cache
duplex auto
speed auto
!
interface GigabitEthernet0/0/0
!
interface GigabitEthernet0/0/1
!
interface GigabitEthernet0/0/2
!
interface GigabitEthernet0/0/3
!
interface Vlan1
no ip address
no ip route-cache
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route 10.200.30.0 255.255.255.0 192.168.10.2
ip route 192.168.2.0 255.255.255.0 192.168.10.2
ip route 192.168.3.0 255.255.255.0 192.168.10.2
!
!
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
password
login
transport input all
!
scheduler allocate 20000 1000
end

cisco-r2#show ip route
Default gateway is not set

Host               Gateway           Last Use    Total Uses  Interface
ICMP redirect cache is empty
cisco-r2#show ip static route
Codes: M - Manual static, A - AAA download, N - IP NAT, D - DHCP,
       G - GPRS, V - Crypto VPN, C - CASA, P - Channel interface processor,
       B - BootP, S - Service selection gateway
       DN - Default Network, T - Tracking object
       L - TL1, E - OER, I - iEdge
       D1 - Dot1x Vlan Network, K - MWAM Route
       PP - PPP default route, MR - MRIPv6, SS - SSLVPN
       H - IPe Host, ID - IPe Domain Broadcast
       U - User GPRS, TE - MPLS Traffic-eng
Codes in []: A - active, N - non-active, B - BFD-tracked, D - Not Tracked, P - permanent

Static local RIB for default

M  10.200.30.0/24 [1/0] via 192.168.10.2 [N]
M  192.168.2.0/24 [1/0] via 192.168.10.2 [N]
M  192.168.3.0/24 [1/0] via 192.168.10.2 [N]
cisco-r2#

On router 2, I have interface 0/0 set to 192.168.1.1 and interface 0/1 set to 192.168.10.1.

On router 1, I have interface 0/0 set to 192.168.2.1 and interface 0/1 set to 192.168.10.2.

The  two routers are connected on their 0/1 interfaces.  On their 0/0  interfaces, I attach a laptop to each router, setting their IP addresses  to the same subnet as the router.  I've set up a static route on router  2 to tell it to send traffic destined for 192.168.2.x to go to next hop  192.168.10.2.  I've also set up a static route on router 2 to tell it to send traffic destined for 192.168.1.x to go to next hop 192.168.10.1.

Each  PC can ping the router that is is connected to, but not the other   router.  From the router, I can ping the other router just fine, but  not  the PC connected to the other router.  I want the two laptops (most  likely two small LANs later) to be able to communicate to each other.

mlund
Level 7
Level 7

Hi

Do "show ip route " to see if next hop is available.

If next hop is not in the routing table the static routes will not be there either.

/Mikael

From router 2:

cisco-r2#show ip route 192.168.10.2
Default gateway is not set

Host               Gateway           Last Use    Total Uses  Interface
ICMP redirect cache is empty

mlund was right. Your router doesn't know how to get to its next hop i.e. the next hop of all your static routes 192.168.10.2.

So is your int g0/1 up?

Can you ping 192.168.10.2?

192.168.10.2 should show up in your routing table as connected.

Also if you turn on routing....

(conf t)#ip routing

In your config it is still turned off! That should solve it.

Yes, from router 2, I can ping 192.168.10.2 just fine.

OK. I updated my post. Give it another read.

Thank you.  That was the problem.  "ip routing" fixed the problem.

Review Cisco Networking for a $25 gift card