Gateway of last resort is referred to as the default gateway as well. What the router does, is say if I don't have a route in my routing table for the incoming packet then use this route (insert default route aka last resort).
You can easily spot this route out, but it will have all zeros for the ip and subnet fields (0.0.0.0 0.0.0.0). You can receive a default route from either a routing protocol (rip, eigrp, ospf, bgp, etc.) or from a static route entered by hand.
To add a static default route, you would type this:
ip route 0.0.0.0 0.0.0.0 xxx.xxx.xxx.xxx
Replace xxx.xxx.xxx.xxx with a smarter router (generally your isp).
To remove a static route, you would repeat the same command but with a "no" in front of it.
I'm a little confused now. So the Gateway of Last Resort will always be 0.0.0.0 0.0.0.0 x.x.x.x? Some of my routers don't have a GLR, is that ok? Sorry..I'm new to routing.
Yes... Gateway of last resort will always have a destination of 0.0.0.0 0.0.0.0. The router to handle that route, is the x.x.x.x.
You don't need a default gateway though. In fact it's pretty common not to have one. Without a default gateway (gateway of last resort), you router will drop the incoming packet that is for a destination that your router doesn't know.
Example:
Image your network consists of (3) subnets (192.168.1.0/24, 192.168.2.0/24, and 192.168.3.0/24). On your router, your routing table might look something like this...
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, Serial0
C 192.168.3.0/24 is directly connected, Serial1
Now with the router in this state, it knows how to get to hosts on those three subnets only. If your want to connect to a host not on these subnets (like a website or something), your router wouldn't know where to send the packet and would drop it.
To get around this, we use a default route so that your router doesn't have to know every public network in the world.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.