Tuesday, December 22, 2015

MP-BGP Configuration


MP-BGP Config


I am going to show you simple configuration for MPBGP where R1 and R5 are the customer sites. The goal of configuration is both customer sites can reach eactother.

R2 Config:
ip vrf CUST1
 rd 1:5
 route-target export 1:5
 route-target import 1:5

interface Loopback0
 ip address 2.2.2.2 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip vrf forwarding CUST1
 ip address 12.1.1.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 23.1.1.2 255.255.255.0
 duplex auto
 speed auto
 mpls ip
router ospf 10
 log-adjacency-changes
 network 2.2.2.0 0.0.0.255 area 0
 network 23.1.1.0 0.0.0.255 area 0
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 neighbor 4.4.4.4 remote-as 100
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 12.1.1.1 remote-as 200
 no auto-summary
 !
 address-family vpnv4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community both
 exit-address-family
 !
 address-family ipv4 vrf CUST1
  neighbor 12.1.1.1 remote-as 200
  neighbor 12.1.1.1 activate
  no synchronization
 exit-address-family

R3 Config:
interface Loopback0
 ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
 ip address 23.1.1.3 255.255.255.0
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet0/1
 ip address 34.1.1.3 255.255.255.0
 duplex auto
 speed auto
 mpls ip
!
router ospf 10
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0

R4 Config:
ip vrf CUST1
 rd 1:5
 route-target export 1:5
 route-target import 1:5
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 34.1.1.4 255.255.255.0
 duplex auto
 speed auto
 mpls ip
!
interface FastEthernet0/1
 ip vrf forwarding CUST1
 ip address 45.1.1.4 255.255.255.0
 duplex auto
 speed auto
!
router ospf 10
 log-adjacency-changes
 network 4.4.4.0 0.0.0.255 area 0
 network 34.1.1.0 0.0.0.255 area 0
!
router bgp 100
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 100
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 45.1.1.5 remote-as 500
 !
 address-family vpnv4
  neighbor 2.2.2.2 activate
  neighbor 2.2.2.2 send-community both
 exit-address-family
 !
 address-family ipv4 vrf CUST1
  neighbor 45.1.1.5 remote-as 500
  neighbor 45.1.1.5 activate
  no synchronization
 exit-address-family


Customer Site Config
R1 Config:
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 12.1.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 12.1.1.2 remote-as 100
 no auto-summary

R5 Config:
interface Loopback0
 ip address 5.5.5.5 255.255.255.0
!
interface FastEthernet0/0
 ip address 45.1.1.5 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
router bgp 500
 no synchronization
 bgp log-neighbor-changes
 redistribute connected
 neighbor 45.1.1.4 remote-as 100
 no auto-summary
 


No comments:

Post a Comment