• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1372
  • Last Modified:

Cisco router ip route command syntax

I want to add a subnet mask to my ip classless route. What is the syntax? I currently have

ip route 0.0.0.0 0.0.0.0 206.111.111.111 permanent

I want to add a subnet mask of 255.255.255.0

0
AnimatorThree
Asked:
AnimatorThree
1 Solution
 
JFrederick29Commented:
I assume you are talking about adding a subnet mask for the 206.111.111.111 gateway address?  If so, you do not need a subnet mask.  You only use a subnet mask on the destination network portion.  In your default route, the second set of 0's (0.0.0.0) is the subnet mask portion of your route.
0
 
mikebernhardtCommented:
How can you add a mask of 25 bits to your default route? Then the route would be for traffic destined for addresses 0.0.0.0-0.0.0.255...

The mask portion of the destination route is the 2nd set of octets. For example if the route was 10.1.1.0 with a next hop of 206.111.111.111 then the syntax would be
ip route 10.1.1.0 255.255.255.0 206.111.111.111

Incidentally, the "permanent" keyword does nothing for you in this case. Static routes are always permanent in that the route is always in the configuration. It's not like on a PC. On the router, it means that it will still try to route traffic to the next hop even if the interface that connects to it is down- probably not what you want.
0
 
AnimatorThreeAuthor Commented:
Dumb question. Thanks for the help tho!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now