Index Manuals Cisco Industrial Ethernet 4000, 4010 and 5000 Switch Software. Configuration Guide (2022)
|
|
|
Configuring IP Unicast Routing
Configuring IP Addressing
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
arp ip-address hardware-address type
Globally associate an IP address with a MAC (hardware)
address in the ARP cache, and specify encapsulation
type as one of these:
arpa—ARP encapsulation for Ethernet interfaces
snap—Subnetwork Address Protocol encapsulation
for Token Ring and FDDI interfaces
sap—HP’s ARP type
3.
arp ip-address hardware-address type
(Optional) Specify that the switch respond to ARP
[alias]
requests as if it were the owner of the specified IP
address.
4.
interface interface-id
Enter interface configuration mode, and specify the
interface to configure.
5.
no shutdown
Enable the interface if necessary. By default, UNIs and
ENIs are disabled and NNIs are enabled.
6.
arp timeout seconds
(Optional) Set the length of time an ARP cache entry will
stay in the cache. The default is 14400 seconds (4
hours). The range is 0 to 2147483 seconds.
7.
end
Return to privileged EXEC mode.
8.
show interfaces [interface-id]
Verify the type of ARP and the timeout value used on all
interfaces or a specific interface.
9.
show arp
View the contents of the ARP cache.
or
show ip arp
10.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
To remove an entry from the ARP cache, use the no arp ip-address hardware-address type global configuration
command. To remove all nonstatic entries from the ARP cache, use the clear arp-cache privileged EXEC command.
EXAMPLE
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# arp 10.0.0.0 aabb.cc03.8200 arpa
Switch(config)# end
Setting ARP Encapsulation
By default, Ethernet ARP encapsulation (represented by the arpa keyword) is enabled on an IP interface. You can change
the encapsulation methods to SNAP if required by your network.
BEFORE YOU BEGIN
The encapsulation type specified in this procedure should match the encapsulation type specified in the Defining a Static
ARP Cache, page 846.
847
Configuring IP Unicast Routing
Configuring IP Addressing
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
interface interface-id
Enter interface configuration mode, and specify the
Layer 3 interface to configure.
3.
no shutdown
Enable the interface if necessary. By default, UNIs
and ENIs are disabled and NNIs are enabled.
4.
arp {arpa | snap}
Specify the ARP encapsulation method:
arpa—Address Resolution Protocol
snap—Subnetwork Address Protocol
5.
end
Return to privileged EXEC mode.
6.
show interfaces [interface-id]
Verify ARP encapsulation configuration on all
interfaces or the specified interface.
7.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
To disable an encapsulation type, use the no arp arpa or no arp snap interface configuration command.
EXAMPLE
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface gi0/2
Switch(config-if)# arp arpa
Switch(config-if)# end
Enabling Proxy ARP
By default, the switch uses proxy ARP to help hosts learn MAC addresses of hosts on other networks or subnets. Follow
these steps to enable proxy ARP if it has been disabled.
BEFORE YOU BEGIN
Review the Configuring Address Resolution Methods, page 845.
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
interface interface-id
Enter interface configuration mode, and specify the
Layer 3 interface to configure.
3.
no shutdown
Enable the interface if necessary. By default, UNIs and
ENIs are disabled and NNIs are enabled.
4.
ip proxy-arp
Enable proxy ARP on the interface.
5.
end
Return to privileged EXEC mode.
6.
show ip interface [interface-id]
Verify the configuration on the interface or all interfaces.
7.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
To disable proxy ARP on the interface, use the no ip proxy-arp interface configuration command.
848
Configuring IP Unicast Routing
Configuring IP Addressing
EXAMPLE
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface gi0/2
Switch(config-if)# ip proxy-arp
Switch(config-if)# end
Routing Assistance When IP Routing is Disabled
These mechanisms allow the switch to learn about routes to other networks when it does not have IP routing enabled:
Proxy ARP, page 849
Default Gateway, page 849
ICMP Router Discovery Protocol (IRDP), page 850
Proxy ARP
Proxy ARP, the most common method for learning about other routes, enables an Ethernet host with no routing
information to communicate with hosts on other networks or subnets. The host assumes that all hosts are on the same
local Ethernet and that they can use ARP to learn their MAC addresses. If a switch receives an ARP request for a host
that is not on the same network as the sender, the switch evaluates whether it has the best route to that host. If it does,
it sends an ARP reply packet with its own Ethernet MAC address, and the host that sent the request sends the packet to
the switch, which forwards it to the intended host. Proxy ARP treats all networks as if they are local and performs ARP
requests for every IP address.
Proxy ARP is enabled by default. To enable it after it has been disabled, see Enabling Proxy ARP, page 848. Proxy ARP
works as long as other routers support it.
Default Gateway
Another method for locating routes is to define a default router or default gateway. All nonlocal packets are sent to this
router, which either routes them appropriately or sends an IP Control Message Protocol (ICMP) redirect message back,
defining which local router the host should use. The switch caches the redirect messages and forwards each packet as
efficiently as possible. A limitation of this method is that there is no means of detecting when the default router has gone
down or is unavailable.
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
ip default-gateway ip-address
Set up a default gateway (router).
3.
end
Return to privileged EXEC mode.
4.
show ip redirects
Display the address of the default gateway router to verify
the setting.
5.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
Use the no ip default-gateway global configuration command to disable this function.
EXAMPLE
Switch# configure terminal
849
Configuring IP Unicast Routing
Configuring IP Addressing
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ip default-gateway 192.31.7.18
Switch(config)# end
ICMP Router Discovery Protocol (IRDP)
Router discovery allows the switch to dynamically learn about routes to other networks using IRDP. IRDP allows hosts to
locate routers. When operating as a client, the switch generates router discovery packets. When operating as a host, the
switch receives router discovery packets. The switch can also listen to Routing Information Protocol (RIP) routing updates
and use this information to infer locations of routers. The switch does not actually store the routing tables sent by routing
devices; it merely keeps track of which systems are sending the data. The advantage of using IRDP is that it allows each
router to specify both a priority and the time after which a device is assumed to be down if no further packets are
received.
Each device discovered becomes a candidate for the default router, and a new highest-priority router is selected when
a higher priority router is discovered, when the current default router is declared down, or when a TCP connection is
about to time out because of excessive retransmissions.
The only required task for IRDP routing on an interface is to enable IRDP processing on that interface. When enabled, the
default parameters apply. You can optionally change any of these parameters.
BEFORE YOU BEGIN
The ip irdp multicast command allows for compatibility with Sun Microsystems Solaris, which requires IRDP packets
to be sent out as multicasts. Many implementations cannot receive these multicasts; ensure end-host ability before
using this command.
If you change the maxadvertinterval value, the holdtime and minadvertinterval values also change, so it is
important to first change the maxadvertinterval value before manually changing either the holdtime or
minadvertinterval values.
850
Configuring IP Unicast Routing
Configuring IP Addressing
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
interface interface-id
Enter interface configuration mode, and specify the Layer 3
interface to configure.
3.
no shutdown
Enable the interface if necessary. By default, UNIs and ENIs are
disabled and NNIs are enabled.
4.
ip irdp
Enable IRDP processing on the interface.
5.
ip irdp multicast
(Optional) Send IRDP advertisements to the multicast address
(224.0.0.1) instead of IP broadcasts.
6.
ip irdp holdtime seconds
(Optional) Set the IRDP period for which advertisements are
valid. The default is three times the maxadvertinterval value. It
must be greater than maxadvertinterval and cannot be greater
than 9000 seconds. If you change the maxadvertinterval value,
this value also changes.
7.
ip irdp maxadvertinterval seconds
(Optional) Set the IRDP maximum interval between
advertisements. The default is 600 seconds.
8.
ip irdp minadvertinterval seconds
(Optional) Set the IRDP minimum interval between
advertisements. The default is 0.75 times the
maxadvertinterval. If you change the maxadvertinterval, this
value changes to the new default (0.75 of maxadvertinterval).
9.
ip irdp preference number
(Optional) Set a device IRDP preference level. The allowed range
is -231 to 231. The default is 0. A higher value increases the router
preference level.
10.
ip irdp address address [number]
(Optional) Specify an IRDP address and preference to
proxy-advertise.
11.
end
Return to privileged EXEC mode.
12.
show ip irdp
Verify settings by displaying IRDP values.
13.
copy running-config
(Optional) Save your entries in the configuration file.
startup-config
Use the no ip irdp interface configuration command to disable IRDP routing.
EXAMPLE
Switch(config)# interface ethernet 0 !Enable irdp on interface Ethernet 0.
Switch(config-if)# ip irdp
Switch(config-if)# ip irdp multicast !Send IRDP advertisements to the multicast address.
Switch(config-if)# ip irdp preference 900 !Increase router preference from 0 to 900.
Switch(config-if)# ip irdp maxadvertinterval 400 !Set maximum time between advertisements to 400 secs.
Switch(config-if)# ip irdp minadvertinterval 100 !Set minimum time between advertisements to 100 secs.
Switch(config-if)# ip irdp holdtime 6000 !Advertisements are good for 6000 seconds.
Switch(config-if)# ip irdp address 10.108.14.5 !Proxy-advertise 10.108.14.5 with default router
preference.
Switch(config-if)# ip irdp address 10.108.14.6 50 !Proxy-advertise 10.108.14.6 with preference of 50.
851
Configuring IP Unicast Routing
Configuring IP Addressing
Configuring Broadcast Packet Handling
After configuring an IP interface address, you can enable routing and configure one or more routing protocols, or you can
configure the way the switch responds to network broadcasts. A broadcast is a data packet destined for all hosts on a
physical network. The switch supports two kinds of broadcasting:
A directed broadcast packet is sent to a specific network or series of networks. A directed broadcast address
includes the network or subnet fields.
A flooded broadcast packet is sent to every network.
Note: You can also limit broadcast, unicast, and multicast traffic on Layer 2 interfaces by using the storm-control
interface configuration command to set traffic suppression levels.
Routers provide some protection from broadcast storms by limiting their extent to the local cable. Bridges (including
intelligent bridges), because they are Layer 2 devices, forward broadcasts to all network segments, thus propagating
broadcast storms. The best solution to the broadcast storm problem is to use a single broadcast address scheme on a
network. In most modern IP implementations, you can set the address to be used as the broadcast address. The switch
supports several addressing schemes for forwarding broadcast messages.
Enabling Directed Broadcast-to-Physical Broadcast Translation, page 852
Forwarding UDP Broadcast Packets and Protocols, page 854
Establishing an IP Broadcast Address, page 855
Flooding IP Broadcasts, page 855
Enabling Directed Broadcast-to-Physical Broadcast Translation
By default, IP-directed broadcasts are not forwarded; they are dropped to make routers less susceptible to
denial-of-service attacks. You can enable forwarding of IP-directed broadcasts on an interface where the broadcast
becomes a physical (MAC-layer) broadcast. Only those protocols configured by using the ip forward-protocol global
configuration command are forwarded.
BEFORE YOU BEGIN
You can specify an access list to control which broadcasts are forwarded. Only those IP packets permitted by the access
list are eligible to be translated from directed broadcasts to physical broadcasts.
852
Configuring IP Unicast Routing
Configuring IP Addressing
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
interface interface-id
Enter interface configuration mode, and specify the
interface to configure.
3.
no shutdown
Enable the interface if necessary. By default, UNIs and ENIs
are disabled and NNIs are enabled.
4.
ip directed-broadcast
Enable directed broadcast-to-physical broadcast
[access-list-number]
translation on the interface. You can include an access list to
control which broadcasts are forwarded. When an access
list is specified, only IP packets permitted by the access list
are eligible to be translated.
5.
exit
Return to global configuration mode.
6.
ip forward-protocol {udp [port] | nd |
Specify which protocols and ports the router forwards when
sdns}
forwarding broadcast packets.
udp—Forward UPD datagrams.
port: (Optional) Destination port that controls which
UDP services are forwarded.
nd—Forward ND datagrams.
sdns—Forward SDNS datagrams.
7.
end
Return to privileged EXEC mode.
8.
show ip interface [interface-id]
Verify the configuration on the interface or all interfaces.
or
show running-config
9.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
Use the no ip directed-broadcast interface configuration command to disable translation of directed broadcast to
physical broadcasts. Use the no ip forward-protocol global configuration command to remove a protocol or port.
EXAMPLE
The following example enables forwarding of IP directed broadcasts on Ethernet interface 0. The ip forward-protocol
command using the udp keyword without specifying any port numbers allows forwarding of UDP packets on the default
ports.
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface ethernet 0
Switch(config-if)# ip directed-broadcast
Switch(config-if)# exit
Switch(config)# ip forward-protocol udp
Switch(config)# end
853
Configuring IP Unicast Routing
Configuring IP Addressing
Forwarding UDP Broadcast Packets and Protocols
User Datagram Protocol (UDP) is an IP host-to-host layer protocol that provides a low-overhead, connectionless session
between two end systems and does not provide for acknowledgment of received datagrams. Network hosts occasionally
use UDP broadcasts to find address, configuration, and name information. If such a host is on a network segment that
does not include a server, UDP broadcasts are normally not forwarded. You can configure an interface on a router to
forward certain classes of broadcasts to a helper address. You can use more than one helper address per interface.
You can specify a UDP destination port to control which UDP services are forwarded. You can specify multiple UDP
protocols. You can also specify the Network Disk (ND) protocol, which is used by older diskless Sun workstations and
the network security protocol SDNS.
By default, both UDP and ND forwarding are enabled if a helper address has been defined for an interface.
If you do not specify any UDP ports when you configure the forwarding of UDP broadcasts, you are configuring the router
to act as a BOOTP forwarding agent. BOOTP packets carry DHCP information.
BEFORE YOU BEGIN
See the description for the ip forward-protocol interface configuration command in the Cisco IOS IP Application
Services Command Reference for the list of ports that are forwarded by default if you do not specify any UDP ports.
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
interface interface-id
Enter interface configuration mode, and specify the Layer 3
interface to configure.
3.
no shutdown
Enable the interface if necessary. By default, UNIs and ENIs
are disabled and NNIs are enabled.
4.
ip helper-address address
Enable forwarding and specify the destination address for
forwarding UDP broadcast packets, including BOOTP.
5.
exit
Return to global configuration mode.
6.
ip forward-protocol {udp [port] | nd |
Specify which protocols the router forwards when
sdns}
forwarding broadcast packets.
7.
end
Return to privileged EXEC mode.
8.
show ip interface [interface-id]
Verify the configuration on the interface or all interfaces.
or
show running-config
9.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
Use the no ip helper-address interface configuration command to disable the forwarding of broadcast packets to
specific addresses. Use the no ip forward-protocol global configuration command to remove a protocol or port.
EXAMPLE
The following example defines a helper address and uses the ip forward-protocol command. Using the udp keyword
without specifying any port numbers will allow forwarding of UDP packets on the default ports.
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface ethernet 0
Switch(config-if)# ip helper-address 10.24.42.2
Switch(config-if)# exit
854
Configuring IP Unicast Routing
Configuring IP Addressing
Switch(config)# ip forward-protocol udp
Switch(config)# end
Establishing an IP Broadcast Address
The most popular IP broadcast address (and the default) is an address consisting of all ones (255.255.255.255).
However, the switch can be configured to generate any form of IP broadcast address.
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
interface interface-id
Enter interface configuration mode, and specify the
interface to configure.
3.
no shutdown
Enable the interface if necessary. By default, UNIs and
ENIs are disabled and NNIs are enabled.
4.
ip broadcast-address ip-address
Enter a broadcast address different from the default, for
example 128.1.255.255.
5.
end
Return to privileged EXEC mode.
6.
show ip interface [interface-id]
Verify the broadcast address on the interface or all
interfaces.
7.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
To restore the default IP broadcast address, use the no ip broadcast-address interface configuration command.
EXAMPLE
The following example specifies an IP broadcast address of 0.0.0.0:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface ethernet 0
Switch(config-if)# ip broadcast-address 0.0.0.0
Switch(config-if)# end
Flooding IP Broadcasts
You can allow IP broadcasts to be flooded throughout your internetwork in a controlled fashion by using the database
created by the bridging STP. Using this feature also prevents loops. To support this capability, bridging must be
configured on each interface that is to participate in the flooding. If bridging is not configured on an interface, the
interface can receive broadcasts but it never forwards the broadcasts it receives, and the router never uses that interface
to send broadcasts received on a different interface.
Packets that are forwarded to a single network address using the IP helper-address mechanism can be flooded. Only
one copy of the packet is sent on each network segment.
To be considered for flooding, packets must meet these criteria. (Note that these are the same conditions used to
consider packet forwarding using IP helper addresses.)
The packet must be a MAC-level broadcast.
The packet must be an IP-level broadcast.
855
Configuring IP Unicast Routing
Configuring IP Addressing
The packet must be a TFTP, DNS, Time, NetBIOS, ND, or BOOTP packet, or a UDP specified by the ip
forward-protocol udp global configuration command.
The time-to-live (TTL) value of the packet must be at least two.
A flooded UDP datagram is given the destination address specified with the ip broadcast-address interface
configuration command on the output interface. The destination address can be set to any address so it might change
as the datagram propagates through the network. The source address is never changed. The TTL value is decremented.
When a flooded UDP datagram is sent out an interface (and the destination address possibly changed), the datagram is
handed to the normal IP output routines and is, therefore, subject to access lists, if they are present on the output
interface.
BEFORE YOU BEGIN
Ensure that bridging is configured on each interface that is to participate in the flooding.
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
ip forward-protocol spanning-tree
Use the bridging spanning-tree database to flood UDP
datagrams.
3.
end
Return to privileged EXEC mode.
4.
show running-config
Verify your entry.
5.
copy running-config startup-config
(Optional) Save your entry in the configuration file.
Use the no ip forward-protocol spanning-tree global configuration command to disable the flooding of IP broadcasts.
EXAMPLE
The following example permits IP broadcasts to be flooded through the internetwork in a controlled fashion:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ip forward-protocol spanning-tree
Switch(config)# end
Speeding up STP-Based UDP Flooding
In the switch, the majority of packets are forwarded in hardware; most packets do not go through the switch CPU. For
those packets that do go to the CPU, you can speed up spanning tree-based UDP flooding by a factor of about four to
five times by using turbo-flooding. This feature is supported over Ethernet interfaces configured for ARP encapsulation.
BEFORE YOU BEGIN
Enable the flooding of IP broadcasts as described in the Flooding IP Broadcasts, page 855.
856
Configuring IP Unicast Routing
Configuring IP Addressing
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode
2.
ip forward-protocol turbo-flood
Use the spanning-tree database to speed up flooding of UDP
datagrams.
3.
end
Return to privileged EXEC mode.
4.
show running-config
Verify your entry.
5.
copy running-config
(Optional) Save your entry in the configuration file.
startup-config
To disable this feature, use the no ip forward-protocol turbo-flood global configuration command.
EXAMPLE
The following example shows how to speed up the flooding of UDP packets using the spanning-tree algorithm:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ip forward-protocol turbo-flood
Switch(config)# end
Monitoring and Maintaining IP Addressing
When the contents of a particular cache, table, or database have become or are suspected to be invalid, you can remove
all its contents by using the clear privileged EXEC commands.
Command
Purpose
clear arp-cache
Clear the IP ARP cache and the fast-switching cache.
clear host {name | *}
Remove one or all entries from the hostname and the address cache.
clear ip route {network [mask] |*}
Remove one or more routes from the IP routing table.
You can display specific statistics, such as the contents of IP routing tables, caches, and databases; the reachability of
nodes; and the routing path that packets are taking through the network.
857
Configuring IP Unicast Routing
Enabling IPv4 Unicast Routing
Command
Purpose
show arp
Display the entries in the ARP table.
show hosts
Display the default domain name, style of lookup service, name server
hosts, and the cached list of hostnames and addresses.
show ip aliases
Display IP addresses mapped to TCP ports (aliases).
show ip arp
Display the IP ARP cache.
show ip interface [interface-id]
Display the IP status of interfaces.
show ip irdp
Display IRDP values.
show ip masks address
Display the masks used for network addresses and the number of
subnets using each mask.
show ip redirects
Display the address of a default gateway.
show ip route [address [mask]] |
Display the current state of the routing table.
[protocol]
show ip route summary
Display the current state of the routing table in summary form.
Enabling IPv4 Unicast Routing
By default, the switch is in Layer 2 switching mode and IP routing is disabled. To use the Layer 3 capabilities of the switch,
you must enable IP routing.
BEFORE YOU BEGIN
Review the Guidelines and Limitations, page 840.
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
ip routing
Enable IP routing.
3.
router ip_routing_protocol
Specify an IP routing protocol. This step might include other
commands, such as specifying the networks to route with
the network (RIP) router configuration command. For
information on specific protocols, see sections later in this
chapter.
4.
end
Return to privileged EXEC mode.
5.
show running-config
Verify your entries.
6.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
Use the no ip routing global configuration command to disable routing.
EXAMPLE
This example shows how to enable IP routing using RIP as the routing protocol:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ip routing
Switch(config)# router rip
Switch(config-router)# network 10.0.0.0
858
Configuring IP Unicast Routing
Configuring RIP
Switch(config-router)# end
Configuring RIP
The Routing Information Protocol (RIP) is an interior gateway protocol (IGP) used in small, homogeneous networks. It is
a distance-vector routing protocol that uses broadcast User Datagram Protocol (UDP) data packets to exchange routing
information. You can find detailed information about RIP in IP Routing Fundamentals, published by Cisco Press.
Using RIP, the switch sends routing information updates (advertisements) every 30 seconds. If a router does not receive
an update from another router for 180 seconds or more, it marks the routes served by that router as unusable. If there is
still no update after 240 seconds, the router removes all routing table entries for the non-updating router.
RIP uses hop counts to rate the value of different routes. The hop count is the number of routers that can be traversed
in a route. A directly connected network has a hop count of zero; a network with a hop count of 16 is unreachable. This
small range (0 to 15) makes RIP unsuitable for large networks.
If the router has a default network path, RIP advertises a route that links the router to the pseudonetwork 0.0.0.0. The
0.0.0.0 network does not exist, but is treated by RIP as a network to implement default routing. The switch advertises
the default network if a default was learned by RIP or if the router has a gateway of last resort and RIP is configured with
a default metric. RIP sends updates to the interfaces in specified networks. If an interface’s network is not specified, it
is not advertised in any RIP update.
This section includes the following topics:
Default RIP Configuration, page 860
Configuring Basic RIP Parameters, page 860
Configuring RIP Authentication, page 862
Configuring Split Horizon, page 863
859
Configuring IP Unicast Routing
Configuring RIP
Default RIP Configuration
Feature
Default Setting
Auto summary
Enabled.
Default-information originate
Disabled.
Default metric
Built-in; automatic metric translations.
IP RIP authentication key-chain
No authentication.
Authentication mode: clear text.
IP RIP receive version
According to the version router configuration command.
IP RIP send version
According to the version router configuration command.
IP RIP triggered
According to the version router configuration command.
IP split horizon
Varies with media.
Neighbor
None defined.
Network
None specified.
Offset list
Disabled.
Output delay
0 milliseconds.
Timers basic
Update: 30 seconds.
Invalid: 180 seconds.
Hold-down: 180 seconds.
Flush: 240 seconds.
Validate-update-source
Enabled.
Version
Receives RIP Version 1 and 2 packets; sends Version 1 packets.
Configuring Basic RIP Parameters
To configure RIP, you enable RIP routing for a network and optionally configure other parameters. RIP configuration
commands are ignored until you configure the network number.
BEFORE YOU BEGIN
Complete the RIP network strategy and planning for your network. For example, you must decide whether to receive and
send only RIP Version 1 or RIP Version 2 packets and whether to use RIP authentication. (RIP Version 1 does not support
authentication.)
860
Configuring IP Unicast Routing
Configuring RIP
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
ip routing
Enable IP routing. (Required only if IP routing is disabled.)
3.
router rip
Enable a RIP routing process, and enter router configuration mode.
4.
network network number
Associate a network with a RIP routing process. You can specify
multiple network commands. RIP routing updates are sent and
received through interfaces only on these networks.
Note: You must configure a network number for RIP commands to take
effect.
5.
neighbor ip-address
(Optional) Define a neighboring router with which to exchange routing
information. This step allows routing updates from RIP (normally a
broadcast protocol) to reach nonbroadcast networks.
6.
offset list [access-list
(Optional) Apply an offset list to routing metrics to increase incoming
number | name] {in | out}
and outgoing metrics to routes learned through RIP. You can limit the
offset [type number]
offset list with an access list or an interface.
7.
timers basic update invalid
(Optional) Adjust routing protocol timers. Valid ranges for all timers are
holddown flush
0 to 4294967295 seconds.
update—The time between sending routing updates. The default is
30 seconds.
invalid—The timer after which a route is declared invalid. The
default is 180 seconds.
holddown—The time before a route is removed from the routing
table. The default is 180 seconds.
flush—The amount of time for which routing updates are
postponed. The default is 240 seconds.
8.
version {1 | 2}
(Optional) Configure the switch to receive and send only RIP Version 1
or RIP Version 2 packets. By default, the switch receives Version 1 and
2 but sends only Version 1.
You can also use the interface commands ip rip {send | receive}
version 1 | 2 | 1 2} to control what versions are used for sending and
receiving on interfaces.
9.
no auto summary
(Optional) Disable automatic summarization. By default, the switch
summarizes subprefixes when crossing classful network boundaries.
Disable summarization (RIP Version 2 only) to advertise subnet and
host routing information to classful network boundaries.
10.
no validate-update-source
(Optional) Disable validation of the source IP address of incoming RIP
routing updates. By default, the switch validates the source IP address
of incoming RIP routing updates and discards the update if the source
address is not valid. Under normal circumstances, disabling this feature
is not recommended. However, if you have a router that is off-network
and you want to receive its updates, you can use this command.
11.
output-delay delay
(Optional) Add interpacket delay for RIP updates sent.
By default, packets in a multiple-packet RIP update have no delay
added between packets. If you are sending packets to a lower-speed
device, you can add an interpacket delay in the range of 8 to 50
milliseconds.
861
Configuring IP Unicast Routing
Configuring RIP
Command
Purpose
12.
end
Return to privileged EXEC mode.
13.
show ip protocols
Verify your entries.
14.
copy running-config
(Optional) Save your entries in the configuration file.
startup-config
To turn off the RIP routing process, use the no router rip global configuration command.
To display the parameters and current state of the active routing protocol process, use the show ip protocols privileged
EXEC command. Use the show ip rip database privileged EXEC command to display summary address entries in the RIP
database.
EXAMPLE
In the following example, RIP updates are sent to all interfaces on network 10.108.0.0 except Ethernet interface 1.
However, in this case, a neighbor router configuration command is included. This command permits the sending of
routing updates to specific neighbors. One copy of the routing update is generated per neighbor.
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ip routing
Switch(config)# router rip
Switch(config-router)# network 10.108.0.0
Router(config-router)# passive-interface Ethernet 1
Router(config-router)# neighbor 10.108.20.4
Router(config-router)# end
Configuring RIP Authentication
RIP Version 1 does not support authentication. If you are sending and receiving RIP Version 2 packets, you can enable
RIP authentication on an interface. The key chain specifies the set of keys that can be used on the interface. If a key chain
is not configured, no authentication is performed, not even the default. Therefore, you must also perform the tasks in the
Managing Authentication Keys, page 964.
The switch supports two modes of authentication on interfaces for which RIP authentication is enabled: plain text and
MD5. The default is plain text.
BEFORE YOU BEGIN
Configure RIP as described in the Configuring Basic RIP Parameters, page 860.
862
Configuring IP Unicast Routing
Configuring RIP
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
interface interface-id
Enter interface configuration mode, and specify the
interface to configure.
3.
no shutdown
Enable the interface if necessary. By default, UNIs
and ENIs are disabled and NNIs are enabled.
4.
ip rip authentication key-chain
Enable RIP authentication.
name-of-chain
5.
ip rip authentication mode [text | md5}
Configure the interface to use plain text
authentication (the default) or MD5 digest
authentication.
6.
end
Return to privileged EXEC mode.
7.
show running-config interface [interface-id]
Verify your entries.
8.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
To restore clear text authentication, use the no ip rip authentication mode interface configuration command. To prevent
authentication, use the no ip rip authentication key-chain interface configuration command.
EXAMPLE
The following example configures the interface to accept and send any key belonging to the key chain named trees and
configures the interface to use MD5 authentication:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface ethernet 0
Switch(config-if)# ip rip authentication key-chain trees
Switch(config-if)# ip rip authentication mode md5
Switch(config-if)# end
Configuring Split Horizon
Routers connected to broadcast-type IP networks and using distance-vector routing protocols normally use the
split-horizon mechanism to reduce the possibility of routing loops. Split horizon blocks information about routes from
being advertised by a router on any interface from which that information originated. This feature can optimize
communication among multiple routers when links are broken.
BEFORE YOU BEGIN
In general, Cisco does not recommend disabling split horizon unless you are certain that your application requires
disabling it to properly advertise routes.
863
Configuring IP Unicast Routing
Configuring RIP
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
interface interface-id
Enter interface configuration mode, and specify the interface
to configure.
3.
no shutdown
Enable the interface if necessary. By default, UNIs and ENIs
are disabled and NNIs are enabled.
4.
ip address ip-address subnet-mask
Configure the IP address and IP subnet.
5.
no ip split-horizon
Disable split horizon on the interface.
6.
end
Return to privileged EXEC mode.
7.
show ip interface interface-id
Verify your entries.
8.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
To enable the split horizon mechanism, use the ip split-horizon interface configuration command.
EXAMPLE
The following simple example disables split horizon on a serial link:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface serial 0
Switch(config-if)# no ip split-horizon
Switch(config-if)# end
Configuring Summary Addresses
To configure an interface running RIP to advertise a summarized local IP address pool on a network access server for
dial-up clients, use the ip summary-address rip interface configuration command.
Note: If split horizon is enabled, neither autosummary nor interface IP summary addresses are advertised.
BEFORE YOU BEGIN
If the interface is in Layer 2 mode (the default), you must enter a no switchport interface configuration command before
entering the ip address interface configuration command.
864
Configuring IP Unicast Routing
Configuring OSPF
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
interface interface-id
Enter interface configuration mode, and specify the
Layer 3 interface to configure.
3.
no shutdown
Enable the interface if necessary. By default, UNIs
and ENIs are disabled and NNIs are enabled.
4.
ip address ip-address subnet-mask
Configure the IP address and IP subnet.
5.
ip summary-address rip ip address
Configure the IP address to be summarized and the
ip-network mask
IP network mask.
6.
no ip split horizon
Disable split horizon on the interface.
7.
end
Return to privileged EXEC mode.
8.
show ip interface interface-id
Verify your entries.
9.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
To disable IP summarization, use the no ip summary-address rip router configuration command.
EXAMPLE
In this example, the major net is 10.0.0.0. The summary address 10.2.0.0 overrides the autosummary address of 10.0.0.0
so that 10.2.0.0 is advertised out interface Gigabit Ethernet port 2, and 10.0.0.0 is not advertised.
Switch(config)# router rip
Switch(config-router)# interface gi0/2
Switch(config-if)# no switchport
Switch(config-if)# ip address 10.1.5.1 255.255.255.0
Switch(config-if)# ip summary-address rip 10.2.0.0 255.255.0.0
Switch(config-if)# no ip split-horizon
Switch(config-if)# exit
Switch(config)# router rip
Switch(config-router)# network 10.0.0.0
Switch(config-router)# neighbor 2.2.2.2 peer-group mygroup
Switch(config-router)# end
Configuring OSPF
Open Shortest Path First (OSPF) is an Interior Gateway Protocol (IGP) designed expressly for IP networks, supporting IP
subnetting and tagging of externally derived routing information. OSPF also allows packet authentication and uses IP
multicast when sending and receiving packets.
This section briefly describes how to configure OSPF. For a complete description of the OSPF commands, see the OSPF
documents listed in the Related Documents, page 966.
Note: OSPF classifies different media into broadcast, nonbroadcast multiaccess (NBMA), or point-to-point networks.
Broadcast and nonbroadcast networks can also be configured as point-to-multipoint networks. The switch supports all
these network types.
The Cisco implementation conforms to the OSPF Version 2 specifications with these key features:
Definition of stub areas is supported.
865
Configuring IP Unicast Routing
Configuring OSPF
Routes learned through any IP routing protocol can be redistributed into another IP routing protocol. At the
intradomain level, this means that OSPF can import routes learned through EIGRP and RIP. OSPF routes can also be
exported into RIP.
Plain text and MD5 authentication among neighboring routers within an area is supported.
Configurable routing interface parameters include interface output cost, retransmission interval, interface transmit
delay, router priority, router dead and hello intervals, and authentication key.
Virtual links are supported.
Not-so-stubby-areas (NSSAs) per RFC 1587 are supported.
OSPF typically requires coordination among many internal routers, area border routers (ABRs) connected to multiple
areas, and autonomous system boundary routers (ASBRs). The minimum configuration would use all default parameter
values, no authentication, and interfaces assigned to areas. If you customize your environment, you must ensure
coordinated configuration of all routers.
This section includes the following topics:
Default OSPF Configuration, page 867
Nonstop Forwarding Awareness, page 868
Configuring OSPF Interfaces, page 869
Configuring OSPF Network Types, page 871
Configuring OSPF Area Parameters, page 874
Configuring Other OSPF Parameters, page 876
Changing LSA Group Pacing, page 878
Configuring a Loopback Interface, page 878
Monitoring OSPF, page 879
866
Configuring IP Unicast Routing
Configuring OSPF
Default OSPF Configuration
Feature
Default Setting
Interface parameters
Cost: No default cost predefined.
Retransmit interval: 5 seconds.
Transmit delay: 1 second.
Priority: 1.
Hello interval: 10 seconds.
Dead interval: 4 times the hello interval.
No authentication.
No password specified.
MD5 authentication disabled.
Area
Authentication type: 0 (no authentication).
Default cost: 1.
Range: Disabled.
Stub: No stub area defined.
NSSA: No NSSA area defined.
Auto cost
100 Mbps.
Default-information originate
Disabled. When enabled, the default metric setting is 10, and the external route
type default is Type 2.
Default metric
Built-in, automatic metric translation, as appropriate for each routing protocol.
Distance OSPF
dist1 (all routes within an area): 110.
dist2 (all routes from one area to another): 110.
and dist3 (routes from other routing domains): 110.
OSPF database filter
Disabled. All outgoing link-state advertisements (LSAs) are flooded to the
interface.
IP OSPF name lookup
Disabled.
Log adjacency changes
Enabled.
Neighbor
None specified.
Neighbor database filter
Disabled. All outgoing LSAs are flooded to the neighbor.
Network area
Disabled.
NSF1 awareness
Enabled2. Allows Layer 3 switches to continue forwarding packets from a
neighboring NSF-capable router during hardware or software changes.
Router ID
No OSPF routing process defined.
Summary address
Disabled.
867
Configuring IP Unicast Routing
Configuring OSPF
Feature
Default Setting
Timers LSA group pacing
240 seconds.
Timers shortest path first (spf)
spf delay: 5 seconds.
spf-holdtime: 10 seconds.
Virtual link
No area ID or router ID defined.
Hello interval: 10 seconds.
Retransmit interval: 5 seconds.
Transmit delay: 1 second.
Dead interval: 40 seconds.
Authentication key: no key predefined.
Message-digest key (MD5): no key predefined.
1. NSF = Nonstop forwarding
2. OSPF NSF awareness is enabled for IPv4 on switches running the IP services image.
Nonstop Forwarding Awareness
The OSPF NSF Awareness feature is supported for IPv4 in the IP services image. When the neighboring router is
NSF-capable, the Layer 3 switch continues to forward packets from the neighboring router during the interval between
the primary Route Processor (RP) in a router crashing and the backup RP taking over, or while the primary RP is manually
reloaded for a non-disruptive software upgrade.
This feature cannot be disabled. For more information about this feature, see the “Configuring Nonstop Forwarding”
chapter in the High Availability Configuration Guide, Cisco IOS Release 15S.
Configuring Basic OSPF Parameters
Enabling OSPF requires that you create an OSPF routing process, specify the range of IP addresses to be associated
with the routing process, and assign area IDs to be associated with that range.
BEFORE YOU BEGIN
Complete the OSPF network strategy and planning for your network. For example, you must decide whether multiple
areas are required.
868
Configuring IP Unicast Routing
Configuring OSPF
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
router ospf process-id
Enable OSPF routing, and enter router configuration
mode. The process ID is an internally used identification
parameter that is locally assigned and can be any
positive integer. Each OSPF routing process has a unique
value.
3.
network address wildcard-mask area
Define an interface on which OSPF runs and the area ID
area-id
for that interface. You can use the wildcard-mask to use
a single command to define one or more multiple
interfaces to be associated with a specific OSPF area.
The area ID can be a decimal value or an IP address.
4.
end
Return to privileged EXEC mode.
5.
show ip protocols
Verify your entries.
6.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
To terminate an OSPF routing process, use the no router ospf process-id global configuration command.
EXAMPLE
This example shows how to configure an OSPF routing process and assign it a process number of 109:
Switch(config)# router ospf 109
Switch(config-router)# network 131.108.0.0 255.255.255.0 area 24
Configuring OSPF Interfaces
You can use the ip ospf interface configuration commands to modify interface-specific OSPF parameters. You are not
required to modify any of these parameters, but some interface parameters (hello interval, dead interval, and
authentication key) must be consistent across all routers in an attached network.
Note: The ip ospf interface configuration commands are all optional.
BEFORE YOU BEGIN
If you modify these parameters, be sure all routers in the network have compatible values.
869
Configuring IP Unicast Routing
Configuring OSPF
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
interface interface-id
Enter interface configuration mode, and specify the Layer 3
interface to configure.
3.
no shutdown
Enable the interface if necessary. By default, UNIs and ENIs
are disabled and NNIs are enabled.
4.
ip ospf cost
(Optional) Explicitly specify the cost of sending a packet on
the interface.
5.
ip ospf retransmit-interval seconds
(Optional) Specify the number of seconds between link state
advertisement transmissions. The range is 1 to 65535
seconds. The default is 5 seconds.
6.
ip ospf transmit-delay seconds
(Optional) Set the estimated number of seconds to wait
before sending a link state update packet. The range is 1 to
65535 seconds. The default is 1 second.
7.
ip ospf priority number
(Optional) Set priority to help find the OSPF designated
router for a network. The range is from 0 to 255. The default
is 1.
8.
ip ospf hello-interval seconds
(Optional) Set the number of seconds between hello
packets sent on an OSPF interface. The value must be the
same for all nodes on a network. The range is 1 to 65535
seconds. The default is 10 seconds.
9.
ip ospf dead-interval seconds
(Optional) Set the number of seconds after the last device
hello packet was seen before its neighbors declare the
OSPF router to be down. The value must be the same for all
nodes on a network. The range is 1 to 65535 seconds. The
default is 4 times the hello interval.
10.
ip ospf authentication-key key
(Optional) Assign a password to be used by neighboring
OSPF routers. The password can be any string of
keyboard-entered characters up to 8 bytes in length. All
neighboring routers on the same network must have the
same password to exchange OSPF information.
11.
ip ospf message digest-key keyid
(Optional) Enable MDS authentication.
md5 key
keyid—An identifier from 1 to 255.
key—An alphanumeric password of up to 16 bytes.
12.
ip ospf database-filter all out
(Optional) Block flooding of OSPF LSA packets to the
interface. By default, OSPF floods new LSAs over all
interfaces in the same area, except the interface on which
the LSA arrives.
13.
end
Return to privileged EXEC mode.
870
Configuring IP Unicast Routing
Configuring OSPF
Command
Purpose
14.
show ip ospf interface
Display OSPF-related interface information.
[interface-name]
15.
show ip ospf neighbor detail
Display NSF awareness status of neighbor switch. The
output matches one of these examples:
Options is 0x52
LLS Options is 0x1 (LR)
When both of these lines appear, the neighbor switch is
NSF aware.
Options is 0x42—This means the neighbor switch is not
NSF aware.
16.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
Use the no form of these commands to remove the configured parameter value or return to the default value.
EXAMPLE
The following example specifies a cost of 65 and sets the interval between link-state advertisement (LSA)
retransmissions to 1 second:
Switch# configure terminal
Switch(config)# interface GigabitEthernet 0/0
Switch(config-if)# ip ospf cost 65
Switch(config-if)# ip ospf retransmit-interval 1
Switch(config-if)# end
Configuring OSPF Network Types
OSPF classifies different media into the three types of networks by default:
Broadcast networks (Ethernet, Token Ring, and FDDI)
Nonbroadcast multiaccess (NBMA) networks (Switched Multimegabit Data Service [SMDS], Frame Relay, and X.25)
Point-to-point networks (High-Level Data Link Control [HDLC], PPP)
You can also configure network interfaces as either a broadcast or an NBMA network and as point-to point or
point-to-multipoint, regardless of the default media type.
Configuring OSPF for Nonbroadcast Networks
Because many routers might be attached to an OSPF network, a designated router is selected for the network. If
broadcast capability is not configured in the network, the designated router selection requires special configuration
parameters. You need to configure these parameters only for devices that are eligible to become the designated router
or backup designated router (in other words, routers with a nonzero router priority value).
BEFORE YOU BEGIN
Complete the OSPF network strategy and planning for your network.
871
Configuring IP Unicast Routing
Configuring OSPF
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
router ospf process-id
Configure an OSPF routing process and enter router
configuration mode.
3.
neighbor ip-address [priority number]
Specify an OSPF neighbor with neighbor parameters as
[poll-interval seconds]
required.
ip-address—Enter the interface IP address of the OSPF
neighbor.
(Optional) priority number—Specify the router priority
value of the nonbroadcast neighbor associated with the
IP address. The range is 0 to 255; the default is 0.
(Optional) poll-interval seconds—Specify a number that
represents the poll interval time (in seconds). This value
should be much larger than the hello interval. The range
is 0-4294967295; the default is 120 seconds (2
minutes).
4.
end
Return to privileged EXEC mode.
5.
show ip ospf [process-id]
Display OSPF-related information.
6.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
On point-to-multipoint, nonbroadcast networks, you then use the neighbor router configuration command to identify
neighbors. Assigning a cost to a neighbor is optional.
EXAMPLE
The following example declares a router at address 192.168.3.4 on a nonbroadcast network, with a priority of 1 and a
poll interval of 180 seconds:
Switch# configure terminal
Switch(config)# router ospf
Switch(config-router)# neighbor 192.168.3.4 priority 1 poll-interval 180
Switch(config-router)# end
Configuring Network Types for OSPF Interfaces
You can configure network interfaces as either broadcast or NBMA and as point-to point or point-to-multipoint,
regardless of the default media type.
An OSPF point-to-multipoint interface is defined as a numbered point-to-point interface with one or more neighbors.
On point-to-multipoint broadcast networks, specifying neighbors is optional. When you configure an interface as
point-to-multipoint when the media does not support broadcast, you should use the neighbor command to identify
neighbors.
BEFORE YOU BEGIN
Complete the OSPF network strategy and planning for your network.
872
Configuring IP Unicast Routing
Configuring OSPF
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
interface interface-id
Enter interface configuration mode, and specify the Layer 3
interface to configure.
3.
no shutdown
Enable the interface if necessary. By default, UNIs and ENIs
are disabled and NNIs are enabled.
4.
ip ospf network {broadcast |
Configure the OSFP network type for the specified interface.
non-broadcast | {point-to-multipoint
Select one of these network types:
[non-broadcast] | point-to-point}}
broadcast—Specify an OSPF broadcast multi-access
network.
non-broadcast—Specify an OSPF NBMA network.
point-to-multipoint—Specify an OSPF
point-to-multipoint network. If you do not enter another
keyword, the interface is point-to-multipoint for
broadcast media.
point-to-multipoint non-broadcast—Specify an OSPF
nonbroadcast point-to-multipoint network.
point-to-point—Specify an OSPF point-to-point
network.
5.
exit
Return to global configuration mode.
6.
router ospf process-id
(Optional for point-to-multipoint; required for
point-to-multipoint nonbroadcast) Configure an OSPF
routing process and enter router configuration mode.
7.
neighbor ip-address cost number
(Optional for point-to-multipoint; required for
point-to-multipoint nonbroadcast). Specify a configured
OSPF neighbor and assign a cost to the neighbor.
ip-address—Enter the interface IP address of the OSPF
neighbor.
cost number—Specify a cost for the neighbor as an
integer from 1 to 65535.
Note: On point-to-multipoint broadcast networks,
specifying a neighbor is optional, but if you do specify a
neighbor, you must specify a cost for that neighbor.
On point-to-multipoint nonbroadcast neighbors, you must
specify a neighbor, but assigning a cost to the neighbor is
optional. If not specified, neighbors assume the cost of the
interface, based on the ip ospf cost interface configuration
command.
8.
end
Return to privileged EXEC mode.
9.
show ip ospf interface [interface-id]
Display OSPF-related interface information.
10.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
Use the no form of the ip ospf network command to return to the default network type for the media.
873
Configuring IP Unicast Routing
Configuring OSPF
EXAMPLE
The following example sets your OSPF network as a broadcast network:
interface serial 0
ip address 192.168.77.17 255.255.255.0
ip ospf network broadcast
encapsulation frame-relay
The following example illustrates a point-to-multipoint network with broadcast:
interface serial 0
ip address 10.0.1.1 255.255.255.0
encapsulation frame-relay
ip ospf cost 100
ip ospf network point-to-multipoint
frame-relay map ip 10.0.1.3 202 broadcast
frame-relay map ip 10.0.1.4 203 broadcast
frame-relay map ip 10.0.1.5 204 broadcast
frame-relay local-dlci 200
!
router ospf 1
network 10.0.1.0 0.0.0.255 area 0
neighbor 10.0.1.5 cost 5
neighbor 10.0.1.4 cost 10
Configuring OSPF Area Parameters
You can optionally configure several OSPF area parameters. These parameters include authentication for
password-based protection against unauthorized access to an area, stub areas, and not-so-stubby-areas (NSSAs). Stub
areas are areas into which information on external routes is not sent. Instead, the area border router (ABR) generates a
default external route into the stub area for destinations outside the autonomous system (AS). An NSSA does not flood
all LSAs from the core into the area, but can import AS external routes within the area by redistribution.
Route summarization is the consolidation of advertised addresses into a single summary route to be advertised by other
areas. If network numbers are contiguous, you can use the area range router configuration command to configure the
ABR to advertise a summary route that covers all networks in the range.
Note: The OSPF area router configuration commands are all optional.
BEFORE YOU BEGIN
Evaluate the following considerations before you implement this feature:
You can set a Type 7 default route that can be used to reach external destinations. When configured, the router
generates a Type 7 default into the NSSA or the NSSA ABR.
Every router within the same area must agree that the area is NSSA; otherwise, the routers will not be able to
communicate.
874
Configuring IP Unicast Routing
Configuring OSPF
DETAILED STEPS
Command
Purpose
1.
configure terminal
Enter global configuration mode.
2.
router ospf process-id
Enable OSPF routing, and enter router configuration mode.
3.
area area-id authentication
(Optional) Allow password-based protection against
unauthorized access to the identified area. The identifier can
be either a decimal value or an IP address.
4.
area area-id authentication
(Optional) Enable MD5 authentication on the area.
message-digest
5.
area area-id stub [no-summary]
(Optional) Define an area as a stub area. The no-summary
keyword prevents an ABR from sending summary link
advertisements into the stub area.
6.
area area-id nssa [no-redistribution]
(Optional) Defines an area as a not-so-stubby-area. Every
[default-information-originate]
router within the same area must agree that the area is
[no-summary]
NSSA. Select one of these keywords:
no-redistribution—Select when the router is an NSSA
ABR and you want the redistribute command to import
routes into normal areas, but not into the NSSA.
default-information-originate—Select on an ABR to
allow importing type 7 LSAs into the NSSA.
no-redistribution—Select to not send summary LSAs
into the NSSA.
7.
area area-id range address mask
(Optional) Specify an address range for which a single route
is advertised. Use this command only with area border
routers.
8.
end
Return to privileged EXEC mode.
9.
show ip ospf [process-id]
Display information about the OSPF routing process in
general or for a specific process ID to verify configuration.
show ip ospf [process-id [area-id]]
Display lists of information related to the OSPF database for
database
a specific router.
10.
copy running-config startup-config
(Optional) Save your entries in the configuration file.
Use the no form of these commands to remove the configured parameter value or to return to the default value.
EXAMPLE
The following example mandates authentication for areas 0 and 10.0.0.0 of OSPF routing process 201. Authentication
keys are also provided.
interface ethernet 0
ip address 192.168.251.201 255.255.255.0
ip ospf authentication-key adcdefgh
!
interface ethernet 1
ip address 10.56.0.201 255.255.0.0
ip ospf authentication-key ijklmnop
!
router ospf 201
network 10.0.0.0 0.255.255.255 area 10.0.0.0
875
Configuring IP Unicast Routing
Configuring OSPF
network 192.168.0.0 0.0.255.255 area 0
area 10.0.0.0 authentication
area 0 authentication
Configuring Other OSPF Parameters
You can optionally configure other OSPF parameters in router configuration mode.
Route summarization: When redistributing routes from other protocols as described in the Using Route Maps to
Redistribute Routing Information, page 953, each route is advertised individually in an external LSA. To help
decrease the size of the OSPF link state database, you can use the summary-address router configuration
command to advertise a single router for all the redistributed routes included in a specified network address and
mask.
Virtual links: In OSPF, all areas must be connected to a backbone area. You can establish a virtual link in case of a
backbone-continuity break by configuring two Area Border Routers as endpoints of a virtual link. Configuration
information includes the identity of the other virtual endpoint (the other ABR) and the nonbackbone link that the two
routers have in common (the transit area). Virtual links cannot be configured through a stub area.
Default route: When you specifically configure redistribution of routes into an OSPF routing domain, the route
automatically becomes an autonomous system boundary router (ASBR). You can force the ASBR to generate a
default route into the OSPF routing domain.
Domain Name Server (DNS) names for use in all OSPF show privileged EXEC command displays makes it easier to
identify a router than displaying it by router ID or neighbor ID.
Default Metrics: OSPF calculates the OSPF metric for an interface according to the bandwidth of the interface. The
metric is calculated as ref-bw divided by bandwidth, where ref is 10 by default, and bandwidth (bw) is specified by
the bandwidth interface configuration command. For multiple links with high bandwidth, you can specify a larger
number to differentiate the cost on those links.
Administrative distance is a rating of the trustworthiness of a routing information source, an integer between 0 and
255, with a higher value meaning a lower trust rating. An administrative distance of 255 means the routing
information source cannot be trusted at all and should be ignored. OSPF uses three different administrative
distances: routes within an area (interarea), routes to another area (interarea), and routes from another routing
domain learned through redistribution (external). You can change any of the distance values.
Passive interfaces: Because interfaces between two devices on an Ethernet represent only one network segment,
to prevent OSPF from sending hello packets for the sending interface, you must configure the sending device to be
a passive interface. Both devices can identify each other through the hello packet for the receiving interface.
Route calculation timers: You can configure the delay time between when OSPF receives a topology change and
when it starts the shortest path first (SPF) calculation and the hold time between two SPF calculations.
Log neighbor changes: You can configure the router to send a syslog message when an OSPF neighbor state
changes, providing a high-level view of changes in the router.
BEFORE YOU BEGIN
Complete the OSPF network strategy and planning for your network.
876
|
|