06-24-2010 08:23 AM - edited 03-06-2019 11:44 AM
hi! i saw a statement in my router
ip route 10.81.2.1 255.255.255.255 10.81.2.254.
what could this statement mean? Only host with the exact ip of 10.81.2.1 will be forwarded to through gw of 10.81.2.254? it seems to be redundant to me since we already have a static route of /24 for that segment configured.
thx
06-24-2010 09:23 AM
" Only host with the exact ip of 10.81.2.1 will be forwarded to through gw of 10.81.2.254?"
Not exactly. In order to get to that host (10.81.2.1) you would need to go through 10.81.2.254 to get to it. The connection would look something like:
10.81.2.50 -> 10.81.2.5 -> 10.81.2.254 -> 10.81.2.1
Above would be a host 10.81.2.50 needing to get to 10.81.2.1. 10.81.2.50's gateway is 10.81.2.5, and it has a connection to 10.81.2.254. 10.81.2.254 knows how to get to 10.81.2.1. Your router needs to know where it needs to send a packet to this particular host. It's HIGHLY possible that in some configurations, you can have something like:
Not redundant:
ip route 10.81.2.0 255.255.255.0 10.81.2.253
ip route 10.81.2.1 255.255.255.255 10.81.2.254
The routers are different, but the host route (the one with 255.255.255.255) is preferred to go over the .254 link.
Redundant:
ip route 10.81.2.0 255.255.255.0 10.81.2.254
ip route 10.81.2.1 255.255.255.255 10.81.2.254
If you have a /24 that is already specified for this network AND the host route is also going to the same destination (10.81.2.254), then you're correct, it's redundant.
HTH,
John
06-24-2010 11:27 PM
hi! i saw a statement in my router
ip route 10.81.2.1 255.255.255.255 10.81.2.254.
what could this statement mean? Only host with the exact ip of 10.81.2.1 will be forwarded to through gw of 10.81.2.254? it seems to be redundant to me since we already have a static route of /24 for that segment configured.
thx
That particular statement means route to the specific host is reachble via 10.81.2.254,If you see the genrall logic for ip route command
Router(config)#ip route network-address subnet-mask {ip-address | exit-interface }
The following parameters are used:
Network-address - Destination network address of the remote network to be added to the routing table
Subnet-mask - Subnet mask of the remote network to be added to the routing table. The subnet mask can be modified to summarize a group of networks.
ip-address - Commonly referred to as the next-hop router's IP address
Hope to Help !!
Ganesh.H
Remember to rate the helpful post
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