BGP Configuration Example 475

Figure 156 Networking diagram of configuring BGP path selection

 

 

 

 

To network

AS200

 

 

 

2.2.2.2

2.0.0.0

 

 

 

 

 

 

 

S0

 

S0

 

 

 

 

192.1.1.2/24

 

194.1.1.2/24

 

 

 

 

 

Router B

 

 

 

 

S0 192.1.1.1/24

EBGP

 

IBGP

S0

1.1.1.1

 

 

194.1.1.1/24

 

 

 

 

 

4.4.4.4

To network

 

EBGP

 

IBGP

 

Router A

 

S1

Router D

1.0.0.0

 

 

 

 

S1 193.1.1.1/24

 

 

 

195.1.1.1/24

 

AS100

S0 193.1.1.2/24

Router C

S1

 

 

 

 

 

195.1.1.2/24

 

 

 

 

3.3.3.3

To network

 

 

 

 

 

 

 

 

 

To network

2.0.0.0

 

 

 

 

2.0.0.0

 

 

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-policyset_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

Page 479
Image 479
3Com 10014299 manual Start BGP, Specify BGP transmission network, Configure peer, RouterA-acl-1rule permit source 1.0.0.0