06-14-2003 05:21 AM - edited 03-02-2019 08:08 AM
if i have to put a satatic route entry for 192.168.1.2 255.255.255.252.
What it will be like
ip route dest mask hop
regards
Manish
06-14-2003 07:04 AM
192.168.1.2 is an ip address in network 192.168.1.0/30
So if you specify ip route 192.168.1.2 255.255.255.252
06-14-2003 12:53 PM
Like thisisshanky said, this IP address is one of four you can have with that mask.
192.168.1.0 is the subnet ID
192.168.1.1 is a usable address
192.168.1.2 is a usable address
192.168.1.3 is a broadcast address for that subnet
If you are trying to set up a static route to the subnet, it would look something like this:
ip route 192.168.1.0 255.255.255.252 xxx.xxx.xxx.xxx 1
where xxx.xxx.xxx.xxx is the IP address of the next-hop router on the way to that subnet, and 1 is the next-to-lowest metric you can have for a route (lowest is 0, for a directly-connected subnet).
If you want to create a static route just for that specific IP host address, it would look like this:
ip route 192.168.1.2 255.255.255.255 xxx.xxx.xxx.xxx 1
Remember, just because you point to the next-hop router doesn't mean the traffic will get to its destination. Every router along that path needs to know how to get there, whether it learns from the static route or from dynamic routing protocols. So you may have to enter that static route several times; and the next-hop IP address will be different for each successive router in the path.
If you really wanted to, you could also change the metric on each static route to reflect the exact number of router hops to the destination; but it probably won't help the traffic get there any faster.
Hope this helps.
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