05-17-2004 12:03 PM - edited 03-02-2019 03:45 PM
I am having trouble configuring gateway of last resort to connect to internet through interface e0/0.The 2612 running rip2 as my routing protocol, with IOS 12.0. I have tried command" ip default-route 0.0.0.0 0.0.0.0 11.11.11.11 which sets up a static route in the routing table. But the sh ip route command shows gateway not set.The same results happen with the ip-route 0.0.0.0 command.Any suggestions?
05-17-2004 12:44 PM
Hello,
try and configure the outgoing interface in your default static route, rather than the next hop:
ip route 0.0.0.0 0.0.0.0 ethernet0/0
Can you post the configuration of your router ?
Regards,
Georg
05-17-2004 05:33 PM
05-18-2004 02:09 PM
Thanks, but the static route with interface had same results. Would a tracert command from a pc help me to verify that next hop is correct? This seems to be the only verification I can think of.
05-17-2004 12:51 PM
what is the IP address of the e0/0 and are you connected to a router through e 0/0, and if so, what is its address?
If you do show ip interface brief, does e0/0 indicate up/up?
If you configure a static route for 0.0.0.0 0.0.0.0 a.b.c.d and if a.b.c.d is reachable (usually because it is on a connected subnet with your e 0/0) then the gateway of last resort should get set.
I have seen problems where people did a static route like this, but the next hop address (a.b.c.d) was not reachable (not a connected subnet address), or the outbound interface was in an up/down state. These problems will prevent the gateway of last resort being set.
I have also seen people get confused about the ip default-gateway command and try to use it to set the gateway of last resort. This command is for a different purpose and does not affect the gateway of last resort.
05-17-2004 03:58 PM
My e0/0 address is 10.10.100.254 (substituted numbers) and the next router address is 10.10.100.1. IP interface is Up/up. but cannot ping next hop through router of course.
The ip default-gateway command is for no ip routing on router. This command would show up in sh run.
Thanks
05-19-2004 05:17 AM
I looked at the configuration file that you posted and I noticed that the IP address on the interface is not quite what you had said. It is
interface Ethernet0/0
description connected to EthernetLAN
ip address 10.10.100.255 255.0.0.0
and I noticed that in the config there is no default route configured. There is only one static route which is ip route 10.10.100.255 255.255.255.254 10.10.100.1 and that destination does show up in the routing table that you show.
And it is a static route with your own interface as the destination!
What happened to the default route?
05-25-2004 07:48 AM
05-25-2004 08:32 AM
I have looked at the config that you posted. It might help analyze the situation better if you could also post the results of show ip route.
I know that Georg suggested making the static route point to the output interface and that is what you have done in this config. While there are situations where I like using the interface in the static route, I do not like it here. The main thing that I do not like is that the outbound interface for the default route is Ethernet. Part of the implication of that is that to send anything out the Ethernet interface you will need the MAC address of the next hop. Since the static route does not include the next hop it means that you will need to arp for the next hop. In practical terms that means that you will need to arp for every destination to which you will send traffic (and maintain an arp table for all those destinations). Think about this question: when you arp for some remote destination, will the next hop device answer the arp? If so then you can forward the traffic and if not then you are stuck.
I am not clear that it is the answer to the question of defining gateway of last resort, but I would like to see the results if you change the static default route to include the next hop address. And please include not only the config, but the results of show ip route.
05-27-2004 06:45 AM
When configuring ip route with 0.0.0.0 0.0.0.0 99.99.99.1, or ip route 192.168.0.0 255.255.255.0 99.99.99.1 I cannot even ping e0/0. Under debug ip packact detail I get an unroutable error. What you said about the arp makes sense why I get an encapsulation error when static route is set to e0/0.The static routes are not showing up in sh ip route now. Here is another show run, with sh ip route. Thanks for the help.
05-27-2004 07:02 AM
I believe that the file you sent contains an important clue. The show ip route only shows the connected route on Ethernet 0/1 and does not show Ethernet 0/0. I suspect there is a problem on that interface. Please post the results of show interface Ethernet 0/0. I believe we will see that the interface is not up/up. That would prevent it being in the routing table and would make the static route not work.
05-28-2004 05:54 AM
05-28-2004 07:16 AM
Thanks for sending the show interface. It does show that both interfaces are up now. But I do not know what has changed since the last time. Would you post a new file that includes: how it is configured now (especially the interfaces, and the static route configuration), the results of show ip route, the results when you ping the next hop address, the results of show arp.
I hope this information will help us to resolve the question about what is happening.
05-28-2004 09:36 AM
05-28-2004 11:36 AM
Based on the file you sent we can explain some things, but there are still several things about this situation that puzzle me.
First of all: what you see in the log coming from 172.16.50.237 is not a reply to your ping. It is to some multicast destination not in response to you.
Second: your attempt to ping never got out of your router. If you look at the debug results, every time it attempted to send a ping there is an error message indicating that it is "unroutable" and that means that the router dropped the packet and did not send it anywhere.
Third: I assume that you believe that the destination you are pinging 99.99.99.1 is in the subnet of Ethernet 0/0 but it is not. The subnet mask configured on Ethernet 0/0 is 255.255.255.248 which means that the subnet is only from .248 through .255. This can also be seen when you look at the results of show ip route and there is no route in the table for 99.99.99.0 or for 99.99.99.1
These are other observations:
- you define
ip default-gateway 99.99.99.1 but as we have just said that destination is not reachable based on the subnet mask on Ethernet 0.0.
- you have only one static route which is ip route 192.168.0.0 255.255.255.0 99.66.136.1 and I have no idea where the next hop address is supposed to be so this static route will not work.
- there is no static route for a default network but there is a default-network command and if that network were routable it should provide the gateway of last resort.
These are the things that puzzle me:
- the interface Ethernet 0/0 is obviously up since there is an entry in the arp table for it. But its network does not appear in the ip routing table. I am not sure why but suspect that it may be a result of doing NAT and using that address to supply the NAT address for outgoing packets. I would suggest that you remove NAT as a test or configure NAT with a pool of addresses and see if the routing behavior changes.
- you configure Ethernet 0/0 to be part of 99.99.99.248 subnet but the debug shows packets coming in on that interface with source address of 172.16.50.237 so there is obviously a mismatch of IP addresses for machines that are directly connected (or connected on a vlan through a switch)
Try changing or removing NAT (and perhaps change the subnet mask on Ethernet 0/0) and let us know what happens.
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