05-27-2011 12:56 PM - edited 03-06-2019 05:14 PM
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.
Solved! Go to Solution.
05-31-2011 06:45 AM
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.
05-27-2011 05:58 PM
Hi,
Can you explain and/or draw your design and what you are trying to accomplish?
Reza
05-28-2011 01:45 AM
Hi,
Post your sanitized config and the output of the previous commands.
Regards.
Alain.
05-31-2011 06:00 AM
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#
05-31-2011 06:01 AM
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.
05-30-2011 01:33 AM
Hi
Do "show ip route
If next hop is not in the routing table the static routes will not be there either.
/Mikael
05-31-2011 06:02 AM
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
05-31-2011 06:45 AM
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.
05-31-2011 06:47 AM
Yes, from router 2, I can ping 192.168.10.2 just fine.
05-31-2011 06:48 AM
OK. I updated my post. Give it another read.
05-31-2011 06:51 AM
Thank you. That was the problem. "ip routing" fixed the problem.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide