====Lab 2: IOS-XE BGP IPv4 Address Family====
This lab will show how to configure a basic Address Family (afi) ipv4 (safi) configuration.
{{ :cisco:bgp:ios-xe_labs:lab_2_ios-xe_bgp_ipv4_address_family.png?300|}}
Router1:
- Configure BGP in AS 40000.
- RouterA(config)#**router bgp 40000**
- Set router as 10.1.1.99.
- RouterA(config)#**bgp router-id 10.1.1.99**
- Change BGP timers.
- Keepalive: 70
- Holdtime: 120
- RouterA(config)#**timers bgp 70 120**
- Log BGP events to system log.
- RouterA(config)#**bgp log-neighbor-changes**
- Configure Router2 as an eBGP neighbor in AS 45000, using directly connected ports.
- RouterA(config)#**neighbor 192.168.1.1 remote-as 45000**
- Configure address-family ipv4 under the router bgp configuration.
- RouterA(config)#**address-family ipv4**
- Set address family network to 10.1.1.0/24
- RouterA(config)#**network 10.1.1.0 mask 255.255.255.0**
- Activate network 10.1.1.0
- RouterA(config)#**neighbor 192.168.1.1 activate**
Router2:
- Configure BGP in AS 45000.
- RouterB(config)#**router bgp 45000**
- Set router as 172.17.1.99.
- RouterB(config)#**bgp router-id 172.17.1.99**
- Change BGP timers.
- Keepalive: 70
- Holdtime: 120
- RouterB(config)#**timers bgp 70 120**
- Log BGP events to system log.
- RouterB(config)#**bgp log-neighbor-changes**
- Configure Router1 as an eBGP neighbor in AS 40000, using directly connected ports.
- RouterB(config)#**neighbor 192.168.1.2 remote-as 40000**
- Configure address-family ipv4 under the router bgp configuration.
- RouterB(config)#**address-family ipv4**
- Set address family network to 172.17.1.0/24
- RouterB(config)#**network 172.17.1.0 mask 255.255.255.0**
- Activate network 172.17.1.0
- RouterB(config)#**neighbor 192.168.1.2 activate**
RouterA#show ip bgp
BGP table version is 3, local router ID is 10.1.1.99
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
*> 10.1.1.0/24 0.0.0.0 0 32768 i
*> 172.17.1.0/24 192.168.1.1 0 0 45000 i
RouterB#show ip bgp
BGP table version is 3, local router ID is 172.17.1.99
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
*> 10.1.1.0/24 192.168.1.2 0 0 40000 i
*> 172.17.1.0/24 0.0.0.0 0 32768 i
Another verification command is: **show ip bgp neighbors**
[[http://www.dergenterprises.com/wiki/doku.php?id=cisco:bgp:ios-xe_labs:lab2:lab2_answer|Lab 2: Answer]]\\
[[http://www.dergenterprises.com/wiki/doku.php?id=cisco:bgp:ios-xe_labs|IOS-XE Labs]]\\