Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Gateway of Last Resort

Status
Not open for further replies.

nvhusker

IS-IT--Management
Feb 7, 2006
14
0
0
US
What are the commands to set a Gateway of Last Resort on our Cisco 2811 router? We are not sure how this is accomplished. Thank you. We want to set the gateway of last resort to 167.154.191.1. Thanks.

nvhusker
 
The gateway of last resort is simply the most preferred default route known by the router. The easiest way to define a gateway of last resort is to configure a static route:

ip route 0.0.0.0 0.0.0.0 a.b.c.d

where a.b.c.d is the IP address of your gateway of last resort.

HTH,
John
 
We have that ip route set exactly the way you say, but when we issue the show ip route command, it still says that the gateway of last resort is not set. What are we missing? Thanks.
 
Can you post the static route exactly as you have it configured? What other routing config is on the router that might be relevant? Are you running a routing protocol? Can you ping the address configured in your static route?
 
You Can add line in config

ip default-gateway A.B.C.D

same A.B.C.D
where is in
ip route 0.0.0.0 0.0.0.0 A.B.C.D
but this is the same.

and A.B.C.D is the IP address of second side Your WAN Interface
IP 167.154.191.1 is logical
if your WAN (eg. Serial0) in Cisco have IP 167.154.191.2
and mask 255.255.255.252

And You must try by ping 167.154.191.1
Can You go from this router outside???

Best Regards
Jerzy


 
That is incorrect. The command "ip default-gateway" is only relevant if you have disabled IP routing and the router is acting as a host on a bridged LAN. That is certainly not the case here.
 
Hi jneiberger

You have right. have distance 0
This line is out
line ip route 0.0.0.0 ... is ok have distance 1




 
Hey all, thanks for your replies but we figured out why it wasn't showing up when we did a show run command. We were configuring this router before connecting to any other interfaces that were up. A gateway of last resort apparently will not show up until it has active connections. Thanks for all your replies.
 
You're almost right. For any route to be valid, the next hop must be reachable. It sounds like you had a static route configured but the next hop wasn't reachable because you didn't have any links up. Having a static route pointing to a link that isn't available is like giving someone directions and telling them to take a road that doesn't exist. ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top