3Com 10014299 Network Router User Manual


 
476 CHAPTER 30: CONFIGURING BGP
2 Configure 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
3 Configure 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
4 Configure 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