Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

subnet masking

can anyone explain to me (or point me to some links) about the effects of masking 255.255.255.255 in the command, ip route destination_ip 255.255.255.255 next_hop_ip.

3 REPLIES
New Member

Re: subnet masking

That will turn every bit on for the address mask, meaning that the route you specified is for that single host (/32).

Re: subnet masking

A packet whose destination ip matches this route, will use this route. All other ip addresses ( ones from the same destination network) wont use this route.

New Member

Re: subnet masking

This sets up a route to a specific host. What this is typically used for is to route traffic for one particular host differently than other hosts on his subnet. For example:

ip route 10.1.0.0 255.255.255.0 10.2.1.1

ip route 10.1.0.11 255.255.255.255 10.2.2.1

All traffic for subnet 10.1.0.0/24 is routed through 10.2.1.1. However, all traffic for host 10.1.0.11 (as indicated by his 255.255.255.255 mask) is routed through 10.2.2.1. May be the host 10.1.0.11 is special and deserves to have its traffic routed throgh a dedicated link. Remember the router always picks the matching route with the longest subnet mask to use. This is true no matter the order of the routes in the table, or source (routing protocol or static) of the route.

Another use for this trick is to "blackhole" undesirable destinations for short periods of time. For example, if you find someone visiting a porno web site at say, 10.99.99.99, you can use the following command to blackhole him:

ip route 10.99.99.99 255.255.255.255 null 0

This drops all traffic to the porno site only.

Have fun!

190
Views
0
Helpful
3
Replies
CreatePlease to create content