3Com Router User Manual
Have a look at the manual 3Com Router User Manual online for free. It’s possible to download the document as PDF or print. UserManuals.tech offer 19 3Com manuals and user’s guides for free. Share the user manual or guide on Facebook, Twitter or Google+.
OSPF Configuration Example447 dial-up mode, although the PPP protocol is encapsulated on the link layer, it is still NBMA type. The peer must be specified manually. Use the ospf peer ip-address command. ■If the network type is broadcast network or NBMA, at least the priority of one interface must be over 0. ■If an area is configured to a stub area, all routers connected with this area must be configured to stub areas. ■The interface type of two adjacent routers must be the same. ■If two or more areas are configured, at least one area must be configured into a backbone area (area 0). ■Make sure the backbone area is connected with all areas. ■A virtual connection cannot go through stub area. 2Global troubleshooting: If the previous steps are correct but OSPF still cannot find the remote route, check the following features of the configuration. ■If two or more areas are configured for one router, at least one area must be configured as a backbone area (the area-id of one area must be 0 or a virtual link must be configured). As shown in the following diagram, only one area is configured on Router A and Router D and two areas are configured respectively for Router B (area0, area1) and Router C (area1, area2). One area in Router B is 0, which satisfies the requirement. However, none of the two areas in Router C is 0. In such a case, a virtual link must be set up between Router C and Router B. Make sure area 2 and area 0 (backbone area) are connected. Figure 151 OSPF Area Schematic Diagram ■The virtual link cannot go through a stub area and the backbone area (area 0) cannot be configured as stub area. Therefore, if a virtual link is configured between Router B and Router C, area 1 cannot be configured as a stub area, nor can area 0. In the above diagram, only area 2 can be configured as a stub area. ■The router in the stub area (Router D) cannot receive an external route. ■Make sure the backbone areas are connected. Rout er A Ro u t e r B Rout er CRout er D ar ea 0 ar ea 1ar ea 2
30 CONFIGURING BGP This chapter covers the following topics: ■BGP Overview ■Configuring BGP ■Displaying and Debugging BGP ■BGP Configuration Example BGP OverviewBorder Gateway Protocol (BGP) is an inter-AS dynamic route discovery protocol. Its primary function is to exchange loop-free routing information between ASs automatically and to construct the topology diagram of an AS through the exchange of path reachability information, including AS numbers. It constructs the topological diagrams of the ASs to eliminate route loops and carry out user configured strategies. The BGP protocol is usually used between ISPs. The current version of BGP is BGP- 4. It applies to the distributed structure and supports classless interdomain routing (CIDR). BGP-4 has become the standard of Internet external routing protocol. It features the following: ■BGP is an external routing protocol, oriented to control route spreading and select best route rather than find and calculate route. This is different from the internal routing protocol. ■Completely resolves the route loop problem by carrying AS path information. ■Uses TCP as the transmission layer protocol, improving the reliability of the protocol. ■BGP-4 supports classless interdomain routing (CIDR), or supernetting. CIDR judges the IP address in a totally new way. It no long recognizes network class A, network class B, or network class C. For example, with CIDR, an illegal class C network address 192.213.0.0 (255.255.0.0) is indicated as 192.213.0.0/16, which is a legal supernetwork. /16 means that the subnet mask is 16bit starting from the left of the address. The introduction of CIDR simplifies the route aggregation. Route aggregation is the combination of several routes. Thus one route instead of several routes are distributed and the routing table is simplified. ■When a route is updated, BGP only sends the incremental route. In this way, BGP occupies much less bandwidth in transmitting routes. It applies to the transmission of a large amount of routing information on the Internet. ■For political and economic reasons, each AS must filter, select and control the routes. BGP-4 provides abundant routing strategies for easy expansion of BGP to support new developments of the Internet.
450CHAPTER 30: CONFIGURING BGP The BGP system runs on a specific router as a high layer protocol. At system startup, the whole BGP routing table is transmitted for the exchange of routing information. Later on, only an update message is transmitted for updating the routing table. In the system, keep-alive messages are received and transmitted to check whether the connection between routers is normal. The router transmitting the BGP message is called the BGP speaker. It receives and generates new routing information from time to time and advertises to other BGP speakers. When a BGP speaker receives a new route advertisement from other ASs, if this route is better than the existing route, or if there is no acceptable route currently, the BGP speaker broadcasts this route to all other BGP speakers in the AS. BGP speakers are peers to each other and several related peers form a peer group. BGP runs on the router in two modes: ■IBGP (Internal BGP) ■EBGP (External BGP) IBGP is run when routers in an autonomous system exchange network reachable information. When routers of different ASs exchange network reachable information, they use EBGP. The BGP protocol system is driven by messages that can be divided into 4 categories: ■Open message. This is the first transmitted message after the connection is created. It is used to create a connection between BGP peers ■Update message is the most important message in BGP system, and is used to switch routing information among the peers. Update message consists of three parts: unreachable route, path attributes and Network Layer Reachability Information (NLRI). ■Notification message notifies errors. ■Keep-alive message is used to check the validity of the connection. Configuring BGP A BGP configuration includes tasks described in the following sections: ■Enabling BGP ■Configuring Networks for BGP Distribution ■Configuring Peers A BGP advanced configuration includes: ■Setting the MED for the AS ■Allow Comparing Path MED ■Configuring the Local Preference ■Configuring BGP Timers ■Configuring a BGP Peer Group ■Creating Aggregate Addresses ■Configure BGP Route Reflector
Configuring BGP 451 ■Configuring a BGP Community ■Configuring a BGP AS Confederation Attribute ■Configuring Route Dampening ■Configuring Synchronization of BGP and IGP ■Configuring the Interactions between BGP and an IGP ■Defining an Access List Entry, an AS Path-list Entry, a Routing Policy ■Configuring a Route Filter for BGP ■Resetting BGP Connections Enabling BGPSpecify the local AS number when BGP is enabled. After BGP is enabled, the local router continuously monitors whether any incoming BGP connection request is received from the peer routers. To make the local router send BGP connection requests to the peer routers, use the peer command. When BGP is turned off, BGP protocol closes all BGP connections that have been created. Perform the following configurations in system view. Ta b l e 508 Enable BGP By default, BGP is disabled. Configuring Networks for BGP DistributionPerform the following configurations in BGP view. Ta b l e 509 Configure Networks for BGP Distribution By default, no network is configured for BGP distribution. Configuring PeersThe routers that exchange BGP packets are called peers to each other. Peers can be directly connected routers or indirectly connected routers but should be connected by other directly connected router or routers. BGP peer basic configuration includes setting the AS number of the peer. Perform the following peer configuration in BGP view. Ta b l e 510 Configure AS Number of the Peer OperationCommand Enable BGP and enter into the BGP viewbgp [ as-number ] Turn off the BGPundo bgp OperationCommand Specify a list of networks associated with BGPnetwork ip-address [ mask address-mask ] [ route-policy policy-name ] Delete a list of networks associated with BGPundo network ip-address [ mask address-mask ] OperationCommand Configure AS number of the peer peer peer-address as-number as-number
452CHAPTER 30: CONFIGURING BGP BGP peer advanced configuration includes the following steps: 1Configure the connection between EBGP peers that are connected indirectly. Ta b l e 511 Configure Connection Between EBGP Peers Connected Indirectly By default, the BGP connection can be established with a directly connected peer router. 2Configure the BGP version of the peer. Ta b l e 512 Configure the BGP Version of the Peer By default, software accepts BGP Version 4. 3Set the timers for the BGP peer. Ta b l e 513 Set the Timers for BGP Peer By default, the value of keepalive-interval is 60 seconds, the value of holdtime-interval is 180 seconds. Caution: The timer configured with this command is of higher preference than that configured with the timers command. 4Configure the BGP route-update interval. Ta b l e 514 Configure BGP Route-update Interval By default, the BGP route-update interval is 5 seconds. 5Configure to send community attribute to the peer. Delete a BGP peer undo peer peer-address as-number as-number OperationCommand Configure connection between EBGP peers connected indirectlypeer peer-address ebgp-max-hop [ max-hop-count ] Return to the default BGP connections to external peersundo peer peer-address ebgp-max-hop [ max-hop-count ] OperationCommand Configure the BGP version of the peerpeer peer-address version version-number Unconfigure the BGP version of the peerundo peer peer-address version OperationCommand Set the timers for BGP peerpeer peer-address timers keepalive-interval holdtime-interval Set the timers for BGP peer to default valueundo peer peer-address timers OperationCommand Configure BGP route-update intervalpeer peer-address route-update-interval seconds Restore BGP route-update intervalundo peer peer-address route-update-interval
Configuring BGP 453 Ta b l e 515 Configure to Send Community Attribute to the Peer By default, the community attributes are not sent to the peer. 6Configure the peer to be the client of the route reflector. Ta b l e 516 Configure the Peer to be the Client of the Route Reflector 7Configure to distribute default route to the peer. Ta b l e 517 Configure to Distribute Default Router to the Peer By default, the local router does not advertise the default route to any peer. A next hop should be sent to the peer unconditionally as the default route. 8Set the own IP address as the next hop when the peer distributes routes. Set the routers own IP address as the next hop when the peer distributes routes. Ta b l e 518 Set the Own IP Address as the Next Hop When the Peer Distributes Route By default, its own address is not the next hop when the peer distributes routes. 9Create a routing policy for the peer. Ta b l e 519 Create a Routing Policy for the Peer OperationCommand Configure to send community attribute to the peerpeer peer-address advertise-community Cancel sending community attribute to the peerundo peer peer-address advertise-community OperationCommand Configure the peer to be the client of the route reflectorpeer peer-address reflect-client Cancel the configuration of making the peer as the client of the BGP route reflectorundo peer peer-address reflect-client OperationCommand Configure to distribute default route to the peerpeer peer-address default-route-advertise Configure not to distribute default route to the peerundo peer peer-address default-route-advertise OperationCommand Set the own IP address as the next hop when the peer distributes routepeer peer-address next-hop-local Not to Set the own IP address as the next hop when the peer distributes routeundo peer peer-address next-hop-local OperationCommand Create a routing policy for the peerpeer peer-address route-policy policy-name { import | export } Remove a routing policy to import or export routesundo peer peer-address route-policy policy-name { import | export }
454CHAPTER 30: CONFIGURING BGP By default, the route from the peer or peer group is not designated with any route policy. 10Create an filtering policy based on access list for the peer. Ta b l e 520 Create a Fltering Policy Based on Access List for the Peer By default, no route filtering policy based on IP ACL for a peer is set. 11Create BGP route filtering based on the AS path for the peer. By default, a BGP filter is disabled. Ta b l e 521 Create a BGP Route Filtering Based on AS Path for the Peer Setting the MED for the ASThe multi-exit discriminator (MED) is the external metric of a route. It is different from the local preference attribute. MED is switched between ASs and the MED that has entered the AS does not leave the AS. AS uses local attributes for its own out-site selection processing while MED attribute is used to select the best route. The route with smallest MED value is selected. When a router running BGP gets routes with the same destination address but a different next hop through different external peers, it makes a preference selection based on the MED values. To operate the MED attribute, an access control list is used to indicate what network will be operated. Perform the following configurations in BGP view. Ta b l e 522 Configure the BGP MED Metric Allow Comparing Path MEDThis command is used to compare MED values from different AS neighboring routes and to select the best route. The route with smaller MED value is selected. Perform the following configurations in BGP view. Ta b l e 523 Allow Comparing Path MED OperationCommand Create an filter policy based on access list for the peerpeer peer-address filter-policy acl-number { import | export } Remove an filter policy based on the access list for the peerundo peer peer-address filter-policy acl-number { import | export } OperationCommand Create a BGP route filtering based on AS path for the peerpeer peer-address acl aspath-list-number { import | export } Delete a BGP route filtering based on AS path for the peerundo peer peer-address acl aspath-list-number { import | export } OperationCommand Configure MED for an AS default-med med Restore the default MED of an AS undo default-med OperationCommand
Configuring BGP 455 By default, MED values from different AS neighboring routes are not compared when determining the best route. This configuration should not be used unless it is certain that different ASs uses the same IGP and routing modes. Configuring the Local PreferenceConfiguring different local preferences affects BGP routing selection. When a router running BGP gets routes with the same destination address but different next hops through different internal peers, it selects the route of the highest local preference to this destination. Perform the following configurations in BGP view. Ta b l e 524 Configure the Local Preference By default, the value of local preference is 100. Configuring BGP TimersThe interval of sending keepalive messages required by RFC and BGP holdtime are important parameters in BGP protocol. When a router has created a BGP connection successfully with the other router, it sends keepalive messages to this router with the time interval set by the keepalive-interval attribute to indicate whether the connection channel is normal. Generally, the time interval for sending a keepalive message is one third of the value for the holdtime attribute. The value of the holdtime-interval attribute is the time interval for continuously receiving keepalive and update messages. If a keepalive or update message is received, the holding timer is reset. If a router has not received any messages from the opposite router for a specific period of holding time, this BGP connection is considered broken and is cut off. The router can negotiate with the interconnected router to set a shorter holding time. Perform the following configurations in BGP view. Ta b l e 525 Configure the Keepalive Timer and Holdtime Tmer for BGP By default, the value for the keepalive-interval attribute is 60 seconds and may have a value ranging from 1 to 4294967295 seconds. The default value for the Allow comparing path MEDcompare-different-as-med Prohibit comparing path MEDundo compare-different-as-med OperationCommand Configure the local preferencedefault local-preference value Restore the local preference value to its default valueundo default local-preference OperationCommand Configure the keepalive timer and holdtime timer for BGP timers keepalive-interval holdtime-interval Restore BGP network timers to their default valueundo timers
456CHAPTER 30: CONFIGURING BGP holdtime-interval attribute is 180 seconds and may have a time interval ranging from 3 to 42949675 seconds. Configuring a BGP Peer GroupThe BGP peer group command can be used for user configuration. When starting several peers of the same configuration, you can first create and configure one peer group, then add other peer groups into this group to get the same configuration. Configuring a basic BGP peer group includes creating a peer group and adding a peer to the group. Perform the following peer group configuration in BGP view. 1Create a peer group By default, a IBGP peer is added to the default peer group and no configuration is necessary. The configuration of route updating strategy to any IBGP peer is only applicable to other IBGP peers in the group. If the router is not configured as a route reflector, all IBGP peers are in one group. Otherwise, all route reflection clients are in one group and non-clients are in another group. The members of an external peer group must be in the same network segment, otherwise some EBGP peers may discard the route updating information you have sent. All peers in this group must be configured with an AS number, if this group is not configured with an AS number. If you add an AS number to the peer group, any peer in this group cannot be configured with an AS number different from this peer group AS number. The members of the peer group cannot be configured with a route updating strategy different from that of the group but different access strategy is permitted. Ta b l e 526 Create a Peer Group By default, no peer group is created. 2Add a peer to the BGP peer group Add one BGP peer into the peer group to create a peer group. When the configuration of the peer group is changed, the configuration of each peer should also be changed accordingly. IBGP peer and EBGP peer cannot be in the same group. Ta b l e 527 Add a Peer to the BGP Peer Group By default, there is no BGP peer in a peer group. OperationCommand Create a peer grouppeer group-name group Delete a specified peer groupundo peer group-name group Reset the connection of all members in the peer groupreset bgp group group-name OperationCommand Add a peer to the BGP peer grouppeer peer-address group group-name Delete a member from the BGP peer groupundo peer peer-address group group-name