
- CE 和 PE 之间可以随便跑什么协议
- 重点
- 不同协议时,PE的设置方式
- PE上需要在BGP 的address-family 中,对其他来源协议做重分布

R5_PE1(config-router)#do show run
Building configuration...
Current configuration : 4600 bytes
!
! Last configuration change at 08:24:17 UTC Sat Aug 27 2022
!
version 15.9
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R5_PE1
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
no ip icmp rate-limit unreachable
!
!
!
ip vrf BLUE
rd 65000:100
route-target export 65000:111
route-target import 65000:111
!
ip vrf GREEN
rd 65000:200
route-target export 65000:200
route-target import 65000:200
!
ip vrf PURPLE
rd 65000:300
route-target export 65000:300
route-target import 65000:300
!
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
no mpls ip propagate-ttl
!
!
!
!
!
redundancy
!
no cdp log mismatch duplex
!
ip tcp synwait-time 5
!
!
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
!
interface GigabitEthernet0/0
ip vrf forwarding BLUE
ip address 172.16.1.1 255.255.255.252
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/1
ip address 57.1.1.5 255.255.255.0
duplex auto
speed auto
media-type rj45
mpls ip
!
interface GigabitEthernet0/2
ip vrf forwarding GREEN
ip address 172.16.1.1 255.255.255.252
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/3
ip vrf forwarding PURPLE
ip address 172.16.1.1 255.255.255.252
duplex auto
speed auto
media-type rj45
!
!
router eigrp MY_VRF_EIGRP
!
address-family ipv4 unicast vrf PURPLE autonomous-system 300
!
topology base
exit-af-topology
network 172.16.1.1 0.0.0.0
exit-address-family
!
router ospf 200 vrf GREEN
redistribute bgp 65000 subnets
network 172.16.1.1 0.0.0.0 area 0
!
router ospf 100
network 5.5.5.5 0.0.0.0 area 0
network 57.1.1.5 0.0.0.0 area 0
!
router bgp 65000
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 6.6.6.6 remote-as 65000
neighbor 6.6.6.6 update-source Loopback0
!
address-family ipv4
exit-address-family
!
address-family vpnv4
neighbor 6.6.6.6 activate
neighbor 6.6.6.6 send-community extended
exit-address-family
!
address-family ipv4 vrf BLUE
neighbor 172.16.1.2 remote-as 65001
neighbor 172.16.1.2 activate
exit-address-family
!
address-family ipv4 vrf GREEN
redistribute ospf 200
exit-address-family
!
address-family ipv4 vrf PURPLE
redistribute eigrp 300
exit-address-family
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
ipv6 ioam timestamp
!
!
!
control-plane
!
banner exec ^C
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
transport input none
!
no scheduler allocate
!
end
- PE1 上的BGP 路由
- BLUE 是通过eBGP 学习到的
- GREEN 是OSPF 重分布进来的,包括在PE2上的重分布
- PURPLE 是通过EIGRP 重分布进来的


- 注意在PE1 和 CE上的路由类型以及AD、Metric变化
