Configuring IP Routing Protocol-Independent Features

Using Variable-Length Subnet Masks

Using Variable-Length Subnet Masks

Enhanced IGRP (EIGRP), Intermediate System-to-Intermediate System (IS-IS) Interdomain Routing Protocol, Open Shortest Path First (OSPF), Routing Information Protocol (RIP) Version 2, and static routes support variable-length subnet masks (VLSMs). With VLSMs, you can use different masks for the same network number on different interfaces, which allows you to conserve IP addresses and more efficiently use available address space. However, using VLSMs also presents address assignment challenges for the network administrator and ongoing administrative challenges.

Refer to RFC 1219 for detailed information about VLSMs and how to correctly assign addresses.

Note Consider your decision to use VLSMs carefully. You can easily make mistakes in address assignments and you will generally find it more difficult to monitor your network using VLSMs.

Note The best way to implement VLSMs is to keep your existing numbering plan in place and gradually migrate some networks to VLSMs to recover address space. See the Variable-Length Subnet Mask Example” section at the end of this chapter for an example of using VLSMs.

Configuring Static Routes

Static routes are user-defined routes that cause packets moving between a source and a destination to take a specified path. Static routes can be important if the Cisco IOS software cannot build a route to a particular destination. They are useful for specifying a gateway of last resort to which all unroutable packets will be sent.

To configure a static route, use the following command in global configuration mode:

Command

 

Purpose

 

 

 

Router(config)# ip route prefix mask {ip-address

Establishes a static route.

interface-type interface-number} [distance] [tag

tag]

 

[permanent]

 

 

 

 

 

See the “Overriding Static Routes with Dynamic Protocols Example” section at the end of this chapter for an example of configuring static routes.

The software remembers static routes until you remove them (using the no form of the ip route global configuration command). However, you can override static routes with dynamic routing information through prudent assignment of administrative distance values. Each dynamic routing protocol has a default administrative distance, as listed in Table 9. If you would like a static route to be overridden by information from a dynamic routing protocol, simply ensure that the administrative distance of the static route is higher than that of the dynamic protocol.

Table 9

Dynamic Routing Protocol Default Administrative Distances

 

 

 

Route Source

 

Default Distance

 

 

Connected interface

0

 

 

 

Static route

 

1

 

 

 

Cisco IOS IP Configuration Guide

IPC-364

Page 410
Image 410
Cisco Systems 78-11741-02 Using Variable-Length Subnet Masks, Configuring Static Routes, Route Source Default Distance