Example for Configuring a BGP Route Reflector


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 vlan10
admin@SwitchA# set vlans vlan-id 20 l3-interface vlan20
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 vlan10 address 192.168.10.1 prefix-length 24
admin@SwitchA# set l3-interface vlan-interface vlan20 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
admin@SwitchA# set protocols bgp ebgp-requires-policy false

Step3        Enable IP routing.

admin@SwitchA# set ip routing enable true

Step4         Commit the configurations.

admin@SwitchA# commit

Switch B

Step1         Configure the VLANs and VLAN interfaces.

admin@SwitchB# set vlans vlan-id 20 l3-interface vlan20
admin@SwitchB# set vlans vlan-id 40 l3-interface vlan40
admin@SwitchB# set interface gigabit-ethernet te-1/1/2 family ethernet-switching native-vlan-id 20
admin@SwitchB# set interface gigabit-ethernet te-1/1/4 family ethernet-switching native-vlan-id 40
admin@SwitchB# set l3-interface vlan-interface vlan20 address 192.168.20.2 prefix-length 24
admin@SwitchB# set l3-interface vlan-interface vlan40 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
admin@SwitchB# set protocols bgp ebgp-requires-policy false

Step3        Enable IP routing.

admin@SwitchB# set ip routing enable true

Step4        Commit the configurations.

admin@SwitchB# commit

Switch C

Step1         Configure the VLANs and VLAN interfaces.

admin@SwitchC# set vlans vlan-id 50 l3-interface vlan50
admin@SwitchC# set interface gigabit-ethernet te-1/1/5 family ethernet-switching native-vlan-id 50
admin@SwitchC# set l3-interface vlan-interface vlan50 address 192.168.50.1 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        Enable IP routing.

admin@SwitchC# set ip routing enable true

Step4         Commit the configurations.

admin@SwitchC# commit

Switch D

Step1         Configure the VLANs and VLAN interfaces.

admin@SwitchD# set vlans vlan-id 40 l3-interface vlan40
admin@SwitchD# set vlans vlan-id 50 l3-interface vlan50
admin@SwitchD# set interface gigabit-ethernet te-1/1/4 family ethernet-switching native-vlan-id 40
admin@SwitchD# set interface gigabit-ethernet te-1/1/5 family ethernet-switching native-vlan-id 50
admin@SwitchD# set l3-interface vlan-interface vlan40 address 192.168.40.2 prefix-length 24
admin@SwitchD# set l3-interface vlan-interface vlan50 address 192.168.50.2 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 neighbor 192.168.40.1 ipv4-unicast route-reflector-client
admin@SwitchD# set protocols bgp neighbor 192.168.50.1 ipv4-unicast route-reflector-client

Step4        Enable IP routing.

admin@SwitchD# set ip routing enable true

Step5         Commit the configurations.

admin@SwitchD# commit

Configuring Switch A to Advertise Route 192.168.10.0/24

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.
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

Copyright © 2024 Pica8 Inc. All Rights Reserved.