3.7.f Implement and troubleshoot multiproctocol BGP

3.7.f [i] IPv4, IPv6, VPN address-family

more on address families in bgp…

as explained before to upgrade your bgp sessions so that they include the pretty address-family structure for you, do this:

R1(config)#router bgp 100
R1(config-router)#bgp upgrade-cli
You are about to upgrade to the AFI syntax of bgp commands

Are you sure ? [yes]: y
R1(config-router)#neigh 192.168.24.2 remote-as 200
R1(config-router)#do sh run | sec bgp
router bgp 100
bgp log-neighbor-changes
neighbor 192.168.24.2 remote-as 200
!
address-family ipv4
neighbor 192.168.24.2 activate
no auto-summary
no synchronization
exit-address-family

however if you’ve forgotten to do that (and it’s only good for that session) you can do this:

bad bgp config session:

R1(config)#router bgp 100
R1(config-router)#neigh 192.168.24.2 remote-as 200
R1(config-router)#do sh run | sec bgp
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 neighbor 192.168.24.2 remote-as 200
 no auto-summary

no address-family goodness…

good bgp config session:

R1(config)#router bgp 100
R1(config-router)#address-family ipv4
R1(config-router-af)#neigh 2.2.2.2 remote-as 200
R1(config-router-af)#neigh 2.2.2.2 up lo0
R1(config-router-af)#do sh run | sec bgp
router bgp 100
bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 200
neighbor 2.2.2.2 update-source Loopback0
!
address-family ipv4
 neighbor 2.2.2.2 activate
no auto-summary
no synchronization
exit-address-family

that’s very pretty…