Network Requirement
As shown in Figure. 1, BGP runs on all the switches.
An EBGP connection is established between Switch A and Switch B, and IBGP fullmesh connections are established between Switch B, Switch C, and Switch D.
Configure IBGP connections between Switch B, Switch C, and Switch D.
Configure an EBGP connection between Switch A and Switch B.
Configure Switch D as the route reflector for Switch B and Switch C, which is the clients of Switch D, to simplify device configuration and management.
You have to finish configurations on Switch D to be a route reflector. No configuration is required on the client.
Figure 1. BGP Route Reflector Configuration
Procedure
This section describes the steps to configure basic BGP functions on SwitchA, SwitchB, SwitchC and SwitchD, configure Switch D as the route reflector for Switch B and Switch C.
Switch A
Step1 Configure the VLANs and VLAN interfaces.
admin@SwitchA# set vlans vlan-id 10 l3-interface 10 admin@SwitchA# set vlans vlan-id 20 l3-interface 20 admin@SwitchA# set interface gigabit-ethernet te-1/1/1 family ethernet-switching native-vlan-id 10 admin@SwitchA# set interface gigabit-ethernet te-1/1/2 family ethernet-switching native-vlan-id 20 admin@SwitchA# set vlan-interface interface 10 vif 10 address 192.168.10.1 prefix-length 24 admin@SwitchA# set vlan-interface interface 20 vif 20 address 192.168.20.1 prefix-length 24
Step2 Configure an EBGP connection.
admin@SwitchA# set protocols bgp router-id 1.1.1.1 admin@SwitchA# set protocols bgp local-as 100 admin@SwitchA# set protocols bgp neighbor 192.168.20.2 remote-as 200
Step3 Commit the configurations.
admin@SwitchA# commit
Switch B
Step1 Configure the VLANs and VLAN interfaces.
admin@SwitchB# set vlans vlan-id 20 l3-interface 20 admin@SwitchB# set vlans vlan-id 30 l3-interface 30 admin@SwitchB# set vlans vlan-id 40 l3-interface 40 admin@SwitchB# set interface gigabit-ethernet ge-1/1/2 family ethernet-switching native-vlan-id 20 admin@SwitchB# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 30 admin@SwitchB# set interface gigabit-ethernet ge-1/1/4 family ethernet-switching native-vlan-id 40 admin@SwitchB# set vlan-interface interface 20 vif 20 address 192.168.20.2 prefix-length 24 admin@SwitchB# set vlan-interface interface 30 vif 30 address 192.168.30.1 prefix-length 24 admin@SwitchB# set vlan-interface interface 40 vif 40 address 192.168.40.1 prefix-length 24
Step2 Configure EBGP and IBGP connections.
admin@SwitchB# set protocols bgp router-id 2.2.2.2 admin@SwitchB# set protocols bgp local-as 200 admin@SwitchB# set protocols bgp neighbor 192.168.20.1 remote-as 100 admin@SwitchB# set protocols bgp neighbor 192.168.40.2 remote-as 200
Step3 Commit the configurations.
admin@SwitchB# commit
Switch C
Step1 Configure the VLANs and VLAN interfaces.
admin@SwitchC# set vlans vlan-id 40 l3-interface 40 admin@SwitchC# set vlans vlan-id 50 l3-interface 50 admin@SwitchC# set interface gigabit-ethernet ge-1/1/4 family ethernet-switching native-vlan-id 40 admin@SwitchC# set interface gigabit-ethernet ge-1/1/5 family ethernet-switching native-vlan-id 50 admin@SwitchC# set vlan-interface interface 40 vif 40 address 192.168.40.2 prefix-length 24 admin@SwitchC# set vlan-interface interface 50 vif 50 address 192.168.50.2 prefix-length 24
Step2 Configure the IBGP connection.
admin@SwitchC# set protocols bgp router-id 3.3.3.3 admin@SwitchC# set protocols bgp local-as 200 admin@SwitchC# set protocols bgp neighbor 192.168.50.2 remote-as 200
Step3 Commit the configurations.
admin@SwitchC# commit
Switch D
Step1 Configure the VLANs and VLAN interfaces.
admin@SwitchD# set vlans vlan-id 30 l3-interface 30 admin@SwitchD# set vlans vlan-id 50 l3-interface 50 admin@SwitchD# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 30 admin@SwitchD# set interface gigabit-ethernet ge-1/1/5 family ethernet-switching native-vlan-id 50 admin@SwitchD# set vlan-interface interface 30 vif 40 address 192.168.30.2 prefix-length 24 admin@SwitchD# set vlan-interface interface 50 vif 50 address 192.168.50.1 prefix-length 24
Step2 Configure the IBGP connection.
admin@SwitchD# set protocols bgp router-id 4.4.4.4 admin@SwitchD# set protocols bgp local-as 200 admin@SwitchD# set protocols bgp neighbor 192.168.40.1 remote-as 200 admin@SwitchD# set protocols bgp neighbor 192.168.50.1 remote-as 200
Step3 Configure Switch D to be a route reflector for Switch B and Switch C.
admin@SwitchD# set protocols bgp ipv4 unicast neighbor 192.168.40.1 route-reflector-client admin@SwitchD# set protocols bgp ipv4 unicast neighbor 192.168.50.1 route-reflector-client
Step4 Commit the configurations.
admin@SwitchD# commit
Verify the Configurations
- View the BGP routing table of Switch B.
admin@SwitchB# run show bgp routes Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ------ ------- ---- ------- *> 192.168.10.0/24 192.168.20.11.1.1.1200 ?
- View the BGP routing table of Switch D.
admin@SwitchB# run show bgp routes detail 192.168.10.0/24 From peer: 3.3.3.3 Route: Not Used Origin: INCOMPLETE AS Path: 200 Nexthop: 192.168.40.1 Multiple Exit Discriminator: 0 Local Preference: 100 Originator ID: 2.2.2.2 Cluster List: 3.3.3.3