...
Network Requirement
As shown in Figure. 1, BGP runs on all the switches.
...
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 of how 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 bgprouter-id 1.1.1.1 admin@SwitchA# set protocols bgp local-as 100 admin@SwitchA# set protocols bgp peerneighbor 192.168.20.2 remote-as 200 |
Step3 Enable IP routing.
Code Block |
---|
admin@SwitchA# set protocols bgp peer 192.168.20.2 local-ip 192.168.20.1 admin@SwitchA# set protocols bgp peer 192.168.20.2 next-hop-selfrouting enable true |
Step3 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 bgprouter-id 2.2.2.2 admin@SwitchB# set protocols bgp local-as 200 admin@SwitchB# set protocols bgp peerneighbor 192.168.20.1 remote-as 100 admin@SwitchB# set protocols bgp peerneighbor 192.168.20.1 local-ip 192.168.20.2 admin@SwitchB# set protocols bgp peer 192.168.20.1 next-hop-self true admin@SwitchB# set protocols bgp peer 192.168.40.2 as 200 admin@SwitchB# set protocols bgp peer 192.168.40.2 local-ip 192.168.40.1 admin@SwitchB# set protocols bgp peer 192.168.40.2 next-hop-self true |
...
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 bgprouter-id 3.3.3.3 admin@SwitchC# set protocols bgp local-as 200 admin@SwitchC# set protocols bgp peerneighbor 192.168.40.1 as 200 admin@SwitchC# set protocols bgp peer 192.168.40.1 local-ip 192.168.40.2 admin@SwitchC# set protocols bgp peer 192.168.40.1 next-hop-self true admin@SwitchC# set protocols bgp peer 192.168.50.1 as 200 admin@SwitchC# set protocols bgp peer 192.168.50.1 local-ip 192.168.50.2 admin@SwitchC# set protocols bgp peer 192.168.50.1 next-hop-self true |
...
50.2 remote-as 200 |
Step3 Enable IP routing.
Code Block |
---|
admin@SwitchC# set protocolsip bgp route-reflector cluster-id 3.3.3.3 admin@SwitchC# set protocols bgp route-reflector disable false admin@SwitchC# set protocols bgp peer 192.168.40.1 client true admin@SwitchC# set protocols bgp peer 192.168.50.1 client truerouting 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 bgprouter-id 4.4.4.4 admin@SwitchD# set protocols bgp local-as 200 admin@SwitchD# set protocols bgp peerneighbor 192.168.3040.1 remote-as 200 admin@SwitchD# set protocols bgp peerneighbor 192.168.3050.1 localremote-ip 192.168.30.2 as 200 |
Step3 Configure Switch D to be a route reflector for Switch B and Switch C.
Code Block |
---|
admin@SwitchD# set protocols bgp peerneighbor 192.168.3040.1 ipv4-unicast nextroute-hopreflector-self trueclient admin@SwitchD# set protocols bgp peerneighbor 192.168.5040.21 as 200 ipv4-unicast route-reflector-client |
Step4 Enable IP routing.
Code Block |
---|
admin@SwitchD# set protocolsip bgprouting peer 192.168.50.2 local-ip 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 peeripv4-unicast network 192.168.5010.2 next-hop-self true |
Step3 Commit the configurations.
Code Block |
---|
admin@SwitchD# 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 |