Monday, November 26, 2012

BGP peering for IPv4/IPv6 -- Cisco configuration example

On one end Border router

 
router bgp your-asn
 bgp always-compare-med
 no bgp enforce-first-as
 bgp log-neighbor-changes
 neighbor CN-RS peer-group
 neighbor CN-RS remote-as 131313
 neighbor CN-RS version 4
 neighbor 13.7.14.1 peer-group CN-RS
 neighbor 13.7.14.1 description rs1.cn.net.kh
 neighbor 13.7.14.2 peer-group CN-RS
 neighbor 13.7.14.2 description rs2.cn.net.kh  
 !       
 address-family ipv4
 neighbor CN-RS activate
 neighbor CN-RS next-hop-self
 neighbor CN-RS soft-reconfiguration inbound
 neighbor CN-RS route-map TO-CN-RS out
 no auto-summary
 no synchronization
 neighbor 13.7.14.1 peer-group CN-IX-RS
 neighbor 13.7.14.2 peer-group CN-IX-RS
 exit-address-family
 !
ip prefix-list TO-CN-RS seq 10 permit <your prefix>
ip prefix-list TO-CN-RS seq 20 permit <your prefix>
!
route-map TO-CN-RS permit 10
match ip address prefix-list TO-CN-RS

Example IPV6 Configuration

router bgp your-asn  
 bgp always-compare-med
 no bgp enforce-first-as
 bgp log-neighbor-changes
 neighbor CN-RS-6 peer-group
 neighbor CN-RS-6 remote-as 131313
 neighbor CN-RS-6 version 4
 neighbor 2001:0D::1 peer-group CN-RS-6
 neighbor 2001:0D::1 description rs1.cn.net.kh
 neighbor 2001:0D::2 peer-group CN-RS-6
 neighbor 2001:0D::2 description rs2.cn.net.kh
 !
 address-family ipv6
 neighbor CN-RS-6 activate
 neighbor CN-RS-6 next-hop-self
 neighbor CN-RS-6 soft-reconfiguration inbound
 neighbor CN-RS-6 route-map TO-CN-RS-6 out
 neighbor 2001:0D::1 peer-group CN-RS-6
 neighbor 2001:0D::2 peer-group CN-RS-6
 exit-address-family
 !
 ipv6 prefix-list TO-CN-RS-6 seq 10 permit <your ipv6 prefix>
 !
 route-map TO-CN-RS-6 permit 10
 match ipv6 address prefix-list TO-CN-RS-6
 !
 

on another end router use the script above as example

No comments:

Post a Comment