Professional Documents
Culture Documents
Cipro Ute
Cipro Ute
Note Many routing protocol specifications refer to routers as gateways, so the word gateway often
appears as part of routing protocol names. However, a router usually is defined as a Layer 3
internetworking device, whereas a protocol translation gateway usually is defined as a Layer 7
internetworking device. The reader should understand that whether a routing protocol name contains
the word “gateway” or not, routing protocol activities occur at Layer 3 of the OSI reference model.
Configure IGRP
The Interior Gateway Routing Protocol (IGRP) is a dynamic distance-vector routing protocol
designed by Cisco Systems in the mid-1980s for routing in an autonomous system that contains
large, arbitrarily complex networks with diverse bandwidth and delay characteristics.
System
Subnet B
Exterior
Interior
S1019a
System routes are routes to networks within an autonomous system. The router derives system routes
from directly connected network interfaces and system route information provided by other
IGRP-speaking routers. System routes do not include subnet information.
Exterior routes are routes to networks outside the autonomous system that are considered when
identifying a gateway of last resort. The router chooses a gateway of last resort from the list of
exterior routes that IGRP provides. The router uses the gateway (router) of last resort if it does not
have a better route for a packet and the destination is not a connected network. If the autonomous
system has more than one connection to an external network, different routers can choose different
exterior routers as the gateway of last resort.
IGRP Updates
By default, a router running IGRP sends an update broadcast every 90 seconds. It declares a route
inaccessible if it does not receive an update from the first router in the route within three update
periods (270 seconds). After seven update periods (630 seconds), the router removes the route from
the routing table.
IGRP uses flash update and poison reverse updates to speed up the convergence of the routing
algorithm. Flash update is the sending of an update sooner than the standard periodic update interval
of notifying other routers of a metric change. Poison reverse updates are intended to defeat larger
routing loops caused by increases in routing metrics. The poison reverse updates are sent to remove
a route and place it in holddown, which keeps new routing information from being used for a certain
period of time.
Task Command
Step 1 Enable an IGRP routing process, which router igrp autonomous-system
places you in router configuration mode.
Step 2 Associate networks with an IGRP network network-number
routing process.
IGRP sends updates to the interfaces in the specified networks. If an interface’s network is not
specified, it will not be advertised in any IGRP update.
It is not necessary to have a registered autonomous system number to use IGRP. If you do not have
a registered number, you are free to create your own. We recommend that if you do have a registered
number, you use it to identify the IGRP process.
Task Command
Define a neighboring router with which to neighbor ip-address
exchange point-to-point routing information.
To control the set of interfaces that you want to exchange routing updates with, you can disable the
sending of routing updates on specified interfaces by configuring the passive-interface command.
See the discussion on filtering in the section in this chapter titled “Filter Routing Information.”
Task Command
Define the variance associated with a particular variance multiplier
path.
Note By using the variance feature, the router can balance traffic across all feasible paths and can
immediately converge to a new path if one of the paths should fail.
See the “IP Routing Protocol Configuration Examples” section at the end of this chapter for an
example of configuring IGRP feasible successor.
Task Command
Distribute traffic proportionately to the ratios of traffic-share {balanced | min}
metrics, or by the minimum-cost route.
Task Command
Adjust the IGRP metric. metric weights tos k1 k2 k3 k4 k5
By default, the IGRP composite metric is a 24-bit quantity that is a sum of the segment delays
and the lowest segment bandwidth (scaled and inverted) for a given route. For a network of
homogeneous media, this metric reduces to a hop count. For a network of mixed media (FDDI,
Ethernet, and serial lines running from 9600 bps to T1 rates), the route with the lowest metric reflects
the most desirable path to a destination.
Disable Holddown
When a router learns that a network is at a greater distance than was previously known, or it learns
the network is down, the route to that network is placed into holddown. During the holddown period,
the route is advertised, but incoming advertisements about that network from any router other than
the one that originally advertised the network’s new metric will be ignored. This mechanism is often
used to help avoid routing loops in the network, but has the effect of increasing the topology
convergence time. To disable holddowns with IGRP, perform the following task in router
configuration mode. All routers in an IGRP autonomous system must be consistent in their use of
holddowns.
Task Command
Disable the IGRP holddown period. no metric holddown
Task Command
Configure the maximum network diameter. metric maximum-hops hops
Task Command
Disable the checking and validation of the source no validate-update-source
IP address of incoming routing updates.
The protocol-dependent modules are responsible for network layer protocol-specific tasks. An
example is the IP Enhanced IGRP module, which is responsible for sending and receiving Enhanced
IGRP packets that are encapsulated in IP. It is also responsible for parsing Enhanced IGRP packets
and informing DUAL of the new information received. IP Enhanced IGRP asks DUAL to make
routing decisions, but the results are stored in the IP routing table. Also, IP Enhanced IGRP is
responsible for redistributing routes learned by other IP routing protocols.
Task Command
Step 1 Enable an IP Enhanced IGRP routing router eigrp autonomous-system
process in global configuration mode.
Step 2 Associate networks with an IP Enhanced network network-number
IGRP routing process in router
configuration mode.
IP Enhanced IGRP sends updates to the interfaces in the specified network(s). If you do not specify
an interface’s network, it will not be advertised in any IP Enhanced IGRP update.
Task Command
Define the variance associated with a particular variance multiplier
path.
Note By using the variance feature, the router can balance traffic across all feasible paths and can
immediately converge to a new path if one of the paths should fail.
Task Command
Adjust the IP Enhanced IGRP metric. metric weights tos k1 k2 k3 k4 k5
Note Because of the complexity of this task, it is not recommended unless it is done with guidance
from an experienced network designer.
By default, the IP Enhanced IGRP composite metric is a 32-bit quantity that is a sum of the segment
delays and the lowest segment bandwidth (scaled and inverted) for a given route. For a network of
homogeneous media, this metric reduces to a hop count. For a network of mixed media (FDDI,
Ethernet, and serial lines running from 9600 bps to T1 rates), the route with the lowest metric reflects
the most desirable path to a destination.
Task Command
Disable automatic summarization. no auto-summary
Task Command
Configure a summary aggregate address. ip summary-address eigrp
autonomous-system-number address mask
Task Command
Redistribute routes from one routing protocol redistribute protocol autonomous-system-number
into another. [route-map map-tag]
To define route maps, perform the following task in global configuration mode:
Task Command
Define any route maps needed to control route-map map-tag [permit | deny] [sequence-number]
redistribution.
Task Command
Disable the redistribution of default no default-information allowed {in | out}
information between IP Enhanced IGRP
processes.
Task Command
Cause the current routing protocol to use the default-metric number
same metric value for all redistributed routes.
Cause the IP Enhanced IGRP routing protocol default-metric bandwidth delay reliability loading mtu
to use the same metric value for all non-IGRP
redistributed routes.
Task Command
Suppress the sending of routing updates passive-interface type number
through a router interface.
Task Command
Control the advertising of routes in routing distribute-list access-list-number out [interface-name |
updates. routing-process | autonomous-system-number]
Task Command
Control which incoming route updates are distribute-list access-list-number in [interface-name]
processes.
Task Command
Apply an offset to routing metrics. offset-list [access-list-number] {in | out} offset
For example, consider a router using IP Enhanced IGRP and RIP. Suppose you trust the IP Enhanced
IGRP-derived routing information more than the RIP-derived routing information. Because the
default IP Enhanced IGRP administrative distance is lower than that for RIP, the router uses the IP
Enhanced IGRP-derived information and ignores the RIP-derived information. However, if you lose
the source of the IP Enhanced IGRP-derived information (for example, because of a power
shutdown), the router uses the RIP-derived information until the IP Enhanced IGRP-derived
information reappears.
Note You can also use administrative distance to rate the routing information from routers running
the same routing protocol. This application is generally discouraged if you are unfamiliar with this
particular use of administrative distance, since it can result in inconsistent routing information,
including forwarding loops.
To filter sources of routing information, perform the following tasks in router configuration mode:
Task Command
Filter on routing information sources. distance eigrp internal-distance external-distance
Adjust the Interval between Hello Packets and the Hold Time
You can adjust the interval between hello packets and the hold time.
Routers periodically send hello packets to each other to dynamically learn of other routers on their
directly attached networks. The routers use this information to discover who their neighbors are and
to learn when their neighbors become unreachable or inoperative.
By default, hello packets are sent every 5 seconds. The exception is on low speed, nonbroadcast,
mutiaccess (NBMA) media, where the default hello interval is 60 seconds. Low speed is considered
to be a rate of T1 or slower, as specified with the bandwidth interface configuration command. The
default hello interval remains 5 seconds for high speed NBMA networks. Note that for the purposes
of Enhanced IGRP, Frame Relay and SMDS networks may or may not be considered to be NBMA.
These networks are considered NBMA if the interface has not been configured to use physical
multicasting; otherwise they are considered not to be NBMA.
You can configure the hold time on a specified interface for a particular IP Enhanced IGRP routing
process designated by the autonomous system number. The hold time is advertised in hello packets
and indicates to neighbors the length of time they should consider the sender valid. The default hold
time is three times the hello interval, or 15 seconds. For slow speed NBMA networks, the default
hold time is 180 seconds.
To change the interval between hello packets, perform the following task in interface configuration
mode:
Task Command
Configure the hello interval for an IP Enhanced ip hello-interval eigrp autonomous-system-number
IGRP routing process. seconds
On very congested and large networks, the default hold time might not be sufficient time for all
routers to receive hello packets from their neighbors. In this case, you may want to increase the hold
time.
To change the hold time, perform the following task in interface configuration mode:
Task Command
Configure the hold time for an IP Enhanced ip hold-time eigrp autonomous-system-number seconds
IGRP routing process.
Note Do not adjust the hold time without advising technical support.
Task Command
Disable split horizon. no ip split-horizon eigrp autonomous-system-number
Configure OSPF
Open Shortest Path First (OSPF) is an IGP developed by the OSPF working group of the Internet
Engineering Task Force (IETF). Designed expressly for IP networks, OSPF supports IP subnetting
and tagging of externally derived routing information. OSPF also allows packet authentication and
uses IP multicast when sending/receiving packets.
We support RFC 1253, Open Shortest Path First (OSPF) MIB, August 1991. The OSPF MIB defines
an IP routing protocol that provides management information related to OSPF and is supported by
Cisco routers.
Note In order to take advantage of the OSPF stub area support, default routing must be used in the
stub area.
Enable OSPF
As with other routing protocols, 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 of IP addresses. Perform the following tasks, starting in global
configuration mode:
Task Command
Step 1 Enable OSPF routing, which places you router ospf process-id
in router configuration mode.
Step 2 Define an interface on which OSPF runs network address wildcard-mask area area-id
and define the area ID for that interface.
In interface configuration mode, specify any of the following interface parameters as needed for your
network:
Task Command
Explicitly specify the cost of sending a packet on ip ospf cost cost
an OSPF interface.
Specify the number of seconds between link state ip ospf retransmit-interval seconds
advertisement retransmissions for adjacencies
belonging to an OSPF interface.
Set the estimated number of seconds it takes to ip ospf transmit-delay seconds
transmit a link state update packet on an OSPF
interface.
Set router priority to help determine the OSPF ip ospf priority number
designated router for a network.
Specify the length of time, in seconds, between ip ospf hello-interval seconds
the hello packets that a router sends on an OSPF
interface.
Set the number of seconds that a router’s hello ip ospf dead-interval seconds
packets must not have been seen before its
neighbors declare the OSPF router down.
Assign a specific password to be used by ip ospf authentication-key key
neighboring OSPF routers on a network segment
that is using OSPF’s simple password
authentication.
Enable OSPF MD5 authentication. ip ospf message-digest-key keyid md5 key
network. In these cases, you can configure the OSPF network type as a point-to-multipoint network.
Routing between two routers that are not directly connected will go through the router that has
virtual circuits to both routers. Note that you do not need to configure neighbors when using this
feature.
An OSPF point-to-multipoint interface is defined as a numbered point-to-point interface having one
or more neighbors. It creates multiple host routes. An OSPF point-to-multipoint network has the
following benefits compared to nonbroadcast multiaccess and point-to-point networks:
• Point-to-multipoint is easier to configure because it requires no configuration of neighbor
commands, it consumes only one IP subnet, and it requires no designated router election.
• It costs less because it does not require a fully-meshed topology.
• It is more reliable because it maintains connectivity in the event of virtual circuit failure.
To configure your OSPF network type, perform the following task in interface configuration mode:
Task Command
Configure the OSPF network type for a specified ip ospf network {broadcast | non-broadcast |
interface. point-to-multipoint}
For an example of an OSPF point-to-multipoint network, see the section “OSPF Point-to-Multipoint
Example” at the end of this chapter.
Task Command
Configure routers interconnecting to neighbor ip-address [priority number] [poll-interval
nonbroadcast networks. seconds]
Stub areas are areas into which information on external routes is not sent. Instead, there is a default
external route generated by the area border router into the stub area for destinations outside the
autonomous system. To further reduce the number of link state advertisements (LSA) sent into a stub
area, you can configure no-summary on the Area Border Router (ABR) to prevent it from sending
summary link advertisement (LSA type 3) into the stub area.
In router configuration mode, specify any of the following area parameters as needed for your
network:
Task Command
Enable authentication for an OSPF area. area area-id authentication
Enable MD5 authentication for an OSPF area. area area-id authentication message-digest
Define an area to be a stub area. area area-id stub [no-summary]
Assign a specific cost to the default summary area area-id default-cost cost
route used for the stub area.
Task Command
Specify an address range for which a single route area area-id range address mask
will be advertised.
Task Command
Specify an address and mask that covers summary-address address mask
redistributed routes, so only one summary route is
advertised.
configuration information in each router consists of the other virtual endpoint (the other Area Border
Router), and the nonbackbone area that the two routers have in common (called the transit area).
Note that virtual links cannot be configured through stub areas.
To establish a virtual link, perform the following task in router configuration mode:
Task Command
Establish a virtual link. area area-id virtual-link router-id [hello-interval seconds]
[retransmit-interval seconds] [transmit-delay seconds]
[dead-interval seconds] [[authentication-key key] |
[message-digest-key keyid md5 key]]
To display information about virtual links, use the show ip ospf virtual-links EXEC command. To
display the router ID of an OSPF router, use the show ip ospf EXEC command.
Task Command
Force the autonomous system boundary router default-information originate [always] [metric
to generate a default route into the OSPF metric-value] [metric-type type-value] [route-map
routing domain. map-name]
See also the discussion of redistribution of routes in the “Configure Routing Protocol-Independent
Features” section later in this chapter.
Task Command
Configure DNS name lookup. ip ospf name-lookup
If a loopback interface is configured with an IP address, the router will use this IP address as its
router ID, even if other interfaces have larger IP addresses. Since loopback interfaces never go down,
greater stability in the routing table is achieved.
OSPF automatically prefers a loopback interface over any other kind, and it chooses the highest IP
address among all loopback interfaces in the router. If no loopback interfaces are present, the highest
IP address in the router is chosen. You cannot tell OSPF to use any particular interface.
To configure an IP address on a loopback interface, perform the following tasks, starting in global
configuration mode:
Task Command
Step 1 Create a loopback interface, which interface loopback 01
places you in interface configuration
mode.
Step 2 Assign an IP address to this interface. ip address address mask2
1. This command is documented in the “Interface Commands” chapter of the Router Products Command Reference
publication.
2. This command is documented in the “IP Commands” chapter of the Router Products Command Reference publication.
Task Command
Disable default OSPF metric calculations based on no ospf auto-cost-determination
interface bandwidth, resulting in a fixed default
metric assignment.
Task Command
Suppress the sending of hello packets through passive-interface type number
the specified interface.
Task Command
Configure route calculation timers. timers spf spf-delay spf-holdtime
Configure RIP
The Routing Information Protocol (RIP) is a relatively old but still commonly used IGP created for
use in small, homogeneous networks. It is a classical distance-vector routing protocol.
RIP uses broadcast User Datagram Protocol (UDP) data packets to exchange routing information.
Each router sends routing information updates every 30 seconds; this process is termed advertising.
If a router does not receive an update from another router for 180 seconds or more, it marks the
routes served by the nonupdating router as being unusable. If there is still no update after 240
seconds, the router removes all routing table entries for the nonupdating router.
The measure, or metric, that RIP uses to rate the value of different routes is the hop count. The hop
count is the number of routers that can be traversed in a route. A directly connected network has a
metric of zero; an unreachable network has a metric of 16. This small range of metrics makes RIP
unsuitable as a routing protocol 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 network 0.0.0.0 does not
exist; RIP treats 0.0.0.0 as a network to implement the default routing feature. Our routers will
advertise 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 the specified networks. If an interface’s network is not
specified, it will not be advertised in any RIP update.
For information about filtering RIP information, see the “Filter Routing Information” section later
in this chapter. RIP is documented in RFC 1058.
To configure RIP, perform the following tasks, starting in global configuration mode:
Task Command
Step 1 Enable a RIP routing process, which router rip
places you in router configuration mode.
Step 2 Associate a network with a RIP routing network network-number
process.
Task Command
Disable the checking and validation of the source no validate-update-source
IP address of incoming routing updates.
Task Command
Define a neighboring router with which to neighbor ip-address
exchange point-to-point routing information.
To control the set of interfaces that you want to exchange routing updates with, you can disable the
sending of routing updates on specified interfaces by configuring the passive-interface command.
See the discussion on filtering in the section in this chapter titled “Filter Routing Information.”
Task Command
Add interpacket delay for RIP updates sent. output-delay delay
Configure IS-IS
IS-IS, which stands for Intermediate System-to-Intermediate System, is an International
Organization for Standardization (ISO) dynamic routing specification. IS-IS is described in
ISO 10589. Cisco’s implementation of IS-IS allows you to configure IS-IS as an IP routing protocol
on your router.
In addition, you can filter routing information (see the task “Filter Routing Information” later in this
chapter for information on how to do this), and specify route redistribution (see the task
“Redistribute Routing Information” later in this chapter for information on how to do this).
Enable IS-IS
As with other routing protocols, enabling IS-IS requires that you create an IS-IS routing process and
assign it to specific networks. You can specify only one IS-IS process per router. Only one IS-IS
process is allowed whether you run it in integrated mode, ISO CLNS only, or IP only.
Network Entity Titles (NETs) define the area addresses for the IS-IS area. Multiple NETs per router
are allowed, up to a maximum of three. Refer to the “Configuring ISO CLNS” chapter for a more
detailed discussion of NETs.
To enable IS-IS on the router, perform the following tasks starting in global configuration mode:
Task Command
Step 1 Enable IS-IS routing and specify an router isis [tag]
IS-IS process for IP, which places you in
router configuration mode.
Step 2 Configure NETs for the routing process; net network-entity-title
you can specify a name for a NET as
well as an address.
Step 3 Enter interface configuration mode. interface type number
Step 4 Specify the interfaces that should be ip router isis [tag]
actively routing IS-IS.
See the section “Configuring IS-IS as an IP Routing Protocol Example” at the end of this chapter.
Task Command
Configure the metric (or cost) for the specified isis metric default-metric [delay-metric [expense-metric
interface. [error-metric]]] {level-1 | level-2}
Task Command
Specify the length of time, in seconds, between isis hello-interval seconds {level-1 | level-2}
hello packets the router sends on the specified
interface.
The hello interval can be configured independently for Level 1 and Level 2, except on serial
point-to-point interfaces. (Because there is only a single type of hello packet sent on serial links, it
is independent of Level 1 or Level 2.) Specify an optional level for X.25, SMDS, and Frame Relay
multiaccess networks.
Task Command
Configure the IS-IS CSNP interval for the isis csnp-interval seconds {level-1 | level-2}
specified interface.
This feature does not apply to serial point-to-point interfaces. It applies to WAN connections if the
WAN is viewed as a multiaccess meshed network.
To set the retransmission level, perform the following task in interface configuration mode:
Task Command
Configure the number of seconds between isis retransmit-interval seconds
retransmission of IS-IS LSPs for point-to-point
links.
The value you specify should be an integer greater than the expected round-trip delay between any
two routers on the attached network. The setting of this parameter should be conservative, or
needless retransmission will result. The value should be larger for serial lines and virtual links.
Task Command
Configure the priority to use for designated isis priority value {level-1 | level-2}
router election.
Task Command
Configure the type of adjacency desired for isis circuit-type {level-1 | level-1-2 | level-2-only}
neighbors on the specified interface (the
interface circuit type).
Task Command
Configure the authentication password for a isis password password {level-1 | level-2}
specified interface.
Task Command
Force a default route into the IS-IS routing default-information originate [route-map map-name]
domain.
See also the discussion of redistribution of routes in the “Configure Routing Protocol-Independent
Features” section later in this chapter.
Task Command
Configure the level at which the router should is-type {level-1 | level-1-2 | level-2-only}
operate.
Task Command
Configure the area authentication password. area-password password
Configure the routing domain authentication domain-password password
password.
To create a summary of addresses for a given level, perform the following task in router
configuration mode:
Task Command
Create a summary of addresses for a given summary-address address mask {level-1 | level-1-2 |
level. level-2}
Configure BGP
The Border Gateway Protocol (BGP), as defined in RFCs 1163 and 1267, allows you to set up an
interdomain routing system that automatically guarantees the loop-free exchange of routing
information between autonomous systems.
4 If the routes have the same weight, prefer the route with the largest local preference.
5 If the routes have the same local preference, prefer the route that was originated by the local
router.
For example, a route might be originated by the local router using the network bgp command,
or through redistribution from an IGP.
6 If the local preference is the same, or if no route was originated by the local router, prefer the
route with the shortest autonomous system path.
7 If the autonomous system path length is the same, prefer the route with the lowest origin code
(IGP < EGP < INCOMPLETE).
8 If the origin codes are the same, prefer the route with the lowest Multi Exit Discriminator (MED)
metric attribute.
This comparison is only done if the neighboring autonomous system is the same for all routes
considered, unless bgp always-compare-med is enabled.
9 Prefer an external (EBGP) path over an internal (IBGP) path.
This means the router will prefer the shortest internal path within the autonomous system to reach
the destination (the shortest path to the BGP next-hop).
11 If the following conditions are all true, insert the route for this path into the IP routing table:
Note EBGP load sharing can occur at this point, which means that multiple paths can be
installed in the forwarding table.
12 If multipath is not enabled, prefer the route with the lowest IP address value for the BGP router
ID.
The router ID is usually the highest IP address on the router or the loopback (virtual) address, but
might be implementation-specific.
Task Command
Step 1 Enable a BGP routing process, which router bgp autonomous-system
places you in router configuration mode.
Step 2 Flag a network as local to this network network-number [mask network-mask]
autonomous system and enter it to the
BGP table.
Note For exterior protocols, a reference to an IP network from the network router configuration
command controls only which networks are advertised. This is in contrast to Interior Gateway
Protocols (IGP), such as IGRP, which also use the network command to determine where to send
updates.
Note The network command is used to inject IGP routes into the BGP table. The network-mask
portion of the command allows supernetting and subnetting. A maximum of 200 entries of the
command are accepted. Alternatively, you could use the redistribute command to achieve the same
result.
Task Command
Specify a BGP neighbor. neighbor {ip-address | peer-group-name}
remote-as number
See an example of configuring BGP neighbors in the section “BGP Neighbor Configuration
Examples“ at the end of this chapter.
Task Command
Reset a particular BGP connection. clear ip bgp address
Task Command
Enable neighbor changes logging. bgp log-neighbor-changes
Use the show logging command to display the log for the BGP neighbor changes.
Task Command
Disable synchronization between BGP and an IGP. no synchronization
When you disable synchronization, you should also clear BGP sessions using the clear ip bgp
command.
See the section “BGP Synchronization Example” at the end of this chapter for an example of
synchronization.
In general, you will not want to redistribute most BGP routes into your IGP. A common design is to
redistribute one or two routes and to make them exterior routes in IGRP or have your BGP speaker
generate a default route for your autonomous system. When redistributing from BGP into IGP, only
the routes learned using EBGP get redistributed.
In most circumstances, you also will not want to redistribute your IGP into BGP. Just list the
networks in your autonomous system with network router configuration commands and your
networks will be advertised. Networks that are listed this way are referred to as local networks and
have a BGP origin attribute of “IGP.” They must appear in the main IP routing table and can have
any source; for example, they can be directly connected or learned via an IGP. The BGP routing
process periodically scans the main IP routing table to detect the presence or absence of local
networks, updating the BGP routing table as appropriate.
If you do perform redistribution into BGP, you must be very careful about the routes that can be in
your IGP, especially if the routes were redistributed from BGP into the IGP elsewhere. This creates
a situation where BGP is potentially injecting information into the IGP and then sending such
information back into BGP and vice versa.
Networks that are redistributed into BGP from the EGP protocol will be given the BGP origin
attribute “EGP.” Other networks that are redistributed into BGP will have the BGP origin attribute
of “incomplete.” The origin attribute in our implementation is only used in the path selection
process.
Task Command
Specify a weight for all routes from a neighbor. neighbor {ip-address | peer-group-name} weight weight
In addition, you can assign weights based on autonomous system path access lists. A given weight
becomes the weight of the route if the autonomous system path is accepted by the access list. Any
number of weight filters are allowed.
To assign weights based on autonomous system path access lists, perform the following tasks
starting in global configuration mode:
Task Command
Step 1 Define a BGP-related access list. ip as-path access-list access-list-number {permit |
deny} as-regular-expression
Step 2 Enter router configuration mode. router bgp autonomous-system
Step 3 Configure administrative weight on all neighbor ip-address filter-list access-list-number weight
incoming routes matching an weight
autonomous system path filter.
Task Command
Filter BGP routing updates to/from neighbors neighbor {ip-address | peer-group-name} distribute-list
as specified in an access list. access-list-number {in | out}
Task Command
Step 1 Define a BGP-related access list. ip as-path access-list access-list-number {permit |
deny} as-regular-expression
Step 2 Enter router configuration mode. router bgp autonomous-system
Step 3 Establish a BGP filter. neighbor {ip-address | peer-group-name} filter-list
access-list-number {in | out | weight weight}
See the example in the section “BGP Path Filtering by Neighbor Example” at the end of this chapter.
Task Command
Disable next-hop processing on BGP updates to a neighbor {ip-address | peer-group-name}
neighbor. next-hop-self
Configuring the above command causes the current router to advertise itself as the next hop for the
specified neighbor. Therefore other BGP neighbors will forward to it packets for that address. This
is useful in a nonmeshed environment, since you know that a path exists from the present router to
that address. In a fully meshed environment, this is not useful since it will result in unnecessary extra
hops, because there might be a direct access through the fully meshed cloud with fewer hops.
Task Command
Specify the BGP version to use when neighbor {ip-address | peer-group-name} version
communicating with a neighbor. value
Task Command
Set the weight for a network. network address weight weight
Task Command
Set a multi exit discriminator. default-metric number
Alternatively, you can set the MED using the route-map command. See the section “BGP Route
Map Examples” at the end of this chapter.
Task Command
Apply a route map to incoming or outgoing routes. neighbor {ip-address | peer-group-name}
route-map route-map-name {in | out}
For examples, see the section “BGP Route Map Examples” at the end of this chapter.
keep in mind that the router configured with the template name is in a passive state for these
neighbors, which means it will not initiate sessions; rather it waits until a session is initiated to it and
then verifies based on the criteria mentioned above.
If you use the neighbor configure-neighbors command, all the neighbors that initiate a session to
the router and pass the neighbor-list are permanently entered into the configuration (NVRAM) upon
issuing the write memory command. (Note that the write memory command has been replaced by
the copy running-config startup-config command.)
Perform the following tasks in router configuration mode to configure BGP neighbor templates:
Task Command
Support anonymous neighbor peers by neighbor template-name neighbor-list
configuring a neighbor template. access-list-number
Treat neighbors that have been accepted by a neighbor template-name configure-neighbors
template as if they were configured by hand.
See the example in the section “Using Access Lists to Specify Neighbors” at the end of this chapter.
Task Command
Automatically reset EBGP sessions. bgp fast-external-fallover
Task Command
Create an aggregate entry in the BGP routing aggregate-address address mask
table.
Generate an aggregate with AS-SET. aggregate-address address mask as-set
Advertise summary addresses only. aggregate-address address-mask summary-only
Suppress selected, more specific routes. aggregate-address address mask suppress-map
map-name
For an example, see the section “BGP Aggregate Route Examples” at the end of this chapter.
Task Command
Disable automatic network summarization. no auto-summary
Task Command
Create a community list. ip community-list community-list-number {permit |
deny} community-number
To set the COMMUNITIES attribute and match clauses based on communities, see the match
community-list and set community commands in the section “Redistribute Routing Information”
later in this chapter.
By default, no COMMUNITIES attribute is sent to a neighbor. You can specify that the
COMMUNITIES attribute be sent to the neighbor at an IP address by performing the following task
in router configuration mode:
Task Command
Specify that the COMMUNITIES attribute be sent neighbor {ip-address | peer-group-name}
to the neighbor at this IP address. send-community
Task Command
Configure a BGP confederation. bgp confederation identifier autonomous-system
In order to treat the neighbors from other autonomous systems within the confederation as special
EBGP peers, perform the following task in router configuration mode:
Task Command
Specify the autonomous systems that belong to the bgp confederation peers autonomous-system
confederation. [autonomous-system ...]
See the example configuration of several peers in a confederation in the section “BGP Confederation
Example“ at the end of this chapter.
For internal BGP, you might want to allow your BGP connections to stay up regardless of which
interface is used to reach a neighbor. To do this, you first configure a loopback interface and assign
it an IP address. Next, configure the BGP update source to be the loopback interface. Finally,
configure your neighbor to use the address on the loopback interface. Now the IBGP session will be
up as long as there is a route, irrespective of any interface.
You can set the minimum interval of time between BGP routing updates.
You can invoke MD5 authentication between two BGP peers, meaning that each segment sent on the
TCP connection between them is verified. This feature must be configured with the same password
on both BGP peers; otherwise, the connection between them will not be made. The authentication
feature uses the MD5 algorithm. Invoking authentication causes the router to generate and check the
MD5 digest of every segment sent on the TCP connection. If authentication is invoked and a segment
fails authentication, a message appears on the console.
Configure any of the following neighbor options in router configuration mode:
Task Command
Specify an access list of BGP neighbors. neighbor any [access-list-number]
Allow internal BGP sessions to use any neighbor {ip-address | peer-group-name}
operational interface for TCP connections. update-source interface
Allow BGP sessions even when the neighbor is neighbor {ip-address | peer-group-name}
not on a directly connected segment. ebgp-multihop
Set the minimum interval between sending neighbor {ip-address | peer-group-name}
BGP routing updates. advertisement-interval seconds
Invoke MD5 authentication on a TCP neighbor {ip-address | peer-group-name} password
connection to a BGP peer. string
Task Command
Create a BGP peer group. neighbor peer-group-name peer-group
After you create a peer group, you configure the peer group with neighbor commands. By default,
members of the peer group inherit all of the configuration options of the peer group. Members can
also be configured to override the options that do not affect outbound updates.
Peer group members will always inherit the following: remote-as (if configured), version,
update-source, out-route-map, out-filter-list, out-dist-list, minimum-advertisement-interval, and
next-hop-self. All of the peer group members will inherit changes made to the peer group.
To assign configuration options to the peer group, perform any of the following tasks in router
configuration mode:
Task Command
Specify that the COMMUNITIES attribute be sent neighbor {ip-address | peer-group-name}
to the neighbor at this IP address. send-community
Allow internal BGP sessions to use any operational neighbor {ip-address | peer-group-name}
interface for TCP connections. update-source interface
Allow BGP sessions even when the neighbor is not neighbor {ip-address | peer-group-name}
on a directly connected segment. ebgp-multihop
Set the minimum interval between sending BGP neighbor {ip-address | peer-group-name}
routing updates. advertisement-interval seconds
Invoke MD5 authentication on a TCP connection to neighbor {ip-address | peer-group-name}
a BGP peer. password string
Specify a BGP neighbor. neighbor {ip-address | peer-group-name}
remote-as number
Specify a weight for all routes from a neighbor. neighbor {ip-address | peer-group-name} weight
weight
Filter BGP routing updates to/from neighbors as neighbor {ip-address | peer-group-name}
specified in an access list. distribute-list access-list-number {in | out}
Establish a BGP filter. neighbor {ip-address | peer-group-name}
filter-list access-list-number {in | out | weight
weight}
Disable next-hop processing on BGP updates to a neighbor {ip-address | peer-group-name}
neighbor. next-hop-self
Specify the BGP version to use when neighbor {ip-address | peer-group-name} version
communicating with a neighbor. value
Apply a route map to incoming or outgoing routes. neighbor {ip-address | peer-group-name}
route-map route-map-name {in | out}
If a peer group is not configured with a remote-as, the members can be configured with the
neighbor ip-address | peer-group-name remote-as command. This allows you to create peer groups
containing EBGP neighbors.
Finally, to configure a BGP neighbor to be a member of that BGP peer group, perform the following
task in router configuration mode, using the same peer group name:
Task Command
Make a BGP neighbor a member of the peer group. neighbor ip-address peer-group peer-group-name
For examples of IBGP and EBGP peer groups, see the section “BGP Peer Group Examples” at the
end of this chapter.
Task Command
Indicate reachable networks through backdoor network address backdoor
routes.
Task Command
Apply route-map to routes when updating the table-map route-map name
IP routing table.
Task Command
Assign a BGP administrative distance. distance bgp external-distance internal-distance
local-distance
Changing the administrative distance of BGP routes is considered dangerous and generally is not
recommended. The external distance should be lower than any other dynamic routing protocol, and
the internal and local distances should be higher than any other dynamic routing protocol.
Task Command
Adjust BGP timers. timers bgp keepalive holdtime
Task Command
Change the default local preference value. bgp default local-preference value
You can use route maps to change the default local preference of specific paths. See the section
“BGP Route Map Examples” for examples.
Task Command
Allow the redistribution of network 0.0.0.0 into default-information originate
BGP.
Task Command
Allow the comparison of MEDs for paths from bgp always-compare-med
neighbors in different autonomous systems.
Configure EGP
The Exterior Gateway Protocol (EGP), specified in RFC 904, is an older EGP used for
communicating with certain routers in the Defense Data Network (DDN) that the U.S. Department
of Defense designates as core routers. EGP also was used extensively when attaching to the National
Science Foundation Network (NSFnet) and other large backbone networks.
An exterior router uses EGP to advertise its knowledge of routes to networks within its autonomous
system. It sends these advertisements to the core routers, which then readvertise their collected
routing information to the exterior router. A neighbor or peer router is any router with which the
router communicates using EGP.
• EGP routers poll their neighbors periodically to see if they are “alive.”
• EGP routers send update messages containing information about the reachability of networks
within their autonomous systems.
Task Command
Step 1 Specify the autonomous system that the autonomous-system local-as
router resides in for EGP.
Step 2 Enable an EGP routing process, which router egp remote-as
places you in router configuration mode.
Step 3 Specify a network to be advertised to the network network-number
EGP peers of an EGP routing process.
Note For exterior gateway protocols, a reference to an IP network from the network router
configuration command that is learned by another routing protocol does not require a redistribute
router configuration command. This is in contrast to interior gateway protocols, such as IGRP, which
require the use of the redistribute command.
Task Command
Specify an EGP neighbor. neighbor ip-address
Task Command
Adjust EGP timers. timers egp hello polltime
Task Command
Specify a third-party through which certain neighbor ip-address third-party third-party-ip-address
destinations can be achieved. [internal | external]
See the “Third-Party EGP Support Example” section at the end of this chapter for an example of
configuring third-party EGP support.
Task Command
Configure EGP to generate a default route. default-information originate
Task Command
Step 1 Allow a specific router to act as a peer router egp 0
with any reachable autonomous system.
Step 2 Define how an EGP process determines neighbor any [access-list-number]
which neighbors will be treated as peers.
or
Allow the specified address to be used as
the next hop in EGP advertisements. neighbor any third-party ip-address [internal |
external]
The EGP process defined in this way can act as a peer with any autonomous system, and information
is interchanged freely between autonomous systems.
See the “EGP Core Gateway Example” section at the end of this chapter for an example of
configuring an EGP core gateway.
Note Split horizon is performed only on a per-gateway basis (in other words, if an external router
informs the router about a specific network, and that router is the best path, the router will not inform
the originating external router about that path). Our routers can also perform per-gateway split
horizon on third-party updates.
Configure GDP
The Gateway Discovery Protocol (GDP), designed by Cisco to address customer needs, allows hosts
to dynamically detect the arrival of new routers, as well as determine when a router goes down. You
must have host software to take advantage of this protocol.
For ease of implementation on a variety of host software, GDP is based on the User Datagram
Protocol (UDP). The UDP source and destination ports of GDP datagrams are both set to 1997
(decimal).
There are two types of GDP messages: report and query. On broadcast media, report message
packets are periodically sent to the IP broadcast address announcing that the router is present and
functioning. By listening for these report packets, a host can detect a vanishing or appearing router.
If a host issues a query packet to the broadcast address, the routers each respond with a report sent
to the host’s IP address. On nonbroadcast media, routers send report message packets only in
response to query message packets. The protocol provides a mechanism for limiting the rate at which
query messages are sent on nonbroadcast media.
Figure 19-2 shows the format of the GDP report message packet format. A GDP query message
packet has a similar format, except that the count field is always zero and no address information is
present.
Address 1
Address 2
S1029a
The fields in the Report and Query messages are as follows:
• Version—8-bit field containing the protocol version number. The current GDP version number
is 1. If an unrecognized version number is found, the GDP message must be ignored.
• Opcode—8-bit field that describes the GDP message type. Unrecognized opcodes must be
ignored. Opcode 1 is a report message and opcode 2 is a query message.
• Count—8-bit field that contains the number of address, priority, and hold time types in this
message. A query message has a Count field value of zero. A report message has a count field
value of 1 or greater.
• Reserved—8-bit reserved field; it must be set to zero.
• Address—32-bit fields containing the IP address of a router on the local network segment. There
are no other restrictions on this address. If a host encounters an address that it believes is not on
its local network segment, it should ignore that address.
• Priority—16-bit fields that indicate the relative quality of the associated address. The
numerically larger the value in the priority field, the better the address should be considered.
• Hold Time—16-bit fields. On broadcast media, the number of seconds the associated address
should be used as a router without hearing further report messages regarding that address. On
nonbroadcast media such as X.25, this is the number of seconds the requester should wait before
sending another query message.
Numerous actions can be taken by the host software listening to GDP packets. One possibility is to
flush the host’s ARP cache whenever a router appears or disappears. A more complex possibility is
to update a host routing table based on the coming and going of routers. The particular course of
action taken depends on the host software and your network requirements.
To enable GDP routing and other optional GDP tasks as required for your network, perform the
following tasks in interface configuration mode:
Task Command
Enable GDP processing on an interface. ip gdp
Set the relative quality of the associated address. ip gdp priority number
Set the GDP report period. ip gdp reporttime seconds
Set the length of time the associated address ip gdp holdtime seconds
should be used as a router without hearing further
report messages regarding that address.
Configure IRDP
Like GDP, the ICMP Router Discovery Protocol (IRDP) allows hosts to locate routers. When
operating as a client, router discovery packets are generated, and when operating as a host, router
discovery packets are received.
The only required task for configuring IRDP routing on a specified interface is to enable IRDP
processing on an interface. Perform the following task in interface configuration mode:
Task Command
Enable IRDP processing on an interface. ip irdp
When you enable IRDP processing, the default parameters will apply. You can optionally change
any of these IRDP parameters. Perform the following tasks in interface configuration mode:
Task Command
Send IRDP advertisements to the all-systems ip irdp multicast
multicast address (224.0.0.1) on a specified
interface.
Set the IRDP period for which advertisements are ip irdp holdtime seconds
valid.
Set the IRDP maximum interval between ip irdp maxadvertinterval seconds
advertisements.
Set the IRDP minimum interval between ip irdp minadvertinterval seconds
advertisements.
Set a router’s IRDP preference level. ip irdp preference number
Specify an IRDP address and preference to ip irdp address address [number]
proxy-advertise.
A router can proxy-advertise other machines that use IRDP; however, this is not recommended
because it is possible to advertise nonexistent machines or machines that are down.
Task Command
Enable IP multicast routing on the router. ip multicast-routing
Task Command
Enable dense-mode PIM on the interface. ip pim dense-mode
For an example of how to configure a PIM interface in dense mode, see the section “Configure a
Router to Operate in Dense Mode Example” later in this chapter.
To configure PIM on an interface to be in sparse mode, perform the following task in interface
configuration mode:
Task Command
Enable sparse-mode PIM on the interface. ip pim sparse-mode
For an example of how to configure a PIM interface in sparse mode, see the section “Configure a
Router to Operate in Sparse Mode Example” later in this chapter.
If you configure the router to operate in sparse mode, you must also choose one or more routers to
be RPs. You do not have to configure the routers to be RPs; they learn this themselves. RPs are used
by senders to a multicast group to announce their existence and by receivers of multicast packets to
learn about new senders. A router can be configured so that packets for a single multicast group can
use one or more RPs.
You must configure the IP address of RPs in leaf routers only. Leaf routers are those routers that are
directly connected either to a multicast group member or to a sender of multicast messages.
The RP address is used by first-hop routers to send PIM register messages on behalf of a host sending
a packet to the group. The RP address is also used by last-hop routers to send PIM join/prune
messages to the RP to inform it about group membership. The RP does not need to know it is an RP.
You need to configure the RP address only on first-hop and last-hop routers (leaf routers).
A PIM router can be an RP for more than one group. A group can have more than one RP. The
conditions specified by the access-list determine for which groups the router is an RP.
To configure the address of the RP, perform the following task in global configuration mode:
Task Command
Configure the address of a PIM rendezvous ip pim rp-address ip-address [access-list-number]
point (RP).
Task Command
Control which RPs the local router will accept Join ip pim accept-rp {address | auto-rp}
messages to. [access-list-number]
To have a router join a multicast group and turn on IGMP on the router, perform the following task
in interface configuration mode:
Task Command
Join a multicast group. ip igmp join-group group-address
Task Command
Configure the frequency at which the designated ip igmp query-interval seconds
router sends IGMP host-query messages.
Task Command
Control the multicast groups that hosts on the ip igmp access-group access-list-number
subnet serviced by an interface can join.
Task Command
Configure the frequency at which multicast ip pim query-interval seconds
routers send PIM router-query messages.
Task Command
Configure the TTL threshold of packets being ip multicast ttl-threshold ttl
forwarded out an interface.
Task Command
Configure the metric associated with a set of ip dvmrp metric metric [list access-list-number]
destinations for DVMRP reports. [protocol process-id] | [dvmrp]
To advertise network 0.0.0.0 to DVMRP neighbors on an interface, perform the following task in
interface configuration mode:
Task Command
Advertise network 0.0.0.0 to DVMRP neighbors. ip dvmrp default-information {originate | only}
Task Command
Step 1 Specify a tunnel interface in global interface tunnel number1
configuration mode. This puts the router
into interface configuration mode.
Step 2 Set the tunnel interface’s source address. tunnel source ip-address1
This is the IP address of the interface on
the router.
Step 3 Set the tunnel interface’s destination tunnel destination ip-address1
address. This is the IP address of the
mrouted multitask router.
Step 4 Configure a DVMRP tunnel. tunnel mode dvmrp1
Step 5 Assign an IP address to the interface. ip address address mask2
or
Configure the interface as unnumbered. ip unnumbered type number2
Step 6 Configure PIM on the interface. ip pim [dense-mode | sparse-mode]
Step 7 Configure an acceptance filter for ip dvmrp accept-filter access-list-number [distance]
incoming DVMRP reports.
1. This command is documented in the “Interface Commands” chapter of the Router Products Command Reference
publication.
2. This command is documented in the “IP Commands” chapter of the Router Products Command Reference publication.
For an example of how to configure a DVMRP interoperability over a tunnel interface, see the
section “Configure DVMRP Interoperability Examples” later in this chapter.
Task Command
Enable DVMRP unicast routing. ip dvmrp unicast-routing
Task Command
Change the number of DVMRP routes ip dvmrp route-limit count
advertised over an interface enabled to run
DVMRP.
Task Command
Configure the number of routes that trigger a ip dvmrp routehog-notification route-count
syslog message.
Use the show ip igmp interface command to display a running count of routes. When the count is
exceeded, “*** ALERT ***” is appended to the line.
Task Command
Change the metric added to DVMRP routes ip dvmrp metric-offset [in | out] increment
advertised in incoming reports.
• When you specify in or no keyword, the increment is added to incoming DVMRP reports and is
reported in mrinfo replies. The default value for in is 1.
• When you specify out, the increment is added to outgoing DVMRP reports for routes from the
DVMRP routing table. The default value for out is 0.
This is similar to the metric keyword in mrouted configuration files.
Source or RP
Router A
Valid
multicast
traffic Receiver
Router B
Router C
Wasted
multicast
traffic
Leaf non-pruning
DVMRP machine
S6235
You can prevent a router from peering (communicating) with a DVMRP neighbor if that neighbor
does not support DVMRP pruning or grafting. To do so, configure Router C, which is a neighbor to
the leaf, non-pruning DVMRP machine, with the ip dvmrp reject-non-pruners command on the
interface to the non-pruning machine. Figure 19-4 illustrates this scenario. In this case, when the
router receives a DVMRP Probe or Report message without the Prune-Capable flag set, the router
logs a syslog message and discards the message.
Source or RP
RP
Router A
Multicast
traffic gets
to receiver, Receiver
not to leaf Router B
DVMRP
machine
S6236
Note that the ip dvmrp reject-non-pruners command prevents peering with neighbors only. If there
are any non-pruning routers multiple hops away (downstream toward potential receivers) that are not
rejected, then a non-pruning DVMRP network might still exist.
To prevent peering with non-pruning DVMRP neighbors, perform the following task in interface
configuration mode:
Task Command
Prevent peering with non-pruning DVMRP ip dvmrp reject-non-pruners
neighbors.
MR 1 UR 1 UR 2 MR 2
S3740
Source Destination
link
tunnel
In Figure 19-5, Source delivers multicast packets to Destination by using MR1 and MR2. MR2
accepts the multicast packet only if it thinks it can reach Source over the tunnel. If this is true, when
Destination sends unicast packets to Source, MR2 sends them over the tunnel. This could be slower
than natively sending the unicast packet through UR2, UR1, and MR1.
Prior to multicast static routes, the configuration in Figure 19-6 was used to overcome the problem
of both unicasts and multicasts using the tunnel. In this figure, MR1 and MR2 are used as multicast
routers only. When Destination sends unicast packets to Source, it uses the (UR3,UR2,UR1) path.
When Destination sends multicast packets, the UR routers do not understand or forward them. But
the MR routers forward the packets.
UR 1 UR 2 UR 3
Source Destination
S3741
MR 1 MR 2
link
tunnel
To make the configuration in Figure 19-6 work, MR1 and MR2 must run another routing protocol
(typically a different instantiation of the same protocol running in the UR routers), so that paths from
sources are learned dynamically.
A multicast static route allows you to use the configuration in Figure 19-5 by configuring a static
multicast source. The router uses the configuration information instead of the unicast routing table.
This allows multicast packets to use the tunnel without having unicast packets use the tunnel.
To configure a multicast static route, perform the following task in global configuration mode:
Task Command
Configure an IP multicast static route. ip mroute source mask [protocol as-number]
{rpf-address | type number} [distance]
• If fast switching is disabled on an incoming interface for a multicast routing table entry, the
packet is sent at process level for all interfaces in the outgoing interface list.
• If fast switching is disabled on an outgoing interface for a multicast routing table entry, the packet
is process-level switched for that interface, but might be fast switched for other interfaces in the
outgoing interface list.
You might want to disable fast switching if you want to log debug messages, because when fast
switching is enabled, debug messages are not logged.
To disable fast switching of IP multicast, perform the following task in interface configuration mode:
Task Command
Disable fast switching of IP multicast. no ip mroute-cache
Task Command
Control transmission rate to a multicast group. ip multicast rate-limit {in | out} [group-list
access-list] [source-list access-list] kbps
Task Command
Enable PIM nonbroadcast, multiaccess mode. ip pim nbma-mode
Consider the following two factors before enabling PIM NBMA mode:
• If the number of neighbors grows, the outgoing interface list will get large. This will cost memory
and replication time.
• If the network (Frame Relay, SMDS, or ATM) supports multicast natively, we encourage you to
use it so that replication is performed at optimal points in the network.
Task Command
Enable sd listener support. ip sd listen
Note Consider your decision to use VLSMs carefully. It is easy to make mistakes in address
assignments and it is generally more difficult to monitor your network using VLSMs.
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 Masks
Example” section at the end of this chapter for an example of using VLSMs.
Task Command
Establish a static route. ip route network [mask] {address | interface} [distance]
See the “Overriding Static Routes with Dynamic Protocols Example” section at the end of this
chapter for an example of configuring static routes.
The router 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 19-2. 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.
Static routes that point to an interface will be advertised via RIP, IGRP, and other dynamic routing
protocols, regardless of whether redistribute static commands were specified for those routing
protocols. This is because static routes that point to an interface are considered in the routing table
to be connected and hence lose their static nature. However, if you define a static route to an interface
that is not one of the networks defined in a network command, no dynamic routing protocols will
advertise the route unless a redistribute static command is specified for these protocols.
When an interface goes down, all static routes through that interface are removed from the IP routing
table. Also, when the router can no longer find a valid next hop for the address specified as the
forwarding router’s address in a static route, the static route is removed from the IP routing table.
Task Command
Specify a default network. ip default-network network-number
The range of maximum paths for protocols other than BGP is 1 to 6 paths. To change the maximum
number of parallel paths allowed (for a protocol other than BGP), perform the following task in
router configuration mode:
Task Command
Configure the maximum number of parallel paths maximum-paths maximum
allowed in a routing table.
Task Command
Define any route maps needed to control route-map map-tag [permit | deny] [sequence-number]
redistribution.
One or more match commands and one or more set commands must follow a route-map command.
To define conditions for redistributing routes from one routing protocol into another, perform at least
one of the following tasks in route-map configuration mode:
Task Command
Match a BGP autonomous system path access match as-path path-list-number
list.
Match a BGP community list. match community-list community-list-number [exact]
Match a standard access list. match ip address
access-list-number...access-list-number
Match the specified metric. match metric metric-value
Match a next-hop router address passed by one match ip next-hop
of the access lists specified. access-list-number...access-list-number
Match the specified tag value. match tag tag-value...tag-value
Match the specified next hop route out one of match interface type number...type number
the interfaces specified.
Match the address specified by the specified match ip route-source
advertised access lists. access-list-number...access-list-number
Match the specified route type. match route-type {local | internal | external [type-1 |
type-2] | level-1 | level-2}
One or more match commands and one or more set commands must follow a route-map command.
To define conditions for redistributing routes from one routing protocol into another, perform at least
one of the following tasks in route-map configuration mode:
Task Command
Set the COMMUNITIES attribute. set community {community-number [additive]} | none
Assign a value to a local BGP path. set local-preference value
Specify the BGP weight for the routing table. set weight weight
Set the BGP origin code. set origin {igp | egp as | incomplete}
Modify the BGP autonomous system path. set as-path {tag | prepend as-path-string}
Specify the address of the next hop. set next-hop next-hop
Enable automatic computing of tag table. set automatic-tag
For routes that are advertised into the specified set level {level-1 | level-2 | level-1-2 | stub-area |
area of the routing domain. backbone}
Set the metric value to give the redistributed set metric metric-value
routes (for any protocol except IGRP or IP
Enhanced IGRP).
Set the metric value to give the redistributed set metric bandwidth delay reliability loading mtu
routes (for IGRP or IP Enhanced IGRP only).
Set the MED value on prefixes advertised to set metric-type internal
EBGP neighbor to match the IGP metric of the
next hop.
Set the metric type to give redistributed routes. set metric-type {internal | external | type-1 | type-2}
Set the tag value to associate with the set tag tag-value
redistributed routes.
For examples of BGP route maps, see the section “BGP Route Map Examples” at the end of this
chapter. For examples of BGP communities and route maps, see the section “BGP Community
Examples with Route Maps.”
To distribute routes from one routing domain into another and to control route redistribution,
perform the following tasks in router configuration mode:
Task Command
Redistribute routes from one routing protocol redistribute protocol [process-id] {level-1 | level-1-2 |
to another routing protocol. level-2} [metric metric-value] [metric-type type-value]
[match internal | external type-value] [tag tag-value]
[route-map map-tag] [weight weight] [subnets]
Cause the current routing protocol to use the default-metric number
same metric value for all redistributed routes
(BGP, EGP, OSPF, RIP).
Cause the IGRP or Enhanced IGRP routing default-metric bandwidth delay reliability loading mtu
protocol to use the same metric value for all
redistributed routes.
Disable the redistribution of default no default-information allowed {in | out}
information between IGRP processes. This is
enabled by default.
The metrics of one routing protocol do not necessarily translate into the metrics of another. For
example, the RIP metric is a hop count and the IGRP metric is a combination of five quantities. In
such situations, an artificial metric is assigned to the redistributed route. Because of this unavoidable
tampering with dynamic information, carelessly exchanging routing information between different
routing protocols can create routing loops, which can seriously degrade network operation.
See the “IP Routing Protocol Configuration Examples” section at the end of this chapter for
examples of configuring redistribution and route maps.
Note When routes are redistributed between OSPF processes, no OSPF metrics are preserved.
Task Command
Suppress the sending of routing updates passive-interface type number
through the specified router interface.
See the “Passive Interface Examples” section at the end of this chapter for examples of configuring
passive interfaces.
Task Command
Permit or deny routes from being advertised in distribute-list access-list-number out [interface-name |
routing updates depending upon the action routing-process]
listed in the access list.
Task Command
Suppress routes listed in updates from being distribute-list access-list-number in [interface-name]
processed.
Task Command
Apply an offset to routing metrics. offset-list [access-list-number] {in | out} offset [type
number]
Task Command
Filter on routing information sources. distance weight [address-mask [access-list-number]] [ip]
For example, consider a router using IGRP and RIP. Suppose you trust the IGRP-derived routing
information more than the RIP-derived routing information. In this example, because the default
IGRP administrative distance is lower than the default RIP administrative distance, the router uses
the IGRP-derived information and ignores the RIP-derived information. However, if you lose the
source of the IGRP-derived information (to a power shutdown in another building, for example), the
router uses the RIP-derived information until the IGRP-derived information reappears.
Note You also can use administrative distance to rate the routing information from routers running
the same routing protocol. This application is generally discouraged if you are unfamiliar with this
particular use of administrative distance, because it can result in inconsistent routing information,
including forwarding loops.
Assigning administrative distances is a problem unique to each network and is done in response to
the greatest perceived threats to the network. Even when general guidelines exist, the network
manager must ultimately determine a reasonable matrix of administrative distances for the network
as a whole. Table 19-3 shows the default administrative distance for various sources of routing
information.
See the “Administrative Distance Examples” section at the end of this chapter for examples of
setting administrative distances.
Task Command
Identify the route map to use for policy routing. ip policy route-map map-tag
You must also define the route map to be used for policy routing. Perform the following task in
global configuration mode:
Task Command
Define a route map to control where packets are route-map map-tag [permit | deny]
output. [sequence-number]
The next step is to define the criteria by which packets are examined to see if they will be policy
routed. No match clause in the route map indicates all packets. Perform one or more of the following
tasks in route-map configuration mode:
Task Command
Match the Level 3 length of the packet. match length min max
Match the destination IP address that is permitted match ip address
by one or more standard or extended access lists. access-list-number...access-list-number
The last step is to specify where the packets that pass the match criteria are output. To do so, perform
one or more of the following tasks in route-map configuration mode:
Task Command
Specify the next hop to route the packet to (it need set ip next-hop ip-address [... ip-address]
not be adjacent).
Task Command
Specify the output interface for the packet. set interface type number [... type number]
Specify the next hop to route the packet to, if there set ip default next-hop ip-address [... ip-address]
is no explicit route for this destination.
Specify the output interface for the packet, if there set default interface type number [... type number]
is no explicit route for this destination.
The set commands can be used in conjunction with each other. They are evaluated in the order shown
in the task table above. A usable next hop implies an interface. Once the local router finds a next hop
and a usable interface, it routes the packet.
For an example, see the section “Policy Routing Example” at the end of this chapter.
Task Command
Identify the route map to use for local policy ip local policy route-map map-tag
routing.
Use the show ip local policy command to display the route map used for local policy routing, if one
exists.
Adjust Timers
Routing protocols use a variety of timers that determine such variables as the frequency of routing
updates, the length of time before a route becomes invalid, and other parameters. You can adjust
these timers to tune routing protocol performance to better suit your internetwork needs.
For IGRP and RIP, you can make the following timer adjustments:
• The rate (time in seconds between updates) at which routing updates are sent
• The interval of time (in seconds) after which a route is declared invalid
• The interval (in seconds) during which routing information regarding better paths is suppressed
• The amount of time (in seconds) that must pass before a route is removed from the routing table
• The amount of time for which routing updates will be postponed
EGP and BGP have their own timers commands, although some EGP timers might be set with the
timers basic command. See the EGP and BGP sections, respectively.
It also is possible to tune the IP routing support in the software to enable faster convergence of the
various IP routing algorithms and hence, quicker fallback to redundant routers. The total effect is to
minimize disruptions to end users of the network in situations where quick recovery is essential.
To adjust RIP or IGRP timers, perform the following task in router configuration mode:
Task Command
Adjust RIP or IGRP timers. timers basic update invalid holddown flush [sleeptime]
Task Command
Enable split horizon. ip split-horizon
Disable split horizon. no ip split-horizon
Split horizon for Frame Relay and SMDS encapsulation is disabled by default. Split horizon is not
disabled by default for interfaces using any of the X.25 encapsulations. For all other encapsulations,
split horizon is enabled by default.
See the section “Split Horizon Examples” at the end of this chapter for examples of using split
horizon.
Note In general, changing the state of the default is not recommended unless you are certain that
your application requires making a change in order to advertise routes properly. Remember: If split
horizon is disabled on a serial interface (and that interface is attached to a packet-switched network),
you must disable split horizon for all routers in any relevant multicast groups on that network.
Task Command
Clear the IP ARP cache and the fast-switching clear arp-cache
cache.
Reset a particular BGP connection. clear ip bgp address
Reset all BGP connections. clear ip bgp *
Task Command
Remove all members of a BGP peer group. clear ip bgp peer-group tag
Delete routes from the DVMRP routing table. clear ip dvmrp route { * | route}
Delete neighbors from the neighbor table. clear ip eigrp neighbors [ip-address | interface]
Delete entries from the IGMP cache. clear ip igmp group [group-name | group-address |
interface]
Delete entries from the IP multicast routing clear ip mroute {* | group [source]}
table.
Clear one or more routes from the IP routing clear ip route {network [mask] | *}
table.
Delete session directory cache entries. clear ip sd [group-address | “session-name”]
Task Command
Trace a branch of a multicast tree for a specific mbranch group-address branch-address [ttl]
group.
Trace a branch of a multicast tree for a group in mrbranch group-address branch-address [ttl]
the reverse direction.
Query a multicast router about which mrinfo [hostname-or-address]
neighboring multicast routers are peering with [source-address-or-interface]
it.
Display IP multicast packet rate and loss mstat source [destination] [group]
information.
Trace the path from a source to a destination mtrace source [destination] [group]
branch for a multicast distribution tree for a
given group.
Send an ICMP Echo Request to a multicast ping [group-address-or-name]
group address.
Display all BGP routes that contain subnet and show ip bgp cidr-only
supernet network masks.
Display routes that belong to the specified show ip bgp community community-number [exact]
communities.
Display routes that are permitted by the show ip bgp community-list community-list-number
community list. [exact]
Display routes that are matched by the show ip bgp filter-list access-list-number
specified autonomous system path access list.
Display the routes with inconsistent originating show ip bgp inconsistent-as
autonomous systems.
Display the routes that match the specified show ip bgp regexp regular-expression
regular expression entered on the command
line.
Task Command
Display the contents of the BGP routing table. show ip bgp [network] [network-mask] [subnets]
Display detailed information on the TCP and show ip bgp neighbors [address]
BGP connections to individual neighbors.
Display routes learned from a particular BGP show ip bgp neighbors address [routes | paths]
neighbor.
Display all BGP paths in the database. show ip bgp paths
Display information about BGP peer groups. show ip bgp peer-group [tag] [summary]
Display the status of all BGP connections. show ip bgp summary
Display the syslog, including neighbor state show logging
changes.
Display the entries in the DVMRP routing show ip dvmrp route [ip-address]
table.
Display statistics on EGP connections and show ip egp
neighbors.
Display the IP Enhanced IGRP discovered show ip eigrp neighbors [type number]
neighbors.
Display the IP Enhanced IGRP topology table show ip eigrp topology [autonomous-system-number |
for a given process. [[ip-address] mask]]
Display the number of packets sent and show ip eigrp traffic [autonomous-system-number]
received for all or a specified IP Enhanced
IGRP process.
Display the multicast groups that are directly show ip igmp groups [group-name | group-address | type
connected to the router and that were learned number]
via IGMP.
Display multicast-related information about an show ip igmp interface [type number]
interface.
Display IRDP values. show ip irdp
Display the local policy route map, if any. show ip local policy
Display the contents of the IP fast switching show ip mcache [group [source]]
cache.
Display the contents of the IP multicast routing show ip mroute [group-name | group-address] [source]
table. [summary] [count] [active kbps]
Display general information about OSPF show ip ospf [process-id]
routing processes in a particular router.
Task Command
Display lists of information related to the OSPF show ip ospf [process-id area-id] database
database for a specific router. show ip ospf [process-id area-id] database [router]
[link-state-id]
show ip ospf [process-id area-id] database [network]
[link-state-id]
show ip ospf [process-id area-id] database [summary]
[link-state-id]
show ip ospf [process-id area-id] database
[asb-summary] [link-state-id]
show ip ospf [process-id] database [external]
[link-state-id]
show ip ospf [process-id area-id] database
[database-summary]
Display the internal OSPF routing table entries show ip ospf border-routers
to Area Border Router (ABR) and Autonomous
System Boundary Router (ASBR).
Display OSPF-related interface information. show ip ospf interface [interface-name]
Display OSPF-neighbor information on a show ip ospf neighbor [interface-name] [neighbor-id]
per-interface basis. detail
Display a list of all LSAs requested by a router. show ip ospf request-list [nbr] [intf] [intf-nbr]
Display a list of all LSAs waiting to be show ip ospf retransmission-list [nbr] [intf] [intf-nbr]
retransmitted.
Display OSPF-related virtual links information. show ip ospf virtual-links
Display information about interfaces show ip pim interface [type number]
configured for PIM.
List the PIM neighbors discovered by the show ip pim neighbor [type number]
router.
Display the RP routers associated with a show ip pim rp [group-name | group-address]
sparse-mode multicast group.
Display policy route maps. show ip policy
Display the parameters and current state of the show ip protocols
active routing protocol process.
Display the current state of the routing table. show ip route [address [mask]] | [protocol [process-id]]
Display the current state of the routing table in show ip route summary
summary form.
Display supernets. show ip route supernets-only
Display how the router is doing Reverse-Path show ip rpf source-address-or-name
Forwarding (that is, from the unicast routing
table, DVMRP routing table, or static mroutes).
Display the contents of the session directory. show ip sd [group | “session-name” | detail]
Display the IS-IS link state database. show isis database [level-1] [level-2] [l1] [l2] [detail]
[lspid]
Display all route maps configured or only the show route-map [map-name]
one specified.
interface serial 0
ip address 131.107.254.1 255.255.255.252
! 2 bits of address space reserved for serial lines
Router A
Router B 131.108.3.4
Router C
10.0.0.0
S1269a
Router D
203 202
102
401 301
Platty Jelly
10.0.0.4
S3775
402
Mollie’s Configuration
hostname mollie
!
interface serial 1
ip address 10.0.0.2 255.0.0.0
ip ospf network point-to-multipoint
encapsulation frame-relay
frame-relay map ip 10.0.0.1 201 broadcast
frame-relay map ip 10.0.0.3 202 broadcast
frame-relay map ip 10.0.0.4 203 broadcast
!
router ospf 1
network 10.0.0.0 0.0.0.255 area 0
Neon’s Configuration
hostname neon
!
interface serial 0
ip address 10.0.0.1 255.0.0.0
ip ospf network point-to-multipoint
encapsulation frame-relay
frame-relay map ip 10.0.0.2 101 broadcast
frame-relay map ip 10.0.0.4 102 broadcast
!
router ospf 1
network 10.0.0.0 0.0.0.255 area 0
Platty’s Configuration
hostname platty
!
interface serial 3
ip address 10.0.0.4 255.0.0.0
ip ospf network point-to-multipoint
encapsulation frame-relay
clockrate 1000000
frame-relay map ip 10.0.0.1 401 broadcast
frame-relay map ip 10.0.0.2 402 broadcast
!
router ospf 1
network 10.0.0.0 0.0.0.255 area 0
Jelly’s Configuration
hostname jelly
!
interface serial 2
ip address 10.0.0.3 255.0.0.0
ip ospf network point-to-multipoint
encapsulation frame-relay
clockrate 2000000
frame-relay map ip 10.0.0.2 301 broadcast
!
router ospf 1
network 10.0.0.0 0.0.0.255 area 0
Router A S0 Router B
E1
Router C
S2582
E2
To transfer a route to 192.31.7.0 into autonomous system 71 (without passing any other information
about autonomous system 109), use the command in the following example:
router igrp 71
redistribute igrp 109
distribute-list 3 out igrp 109
access-list 3 permit 192.31.7.0
In this example, the router global configuration command starts an IGRP routing process. The
network router configuration command specifies that network 128.1.0.0 (the regional network) is to
receive IGRP routing information. The redistribute router configuration command specifies that
RIP-derived routing information be advertised in the routing updates. The default-metric router
configuration command assigns an IGRP metric to all RIP-derived routes.
The distribute-list router configuration command instructs the router to use access list 10 (not
defined in this example) to limit the entries in each outgoing update. The access list prevents
unauthorized advertising of university routes to the regional network.
To transfer a route from 192.31.7.0 into autonomous system 71 (without passing any other
information about autonomous system 109), use the command in the following example:
router eigrp 71
redistribute eigrp 109 route-map 109-to-71
route-map 109-to-71 permit
match ip address 3
set metric 10000 100 1 255 1500
access-list 3 permit 192.31.7.0
The following example is an alternative way to transfer a route to 192.31.7.0 into autonomous
system 71. Unlike the previous configuration, this one does not allow you to arbitrarily set the
metric.
router eigrp 71
redistribute eigrp 109
distribute-list 3 out eigrp 109
access-list 3 permit 192.31.7.0
In this example, the router global configuration command starts an IP Enhanced IGRP routing
process. The network router configuration command specifies that network 128.1.0.0 (the regional
network) is to send and receive IP Enhanced IGRP routing information. The redistribute router
configuration command specifies that RIP-derived routing information be advertised in the routing
updates. The default-metric router configuration command assigns an IP Enhanced IGRP metric to
all RIP-derived routes.
The distribute-list router configuration command instructs the router to use access list 10 (not
defined in this example) to limit the entries in each outgoing update. The access list prevents
unauthorized advertising of university routes to the regional network.
Each network router configuration command is evaluated sequentially, so the specific order of these
commands in the configuration is important. The router sequentially evaluates the
address/wildcard-mask pair for each interface. See the “IP Routing Protocols Commands” chapter
of the Router Products Command Reference publication for more information.
Consider the first network command. Area ID 10.9.50.0 is configured for the interface on which
subnet 131.108.20.0 is located. Assume that a match is determined for interface Ethernet 0. Interface
Ethernet 0 is attached to Area 10.9.50.0 only.
The second network command is evaluated next. For Area 2, the same process is then applied to all
interfaces (except interface Ethernet 0). Assume that a match is determined for interface Ethernet 1.
OSPF is then enabled for that interface and Ethernet 1 is attached to Area 2.
This process of attaching interfaces to OSPF areas continues for all network commands. Note that
the last network command in this example is a special case. With this command all available
interfaces (not explicitly attached to another area) are attached to Area 0.
Area 1
Router A Router B
E1 E2 Interface address:
Interface address:
131.108.1.1 131.108.1.2
Network: 131.108.1.0
Interface address:
E3 131.108.1.3
Router C
S0 Interface address:
131.108.2.3
Network: 131.108.2.0
S1 Area 0
Interface address:
Router D 131.108.2.4
E4
Interface address:
10.0.0.4
Network: 10.0.0.0 Interface address:
10.0.0.5
E5
Interface address: Remote address:
Router E S2 11.0.0.5 11.0.0.6
in AS 110
Network: 11.0.0.0
S1030a
In this configuration, five routers are configured in OSPF autonomous system 109:
• Router A and Router B are both internal routers within Area 1.
• Router C is an OSPF area border router; note that for Router C, Area 1 is assigned to E3 and
Area 0 is assigned to S0.
• Router D is an internal router in Area 0 (backbone area); in this case, both network router
configuration commands specify the same area (Area 0, or the backbone area).
• Router E is an OSPF autonomous system boundary router; note that BGP routes are redistributed
into OSPF and that these routes are advertised by OSPF.
Note It is not necessary to include definitions of all areas in an OSPF autonomous system in the
configuration of all routers in the autonomous system. You need only define the directly connected
areas. In the example that follows, routes in Area 0 are learned by the routers in Area 1 (Router A
and Router B) when the area border router (Router C) injects summary link state advertisements
(LSAs) into Area 1.
Autonomous system 109 is connected to the outside world via the BGP link to the external peer at
IP address 11.0.0.6.
interface serial 0
ip address 131.108.2.3 255.255.255.0
interface serial 1
ip address 131.108.2.4 255.255.255.0
interface serial 2
ip address 11.0.0.5 255.0.0.0
Figure 19-11 Interface and Area Specifications for OSPF Example Configuration
E2
Area ID: 0
Configured as backbone area
Route-Map Examples
The examples in this section illustrate the use of redistribution, with and without route maps.
Examples from both the IP and CLNS routing protocols are given.
The following example redistributes all OSPF routes into IGRP:
router igrp 109
redistribute ospf 110
The following example redistributes RIP routes with a hop count equal to 1 into OSPF. These routes
will be redistributed into OSPF as external link state advertisements with a metric of 5, metric type
of Type 1, and a tag equal to 1.
router ospf 109
redistribute rip route-map rip-to-ospf
!
route-map rip-to-ospf permit
match metric 1
set metric 5
set metric-type type1
set tag 1
The following example redistributes OSPF learned routes with tag 7 as a RIP metric of 15:
router rip
redistribute ospf 109 route-map 5
!
route-map 5 permit
match tag 7
set metric 15
The following example redistributes OSPF intra-area and interarea routes with next-hop routers on
serial interface 0 into BGP with an INTER_AS metric of 5:
router bgp 109
redistribute ospf 109 route-map 10
!
route-map 10 permit
match route-type internal
match interface serial 0
set metric 5
The following example redistributes two types of routes into the integrated IS-IS routing table
(supporting both IP and CLNS). The first are OSPF external IP routes with tag 5; these are inserted
into Level 2 IS-IS LSPs with a metric of 5. The second are ISO-IGRP derived CLNS prefix routes
that match CLNS access list 2000. These will be redistributed into IS-IS as Level 2 LSPs with a
metric of 30.
router isis
redistribute ospf 109 route-map 2
redistribute iso-igrp nsfnet route-map 3
!
route-map 2 permit
match route-type external
match tag 5
set metric 5
set level level-2
!
route-map 3 permit
match address 2000
set metric 30
With the following configuration, OSPF external routes with tags 1, 2, 3, and 5 are redistributed into
RIP with metrics of 1, 1, 5, and 5, respectively. The OSPF routes with a tag of 4 are not redistributed.
router rip
redistribute ospf 109 route-map 1
!
route-map 1 permit
match tag 1 2
set metric 1
!
route-map 1 permit
match tag 3
set metric 5
!
route-map 1 deny
match tag 4
!
route map 1 permit
match tag 5
set metric 5
Given the following configuration, a RIP learned route for network 160.89.0.0 and an ISO-IGRP
learned route with prefix 49.0001.0002 will be redistributed into an IS-IS Level 2 LSP with a metric
of 5:
router isis
redistribute rip route-map 1
redistribute iso-igrp remote route-map 1
!
route-map 1 permit
match ip address 1
match clns address 2
set metric 5
The following configuration example illustrates how a route map is referenced by the
default-information router configuration command. This is called conditional default origination.
OSPF will originate the default route (network 0.0.0.0) with a Type 2 metric of 5 if 140.222.0.0 is
in the routing table.
route-map ospf-default permit
match ip address 1
set metric 5
set metric-type type-2
!
access-list 1 140.222.0.0 0.0.255.255
!
router ospf 109
default-information originate route-map ospf-default
See more route map examples in the sections “BGP Route Map Examples” and “BGP Community
Examples with Route Maps.”
Router C1 Router C2
Route to Network A
Metric = n = 12776
A maximum of four paths can be in the routing table for a single destination. If there are more than
four feasible paths, the four best feasible paths are used.
In Figure 19-13, Router A is being configured. The internal BGP neighbor is not directly linked to
Router A. External neighbors (in autonomous system 167 and autonomous system 99) must be
linked directly to Router A.
Router Router
Router
Router A Router
Internal BGP
AS 109 131.108.234.2
131.108.0.0
192.31.7.0
Router Router
S1270a
131.108.200.1 150.136.64.19
AS 167 AS 99
AS
Router IGRP
Router
Physical connectivity
EGBP connections
IBGP connections
Router
S2566
Network 198.92.68.0
In the following example, route map freddy marks all paths originating from autonomous system 690
with a Multi Exit Discriminator (MED) metric attribute of 127. The second permit clause is required
so that routes not matching autonomous system path list 1 will still be sent to neighbor 1.1.1.1.
router bgp 100
neighbor 1.1.1.1 route-map freddy out
!
ip as-path access-list 1 permit ^690_
ip as-path access-list 2 permit .*
!
route-map freddy permit 10
match as-path 1
set metric 127
!
route-map freddy permit 20
match as-path 2
The following example shows how you can use route maps to modify incoming data from the IP
forwarding table:
router bgp 100
redistribute igrp 109 route-map igrp2bgp
!
route-map igrp2bgp
match ip address 1
set local-preference 25
set metric 127
set weight 30000
set next-hop 192.92.68.24
set origin igp
!
access-list 1 permit 131.108.0.0 0.0.255.255
It is proper behavior to not accept any autonomous system path not matching the match clause of
the route map. This means that you will not set the metric and the router will not accept the route.
However, you can configure the router to accept autonomous system paths not matched in the match
clause of the route map command by using multiple maps of the same name, some without
accompanying set commands.
route-map fnord permit 10
match as-path 1
set local-preference 5
!
route-map fnord permit 20
match as-path 2
The following example shows how you can use route maps in a reverse operation to set the route tag
(as defined by the BGP/OSPF interaction document, RFC 1403) when exporting routes from BGP
into the main IP routing table:
router bgp 100
table-map set_ospf_tag
!
route-map set_ospf_tag
match as-path 1
set automatic-tag
!
ip as-path access-list 1 permit .*
In the following example, the route map called set-as-path is applied to outbound updates to the
neighbor 200.69.232.70. The route map will prepend the autonomous system path “100 100” to
routes that pass access list 1. The second part of the route map is to permit the advertisement of other
routes.
router bgp 100
network 171.60.0.0
network 172.60.0.0
neighbor 200.69.232.70 remote-as 200
neighbor 200.69.232.70 route-map set-as-path out
!
route-map set-as-path 10 permit
match address 1
set as-path prepend 100 100
!
route-map set-as-path 20 permit
match address 2
!
access-list 1 permit 171.60.0.0 0.0.255.255
access-list 1 permit 172.60.0.0 0.0.255.255
!
access-list 2 permit 0.0.0.0 255.255.255.255
In the second example, the route map set-community is applied to the outbound updates to neighbor
171.69.232.90. All the routes that originate from AS 70 have the community values 200 200 added
to their already existing values. All other routes are advertised as normal.
route-map bgp 200
neighbor 171.69.232.90 remote-as 100
neighbor 171.69.232.90 send-community
neighbor 171.69.232.90 route-map set-community out
!
route-map set-community 10 permit
match as-path 1
set community 200 200 additive
!
route-map set-community 20 permit
match as-path 2
!
ip as-path access-list 1 permit 70$
ip as-path access-list 2 permit .*
In the third example, community-based matching is used to selectively set MED and
local-preference for routes from neighbor 171.69.232.55. All the routes that match community list 1
get the MED set to 8000. This includes any routes that have the communities “100 200 300” or
“900 901.” These routes could have other community values also.
All the routes that pass community list 2 get the local preference set to 500. This includes the routes
that have community values 88 or 90. If they belong to any other community, they will not be
matched by community list 2.
All the routes that match community list 3 get the local-preference set to 50. Community list 3 will
match all the routes because all the routes are members of the Internet community. Thus all the
remaining routes from neighbor 171.69.232.55 get a local preference 50.
router bgp 200
neighbor 171.69.232.55 remote-as 100
neighbor 171.69.232.55 route-map filter-on-community in
!
route-map filter-on-community 10 permit
match community 1
set metric 8000
!
route-map filter-on-community 20 permit
match community 2 exact-match
set local-preference 500
!
route-map filter-on-community 30 permit
match community 3
set local-preference 50
!
ip community-list 1 permit 100 200 300
ip community-list 1 permit 900 901
!
ip community-list 2 permit 88
ip community-list 2 permit 90
!
ip community-list 3 permit internet
The following configuration creates an aggregate entry in the BGP routing table when there is at least
one specific route that falls into the specified range. The aggregate route will be advertised as coming
from your autonomous system and has the atomic aggregate attribute set to show that information
might be missing. (By default, atomic aggregate is set unless you use the as-set keyword in the
aggregate-address command.)
router bgp 100
aggregate-address 193.0.0.0 255.0.0.0
The following example creates an aggregate entry using the same rules as in the previous example,
but the path advertised for this route will be an AS_SET consisting of all elements contained in all
paths that are being summarized:
router bgp 100
aggregate-address 193.0.0.0 255.0.0.0 as-set
The following example not only creates the aggregate route for 193.*.*.*, but will also suppress
advertisements of more specific routes to all neighbors:
router bgp 100
aggregate-address 193.0.0.0 255.0.0.0 summary-only
In a BGP speaker in autonomous system 6001, the bgp confederation peers command marks the
peers from autonomous systems 6002 and 6003 as special EBGP peers. Hence peers 171.69.232.55
and 171.69.232.56 will get the local-preference, next-hop and MED unmodified in the updates. The
router at 160.69.69.1 is a normal EBGP speaker and the updates received by it from this peer will be
just like a normal EBGP update from a peer in autonomous system 666.
router bgp 6001
bgp confederation identifier 666
bgp confederation peers 6002 6003
neighbor 171.69.232.55 remote-as 6002
neighbor 171.69.232.56 remote-as 6003
neighbor 160.69.69.1 remote-as 777
In a BGP speaker in autonomous system 6002, the peers from autonomous systems 6001 and 6003
are configured as special EBGP peers. 170.70.70.1 is a normal IBGP peer and 199.99.99.2 is a
normal EBGP peer from autonomous system 700.
router bgp 6002
bgp confederation identifier 666
bgp confederation peers 6001 6003
neighbor 170.70.70.1 remote-as 6002
neighbor 171.69.232.57 remote-as 6001
neighbor 171.69.232.56 remote-as 6003
neighbor 199.99.99.2 remote-as 700
In a BGP speaker in autonomous system 6003, the peers from autonomous systems 6001 and 6002
are configured as special EBGP peers. 200.200.200.200.200 is a normal EBGP peer from
autonomous system 701.
router bgp 6003
bgp confederation identifier 666
bgp confederation peers 6001 6002
neighbor 171.69.232.57 remote-as 6001
neighbor 171.69.232.55 remote-as 6002
neighbor 200.200.200.200 remote-as 701
The following is a part of the configuration from the BGP speaker 200.200.200.205 from
autonomous system 701. Neighbor 171.69.232.56 is configured as a normal EBGP speaker from
autonomous system 666. The internal division of the autonomous system into multiple autonomous
systems is not known to the peers external to the confederation.
router bgp 701
neighbor 171.69.232.56 remote-as 666
neighbor 200.200.200.205 remote-as 701
This configuration specifies that an EGP process on any router on network 10.0.0.0 can act as a peer
with the Core router. All traffic in this configuration will flow through the Core router.
Third-party advertisements allow traffic to bypass the Core router and go directly to the router that
advertised reachability to the Core.
access-list 2 permit 10.0.0.0 0.255.255.255
! global access list assignment
router egp 0
neighbor any 2
neighbor any third-party 10.1.1.1
Core Router
X.25 PDN
Net address:
10.0.0.0
Interface Address:
10.1.1.1
S1066a
Net address: Net address: Net address:
1.0.0.0 2.0.0.0 3.0.0.0
Router 131.108.0.0
10.0.0.0
Router 192.31.7.0
Router
S1025a
AS164 AS109
IGRP router
S1067a
E1
No routing updates
sent to this interface
As in the first example, IGRP updates are sent to all interfaces on network 131.108.0.0 except
interface Ethernet 1 in the following example. 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.
router igrp 109
network 131.108.0.0
passive-interface ethernet 1
neighbor 131.108.20.4
In OSPF, hello packets are not sent on an interface that is specified as passive. Hence, the router will
not be able to discover any neighbors, and none of the OSPF neighbors will be able to see the router
on that network. In effect, this interface will appear as a stub network to the OSPF domain. This is
useful if you want to import routes associated with a connected network into the OSPF domain
without any OSPF activity on that interface.
The passive-interface router configuration command typically is used when the wildcard
specification on the network router configuration command configures more interfaces than is
desirable. The following configuration causes OSPF to run on all subnets of 131.108.0.0:
interface ethernet 0
ip address 131.108.1.1 255.255.255.0
interface ethernet 1
ip address 131.108.2.1 255.255.255.0
interface ethernet 2
ip address 131.108.3.1 255.255.255.0
!
router ospf 109
network 131.108.0.0 0.0.255.255 area 0
If you do not want OSPF to run on 131.108.3.0, enter the following commands:
router ospf 109
network 131.108.0.0 0.0.255.255 area 0
passive-interface ethernet 2
The following example assigns the router with the address 192.31.7.18 an administrative distance of
100, and all other routers on subnet 192.31.7.0 an administrative distance of 200:
distance 100 192.31.7.18 0.0.0.0
distance 200 192.31.7.0 0.0.0.255
However, if you reverse the order of these commands, all routers on subnet 192.31.7.0 are assigned
an administrative distance of 200, including the router at address 192.31.7.18:
distance 200 192.31.7.0 0.0.0.255
distance 100 192.31.7.18 0.0.0.0
Assigning administrative distances is a problem unique to each network and is done in response to
the greatest perceived threats to the connected network. Even when general guidelines exist, the
network manager must ultimately determine a reasonable matrix of administrative distances for the
network as a whole.
In the following example, the distance value for IP routes learned is 90. Preference is given to these
IP routes rather than routes with the default administrative distance value of 110.
router isis
distance 90 ip
Example 1
The following sample configuration illustrates a simple example of disabling split horizon on a serial
link. In this example, the serial link is connected to an X.25 network.
interface serial 0
encapsulation x25
no ip split-horizon
Example 2
In the next example, Figure 19-18 illustrates a typical situation in which the no ip split-horizon
interface configuration command would be useful. This figure depicts two IP subnets that are both
accessible via a serial interface on Router C (connected to Frame Relay network). In this example,
the serial interface on Router C accommodates one of the subnets via the assignment of a secondary
IP address.
The Ethernet interfaces for Router A, Router B, and Router C (connected to IP networks 12.13.50.0,
10.20.40.0, and 20.155.120.0) all have split horizon enabled by default, while the serial interfaces
connected to networks 128.125.1.0 and 131.108.1.0 all have split horizon disabled by default. The
partial interface configuration specifications for each router that follow Figure 19-18 illustrate that
the ip split-horizon command is not explicitly configured under normal conditions for any of the
interfaces.
In this example, split horizon must be disabled in order for network 128.125.0.0 to be advertised into
network 131.108.0.0, and vice versa. These subnets overlap at Router C, interface S0. If split horizon
were enabled on serial interface S0, it would not advertise a route back into the Frame Relay network
for either of these networks.
Figure 19-18 Disabled Split Horizon Example for Frame Relay Network
E0 E2
S0 S2
CS C CS B
Network address:
12.13.50.0
Interface address: Secondary
Interface address: interface address: Interface address:
12.13.50.1 131.108.1.2
128.125.1.1 131.108.1.1
E1
Network
S1 address:
Network 131.108.1.0
CS A address:
Interface address: 128.125.1.0
128.125.1.2
Frame Relay
network
S1069a
Configuration for Router A
interface ethernet 1
ip address 12.13.50.1
!
interface serial 1
ip address 128.125.1.2
encapsulation frame-relay
no ip split-horizon