Routing


Routing
 
 
 
This chapter provides information on configuring an enhanced, or extended, service. The product administration guides provide examples and procedures for configuration basic services on the system. It is recommended that you select the configuration example that best meets your service model, and configure the required elements for that model before using the procedures in this chapter.
 
Routing Policies
This section describes how to configure the elements you need to specify routing policies. Routing policies modify and redirect routes to and from the system to satisfy specific routing needs.
Use the following building blocks to configure routing policies:
Route Access Lists - The basic building block of a routing policy. Route access lists filter routes based upon a specified range of IP addresses.
IP Prefix Lists - A more advanced element of a routing policy. An IP Prefix list filters routes based upon IP prefixes.
AS Path Access Lists - A basic building block used for Border Gateway Protocol (BGP) routing. These lists filter Autonomous System (AS) paths.
Route Maps - Route-maps provide detailed control over routes during route selection or route advertisement by a routing protocol, and in route redistribution between routing protocols. For this level of control you use IP Prefix Lists, Route Access Lists and AS Path Access Lists to specify IP addresses, address ranges, and Autonomous System Paths.
 
Creating IP Prefix Lists
Use the following configuration example to create IP Prefix Lists:
  config
    context <context_name>
      ip prefix-list name <list_name> { deny | permit } <network_address/net_mask>
Notes:
 
Creating Route Access Lists
Use the following procedure to create a Route Access List:
  config
    context <context_name>
       route-access-list { extended identifier } { deny | permit } [ip address ] <ip_address>
       route-access-list named <list_name> { deny | permit } { <ip_address/mask> | any } [ exact-match ]
route-access-list standard identifier { permit | deny } {<ip_address> <wildcard_mask> | any | host <network_address> }
Notes:
 
Creating AS Path Access Lists
Use the following procedure to create an AS Path Access List:
config
  context     <context_name>
ip as-path access-list <list_name> [ { deny | permit } <reg_expr> ]
Notes:
 
Creating Route Maps
Use the following configuration example to create a Route Map:
  config
    context <context_name>
       route-map< map_name > { deny | permit } < seq_number >
Notes:
 
Sample Configuration
The example below shows a configuration that creates two route access lists, applies them to a route map, and uses that route map for a BGP router neighbor.
config
  context isp1
     route-access-list named RACLin1a permit 88.151.1.0/30
     route-access-list named RACLin1a permit 88.151.1.4/30
     route-access-list named RACLany permit any
     route-map RMnet1 deny 100
        match ip address route-access-list RACLin 1 a
        #exit
        route-map RMnet1 deny 200
        match ip address route-access-list RACLin 1 b
        #exit
     route-map RMnet1 permit 1000
        match ip address route-access-list RACLany
        #exit
     router bgp 1
        neighbor 152.20.1.99 as-path 101
        neighbor 152.20.1.99 route-map RMnet1
 
Static Routing
 
The system supports static network route configuration on a per context basis. Define network routes by specifying an IP address and mask for the route, the name of the interface in the currant context that the route must use, and a next hop IP address.
 
Adding Static Routes to a Context
To add static routes to a context configuration, you must know the names of the interfaces that are configured in the current context. Use the following command to list the interfaces in the current context:
show ip interface
Information for all interfaces configured in the current context is displayed as shown in the following example.
[ local ]< host_name > #show ip interface
Intf Name: Egress 1
Description:
IP State: Up (Bound to 24/1 untagged ifIndex 402718721)
IP Address: 192.168.231.5
Subnet Mask: 255.255.255.0
Bcast Address: 192.168.231.255
MTU: 1500
Resoln Type: ARP ARP timeout: 3600 secs
L3 monitor LC-port switchover: Disabled
Number of Secondary Addresses: 0
Total interface count: 1
The first line of information for each interface lists the interface name for the current context as shown in the example output. In this case, there is one interface with the name Egress 1.
config
context <context_name>
ip route { < ip_address | ip_mask > | < ip_addr_mask_combo > } { next-hop } < next_hop_address > | < egress_name > [ precedence ] < precedence > [ cost ] < cost >
Notes:
You can configure a maximum of 1200 static routes per context. Save your configuration as described in Verifying and Saving Your Configuration.
 
