Questions about gateway of last resort

NawaketteNawakette Member Posts: 33 ■■□□□□□□□□
Hello !

Suppose we have two routers (Router1 and Router2) with the following configurations :

Router1 : FastEthernet0 : 172.16.0.1 / 255.255.0.0
Serial0 : 172.17.0.1 / 255.255.0.0

Router2 : FastEthernet0 : 172.18.0.1 / 255.255.0.0
Serial0 : 172.17.0.2 / 255.255.0.0

We have defined a default route on both of them :

ip route 0.0.0.0 0.0.0.0 172.17.0.2 on Router1

ip route 0.0.0.0 0.0.0.0 172.17.0.1 on Router2

At this stage, we have a gateway of last resort on both routers.

If we remove the RIP protocol on both router, we can still ping from one router to the FastEthernet0's interface of the other one.

Is it thanks to default routes (I suppose) ?

If now we delete the default route on Router1, we can still ping from one router to the FastEthernet0's interface of the other one.

For which reason ?? Is it because the routes are still in the routing tables ???

If now we delete de default route on Router2 also, we configure IGRP and we add a default route in Router2 by using ip default-network 172.17.0.0 command, what will happen in the routing table ?

A new default route will be added ???
How is it managed ?


Thanks

Comments

  • Danman32Danman32 Member Posts: 1,243
    If you want to see what the route table looks like, simply display it.
    Show ip route

    To answer the first part of your question, since both routers had default routes which pointed to the other router, then a router would forward a packet destined for a network not directly attached to the other router. You could ping a wacko IP and the router would forward it to the other.

    However, without seeing the resulting routing table, I can't say why the ping still works to the ethernet IPs when you removed the default routes. I could understand if you were pinging the IP of the other router's serial port, since the network is directly attached to the router doing the pinging, so it would arp and find the MAC of the destination.
  • pannupanditpannupandit Member Posts: 92 ■■□□□□□□□□
    there is no issue of default routes ...in this case. As these are directly connected networks to the router (fast ethernetinterfaces), so u can ping it.But u can only ping to ip address of fastethernet interface.

    Like if there are 3 routers. router1, router2,router3

    router 2 is connected to router3 by serial interfaces and router2 is connected to router1 by ethernet interfaces.

    Router1 : Fasteethernet0: 172.16.0.2 /255.255.0.0

    Router2 : FastEthernet0 : 172.16.0.1 / 255.255.0.0
    Serial0 : 172.17.0.1 / 255.255.0.0

    Router3 : FastEthernet0 : 172.18.0.1 / 255.255.0.0
    Serial0 : 172.17.0.2 / 255.255.0.0

    now in this configuration ..without any default routes defined....router3 can ping the router2 fastethernet interface but it cant ping the fastetehrnet of router1.see ping always get successful when there is a reply to ping request packet by ping reaply packet. now for router3 and router2 they can ping any interface of each other because both have routes defined for each other's network. As router2 is directly connected to router3 from serial interface.. it will obviously have route defined for that network and will easyly send reply to ping come from router3. So in this way ping works between router3 and router2.however when router3 will send a ping to fastethernet address of router1.ping request packet will reach there(as router2 is directly connected to router1 and ping willreach there) but router1 wont be able to send a reply to that request(ip of router3's interface) as it wont have any route defined for ip 172.17.0.2 which is the ip of router3.so ping will fails.
    this ping will only work if there is a defaul route defined or static route defined or any routing protocol is configured.

    thanks[/img]
  • pannupanditpannupandit Member Posts: 92 ■■□□□□□□□□
    however this configuration dont work for simulator labs(boson) but will work in real router scenario.
  • NawaketteNawakette Member Posts: 33 ■■□□□□□□□□
    Thanks to both of you for the clear answers :P
    Danman32 wrote:
    You could ping a wacko IP and the router would forward it to the other.

    What do you mean by "wacko IP" (I guess you mean the Serial0 interface ?)
  • NawaketteNawakette Member Posts: 33 ■■□□□□□□□□
    there is no issue of default routes ...in this case. As these are directly connected networks to the router (fast ethernetinterfaces), so u can ping it.But u can only ping to ip address of fastethernet interface.

    Do you mean that we can ping (from Router1) the FastEthernet0 on Router2 but can't ping any device connected behind this FastEthernet0 interface ?
  • Danman32Danman32 Member Posts: 1,243
    Nawakette wrote:
    Thanks to both of you for the clear answers :P
    Danman32 wrote:
    You could ping a wacko IP and the router would forward it to the other.

    What do you mean by "wacko IP" (I guess you mean the Serial0 interface ?)

    An IP that has nothing to do with your configuration. For example: 10.22.33.44. Since there is no such network defined anywhere, it will be sent out through the gateway of last resort, in hopes that the next router can route it. Now since that next router's last resort is back to the first router, you may get into a brief routing loop until the packet's time to live expires.
  • pannupanditpannupandit Member Posts: 92 ■■□□□□□□□□
    Nawakette wrote:
    there is no issue of default routes ...in this case. As these are directly connected networks to the router (fast ethernetinterfaces), so u can ping it.But u can only ping to ip address of fastethernet interface.

    Do you mean that we can ping (from Router1) the FastEthernet0 on Router2 but can't ping any device connected behind this FastEthernet0 interface ?


    yeah I mean the same what u are getting.....u can ping routers fastethernet interface but can't ping the other devices if u haven't defined route for them.
Sign In or Register to comment.