First: Configure basic MPLS VPN from R1 to R3(configs are down below.)
Second: Configure OSPF from R1 to R6
R4#
int lo 4
ip add 4.4.4.4 ### loopback 4 will be added to ospf by redistribution.
!
router ospf 1
router-id 1.1.4.4
redistribute connected subnets
network 1.1.4.4 0.0.0.0 area 0
network 1.1.14.4 0.0.0.0 area 0
R5#
router ospf 1
router-id 1.1.5.5
network 1.1.5.5 0.0.0.0 area 0
network 1.1.25.5 0.0.0.0 area 0
R6#
router ospf 1
router-id 1.1.6.6
network 1.1.6.6 0.0.0.0 area 0
network 1.1.36.6 0.0.0.0 area 0
R1#
router ospf 1 vrf company1 ###OSPF have to use separate processes for each client
router-id 1.1.1.1 and MPLS internal network.
network 1.1.14.1 0.0.0.0 area 0
redistribute bgp 1 subnets
exit
router bgp 1
address-family ipv4 vrf company1
redistribute ospf 1 match internal external 1 external 2 ###When OSPF is redistributed into BGP,
by default, only internal network of OSPF will be redistrituted. To resolve this problem, "match" option is required.
R2#
router ospf 1 vrf company1
router-id 1.1.2.2
network 1.1.25.2 0.0.0.0 area 0
redistribute bgp 1 subnets
exit
router bgp 1
address-family ipv4 vrf company1
redistribute ospf 1 match internal external 1 external 2
R3#
router ospf 1 vrf company1
router-id 1.1.3.3
network 1.1.36.3 0.0.0.0 area 0
redistribute bgp 1 subnets
exit
router bgp 1
address-family ipv4 vrf company1
redistribute ospf 1 match internal external 1 external 2
Check Point:
The routes of R6 shown in the above are Inter Area routing(IA).
R1# show ip ospf database
R1# show ip ospf
To be continued....
---------------------------------Configs for MPLS VPN from R1 to R3----------------------------------
R1#
ip cef
!
ip vrf company1
rd 1:100
route-target export 1:100
route-target import 1:100
!
mpls label protocol ldp
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.12
encapsulation dot1Q 12
ip address 1.1.12.1 255.255.255.0
mpls ip
!
interface FastEthernet0/0.14
encapsulation dot1Q 14
ip vrf forwarding company1
ip address 1.1.14.1 255.255.255.0
!
interface FastEthernet0/0.17
encapsulation dot1Q 17
ip address 1.1.17.1 255.255.255.0
!
router eigrp 1
network 1.1.1.1 0.0.0.0
network 1.1.12.1 0.0.0.0
auto-summary
!
router bgp 1
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
neighbor 1.1.2.2 remote-as 1
neighbor 1.1.2.2 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 1.1.2.2 activate
neighbor 1.1.2.2 send-community extended
exit-address-family
!
address-family ipv4 vrf company1
no synchronization
exit-address-family
!
R2#
ip cef
!
ip vrf company1
rd 1:100
route-target export 1:100
route-target import 1:100
!
mpls label protocol ldp
!
interface Loopback0
ip address 1.1.2.2 255.255.255.255
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.12
encapsulation dot1Q 12
ip address 1.1.12.2 255.255.255.0
mpls label protocol ldp
mpls ip
!
interface FastEthernet0/0.23
encapsulation dot1Q 23
ip address 1.1.23.2 255.255.255.0
mpls label protocol ldp
mpls ip
!
interface FastEthernet0/0.25
encapsulation dot1Q 25
ip vrf forwarding company1
ip address 1.1.25.2 255.255.255.0
!
router eigrp 1
network 1.1.2.2 0.0.0.0
network 1.1.12.2 0.0.0.0
network 1.1.23.2 0.0.0.0
auto-summary
!
router bgp 1
no synchronization
bgp router-id 1.1.2.2
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 route-reflector-client
neighbor 1.1.3.3 remote-as 1
neighbor 1.1.3.3 update-source Loopback0
neighbor 1.1.3.3 route-reflector-client
no auto-summary
!
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
neighbor 1.1.1.1 route-reflector-client
neighbor 1.1.3.3 activate
neighbor 1.1.3.3 send-community extended
neighbor 1.1.3.3 route-reflector-client
exit-address-family
!
address-family ipv4 vrf company1
no synchronization
exit-address-family
!
R3#
ip cef
!
ip vrf company1
rd 1:100
route-target export 1:100
route-target import 1:100
!
interface Loopback0
ip address 1.1.3.3 255.255.255.255
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.23
encapsulation dot1Q 23
ip address 1.1.23.3 255.255.255.0
mpls label protocol ldp
mpls ip
!
interface FastEthernet0/0.36
encapsulation dot1Q 36
ip vrf forwarding company1
ip address 1.1.36.3 255.255.255.0
!
interface FastEthernet0/0.38
encapsulation dot1Q 38
ip address 1.1.38.3 255.255.255.0
!
router eigrp 1
network 1.1.3.3 0.0.0.0
network 1.1.23.3 0.0.0.0
auto-summary
!
router bgp 1
no synchronization
bgp router-id 1.1.3.3
bgp log-neighbor-changes
neighbor 1.1.2.2 remote-as 1
neighbor 1.1.2.2 update-source Loopback0
no auto-summary
!
address-family vpnv4
neighbor 1.1.2.2 activate
neighbor 1.1.2.2 send-community extended
exit-address-family
!
address-family ipv4 vrf company1
no synchronization
exit-address-family
!
No comments:
Post a Comment