BGP IPv4 - Initial Configuration

Initial Configuration

The initial configuration of BGP (Border Gateway Protocol) for IPv4 involves setting up the basic parameters to establish BGP routing within a network. Key aspects of the initial configuration include defining the router's AS number, configuring BGP neighbors by specifying their IP addresses and AS numbers, and determining which networks will be advertised to BGP peers. Additionally, administrators may set various attributes such as the BGP router ID, timers, and policies to influence BGP behavior. Proper configuration of the initial parameters ensures that BGP routers can form peer relationships, exchange routing information, and participate in the BGP routing process. Additionally, careful consideration of route filtering and network advertisements during the initial setup is crucial to ensure optimal routing and network stability. The BGP IPv4 initial configuration serves as the foundation for a well-functioning BGP routing environment, and administrators must tailor the configuration to meet the specific requirements and policies of their network.

Lab:

Disclaimer

This Configuration Guide is designed to assist members to enhance their skills in particular technology area. While every effort has been made to ensure that all material is as complete and accurate as possible, the enclosed material is presented on an “as is” basis. Neither the authors nor Forum assume any liability or responsibility to any person or entity with respect to loss or damages incurred from the information contained in this guide. This configuration guide was developed by Forum. Any similarities between material presented in this configuration guide and any other material is completely coincidental.

Cisco IOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.2(4)M1, DEVELOPMENT TEST SOFTWARE

Task 1: Configure IPv4 BGP process for Autonomous

Step 1: In the configuration mode of router configure IPv4 BGP Process by following command:

R1:
router bgp 65100				                    //initiate BGP process for AS 65100
neighbor 22.0.1.2 remote-as 65000  	          	//creates a BGP peer group
neighbor 22.0.1.2 ebgp-multihop 5	
neighbor 22.0.1.2 update-source loopback 1	          //to form loopback  to loopback indirect peering                                              
neighbor 22.0.1.2 soft-reconfiguration inbound	     //to store fresh incoming updated from neighbor
exit
R2:
router bgp 65000
neighbor 11.0.1.1 remote-as 65100
neighbor 11.0.1.1 ebgp-multihop 5	 	           //BGP connections to external peers residing 
neighbor 11.0.1.1 update-source loopback 1         on networks that are not directly connected
neighbor 11.0.1.1 soft-reconfiguration inbound
neighbor 33.0.1.3 remote-as 65000
neighbor 33.0.1.3 update-source loopback 1
neighbor 33.0.1.3 soft-reconfiguration inbound
exit
R3:
router bgp 65000
neighbor 22.0.1.2 remote-as 65000
neighbor 22.0.1.2 update-source loopback 1
neighbor 22.0.1.2 soft-reconfiguration inbound
neighbor 44.0.1.4 remote-as 65200
neighbor 44.0.1.4 ebgp-multihop 5
neighbor 44.0.1.4 update-source loopback 1
neighbor 44.0.1.4 soft-reconfiguration inbound
exit
R4:
router bgp 65200
neighbor 33.0.1.3 remote-as 65000
neighbor 33.0.1.3 ebgp-multihop 5
neighbor 33.0.1.3 update-source loopback 1
neighbor 33.0.1.3 soft-reconfiguration inbound
exit

Step 2: In the configuration mode of router configure IPv4 OSPF Process by following command:

R1:
router ospf 1					          //initiate OSPF process with process id 1
network 0.0.0.0 0.0.0.0 area 0			//send updates on any ip with any mask 
exit
R2:
router ospf 1
network 0.0.0.0 0.0.0.0 area 0
exit
R3:
router ospf 1
network 0.0.0.0 0.0.0.0 area 0
exit
R4:
router ospf 1
network 0.0.0.0 0.0.0.0 area 0
exit

Step 3: Announce the network in BGP Process

R1:
router bgp 65100
address-family ipv4				          //enable address family for IPv4 BGP
network 11.0.1.0 mask 255.255.255.0		//announce the network in BGP process
network 11.0.2.0 mask 255.255.255.0
network 11.0.3.0 mask 255.255.255.0
exit
R2:
router bgp 65000
address-family ipv4
network 22.0.1.0 mask 255.255.255.0
network 22.0.2.0 mask 255.255.255.0
network 22.0.3.0 mask 255.255.255.0
exit
R3:
router bgp 65000
address-family ipv4
network 33.0.1.0 mask 255.255.255.0
network 33.0.2.0 mask 255.255.255.0
network 33.0.3.0 mask 255.255.255.0
exit
R4:
router bgp 65200
address-family ipv4
network 44.0.1.0 mask 255.255.255.0
network 44.0.2.0 mask 255.255.255.0
network 44.0.3.0 mask 255.255.255.0
exit

Task 2: Verification

Step 1: Verify IPv4 routes in routing table by following command:

R2#show ip route 
//shows router’s routing table and IPv4 routes entries
	Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      11.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