Deleting Static Routes From a Context
Use the following configuration example to remove static routes from a contexts configuration:
 
config
context context_name
no ip route { < ip_address > < ip_mask > | < ip_addr_mask_combo > } < next_hop_address > < egress_name > [ precedence < precedence > ] [ cost < cost > ]
Notes:
 
OSPF Routing
 
This section gives an overview of OSPF (Open Shortest Path First) routing and its implementation in the system. It also provides the procedure for enabling the base OSPF functionality, and lists the commands that are available for more complex configuration.
OSPF routing is included with the IPV4 Routing Protocols feature. You must purchase and install a license key before you can use this feature.
Important: During system task recovery, it is possible for a dynamically-learned forwarding entry to incorrectly remain in the system forwarding table if that forwarding entry has been removed from the dynamic routing protocol during the recovery.
 
OSPF Version 2 Overview
OSPF is a link-state routing protocol, an interior gateway protocol (IGP) that routes IP packets using the shortest path first based solely on the destination IP address in the IP packet header. IP packets are routed are not encapsulated in any further protocol headers as they transit the network. An Autonomous System (AS), or Domain, is defined as a group of networks within a common routing infrastructure.
OSPF is a dynamic routing protocol that quickly detects topological changes in the AS (such as router interface failures) and calculates new loop-free routes after a period of convergence. This period of convergence is short and involves a minimum of routing traffic.
In a link-state routing protocol, each router maintains a database, referred to as the link-state database, that describes the Autonomous System's topology.Each participating router has an identical database. Each individual piece of this database is a particular router's local state (for example, the router's usable interfaces and reachable neighbors). The router distributes its local state throughout the Autonomous System by flooding.
All routers run the same algorithm in parallel. From the link-state database, each router constructs a tree of shortest paths with itself as root to each destination in the Autonomous System. Externally derived routing information appears on the tree as leaves. The cost of a route is described by a single dimensionless metric.
OSPF allows sets of networks to be grouped together. Such a grouping is called an area. The topology of this area is hidden from the rest of the AS, which enables a significant reduction in routing traffic. Also, routing within the area is determined only by the area’s own topology, lending the area protection from bad routing data. An area is a generalization of an IP subnetted network.
OSPF enables the flexible configuration of IP subnets so that each route distributed by OSPF has a destination and mask. Two different subnets of the same IP network number may have different sizes (that is, different masks). This is commonly referred to as variable-length subnetting. A packet is routed to the best (longest or most specific) match. Host routes are considered to be subnets whose masks are “all ones” (0xffffffff).
OSPF traffic can be authenticated or non-authenticated, or can use no authentication, simple/clear text passwords, or MD5-based passwords. This means that only trusted routers can participate in the Autonomous System’s routing. You can specify a variety of authentication schemes and, in fact, you can configure separate authentication schemes for each IP subnet.
Externally derived routing data (for example, routes learned from an exterior protocol such as BGP ) is advertised throughout the AS. This externally derived data is kept separate from the OSPF protocol’
s link state data. Each external route can also be tagged by the advertising router, enabling the passing of additional information between routers on the boundary of the AS.
 
Link-State Algorithm
OSPF uses a link-state algorithm in order to build and calculate the shortest path to all known destinations. The algorithm by itself is quite complicated. The following is a very high level, simplified way of looking at the various steps of the algorithm:
1.
2.
3.
4.
 
Basic OSPFv2 Configuration
This section describes how to implement basic OSPF routing functionality.
 
Enabling OSPF Routing For a Specific Context
Use the following configuration example to enable OSPF Routing for a specific context:
config
  context <context_name>
     router ospf
     end
Notes:
 
Enabling OSPF Over a Specific Interface
After you enable OSPF, specify the networks on which it will run. Use the following command to enable OSPF:
network < network_ip_address > / < network_mask > area {< area_id > | < area_ip_address > }
Important: The default cost for OSPF on the system is 10. To change the cost, refer to the ip ospf cost command in the Ethernet Interface Configuration mode. For detailed information on this command refer to the Cisco ASR 5000 Series Command Line Interface Reference.
Notes:
 
Redistributing Routes Into OSPF (Optional)
Redistributing routes into OSPF means any routes from another protocol that meet specified a specified criterion, such as route type, metric, or rule within a route-map, are redistributed using the OSPFv2 protocol to all OSPF areas. This is an optional configuration.
config
  context < context_name >
     router ospf
        redistribute { connected | rip | static }
        end
Notes:
 
Confirming OSPF Configuration Parameters
To confirm the OSPF router configuration, use the following command and look for the section labeled router ospf in the screen output:
show config context < ctxt_name > [ verbose ]
 
Viewing Routing Information
To view routing information for the current context, at the Executive mode level, use one of the following commands;
 
This example shows sample output of the command, show ip route.
[local]host_name# show ip route
"*" indicates the Best or Used route. Destination Nexthop Protocol Prec Cost Interface
*44.44.44.0/24 208.230.231.50 static 1 0 local1
*192.168.82.0/24 0.0.0.0 connected 0 0
*192.168.83.0/24 0.0.0.0 connected 0 0
208.230.231.0/24 0.0.0.0 ospf 110 10 local1
*208.230.231.0/24 0.0.0.0 connected 0 0 local1
Total route count: 5
 
Equal Cost Multiple Path (ECMP)
The system supports ECMP for routing protocols. ECMP distributes traffic across multiple routes that have the same cost to lessen the burden on any one route.
config
  context < context_name >
     ip routing maximum-paths [ max_no ]
Notes:
 
BGP-4 Routing
The Border Gateway Protocol 4 (BGP-4) routing protocol is supported through a BGP router process that is implemented at the context level.
The Border Gateway Protocol (BGP) is an inter-Autonomous System routing protocol. An Autonomous System (AS) is a set of routers under a single technical administration that use an interior gateway protocol and common metrics to route packets within the AS. The set of routers uses an exterior gateway protocol to route packets to other ASs.
BGP runs over TCP. This eliminates the need for the BGP protocol to implement explicit update fragmentation, retransmission, acknowledgement, and sequencing information. Any authentication scheme used by TCP may be used in addition to BGP’s own authentication mechanisms.
BGP routers exchange network reachability information with other BGP routers. This information builds a picture of AS connectivity from which routes are filtered and AS level policy decisions are enforced.
BGP-4 provides classless inter-domain routing. This includes support for advertising an IP prefix and eliminates the concept of network class within BGP. BGP-4 also allows the aggregation of routes, including the aggregation of AS paths.
 
Overview of BGP Support
When using Mobile IP, mobile devices communicate to the Internet through Home Agents (HAs). HAs assign IP addresses to the mobile node from a configured pool of addresses. These addresses are also advertised to Internet routers through an IP routing protocol to ensure dynamic routing. The BGP-4 protocol is used as a monitoring mechanism between an HA and Internet router with routing to support Interchassis Session Recovery. (Refer to the Interchassis Session Recovery chapter in this manual for more information.)
The objective of BGP-4 protocol support is to satisfy routing requirements and to monitor communications with Internet routers. BGP-4 may trigger an active to standby switchover to keep subscriber services from being interrupted.
The following BGP-4 features are supported:
IP pool routes and loopback routes are advertised in the BGP domain in the following ways:
If a BGP task restarts because of a processing card failure, a migration, a crash, or the removal of a processing card, all peering session and route information is lost.
 
Configuring BGP
This section describes how to configure and enable basic BGP routing support in the system.
config
  context <context_name>
     router { ospf | bgp < as_number >
        neighbor < IP_address > { remote-as < AS_num > }
Notes:
 
Redistributing Routes Into BGP (Optional)
Redistributing routes into BGP simply means that any routes from another protocol that meet a specified criterion, such as a route type, or a rule within a route-map, are redistributed through the BGP protocol to all BGP areas. This is an optional configuration.
config
  context <context_name>
     router{ ospf | bgp < as_number > }
        redistribute{bgp | connected | static } [ metric ] < metric_value > ] [ metric-type ] {1 | 2 } ] [ route-map ] < route_map_name ]
Notes:
 

Cisco Systems Inc.
Tel: 408-526-4000
Fax: 408-527-0883