mpls 实验

mpls 实验_第1张图片

R1与R3之间使用ospf,R2与R3之间使用eigrp, R5与R6之间使用ospf,R5与R7之间使用静态,R5与R8之间使用bgp建立ebgp邻居关系

R1pingR6

R2pingR7

mpls 实验_第2张图片

R8pingR1、R2

mpls 实验_第3张图片

R1的路由表

mpls 实验_第4张图片

R2的路由表

mpls 实验_第5张图片

R6的路由表

mpls 实验_第6张图片

R7的路由表

mpls 实验_第7张图片

R8的路由表

mpls 实验_第8张图片

R1:

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 13.0.0.1 255.255.255.0
 duplex half
router ospf 1
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0

R2:

interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
 ip address 23.0.0.1 255.255.255.0
 duplex half
!
router eigrp 1
 network 0.0.0.0
 no auto-summary

R3


ip cef         
no ip domain lookup
ip vrf A
 rd 11:1
 route-target export 11:1
 route-target import 12:1
 route-target import 33:3
!
ip vrf B
 rd 22:2
 route-target export 21:1
 route-target import 22:1
 route-target import 33:3       
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
 ip vrf forwarding A
 ip address 13.0.0.2 255.255.255.0
 duplex half
!
interface FastEthernet1/0
 ip vrf forwarding B
 ip address 23.0.0.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/1
 ip address 34.0.0.1 255.255.255.0
 duplex auto
 speed auto
 mpls ip
router eigrp 1
 network 3.3.3.3 0.0.0.0
 network 34.0.0.0
 no auto-summary
!
router eigrp 2
 auto-summary
 !        
 address-family ipv4 vrf B
  redistribute bgp 1 metric 1544 100 255 2 1500
  network 23.0.0.0
  no auto-summary
  autonomous-system 1
 exit-address-family
!
router ospf 1 vrf A
 router-id 3.3.3.3
 log-adjacency-changes
 redistribute bgp 1 subnets
 network 13.0.0.0 0.0.0.255 area 0
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 5.5.5.5 remote-as 1
 neighbor 5.5.5.5 update-source Loopback0
 neighbor 5.5.5.5 next-hop-self
 no auto-summary
 !
 address-family v4
  neighbor 5.5.5.5 activate
  neighbor 5.5.5.5 send-community both
 exit-address-family
 !
 address-family ipv4 vrf B
  redistribute eigrp 1 metric 2
  no synchronization
 exit-address-family
 !
 address-family ipv4 vrf A
  redistribute ospf 1 vrf A
  no synchronization
 exit-address-family

R4


interface FastEthernet0/0
 ip address 34.0.0.2 255.255.255.0
 duplex half
 mpls ip
!
interface FastEthernet1/0
 ip address 45.0.0.1 255.255.255.0
 duplex auto
 speed auto
 mpls ip
router eigrp 1
 network 0.0.0.0
 no auto-summary

R5


ip cef        
no ip domain lookup
ip vrf C
 rd 33:3
 route-target export 12:1
 route-target import 11:1
!
ip vrf D
 rd 44:4
 route-target export 22:1
 route-target import 21:1
!
ip vrf E
 rd 5:5
 route-target export 33:3
 route-target import 11:1
 route-target import 21:1
!
interface Loopback0
 ip address 5.5.5.5 255.255.255.255
!
interface FastEthernet0/0
 ip address 45.0.0.2 255.255.255.0
 duplex half
 mpls ip
!
interface FastEthernet1/0
 ip vrf forwarding C
 ip address 56.0.0.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/1
 ip vrf forwarding D
 ip address 57.0.0.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 ip vrf forwarding E
 ip address 58.0.0.2 255.255.255.0
 duplex half
!
router eigrp 1
 network 5.5.5.5 0.0.0.0
 network 45.0.0.0
 no auto-summary
!
router ospf 1 vrf C
 log-adjacency-changes
 redistribute bgp 1 subnets
 network 56.0.0.0 0.0.0.255 area 0
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 3.3.3.3 remote-as 1
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 next-hop-self
 no auto-summary
 !
 address-family v4
  neighbor 3.3.3.3 activate
  neighbor 3.3.3.3 send-community both
 exit-address-family
 !
 address-family ipv4 vrf E
  neighbor 58.0.0.1 remote-as 2
  neighbor 58.0.0.1 activate
  no synchronization
 exit-address-family
 !
 address-family ipv4 vrf D
  redistribute connected
  redistribute static
  no synchronization
 exit-address-family
 !
 address-family ipv4 vrf C
  redistribute ospf 1 vrf C
  no synchronization
 exit-address-family
!
ip forward-protocol nd
ip route vrf D 7.7.7.7 255.255.255.255 57.0.0.1

R6


interface Loopback0
 ip address 6.6.6.6 255.255.255.255
!
interface FastEthernet0/0
 ip address 56.0.0.1 255.255.255.0
 duplex half
!
router ospf 1
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0

R7


interface Loopback0
 ip address 7.7.7.7 255.255.255.255
!
interface FastEthernet0/0
 ip address 57.0.0.1 255.255.255.0
 duplex half
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0

R8


interface Loopback0
 ip address 8.8.8.8 255.255.255.255
!
interface FastEthernet0/0
 ip address 58.0.0.1 255.255.255.0
 duplex half
!
router bgp 2
 no synchronization
 bgp log-neighbor-changes
 neighbor 58.0.0.2 remote-as 1
 no auto-summary
network 8.8.8.8 mask 255.255.255.255

 

你可能感兴趣的:(网络)