MPLC作业

1. 在MPLS VPN骨干网络中运行IGP协议(以OSPF为例)

 在PE1、P1、P2上配置OSPF,确保环回口和骨干链路互通:
PE1配置:
router ospf 1
 network 1.1.1.1 0.0.0.0 area 0     # 环回口
 network 172.16.0.1 0.0.0.3 area 0   # PE1-P1链路(GE0/0/0)
 network 192.168.0.1 0.0.0.3 area 0  # PE1-P2链路(GE0/0/2)

P1配置:
router ospf 1
 network 2.2.2.2 0.0.0.0 area 0      # 环回口
 network 172.16.0.1 0.0.0.3 area 0   # P1-PE1链路
 network 172.16.0.5 0.0.0.3 area 0   # P1-P2链路(GE0/0/1)

P2配置:
router ospf 1
 network 3.3.3.3 0.0.0.0 area 0      # 环回口
 network 172.16.0.5 0.0.0.3 area 0   # P2-P1链路
 network 192.168.0.1 0.0.0.3 area 0  # P2-PE1链路

2. 激活MPLS和LDP,建立LDP对等体

# 在所有骨干设备(PE1、P1、P2)上全局启用MPLS和LDP:
mpls lsr-id <环回口IP>   # 例如PE1: mpls lsr-id 1.1.1.1
mpls ldp
 interface <接口名>       # 在连接骨干链路的接口(如GE0/0/0、GE0/0/2)激活LDP

3. 在PE设备上创建VRF并配置CE-PE动态路由(以BGP为例)

# PE1配置(客户A站点1):
ip vrf CustomerA
 rd 64512:1
 route-target both 64512:1

interface GE0/0/0
 ip vrf forwarding CustomerA
 ip address 172.16.0.2 255.255.255.252

router bgp 2345
 address-family ipv4 vrf CustomerA
  neighbor 172.16.0.1 remote-as 64512   # CE1的AS号
  network 172.16.1.0 mask 255.255.255.0 # 宣告客户A站点1的路由

# PE1配置(客户B站点1):
ip vrf CustomerB
 rd 64513:1
 route-target both 64513:1

interface GE0/0/0(另一接口)
 ip vrf forwarding CustomerB
 ip address 192.168.0.6 255.255.255.252

router bgp 2345
 address-family ipv4 vrf CustomerB
  neighbor 192.168.0.5 remote-as 64513   # CE3的AS号
  network 192.168.1.0 mask 255.255.255.0 # 宣告客户B站点1的路由

4. 在PE设备之间配置MP-BGP对等体

# PE1和PE2(假设PE2地址为2.2.2.2)配置:
router bgp 2345
 neighbor 2.2.2.2 remote-as 2345         # PE2的环回口地址
 neighbor 2.2.2.2 update-source Loopback0
 address-family vpnv4
  neighbor 2.2.2.2 activate
  neighbor 2.2.2.2 send-community extended

5. 在PE上进行路由引入(VPNv4与IPv4路由转换)

# 在PE的BGP配置中自动完成(通过VRF地址族宣告的路由会自动转换为VPNv4路由)
# 若需重分发其他协议(如OSPF)的路由:
router bgp 2345
 address-family ipv4 vrf CustomerA
  redistribute ospf 1     # 假设CE-PE运行OSPF

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值