ENSP MPLS-VRF实验(华为设备)

实验拓扑图

需求

R1和R3互通,R4和R5互通

实验步骤

  1. 先配置R1 R3 R4 R5 的ip地址


[R1]
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.12.1/24      up         up            
LoopBack0                         192.168.1.1/24       up         up(s)     

[R3]
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.23.3/24      up         up          
LoopBack0                         192.168.2.1/24       up         up(s)      

[R4]
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.24.4/24      up         up        
LoopBack0                         192.168.1.1/24       up         up(s)    

[R5]
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.25.3/24      up         up              
LoopBack0                         192.168.2.1/24       up         up(s)     
  1. 在R1 R3 R4 R5中开启ospf,并在GigabitEthernet0/0/0 和LoopBack0 下开启ospf功能,另外一个方法就是可以在区域中宣告自己的ip,这里演示第一中方法

R1 R3 R4 R5分别启动ospf进程,进程号为1,进入区域0。


[R1][R3][R4][R5]
ospf 1
 area 0.0.0.0 

在GigabitEthernet0/0/0 和LoopBack0 下开启ospf功能


[R1][R3][R4][R5]
interface GigabitEthernet0/0/0
 ospf enable 1 area 0.0.0.0
interface LoopBack0
 ospf enable 1 area 0.0.0.0

  1. 在R1 R3 R4 R5的LoopBack0 中配置OSPF 网络类型 ,设置为broadcast类型


[R1][R3][R4][R5]
interface LoopBack0
 ospf network-type broadcast
  1. 在isp路由器中配置vpn实列。


[isp]
ip vpn-instance 1
 ipv4-family
  route-distinguisher 1:1
#
ip vpn-instance 2
 ipv4-family                              
  route-distinguisher 2:2
  1. 在isp路由器中的接口下绑定vpn实列,并配置ip地址。


[isp]
interface GigabitEthernet0/0/0
 ip binding vpn-instance 1
 ip address 192.168.12.5 24
#
interface GigabitEthernet0/0/1
 ip binding vpn-instance 1
 ip address 192.168.23.5 24
#                                         
interface GigabitEthernet0/0/2
 ip binding vpn-instance 2
 ip address 192.168.24.5 24 
#
interface GigabitEthernet5/0/0
 ip binding vpn-instance 2
 ip address 192.168.25.5 24
  1. 在isp路由器中启动多个ospf进程,并绑定VPN实列。


[isp]
ospf 1 router-id 2.2.2.2 vpn-instance 1
 area 0.0.0.0 
#
ospf 2 router-id 2.2.2.2 vpn-instance 2
 area 0.0.0.0 
  1. 在isp路由器的接口下启动ospf功能。


[isp]
interface GigabitEthernet0/0/0
 ospf enable 1 area 0.0.0.0
#
interface GigabitEthernet0/0/1
 ospf enable 1 area 0.0.0.0
#                                         
interface GigabitEthernet0/0/2
 ospf enable 2 area 0.0.0.0
#
interface GigabitEthernet5/0/0
 ospf enable 2 area 0.0.0.0
  1. 验证实验结果。


<r1>ping 192.168.2.1
  PING 192.168.2.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.2.1: bytes=56 Sequence=1 ttl=254 time=40 ms
    Reply from 192.168.2.1: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 192.168.2.1: bytes=56 Sequence=3 ttl=254 time=20 ms
    Reply from 192.168.2.1: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 192.168.2.1: bytes=56 Sequence=5 ttl=254 time=30 ms

<r4>ping 192.168.2.1
  PING 192.168.2.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.2.1: bytes=56 Sequence=1 ttl=254 time=40 ms
    Reply from 192.168.2.1: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 192.168.2.1: bytes=56 Sequence=3 ttl=254 time=40 ms
    Reply from 192.168.2.1: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 192.168.2.1: bytes=56 Sequence=5 ttl=254 time=20 ms

<r4>tracert 192.168.2.1
 traceroute to  192.168.2.1(192.168.2.1), max hops: 30 ,packet length: 40,press CTRL_C to break 
 1 192.168.24.5 20 ms  20 ms  10 ms 
 2 192.168.25.3 20 ms  20 ms  30 ms 

<r1>tracert 192.168.2.1
 traceroute to  192.168.2.1(192.168.2.1), max hops: 30 ,packet length: 40,press CTRL_C to break 
 1 192.168.12.5 40 ms  10 ms  10 ms 
 2 192.168.23.3 20 ms  20 ms  20 ms 
  1. 符合实验需求,实验完成。

  • 6
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

时光里的雨

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值