...
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.
Code Block |
---|
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 vlanl3-interface vlan-interface 10 vif 10 address 192.168.10.1 prefix-length 24 admin@SwitchA# set vlanl3-interface vlan-interface 20 vif 20 address 192.168.20.1 prefix-length 24 |
...
Code Block |
---|
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 Enable IP routing.
Code Block |
---|
admin@SwitchA# set ip routing enable true |
Step4 Commit the configurations.
...
Code Block |
---|
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 vlanl3-interface vlan-interface 20 vif 20 address 192.168.20.2 prefix-length 24 admin@SwitchB# set vlanl3-interface vlan-interface 30 vif 30 address 192.168.30.1 prefix-length 24 admin@SwitchB# set vlanl3-interface vlan-interface 40 vif 40 address 192.168.40.1 prefix-length 24 |
...
Code Block |
---|
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 Enable IP routing.
Code Block |
---|
admin@SwitchB# set ip routing enable true |
Step4 Commit the configurations.
...
Code Block |
---|
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 vlanl3-interface vlan-interface 40 vif 40 address 192.168.40.2 prefix-length 24 admin@SwitchC# set vlanl3-interface vlan-interface 50 vif 50 address 192.168.50.2 prefix-length 24 |
...
Code Block |
---|
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 Enable IP routing.
Code Block |
---|
admin@SwitchC# set ip routing enable true |
Step4 Commit the configurations.
...
Code Block |
---|
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 vlanl3-interface vlan-interface 30 vif 40 address 192.168.30.2 prefix-length 24 admin@SwitchD# set vlanl3-interface vlan-interface 50 vif 50 address 192.168.50.1 prefix-length 24 |
...
Code Block |
---|
admin@SwitchD# set protocols bgp ipv4 unicast neighbor 192.168.40.1 ipv4-unicast route-reflector-client admin@SwitchD# set protocols bgp ipv4 unicast neighbor 192.168.5040.1 ipv4-unicast route-reflector-client |
...
Step4 Enable IP routing.
Code Block |
---|
admin@SwitchD# set ip routing enable true |
Step5 Commit the configurations.
Code Block |
---|
admin@SwitchD# commit |
Configuring Switch A to Advertise Route 192.168.10.0/24
Code Block |
---|
admin@SwitchA# set protocols bgp ipv4-unicast network 192.168.10.0/24
admin@SwitchA# commit |
Verify the Configurations
- View the BGP routing table of Switch BD.
Code Block |
---|
admin@SwitchB#admin@SwitchD# run show bgp routes Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ------ ------- ---- ------- *>route 192.168.10.0/24 BGP routing table entry for 192.168.10.0/24 Paths: (1 available, best #1, table default) Advertised to non peer-group peers: 192.168.1050.0/24 192.168.20.11.1.1.1200 ? |
- View the BGP routing table of Switch D.
Code Block |
---|
admin@SwitchB# run show bgp routes detail2 200 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.3from 192.168.20.1 (2.2.2.2) Origin IGP, metric 0, valid, external, best (First path received) Last update: Wed Apr 7 16:13:35 2021 |