B        11.0.1.0/24 [20/0] via 11.0.1.1, 00:08:54
O        11.0.1.1/32 [110/65] via 12.0.0.1, 00:11:20, Serial2/0
B        11.0.2.0/24 [20/0] via 11.0.1.1, 00:08:25
O        11.0.2.1/32 [110/65] via 12.0.0.1, 00:11:20, Serial2/0
B        11.0.3.0/24 [20/0] via 11.0.1.1, 00:08:25
O        11.0.3.1/32 [110/65] via 12.0.0.1, 00:11:20, Serial2/0
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.0.0.0/24 is directly connected, Serial2/0
L        12.0.0.2/32 is directly connected, Serial2/0
      22.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C        22.0.1.0/24 is directly connected, Loopback1
L        22.0.1.2/32 is directly connected, Loopback1
C        22.0.2.0/24 is directly connected, Loopback2
L        22.0.2.2/32 is directly connected, Loopback2
C        22.0.3.0/24 is directly connected, Loopback3
L        22.0.3.2/32 is directly connected, Loopback3
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.0.0.0/24 is directly connected, Ethernet0/0
L        23.0.0.2/32 is directly connected, Ethernet0/0
      33.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
B        33.0.1.0/24 [200/0] via 33.0.1.3, 00:06:10
O        33.0.1.3/32 [110/11] via 23.0.0.3, 00:10:14, Ethernet0/0
B        33.0.2.0/24 [200/0] via 33.0.1.3, 00:06:05
O        33.0.2.3/32 [110/11] via 23.0.0.3, 00:10:14, Ethernet0/0
B        33.0.3.0/24 [200/0] via 33.0.1.3, 00:05:57
O        33.0.3.3/32 [110/11] via 23.0.0.3, 00:10:14, Ethernet0/0
      34.0.0.0/24 is subnetted, 1 subnets
O        34.0.0.0 [110/74] via 23.0.0.3, 00:10:14, Ethernet0/0
      44.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
B        44.0.1.0/24 [200/0] via 44.0.1.4, 00:04:48
O        44.0.1.4/32 [110/75] via 23.0.0.3, 00:10:14, Ethernet0/0
B        44.0.2.0/24 [200/0] via 44.0.1.4, 00:04:17
O        44.0.2.4/32 [110/75] via 23.0.0.3, 00:10:14, Ethernet0/0
B        44.0.3.0/24 [200/0] via 44.0.1.4, 00:03:47
O        44.0.3.4/32 [110/75] via 23.0.0.3, 00:10:14, Ethernet0/0

Step 2: Verify IPv4 BGP neighborship and its details by following command:

BGP neighbor states:
1.	Idle – TCP connectivity issue
2.	Active – Command configuration issue
3.	Established – TCP connectivity established

R2# show bgp ipv4 unicast neighbor
//shows details of IPv4 BGP neighbor
BGP neighbor is 11.0.1.1, remote AS 65100, external link
BGP version 4, remote router ID 11.0.3.1
BGP state = Established, up for 01:27:42
Last read 00:00:20, last write 00:00:20, hold time is 180, keepalive interval
is 60 seconds
Neighbor sessions:
1 active, is not multisession capable (disabled)
--------------------Output Omitted---------------------
 
BGP neighbor is 33.0.1.3, remote AS 65000, internal link
BGP version 4, remote router ID 33.0.3.3
BGP state = Established, up for 01:27:52
Last read 00:00:49, last write 00:00:24, hold time is 180, keepalive interval is 60 seconds	
Neighbor sessions: 
1 active, is not multisession capable (disabled)
-------------------Output Omitted------------------

Step 3: Verify IPv4 BGP routes and its details by following command:

R2#show ip bgp	
//shows IPv4 BGP table where “>” shows best path.
BGP table version is 13, local router ID is 22.0.3.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
     Network          Next Hop       Metric     LocPrf     Weight     Path
 *>  11.0.1.0/24      11.0.1.1         0               	   0	     65100 i
 *>  11.0.2.0/24      11.0.1.1         0               	   0 	     65100 i
 *>  11.0.3.0/24      11.0.1.1         0                   0 	     65100 i
 *>  22.0.1.0/24      0.0.0.0          0         	       32768     i
 *>  22.0.2.0/24      0.0.0.0          0       	 	       32768     i
 *>  22.0.3.0/24      0.0.0.0          0         	       32768     i
 *>i 33.0.1.0/24      33.0.1.3         0    	 100         0 	     i
 *>i 33.0.2.0/24      33.0.1.3         0         100         0       i
 *>i 33.0.3.0/24      33.0.1.3         0         100         0       i
 *>i 44.0.1.0/24      44.0.1.4         0         100         0 	     65200 i
 *>i 44.0.2.0/24      44.0.1.4         0         100         0 	     65200 i
 *>i 44.0.3.0/24      44.0.1.4         0         100         0 	     65200