...
Figure 1. BGP configuration
Procedure
This section describes the steps of how to configure basic BGP functions on SwitchA, SwitchB, SwitchC and SwitchD.
Switch A
Step1 Configure the VLANs and VLAN interfaces.
...
Step1 Configure the VLANs and VLAN interfaces.
Code Block |
---|
admin@XorPlus#admin@SwitchD# set vlans vlan-id 30 l3-interface 30 admin@XorPlus#admin@SwitchD# set vlans vlan-id 50 l3-interface 50 admin@XorPlus#admin@SwitchD# set interface gigabit-ethernet ge-1/1/3 family ethernet-switching native-vlan-id 30 admin@XorPlus#admin@SwitchD# set interface gigabit-ethernet ge-1/1/5 family ethernet-switching native-vlan-id 50 admin@XorPlus#admin@SwitchD# set vlan-interface interface 30 vif 40 address 192.168.30.2 prefix-length 24 admin@XorPlus#admin@SwitchD# set vlan-interface interface 50 vif 50 address 192.168.50.1 prefix-length 24 |
Step2 Configure the IBGP connection.
Code Block |
---|
admin@XorPlus#admin@SwitchD# set protocols bgp bgp-id 4.4.4.4 admin@XorPlus#admin@SwitchD# set protocols bgp local-as 200 admin@XorPlus#admin@SwitchD# set protocols bgp peer 192.168.30.1 as 200 admin@XorPlus#admin@SwitchD# set protocols bgp peer 192.168.30.1 local-ip 192.168.30.2 admin@XorPlus#admin@SwitchD# set protocols bgp peer 192.168.30.1 next-hop-self true admin@XorPlus#admin@SwitchD# set protocols bgp peer 192.168.50.2 as 200 admin@XorPlus#admin@SwitchD# set protocols bgp peer 192.168.50.2 local-ip 192.168.50.1 admin@XorPlus#admin@SwitchD# set protocols bgp peer 192.168.50.2 next-hop-self true |
...
Code Block |
---|
admin@SwitchD# commit |
Viewing BGP Peer Status on Switch B
Code Block |
---|
admin@SwitchB# run show bgp peers detail Peer 2: local 192.168.20.2/179 remote 192.168.20.1/179 Peer ID: 1.1.1.1 Peer State: ESTABLISHED Admin State: START Negotiated BGP Version: 4 Peer AS Number: 100 Updates Received: 20, Updates Sent: 2 Messages Received: 634, Messages Sent: 611 Time since last received update: 1685 seconds Number of transitions to ESTABLISHED: 1 Time since last entering ESTABLISHED state: 15995 seconds Retry Interval: 120 seconds Hold Time: 90 seconds, Keep Alive Time: 30 seconds Configured Hold Time: 90 seconds, Configured Keep Alive Time: 30 seconds Minimum AS Origination Interval: 0 seconds Minimum Route Advertisement Interval: 0 seconds Peer 2: local 192.168.30.1/179 remote 192.168.30.2/179 Peer ID: 4.4.4.4 Peer State: ESTABLISHED Admin State: START Negotiated BGP Version: 4 Peer AS Number: 100 Updates Received: 20, Updates Sent: 2 Messages Received: 634, Messages Sent: 611 Time since last received update: 1685 seconds Number of transitions to ESTABLISHED: 1 Time since last entering ESTABLISHED state: 15995 seconds Retry Interval: 120 seconds Hold Time: 90 seconds, Keep Alive Time: 30 seconds Configured Hold Time: 90 seconds, Configured Keep Alive Time: 30 seconds Minimum AS Origination Interval: 0 seconds Minimum Route Advertisement Interval: 0 seconds Peer 3: local 192.168.40.1/179 remote 192.168.40.2/179 Peer ID: 3.3.3.3 Peer State: ESTABLISHED Admin State: START Negotiated BGP Version: 4 Peer AS Number: 100 Updates Received: 20, Updates Sent: 2 Messages Received: 634, Messages Sent: 611 Time since last received update: 1685 seconds Number of transitions to ESTABLISHED: 1 Time since last entering ESTABLISHED state: 15995 seconds Retry Interval: 120 seconds Hold Time: 90 seconds, Keep Alive Time: 30 seconds Configured Hold Time: 90 seconds, Configured Keep Alive Time: 30 seconds Minimum AS Origination Interval: 0 seconds Minimum Route Advertisement Interval: 0 seconds |
...
View the BGP routing table of Switch B:
Code Block |
---|
admin@XorPlus#admin@SwitchD# 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.1 1.1.1.1 100 ? admin@XorPlus#admin@SwitchD# |
View the BGP routing table of Switch C:
Code Block |
---|
admin@XorPlus#admin@SwitchD# 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.1 2.2.2.2 100 ? admin@XorPlus#admin@SwitchD# |
The preceding command output display that the route to destination 192.168.10.0/24 becomes invalid because the next hop address of this route is unreachable.
...