MPLS VPN实验

 

 IP,环回与静态配置

R1:

R2:

 

R3:

 

R4:

 

R5:

 

R6:

 

R7:

 

 ISP部分进行IGP宣告

R2:

ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 23.1.1.1 0.0.0. 0 

[r2]mpls lsr-id 2.2.2.2    

[r2]mpls           

[r2-mpls]mpls ldp     

[r2-mpls-ldp]q

[r2]interface GigabitEthernet 0/0/1

[r2-GigabitEthernet0/0/1]mpls  

[r2-GigabitEthernet0/0/1]mpls ldp  

R3\R4与上同理

ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 23.1.1.2 0.0.0.0
network 34.1.1.1 0.0.0.0

R4:

ospf 1 router-id 4.4.4.4
area 0.0.00
network  4.4.4.4  0.0.0.0
network 34.1.1.2  0.0.0.0
network 47.1.1.1  0.0. 0.0

MPLS-VPN创建

R2:

[r2]ip vpn-instance a    

[r2-vpn-instance-a]ipv4-family    

[r2-vpn-instance-a-af-ipv4]route-distinguisher 1:1  

[r2-vpn-instance-a-af-ipv4]vpn-target 1:1  

[r2]interface GigabitEthernet 0/0/0  

[r2-GigabitEthernet0/0/0]ip binding vpn-instance a  

[r2-GigabitEthernet0/0/0]ip address 192.168.2.2 24   

[r2]ip vpn-instance b    

[r2-vpn-instance-a]ipv4-family    

[r2-vpn-instance-a-af-ipv4]route-distinguisher 2:2   

[r2-vpn-instance-a-af-ipv4]vpn-target 2:2   

[r2]interface GigabitEthernet 0/0/0    

[r2-GigabitEthernet0/0/0]ip binding vpn-instance b  

[r2-GigabitEthernet0/0/0]ip address 192.168.2.2 24   

建立bgp邻居关系:

R2:

[r2]bgp 2

 [r2-bgp]router-id 2.2.2.2

 [r2-bgp]pe 4.4.4.4 as-number 2

 [r2-bgp]pe 4.4.4.4 connect-interface LoopBack 0

 [r2-bgp]pe 4.4.4.4 next-hop-local    

 [r2-bgp]ipv4-family vpnv4

 [r2-bgp-af-vpnv4]peer 4.4.4.4 enable

R4:

[r4]bgp 2

 [r4-bgp]router-id 4.4.4.4

 [r4-bgp]pe 2.2.2.2 as-number 2

 [r4-bgp]pe 2.2.2.2 connect-interface LoopBack 0

 [r4-bgp]pe 2.2.2.2 next-hop-local    

 [r4-bgp]ipv4-family vpnv4

 [r4-bgp-af-vpnv4]peer 2.2.2.2 enable

交互路由:

R2:

ipv4-fami ly vpn-instance a
import-route direct
import- route static

R4:

ipv4-fami ly vpn-instance aa
1 mport-route direct
1 mport-route static

R6:

rip 1
version 2
network 192.168.1.0
network 192.168.2.0

R7:

ospf 1
area 0.0.0.0
network 47.1.1.2 0.0.0.0
network 192.168.3.10.0.0.0
network 192. 168.4.2 0.0.0.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值