cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
276
Views
0
Helpful
2
Replies

Simple Routing Question

manish-young
Level 1
Level 1

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

2 Replies 2

thisisshanky
Level 11
Level 11

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.

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

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.

Review Cisco Networking for a $25 gift card