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+.
Configuring BGP 467 Ta b l e 551 Allow the Import of Network 0.0.0.0 into the BGP By default, the import of network 0.0.0.0 into BGP is disabled. Defining an Access List Entry, an AS Path-list Entry, a Routing PolicyThis section describes the configuration of an access list, an AS path list, and a routing policy. Define an access list entry See “Access Control List” in ****need proper ref here 3Com Router Operation Manual (Security Configuration)******. for more details. Define an AS Path-list entry There is an AS path field in the routing information packet of the BGP protocol. When the BGP protocol operates with the switching routing information, the path of the routing information crossing the AS is recorded in this field. aspath-list is identified with aspath-list-number. When defining aspath-list, you can specify an aspath regular expression used to match the aspath field in the routing information. Use aspath-list to match the aspath field in the BGP routing information, filtering the information that does not meet the conditions. You can define multiple aspath-lists for one list number so that one list number represents a group of aspath-lists. Each AS path list is identified with numbers. Perform the following configurations in system view. Ta b l e 552 Define a BGP-related ACL Entry By default, no access list entry is defined. In the matching process, many aspath-list-number us Boolean “OR” operation so that if the routing information passes one item, information is filtered by the as-path list identified with this list number. Define a routing policy A routing policy is an important way for BGP to implement the route strategy. According to the matching result of the route attribute, BGP decides on the operations to be applied on a route attribute. In each routing policy, there can be several matching rules, labeled with a serial number. When importing a route, it is compared to a rule by number, from small to large. When the first matched rule is found, the matching process is completed. If no matched rules are found, router reception and transmission is canceled. OperationCommand Allow the import of network 0.0.0.0 into the BGPdefault-information Disable the import of network 0.0.0.0 into the BGPundo default-information OperationCommand Define a BGP-related ACL entryip as-path acl aspath-list-number { permit | deny } as-regular-expression Remove a BGP-related ACL entryundo ip as-path acl aspath-list-number
468CHAPTER 30: CONFIGURING BGP Perform the following configurations in system view. Ta b l e 553 Define a Routing Policy Define a match rule Perform the following configurations in BGP Routing policy view. Ta b l e 554 Define a Match Rules By default, AS regular expression, community list, interface type, IP address range, and metric value are not matched. See “Define matching rules” of “Configuration of IP Routing Policy” for details. Define an apply clause Perform the following configurations in Routing policy view. Ta b l e 555 Define An Apply Clause OperationCommand Define a routing policy and enter into the Routing policy viewroute-policy policy-name { permit | deny } [ seq-number ] Remove a specified routing policyundo route-policy policy-name [ permit | deny ] [seq-number ] OperationCommand Specify a BGP AS path list to be matched in routing policyif-match as-path aspath-list-number Delete a BGP AS path list to be matched in routing policyundo if-match as-path Specify BGP community list number to be matched in routing policy.if-match community {standard-community-list-number [ exact-match ] | extended-community-list-number } Delete BGP community listundo if-match community Define the matched routing access control list and prefix list in routing policy.if-match ip address { acl-number | ip-prefix prefix-list-name } Remove a standard access list or a prefix listundo if-match ip address [ ip-prefix ] Define matched the type of interfaceif-match interface [ type number ] Remove the matched interfaceundo if-match interface Specify the next hop to be matched in Route-policy by an access list or an prefix list specifiedif-match ip next-hop { acl-number | ip-prefix prefix-list-name } Remove the destination address of the matched routeundo if-match ip next-hop [ ip-prefix ] Define matched the specified costif-match cost cost Delete the specified costundo if-match cost OperationCommand Set the BGP AS path access listapply as-path aspath-list-number Delete BGP AS-path attribute to BGP routesundo apply as-path
Configuring BGP 469 By default, AS serial number, BGP community attribute, next hop, local preference, metric value, and origin attributes are not applied. See “Define Apply Clause “of “Configuration of IP Routing Policy” for details. Configuring a Route Filter for BGPPerform the following configurations in BGP view. Configure a route filter for information received by BGP Ta b l e 556 Filter Routing Information Received from BGP Set the communities attributesapply community { { [aa:nn ] [ no-export-subconfed ] [ no-advertise ] [ no-export ] } [ additive ] | none | additive } Delete the communities attributesundo apply community Set the next hop of BGP routing informationapply ip next-hop ip-address delete the next hop of BGP routingundo apply ip next-hop Set the local preference value of source routeapply local-preference value Cancel the local preference value of source route undo apply local-preference Apply cost to the imported routesapply cost cost Restore the destination routing protocols cost valueundo apply cost Set the origin attribute of the original route in the Route-policyapply origin { igp | egp as-number | incomplete } Remove the origin attributeundo apply origin Operation Command OperationCommand Filter routing information received from a specified gatewayfilter-policy gateway prefix-list-name import Change or cancel filtering the routing information received from a specified gatewayundo filter-policy gateway prefix-list-name import Filter the routing information receivedfilter-policy {acl-number | ip-prefix prefix-list-name } import Change or cancel filtering routing information receivedundo filter-policy {acl-number | ip-prefix prefix-list-name } import Configure to filter the routing information received from the specified address and that matching prefix-list. filter-policy ip-prefix prefix-list-name { gateway prefix-list-name | import } Configure not to filter the routing information received from the specified address and that matching prefix-list. undo filter-policy ip-prefix prefix-list-name { gateway prefix-list-name | import }
470CHAPTER 30: CONFIGURING BGP Configure Filtering Route Information being Advertised by BGP Ta b l e 557 Filter Routing Information Being Advertised by BGP By default, BGP does not filter any route information that is received or advertised. protocol specifies the routing domain that can will be filtered. At present, BGP can filter route domains such as connected, static, OSPF and OSPF-ASE. See “Configure Route Filter” of “Configuration of IP Routing Policy” for details. Resetting BGP ConnectionsAfter modifying a BGP configuration, you must turn off the current BGP connections and reset BGP connections to make the new configuration effective. Perform the following configurations in system view. Ta b l e 558 Reset BGP Connections Displaying and Debugging BGP Ta b l e 559 Display and Debug BGP OperationCommand Filter routing information being advertised by BGPfilter-policy {acl-number | ip-prefix prefix-list-name } export [ protocol ] Cancel filtering routing information being advertised by BGPundo filter-policy {acl-number | ip-prefix prefix-list-name } export [ protocol ] OperationCommand Reset BGP connection reset bgp { all | peer-id } Clear routing flapping attenuation information and cancel the dampening over the routes. reset bgp dampening [ network-address [ mask ] ] Reset the BGP connection of a specified peer or all members of a peer group reset bgp group group-name OperationCommand Display BGP path information display bgp paths as-regular-expression Display AS filtered path information in BGPdisplay ip as-path-acl acl-number Display the routing information of the specified IP address in the routing table.display bgp routing-table ip-address [ mask ] Display CIDR routedisplay bgp routing-table cidr Display routing information of the specified BGP communitydisplay bgp routing-table community [ [aa:nn ] [ no-export-subconfed ] [ no-advertise] [ no-export ] ] [ exact-match ] Display routing information of permitted in the specified BGP community listdisplay bgp routing-table comm-list community-list-number [ exact-match] Display Dampening routedisplay bgp routing-table dampened Display the route matching the specified access listdisplay bgp routing-table acl acl-number
BGP Configuration Example471 BGP Configuration ExampleThis section describes several different configurations of BGP with a suggested procedure for each configuration. Configuring the AS Confederation AttributeAs shown in the following diagram, AS 100 is divided into 3 sub-ASs: 1001, 1002, 1003, which are configured with EBGP, confederation EBGP and IBGP. Display route flap informationdisplay bgp routing-table flap-information [ { regular-expression as-regular-expression } | { acl acl-number } | { network-address [ mask [ longer-match ] ] } ] Display the route with inconsistent source ASdisplay bgp routing-table different-origin-as Display peer informationdisplay bgp peer [ peer-address ] Display routing information distributed through BGPdisplay bgp routing-table network Display peer group informationdisplay bgp group [ group-name ] –table regular-expressdisplay bgp routing-table regular-expression as-regular-expression Display BGP route summary informationdisplay bgp summary Display the configured routing policy informationdisplay route-policy policy-name Enable BGP packet debugging.debugging bgp { all | event | { keepalive | open | packet | update } [ receive | send ] [ verbose ] } } Disable BGP packet debugging undo debugging bgp { all | event | keepalive | open | packet | update } Operation Command
472CHAPTER 30: CONFIGURING BGP Figure 154 Networking diagram of configuring AS confederation 1Configure Router A: [RouterA] bgp 1001 [RouterA-bgp] undo synchronization [RouterA-bgp] confederation id 100 [RouterA-bgp] confederation peer-as 1002 1003 [RouterA-bgp] peer 172.68.10.2 as-number 1002 [RouterA-bgp] peer 172.68.10.3 as-number 1003 2Configure Router B: [RouterB] bgp 1002 [RouterA-bgp] undo synchronization [RouterB-bgp] confederation id 100 [RouterB-bgp] confederation peer-as 1001 1003 [RouterB-bgp] peer 172.68.10.1 as-number 1001 [RouterB-bgp] peer 172.68.10.3 as-number 1003 3Configure Router C: [RouterC] bgp 1003 [RouterA-bgp] undo synchronization [RouterC-bgp] confederation id 100 [RouterC-bgp] confederation peer-as 1001 1002 [RouterC-bgp] peer 172.68.10.1 as-number 1001 [RouterC-bgp] peer 172.68.10.2 as-number 1002 [RouterC-bgp] peer 156.10.1.2 as-number 200 [RouterC-bgp] peer 172.68.1.2 as-number 1003 Configuring BGP Route ReflectorRouter B receives a BGP update message and forwards the update to Router C, which is configured as a route reflector and has two clients: Router B and Router D. When Router C receives routing update from Router B, it reflects the information to Router D. Therefore, an IBGP connection is not necessary between Router B and Router D, because Router C will reflect the information to Router D. AS200 AS100 AS1002AS1001 AS1003 Ethernet 172.68.10.1172.68.10.2 172.68.10.3 172.68.1.2 172.68.1.1 156.10.1.1 156.10.1.2Router A Router B Router CRouter D Router E
BGP Configuration Example473 Figure 155 Networking diagram of configuring route reflector 1Configure Router A: [RouterA] bgp 100 [RouterA-bgp] undo synchronization [RouterA-bgp] peer 192.1.1.2 as-number 200 [RouterA-bgp] interface serial 0 [RouterA-Serial0] ip address 192.1.1.1 255.255.255.0 2Configure Router B: aConfigure BGP peers [RouterB] bgp 200 [RouterA-bgp] undo synchronization [RouterB-bgp] peer 192.1.1.1 as-number 100 [RouterB-bgp] peer 193.1.1.1 as-number 200 bEnable OSPF [RouterB] ospf enable cConfigure Serial 0 [RouterB-ospf] interface serial 0 [RouterB-Serial0] ip address 192.1.1.2 255.255.255.0 dConfigure Serial 1 [RouterB-Serial0] interface serial 1 [RouterB-Serial1] ip address 193.1.1.2 255.255.255.0 [RouterB-Serial1] ospf enable area 0 3Configure Router C: aConfigure BGP peers and route reflector clients [RouterC] bgp 200 [RouterA-bgp] undo synchronization [RouterC-bgp] peer 193.1.1.2 as-number 200 reflect-client [RouterC-bgp] peer 193.1.1.2 reflect-client [RouterC-bgp] peer 194.1.1.2 as-number 200 reflect-client [RouterC-bgp] peer 194.1.1.2 reflect-client bEnable OSPF [RouterC] ospf enable cConfigure Serial 0 [RouterC-ospf] interface serial 0 IB GPIBGP EBGP Route reflector clientRoute reflec tor S1 194. 1. 1.1/24 S0 193.1.1. 1/ 24 S1 193.1.1.2/24S0 194.1.1. 2/ 24 S0 192. 1. 1. 2/24 S0 192.1.1.1/242.2.2.2 4. 4. 4.4 1.1. 1. 13.3.3. 3 AS100 AS200 Connected w ith netw ork 1. 0.0.0 S1Router C Router B Router D Router A Route reflector c lient Router E S2 S0IBGP 5.5.5.5
474CHAPTER 30: CONFIGURING BGP [RouterC-Serial0] ip address 193.1.1.1 255.255.255.0 dConfigure Serial 1 [RouterC-Serial0] interface serial 1 [RouterC-Serial1] ip address 194.1.1.1 255.255.255.0 [RouterC-Serial1] ospf enable area 0 4Configure Router D: aConfigure BGP peers [RouterD] bgp 200 [RouterA-bgp] undo synchronization [RouterD-bgp] peer 194.1.1.1 as-number 200 bEnable OSPF [RouterD] ospf enable cConfigure Serial 0 [RouterD-ospf] interface serial 0 [RouterD-Serial0] ip address 194.1.1.2 255.255.255.0 [RouterD-Serial0] ospf enable area 0 View BGP routing table on Router B with display bgp routing-table command. Note that Router B knows that network 1.0.0.0 exists. [RouterB] display bgp routing-table View BGP routing table on Router C with display bgp routing-table command. Note that Router C knows that network 1.0.0.0 exists. [RouterD] display bgp routing-table Configuring BGP Path SelectionThis example describes how the administrator manages the routing with the BGP attribute. All routers are configured with BGP. OSPF is used by IGP in AS200. Router A is in AS100, functioning as the BGP peer of Router B and Router C in AS200. When Router B and Router C run IBGP to Router D, Router D is also in AS200. network next hopmetriclocalpref 1.0.0.0192.1.1.10 networknext hop metricllocalpref 1.0.0.0194.1.1.1 0100
BGP Configuration Example475 Figure 156 Networking diagram of configuring BGP path selection 1Configure Router A: [RouterA] interface serial 0 [RouterA-Serial0] ip address 192.1.1.1 255.255.255.0 [RouterA] interface serial 1 [RouterA-Serial1] ip address 193.1.1.1 255.255.255.0 [RouterA-Serial1] quit aStart BGP [RouterA] bgp 100 [RouterA-bgp] undo synchronization bSpecify BGP transmission network [RouterA-bgp] network 1.0.0.0 mask 255.0.0.0 [RouterA-bgp] network 2.0.0.0 mask 255.0.0.0 cConfigure peer [RouterA-bgp] peer 192.1.1.2 as-number 200 [RouterA-bgp] peer 193.1.1.2 as-number 200 dConfigure MED attribute of Router A ■Add access list to Router A and enable network 1.0.0.0. [RouterA-bgp] acl 1 [RouterA-acl-1] rule permit source 1.0.0.0 0.255.255.255 ■Define two routing diagram, namely set_med_50 and set_med_100. The first routing diagram is network 1.0.0.0. The MED attribute is 50, and the second MED attribute is 100. [RouterA-acl-1] route-policy set_med_50 permit 1 [RouterA-route-policy] if-match ip address 1 [RouterA-route-policy] apply cost 50 [RouterA-route-policy] quit [RouterA] route-policy set_med_100 permit 1 [RouterA-route-policy] if-match ip address 1 ■[RouterA-route-policy] apply cost 100Apply the routing diagram set_med_50 to the exit routing update of Router C (193.1.1.2). Apply the routing diagram set_med_100 to exit routing update of Router B (192.1.1.2). [RouterA] bgp 100 [RouterA-bgp] peer 193.1.1.2 route-policy set_med_50 export [RouterA-bgp] peer 192.1.1.2 route-policy set_med_100 export Router B Router CRouter D Router A S0 194.1.1.2/24 S0 192.1.1.1/24 S1 193.1.1.1/24 S0 193.1.1.2/24S1 195.1.1.2/24 S0 192.1.1.2/242.2.2.2 4.4.4.4 3.3.3.3 1.1.1.1 AS100AS200 S0 194.1.1.1/24 S1 195.1.1.1/24 IBGP IBGP EBGP EBGP1.0.0.0To network 2.0.0.0 2.0.0.0 To network To network 2.0.0.0 To network
476CHAPTER 30: CONFIGURING BGP 2Configure Router B: [RouterB] interface serial 0 [RouterB-Serial0] ip address 192.1.1.2 255.255.255.0 [RouterB] interface serial 1 [RouterB-Serial1] ip address 194.1.1.2 255.255.255.0 [RouterB] ospf enable [RouterB-ospf] network 194.1.1.0 0.0.0.255 area 0 [RouterB-ospf] network 192.1.1.0 0.0.0.255 area 0 [RouterB] bgp 200 [RouterB-bgp] undo synchronization [RouterB-bgp] peer 192.1.1.1.1 as-number 100 [RouterB-bgp] peer 194.1.1.1.1 as-number 200 [RouterB-bgp] peer 195.1.1.1.2 as-number 200 3Configure Router C: [RouterC] interface serial 0 [RouterC -Serial] ip address 193.1.1.2 255.255.255.0 [RouterC] interface serial 1 [RouterC-Serial1] ip address 195.1.1.2 255.255.255.0 [RouterC] ospf enable [RouterC-ospf] network 193.1.1.0 0.0.0.255 area 0 [RouterC-ospf] network 195.1.1.0 0.0.0.255 area 0 [RouterC] bgp 200 [RouterC-bgp] undo synchronization [RouterC-bgp] peer 193.1.1.1 as-number 100 [RouterC-bgp] peer 194.1.1.2 as-number 200 [RouterC-bgp] peer 195.1.1.1 as-number 200 Set the local preference attribute of Router C. ■Add access list 1 to Router C and enable network 1.0.0.0. [RouterC-bgp] acl 1 [RouterC-acl-1] rule permit source 1.0.0.0 0.255.255.255 ■Define a routing diagram named localpref. In the diagram, the local preference of the route matching access list 1 is set to 200 and the local preference of the route not matching access list 1 is 100. [RouterC-acl-1]route-policy localpref permit 1 [RouterC-route-policy] if-match ip address 1 [RouterC-route-policy] apply local-preference 200 [RouterC-route-policy] route-policy localpref permit 2 [RouterC-route-policy] apply local-preference 100 ■Apply this routing diagram to the entry traffic from BGP peer 193.1.1.2 (Router A). [RouterC] bgp200 [RouterC-bgp] peer 193.1.1.1 route-policy localpref import 4Configure Router D: [RouterD] interface serial 0 [RouterD-Serial0] ip address 194.1.1.1 255.255.255.0 [RouterD] interface serial 1 [RouterD-Serial1] ip address 195.1.1.1 255.255.255.0 [RouterD] ospf enable [RouterD-ospf]network 194.1.1.0 0.0.0.255 area 0 [RouterD-ospf]network 195.1.1.0 0.0.0.255 area 0