mpls vrf lite 简单配置实例

mpls vrf lite 简单配置实例_第1张图片



sw1:

interface Ethernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
!         
interface Ethernet0/2
 switchport trunk encapsulation dot1q
 switchport mode trunk
!

vlan 10

!

vlan 20

--------------------------------------------------------------------

R2


!         
ip vrf 1
 rd 1:1   
 route-target export 1:1
 route-target import 1:1
!         
ip vrf 2
 rd 2:2   
 route-target export 2:2
 route-target import 2:2
!               
ip cef    
!         
mpls label range 200 299
mpls label protocol ldp
!                   
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!         
interface Ethernet0/0
 ip address 24.1.1.2 255.255.255.0
 mpls ip  

interface Ethernet0/1
 no ip address
!        
interface Ethernet0/1.10
 encapsulation dot1Q 10
 ip vrf forwarding 1
 ip address 23.1.1.2 255.255.255.0
 ip ospf 1 area 0
!         
interface Ethernet0/1.20
 encapsulation dot1Q 20
 ip vrf forwarding 2
 ip address 32.1.1.2 255.255.255.0  
!         
router eigrp 90
 network 2.2.2.2 0.0.0.0
 network 24.1.1.0 0.0.0.255
!               
router eigrp 100
 !        
 address-family ipv4 vrf 2 autonomous-system 100
  redistribute bgp 1 metric 10000 1 255 1 1500
  network 32.1.1.0 0.0.0.255
 exit-address-family
!         
router ospf 1 vrf 1
 redistribute bgp 1 subnets
!         
router bgp 1
 bgp log-neighbor-changes
 neighbor 4.4.4.4 remote-as 1
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 4.4.4.4 next-hop-self
 !        
 address-family v4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community both
 exit-address-family
 !        
 address-family ipv4 vrf 1
  redistribute ospf 1
 exit-address-family
 !        
 address-family ipv4 vrf 2
  redistribute eigrp 100
 exit-address-family

!

mpls ldp router-id Loopback0


-----------------------------------------------------------


r3

     
ip vrf 3
!         
ip vrf 4
!  
!         
no ip domain lookup
ip cef       
!         
interface Loopback0
 ip vrf forwarding 4
 ip address 3.3.3.3 255.255.255.0
!         
interface Ethernet0/0
 no ip address
!         
interface Ethernet0/0.10
 encapsulation dot1Q 10
 ip vrf forwarding 3
 ip address 23.1.1.3 255.255.255.0
 ip ospf 1 area 0
!         
interface Ethernet0/0.20
 encapsulation dot1Q 20
 ip vrf forwarding 4
 ip address 32.1.1.3 255.255.255.0
!         
interface Ethernet0/1
 ip vrf forwarding 3
 ip address 35.1.1.3 255.255.255.0
 ip ospf 1 area 0
!         
router eigrp 100
 !        
 address-family ipv4 vrf 4 autonomous-system 100
  network 3.3.3.0 0.0.0.255
  network 32.1.1.0 0.0.0.255
 exit-address-family
!         
router ospf 1 vrf 3
!         


------------------------------------------------------

r4:



ip vrf 1
 rd 1:1   
 route-target export 1:1
 route-target import 1:1
!         
ip vrf 2
 rd 2:2   
 route-target export 2:2
 route-target import 2:2
!         
no ip domain lookup
ip cef    
!         
mpls label range 400 499
mpls label protocol ldp
!          
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!         
interface Loopback1
 ip vrf forwarding 1
 ip address 44.4.4.4 255.255.255.0
!         
interface Ethernet0/0
 ip address 24.1.1.4 255.255.255.0
 mpls ip  
!         
router eigrp 90
 network 4.4.4.4 0.0.0.0
 network 24.1.1.0 0.0.0.255
!         
router bgp 1
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 1
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 next-hop-self
 !        
 address-family v4
  neighbor 2.2.2.2 activate
  neighbor 2.2.2.2 send-community both
 exit-address-family
!   
!         
mpls ldp router-id Loopback0
!         

-----------------------------------------------------------------------------

r5:


    
no ip domain lookup
ip cef          
!         
!         
interface Loopback0
 ip address 5.5.5.5 255.255.255.0
!         
interface Ethernet0/0
 ip address 35.1.1.5 255.255.255.0
!         
router ospf 1
 network 5.5.5.0 0.0.0.255 area 0
 network 35.1.1.0 0.0.0.255 area 0



你可能感兴趣的:(Cisco,思科,总结)