static route using both broadcast interface and next-hop ip !!

oudmasteroudmaster Member Posts: 11 ■■■□□□□□□□
hi,

I have used in my lab a static route "ip route 4.4.4.4 255.255.255.255 GigabitEthernet1/0 10.0.0.3"


both 10.0.0.3 and 10.0.0.2 have route to 4.4.4.4/32

using the static route mentioned up, the router installed 10.0.0.3, I have shutdown 10.0.0.3 and I was expecting the router change its decision to 10.0.0.2 but it did not.

so here what is the use of this command since it is available in Cisco IOS??


thanks,

Comments

  • networker050184networker050184 Mod Posts: 11,962 Mod
    The command is used for exactly what you saw! If you want the static route to only resolve over a certain physical interface then you'd configure it this way. This is very useful when you are redistributing statics and only want this router to inject the route when it's directly attached interface is up. If you do not have this and it still has a route to 10.0.0.3 via another router the static route will remain in the table. You may then end up with inefficient routing.
    An expert is a man who has made all the mistakes which can be made.
  • oudmasteroudmaster Member Posts: 11 ■■■□□□□□□□
    Hi, thanks for reply, but I did not understand it totally due to the following confusions:


    The command is used for exactly what you saw! If you want the static route to only resolve over a certain physical interface then you'd configure it this way.
    but how is that possible with Router since first of all it does not accept same prefix to be assigned to two different interfaces. like if I use command "ip route 4.4.4.4 255.255.255.255 GigabitEthernet1/0 10.0.0.3" it does not make sense if Gig1 had prefix like 10.0.2.1\24
    ??
    however when I tried it, it was possible and don't understand why the router accept such this

    This is very useful when you are redistributing statics and only want this router to inject the route when it's directly attached interface is up.
    I have tried to use command like "ip route 4.4.4.4 255.255.255.255 10.0.0.3" without specifying the interface, when the directly connected interface which has 10.0.0.1\24 got down, this route was removed from the routing table. so in case of redistributing statics route into IGP, routing table will get updated automatically without using interface option in the static route as per this result !!

    If you do not have this and it still has a route to 10.0.0.3 via another router the static route will remain in the table. You may then end up with inefficient routing
    10.0.0.3 is the next hop and available on the LAN interface of the router. so how come I can reach it via another router!!
    the destination network is 4.4.4.4/32
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Multiple routers can have an interface on the same LAN segment.
    An expert is a man who has made all the mistakes which can be made.
Sign In or Register to comment.