39.3 Configuration Examples of BGP
39.3.1 Examples 1: configure BGP neighbor
SwitchB, SwitchC and SwitchD are in AS200, SwitchA is in AS100. SwitchA and SwitchB share the same
network segment. SwitchB and SwitchD are not connected physically.
SwitchA
AS100
The configurations of SwitchA are as following:
SwitchA(config)#router bgp 100
SwitchA(config-router-bgp)#neighbor 11.1.1.2 remote-as 200
SwitchA(config-router-bgp)#exit
The configurations of SwitchB are as following:
SwitchB(config)#router bgp 200
SwitchB(config-router-bgp)#network 11.0. 0.0
SwitchB(config-router-bgp)#network 12.0. 0.0
SwitchB(config-router-bgp)#network 13.0. 0.0
SwitchB(config-router-bgp)#neighbor 11.1.1.1 remote-as 100
SwitchB(config-router-bgp)#neighbor 12.1.1.3 remote-as 200
SwitchB(config-router-bgp)#neighbor 13.1.1.4 remote-as 200
SwitchB(config-router-bgp)#exit
The configurations of SwitchC are as following:
SwitchC(config)#router bgp 200
SwitchC(config-router-bgp)#network 12.0.0.0
SwitchC(config-router-bgp)#network 13.0.0.0
SwitchC(config-router-bgp)#neighbor 12.1. 1.2 remote-as 200
SwitchC(config-router-bgp)#neighbor 13.1. 1.4 remote-as 200
SwitchC(config-router-bgp)#exit
The configurations of SwitchD are as following:
Vlan1:11.1.1.1
Vlan1:11.1.1.2
Figure 39-3-1 BGP Net work Topologic al Map
SwitchC
Vlan1: 12.1.1.3
Vlan2: 12.1.1.2
SwitchB
AS200
39-15
Vlan2: 13.1.1.3
Vlan1: 13.1.1.4
SwitchD