Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

 Figure 1. BGP configuration

Image Modified

Procedure

This section describes the steps of configuring basic BGP functions on SwitchA, SwitchB, SwitchC and SwitchD.

Switch A

Step1         Configure the VLANs and VLAN interfaces.

...

Code Block
admin@SwitchA# commit

Switch B

Step1         Configure the VLANs and VLAN interfaces.

...

Code Block
admin@SwitchA# commit

Switch C

Step1         Configure the VLANs and VLAN interfaces.

...

Code Block
admin@SwitchA# commit

Switch D

Step1         Configure the VLANs and VLAN interfaces.

...

Code Block
admin@SwitchA# commit

Viewing BGP Peer Status on Switch B

Code Block
admin@XorPlus#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

Configuring Switch A to Advertise Route 192.168.10.0/24

Code Block
admin@XorPlus#admin@SwitchA# set policy policy-statement direct-to-bgp term t1 from protocol connected 
admin@XorPlus#admin@SwitchA# set policy policy-statement direct-to-bgp term t1 from network4 192.168.10.0/24
admin@XorPlus#admin@SwitchA# set policy policy-statement direct-to-bgp term t1 then accept 
admin@XorPlus# commit
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus#
admin@XorPlus# admin@SwitchA# set protocols bgp export direct-to-bgp
admin@XorPlus#admin@SwitchA# commit
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# 

...

Code Block
admin@XorPlus# 


View the BGP routing table of Switch B:

Code Block
admin@XorPlus# 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# 

...

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. 

Configuring Switch B to Advertise a Connected Route

Code Block
admin@XorPlus#admin@SwitchB# set policy policy-statement direct-to-bgp term t1 from protocol connected 
admin@XorPlus#admin@SwitchB# set policy policy-statement direct-to-bgp term t1 then accept 
admin@XorPlus# commit
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus#
admin@XorPlus# admin@SwitchB# set protocols bgp export direct-to-bgp
admin@XorPlus#admin@SwitchB# commit
Waiting for merging configuration.
Commit OK.
Save done.
admin@XorPlus# 

Ping 192.168.10.1 on Switch C:

Code Block
admin@XorPlus#admin@SwitchC# run ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data.
64 bytes from 192.168.10.1: icmp_req=1 ttl=63 time=4.68 ms
64 bytes from 192.168.10.1: icmp_req=2 ttl=63 time=4.46 ms
64 bytes from 192.168.10.1: icmp_req=3 ttl=63 time=5.35 ms
64 bytes from 192.168.10.1: icmp_req=4 ttl=63 time=4.52 ms
64 bytes from 192.168.10.1: icmp_req=5 ttl=63 time=4.51 ms 
192.168.10.1 ping statistics —
5 packets transmitted, 5 received, 0% packet loss, time 4017ms
rtt min/avg/max/mdev = 4.460/4.709/5.358/0.338 ms
admin@XorPlus#

View the BGP routing table of Switch C:

Code Block
admin@XorPlus#admin@SwitchC# 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 ?
*> 192.168.20.0/24 192.168.40.1 2.2.2.2?
*>192.168.30.0/24 192.168.40.1 2.2.2.2?
admin@XorPlus#