cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10604
Views
0
Helpful
4
Replies

IP route 0.0.0.0 and show ip route results

Little Bunny
Level 1
Level 1

Hello

 

 

I have a 3750 L3 switch with the following config:

 

ip route 0.0.0.0 0.0.0.0 172.16.30.1

ip default-gateway 172.16.30.1

 

I get the following when looking for a route to a network that isn't implicitly configured with a static route:

 

router#sh ip route 172.31.0.0
% Network not in table

 

Even though it doesn't show up, should it still be matching against the default route / gateway and be forwarded to 172.16.30.1? If I do a traceroute to something in 172.31.0.0 it doesn't seem to be leaving the 3750:

 

router#traceroute 172.31.1.1

Type escape sequence to abort.
Tracing the route to 172.31.1.1

1 * * *
2 *

 

Thanks

LB

1 Accepted Solution

Accepted Solutions

brselzer
Cisco Employee
Cisco Employee

Hello,

 

Even if you have a default route, the output of "show ip route [route]" will still return % Network not in table. You will have to run show ip route and see if you have something on the top that says "Gateway of last resort"

 

If you want to see what the next hop is for traffic that hits the default route. Do "show ip cef 172.31.0.0" instead. 

 

This is expected behavior. 

-Bradley Selzer
CCIE# 60833

View solution in original post

4 Replies 4

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

If the switch is used as layer-3 than you don't need "ip default-gateway 172.16.30.1"

Just make sure that "ip routing" is enabled and negate the command above "no ip default-gateway 172.16.30.1" and test again. Also, make sure that "ip route 0.0.0.0 0.0.0.0 172.16.30.1"is in the running config before testing

HTH

LB

 

First let me make a comment about the configuration of default-gateway. Reza's point is that if the switch is L3 capable and if ip routing is enabled then the configuration of default-gateway is not needed. I agree that it is not needed but do not necessarily agree that it should be removed. If there would be some circumstance where layer 3 routing was disabled then the switch could use the configured default-gateway to communicate with remote networks. It is sort of like having insurance - you do not normally use that resource, but in some problem situations you are glad to have it.

 

Then let me comment about this

sh ip route 172.31.0.0

If that network is not mentioned in the routing table then it is not in the routing table. But that does not mean that you can not forward traffic to that network using the default route/gateway of last resort. To help us figure out what is going on could you post the output of show ip route from that switch?

 

HTH

 

Rick

 

HTH

Rick

brselzer
Cisco Employee
Cisco Employee

Hello,

 

Even if you have a default route, the output of "show ip route [route]" will still return % Network not in table. You will have to run show ip route and see if you have something on the top that says "Gateway of last resort"

 

If you want to see what the next hop is for traffic that hits the default route. Do "show ip cef 172.31.0.0" instead. 

 

This is expected behavior. 

-Bradley Selzer
CCIE# 60833

Thanks all for your help. The output from "sh ip cef 172.31.0.0" proves that it is forwarding to the next hop correctly:

 

router#sh ip cef 172.31.0.0
0.0.0.0/0
nexthop 172.16.30.1 Vlan30

 

Also just for info the output of "sh ip route" shows the correct gateway:

 

Gateway of last resort is 172.16.30.1 to network 0.0.0.0

 

Thanks again

LB

Review Cisco Networking for a $25 gift card