...
Table of Contents |
---|
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.
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 l3-interface vlan-interface 10 address 192.168.10.1 prefix-length 24
admin@SwitchA# set l3-interface vlan-interface 20 address 192.168.20.1 prefix-length 24 |
Step2 Configure an EBGP connection.
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@SwitchA# commit |
Switch B
Step1 Configure the VLANs and VLAN interfaces.
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 l3-interface vlan-interface 20 address 192.168.20.2 prefix-length 24
admin@SwitchB# set l3-interface vlan-interface 30 address 192.168.30.1 prefix-length 24
admin@SwitchB# set l3-interface vlan-interface 40 address 192.168.40.1 prefix-length 24 |
Step2 Configure EBGP and IBGP connections.
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@SwitchB# commit |
Switch C
Step1 Configure the VLANs and VLAN interfaces.
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 l3-interface vlan-interface 40 address 192.168.40.2 prefix-length 24
admin@SwitchC# set l3-interface vlan-interface 50 address 192.168.50.2 prefix-length 24 |
Step2 Configure the IBGP connection.
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@SwitchC# commit |
Switch D
Step1 Configure the VLANs and VLAN interfaces.
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 l3-interface vlan-interface 30 address 192.168.30.2 prefix-length 24
admin@SwitchD# set l3-interface vlan-interface 50 address 192.168.50.1 prefix-length 24 |
Step2 Configure the IBGP connection.
Code Block |
---|
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.
Code Block |
---|
admin@SwitchD# set protocols bgp neighbor 192.168.40.1 ipv4-unicast route-reflector-client
admin@SwitchD# set protocols bgp neighbor 192.168.40.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 D.
Code Block |
---|
admin@SwitchD# run show bgp 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.50.2
200
192.168.10.0 from 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 |