MPLS实验

在这里插入图片描述
设计思路:
第一阶段 路由通信
第一步:
创建 VRF 定义RT RD
接口划入VRF
12 运行动态协议 45 之间相同做法 eigrp 需要声明
2 4 BGP
MP–BGP (VPNv4–BGP)
动态路由重发布 BGP 识别RT BGP重发布到 5
双层标签
客户和运营商的边界路由器启动相应的路由协议,然后在PE路由器的路由表下 创建多个虚拟路由表(VRF)并创建一个标识RD值 (为了区分不同的客户之间将路由重发布到主运营商的路由表中,IP地址 可能会出现相同的) ;
第二步: VPNv4路由(传递IPV6的路由为VPNv6路由) 重发布到主路由表中, 则主网络中必须开启BGP邻居 ; 2 4 之间必须建立 BGP邻居 和VPNv4的邻居 中间的路由器例如 3 不需要考虑 (BGP传递路由使用单播,TCP三次握手);
第三步 由于 RD VRF 只具有本地意义,所以需要 RT值;RT值重发布到BGP中,变成扩展团体属性携带在路由中;从而路由导入和导出只能进入RT值相同的VRF中;
第四步
4 5 之间建立IGP协议 将4中的BGP路由表与5中VRF的RT值相同的路由重发布到5中。
R1配置
R1#show run
Building configuration…
Current configuration : 1454 bytes
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
hostname R1
boot-start-marker
boot-end-marker
logging message-counter syslog
no aaa new-model
ip source-route
no ip icmp rate-limit unreachable
ip cef
no ip domain lookup
no ipv6 cef
multilink bundle-name authenticated
memory-size iomem 0
archive
log config
hidekeys
ip tcp synwait-time 5
interface Loopback0
ip address 1.1.1.1 255.255.255.0
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
serial restart-delay 0
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
router rip
version 2
network 1.0.0.0
network 12.0.0.0
no auto-summary
ip forward-protocol nd
no ip http server
no ip http secure-server
no cdp log mismatch duplex
control-plane
mgcp fax t38 ecm
gatekeeper
shutdown
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
end
R2配置
R2#show run
Building configuration…
Current configuration : 2228 bytes
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
hostname R2
boot-start-marker
boot-end-marker
logging message-counter syslog
no aaa new-model
ip source-route
no ip icmp rate-limit unreachable
ip cef
no ip domain lookup
ip vrf A1
rd 1:1
route-target export 100:1
route-target import 100:1
no ipv6 cef
multilink bundle-name authenticated
memory-size iomem 0
archive
log config
hidekeys
ip tcp synwait-time 5
interface Loopback0
ip address 2.2.2.2 255.255.255.0
ip ospf network point-to-point
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
interface Serial1/0
ip vrf forwarding A1
ip address 12.1.1.2 255.255.255.0
serial restart-delay 0
interface Serial1/1
ip address 23.1.1.1 255.255.255.0
mpls ip
serial restart-delay 0
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
router ospf 100
router-id 92.1.1.1
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 23.1.1.1 0.0.0.0 area 0
router rip
address-family ipv4 vrf A1
redistribute bgp 100 metric 1
network 12.0.0.0
no auto-summary
version 2
exit-address-family
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 192.168.4.4 remote-as 100
neighbor 192.168.4.4 next-hop-self
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 A1
redistribute rip
no synchronization
exit-address-family
ip forward-protocol nd
no ip http server
no ip http secure-server
no cdp log mismatch duplex
control-plane
mgcp fax t38 ecm
gatekeeper
shutdown
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
end
R3配置
R3#show run
Building configuration…
Current configuration : 1597 bytes
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
hostname R3
boot-start-marker
boot-end-marker
logging message-counter syslog
no aaa new-model
ip source-route
no ip icmp rate-limit unreachable
ip cef
no ip domain lookup
no ipv6 cef
multilink bundle-name authenticated
memory-size iomem 0
archive
log config
hidekeys
ip tcp synwait-time 5
interface Loopback0
ip address 3.3.3.3 255.255.255.0
ip ospf network point-to-point
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
interface Serial1/0
ip address 34.1.1.1 255.255.255.0
mpls ip
serial restart-delay 0
interface Serial1/1
ip address 23.1.1.2 255.255.255.0
mpls ip
serial restart-delay 0
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
router ospf 100
router-id 93.1.1.1
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 23.1.1.2 0.0.0.0 area 0
network 34.1.1.1 0.0.0.0 area 0
ip forward-protocol nd
no ip http server
no ip http secure-server
no cdp log mismatch duplex
control-plane
mgcp fax t38 ecm
gatekeeper
shutdown
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
end
R4配置
R4#show run
Building configuration…
Current configuration : 2355 bytes
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
hostname R4
boot-start-marker
boot-end-marker
logging message-counter syslog
no aaa new-model
ip source-route
no ip icmp rate-limit unreachable
ip cef
no ip domain lookup
ip vrf A2
rd 1:2
route-target export 100:1
route-target import 100:1
no ipv6 cef
multilink bundle-name authenticated
memory-size iomem 0
archive
log config
hidekeys
ip tcp synwait-time 5
interface Loopback0
ip address 4.4.4.4 255.255.255.0
ip ospf network point-to-point
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
interface Serial1/0
ip address 34.1.1.2 255.255.255.0
mpls ip
serial restart-delay 0
interface Serial1/1
ip vrf forwarding A2
ip address 45.1.1.1 255.255.255.0
serial restart-delay 0
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
router eigrp 100
auto-summary
address-family ipv4 vrf A2
redistribute bgp 100 metric 2000 100 255 1 1500
network 4.4.4.0 0.0.0.255
network 45.1.1.0 0.0.0.255
no auto-summary
autonomous-system 100
exit-address-family
router ospf 100
router-id 94.1.1.1
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 0
network 34.1.1.2 0.0.0.0 area 0
network 45.1.1.1 0.0.0.0 area 0
router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback0
neighbor 192.168.2.2 remote-as 100
neighbor 192.168.2.2 next-hop-self
no auto-summary
address-family vpnv4
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community both
exit-address-family
address-family ipv4 vrf A2
redistribute eigrp 100
no synchronization
exit-address-family
ip forward-protocol nd
no ip http server
no ip http secure-server
no cdp log mismatch duplex
control-plane
mgcp fax t38 ecm
gatekeeper
shutdown
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
end
R5配置
R5#show run
Building configuration…
Current configuration : 1504 bytes
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
hostname R5
boot-start-marker
boot-end-marker
logging message-counter syslog
no aaa new-model
ip source-route
no ip icmp rate-limit unreachable
ip cef
no ip domain lookup
no ipv6 cef
multilink bundle-name authenticated
memory-size iomem 0
archive
log config
hidekeys
ip tcp synwait-time 5
interface Loopback0
ip address 5.5.5.5 255.255.255.0
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
interface Serial1/1
ip address 45.1.1.2 255.255.255.0
serial restart-delay 0
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
router eigrp 100
network 5.5.5.0 0.0.0.255
network 5.0.0.0
network 45.1.1.0 0.0.0.255
network 45.0.0.0
no auto-summary
ip forward-protocol nd
no ip http server
no ip http secure-server
no cdp log mismatch duplex
control-plane
mgcp fax t38 ecm
gatekeeper
shutdown
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
end

猜你喜欢

转载自blog.csdn.net/qq_43572192/article/details/88693710