thisisshanky Sat, 06/14/2003 - 07:04
User Badges:
  • Purple, 4500 points or more

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 you will get an error message saying inconsistent address and mask.



konigl Sat, 06/14/2003 - 12:53
User Badges:
  • Gold, 750 points or more

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.


Actions

This Discussion