当前位置:网站首页>HCIP WPN 实验
HCIP WPN 实验
2022-08-04 16:39:00 【less than _ermi】
实验内容:

实验拓扑:
实验要求:
r6通过r7访问r3(上网)
实验过程:
1、各个路由器接口IP 配置
(r2的g0/0/0接口IP需进入空间a配置g0/0/2进入空间b)
[r2]ip vpn-instance a
[r2-vpn-instance-a]route-distinguisher 1:1
[r2-vpn-instance-a-af-ipv4]vpn
[r2-vpn-instance-a-af-ipv4]vpn-target 1:1
IVT Assignment result:
Info: VPN-Target assignment is successful.
EVT Assignment result:
Info: VPN-Target assignment is successful.
[r2-vpn-instance-a-af-ipv4]q
[r2-vpn-instance-a]q
[r2]inter g0/0/0
[r2-GigabitEthernet0/0/0]ip binding vpn-instance a
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!
[r2-GigabitEthernet0/0/0]ip add 192.168.2.2 24
[r2]ip vpn-instance b
[r2-vpn-instance-b]rou
[r2-vpn-instance-b]route-distinguisher 1:2
[r2-vpn-instance-b-af-ipv4]vpnn
[r2-vpn-instance-b-af-ipv4]vpn
[r2-vpn-instance-b-af-ipv4]vpn-target 1:2
IVT Assignment result:
Info: VPN-Target assignment is successful.
EVT Assignment result:
Info: VPN-Target assignment is successful.
[r2-vpn-instance-b-af-ipv4]q
[r2-vpn-instance-b]q
[r2]inter g0/0/2
[r2-GigabitEthernet0/0/2]ip binding vpn-instance b
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!
[r2-GigabitEthernet0/0/2]ip add 192.168.2.2 24(r4的g0/0/1接口IP需进入空间a配置g0/0/2进入空间b)
[r4]ip vpn-instance a
[r4-vpn-instance-a]route-distinguisher 1:1
[r4-vpn-instance-a-af-ipv4]vpn-target 1:1
IVT Assignment result:
Info: VPN-Target assignment is successful.
EVT Assignment result:
Info: VPN-Target assignment is successful.
[r4-vpn-instance-a-af-ipv4]q
[r4-vpn-instance-a]q
[r4]inter g0/0/1
[r4-GigabitEthernet0/0/1]ip binding vpn-instance a
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!
[r4-GigabitEthernet0/0/1]ip add 192.168.3.2 24
[r4]ip vpn-instance b
[r4-vpn-instance-b]route-distinguisher 1:2
[r4-vpn-instance-b-af-ipv4]vpn-target 1:2
IVT Assignment result:
Info: VPN-Target assignment is successful.
EVT Assignment result:
Info: VPN-Target assignment is successful.
[r4-vpn-instance-b-af-ipv4]q
[r4-vpn-instance-b]q
[r4]inter g0/0/2
[r4-GigabitEthernet0/0/2]ip binding vpn-instance b
Info: All IPv4 related configurations on this interface are removed!
Info: All IPv6 related configurations on this interface are removed!
[r4-GigabitEthernet0/0/2]ip add 192.168.3.2 242、ISP启用oSPF协议进程1
[r2]ospf 1
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 23.1.1.0 0.0.0.255
[r3]ospf 1
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 23.1.1.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]network 34.1.1.0 0
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[r4]ospf 1
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 34.1.1.0 0.0.0.255
[r4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.03、r2\r4启用BGP协议
[r2]bgp 1
[r2-bgp]peer 4.4.4.4 as-number 1
[r2-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[r2-bgp]peer 4.4.4.4 next-hop-local
[r4]bgp 1
[r4-bgp]peer 2.2.2.2 as-number 1
[r4-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[r4-bgp]peer 2.2.2.2 next-hop-local
4、r2\r3\r4启用mpls协议
[r2]mpls lsr-id 2.2.2.2
[r2]mpls
Info: Mpls starting, please wait... OK!
[r2-mpls]mpls ldp
[r2-mpls-ldp]q
[r2]inter g0/0/1
[r2-GigabitEthernet0/0/1]mpls
[r2-GigabitEthernet0/0/1]mpls ldp
[r3]mpls lsr-id 3.3.3.3
[r3]mpls
Info: Mpls starting, please wait... OK!
[r3-mpls]mpls ldp
[r3-mpls-ldp]q
[r3]inter g0/0/0
[r3-GigabitEthernet0/0/0]mpls
[r3-GigabitEthernet0/0/0]mpls ldp
[r3-GigabitEthernet0/0/0]q
[r3]inter g0/0/1
[r3-GigabitEthernet0/0/1]mpls
[r3-GigabitEthernet0/0/1]mpls ldp
[r4]mpls lsr
[r4]mpls lsr-id 4.4.4.4
[r4]mpls
Info: Mpls starting, please wait... OK!
[r4-mpls]mpls ldp
[r4-mpls-ldp]q
[r4]inter g0/0/0
[r4-GigabitEthernet0/0/0]mpls
[r4-GigabitEthernet0/0/0]mpls ldp
5、r1\r5启用oSPF协议同时进入空间a对r2\r4启用oSPF进程2
[r1]ospf 1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[r2]ospf 2 vpn-instance a
[r2-ospf-2]area 0
[r2-ospf-2-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[r4]ospf 2 vpn-instance a
[r4-ospf-2]area 0
[r4-ospf-2-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[r5]ospf 1
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[r5-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.2556、r6\r7启用RIP协议同时进入空间b对r2\r4启用RIP
[r6]rip 1
[r6-rip-1]version 2
[r6-rip-1]network 192.168.2.0
[r6-rip-1]network 192.168.1.0
[r2]rip 1 vpn-instance b
[r2-rip-1]version 2
[r2-rip-1]network 192.168.2.0
[r4]rip 1 vpn-instance b
[r4-rip-1]version 2
[r4-rip-1]network 192.168.3.0
[r7]rip 1
[r7-rip-1]version 2
[r7-rip-1]network 192.168.3.0
[r7-rip-1]network 192.168.4.07、重发布
[r2]bgp 1
[r2-bgp]ipv4 vpn-instance a
[r2-bgp-a]import-route ospf 2
[r2-bgp-a]q
[r2-bgp]ipv4 vpn-instance b
[r2-bgp-b]import-route rip 1
[r2-bgp-b]q
[r2-bgp]q
[r2]rip 1
[r2-rip-1]import-route bgp
[r2-rip-1]q
[r2]ospf 2
[r2-ospf-2]import-route bgp
[r4]bgp 1
[r4-bgp]ipv4 vpn-instance a
[r4-bgp-a]import-route ospf 2
[r4-bgp-a]q
[r4-bgp]ipv4 vpn-instance b
[r4-bgp-b]import-route rip 1
[r4-bgp-b]q
[r4-bgp]q
[r4]ospf 2
[r4-ospf-2]import-route bgp
[r4-ospf-2]q
[r4]rip 1
[r4-rip-1]import-route bgp
[r4-rip-1]q8、PE与PE间建立MP-BPG邻居关系
[r2]bgp 1
[r2-bgp]ipv4
[r2-bgp]ipv4-family vpnv4
[r2-bgp-af-vpnv4]peer 4.4.4.4 enable
[r4]bgp 1
[r4-bgp]ipv4
[r4-bgp]ipv4-family vpnv4
[r4-bgp-af-vpnv4]peer 2.2.2.2 enable 9、nat地址转换
[r7]acl 2000
[r7-acl-basic-2000]ru
[r7-acl-basic-2000]rule 1 per
[r7-acl-basic-2000]rule 1 permit so
[r7-acl-basic-2000]rule 1 permit source an
[r7-acl-basic-2000]rule 1 permit source any
[r7-acl-basic-2000]q
[r7]inter g0/0/1
[r7-GigabitEthernet0/0/1]nat out
[r7-GigabitEthernet0/0/1]nat outbound 200010、在r7上配置缺省下一跳指向r4,在r4bgp宣告缺省给r2,在r3上配置缺省下一跳指向r4,在r2下发缺省给r6
[r7]ip route-static 0.0.0.0 0 192.168.3.2
[r4]bgp 1
[r4-bgp]ipv4 vpn-instance b
[r4-bgp-b]network 0.0.0.0
[r3]ip route-static 0.0.0.0 0 34.1.1.2
[r2]rip 1
[r2-rip-1]default-route originate 11、测试


边栏推荐
- Check which user permissions are assigned to each database, is there an interface for this?
- \/ PN的综合实验
- 基本的SELECT语句
- 8年软件测试感悟,送给刚入测试行业的小伙伴
- 15天升级打怪,成为虚拟时尚创作者
- 九联_UNT400G_S905L2_(联通)_线刷固件包
- 美容院管理系统有哪些促销方式?
- “敏捷欺骗了开发人员”
- 2022-08-04日报:量化细胞内的信息流:机器学习时代下的研究进展
- Real-Time Rendering 4th related resource arrangement (no credit required)
猜你喜欢

推荐 7 月份 yyds 的开源项目

【Pick-in】Advertising-information flow cross-domain CTR estimation (to be updated)

8年软件测试感悟,送给刚入测试行业的小伙伴

Real-Time Rendering 4th相关资源整理(无需积分 传火)

Hubei Mobile HG680-LV_S905L3B_wire brush firmware package

Mobile Hisense IP102H_905L3-B_wire brush firmware package

No server is required, teach you to get real-time health code recognition with only 30 lines of code

谷粒商城笔记

leetcode 48. Rotate Image 旋转图像(Medium)

Steady Development | Data and Insights on Mobile Game Players in Western Europe
随机推荐
Mobile Hisense IP102H_905L3-B_wire brush firmware package
转型阵痛期,好未来减亏容易增收难?
shell中当basename和dirname无法满足你的需求时你一定要想到的命令
湖北移动HG680-LV_S905L3B_线刷固件包
【Pick-in】Advertising-information flow cross-domain CTR estimation (to be updated)
码蹄集 - MT2165 - 小码哥的抽卡之旅1
2022-08-04日报:量化细胞内的信息流:机器学习时代下的研究进展
LeetCode·85.最大矩形·单调栈
Mobile BesTV_R3300-L_S905L_8189_wire brush firmware package
【打卡】广告-信息流跨域ctr预估(待更新)
跨域传递数据(iframe)
leetcode 48. Rotate Image 旋转图像(Medium)
MetaAI科学家解读最新模型:200+语言互译,扩充千倍翻译数据,全球元宇宙用户自由交流
Steady Development | Data and Insights on Mobile Game Players in Western Europe
湖北电信天邑TY1608_S905L3B_MT7668_卡刷固件包
面试官:多个线程执行完毕后,才执行另一个线程,该怎么做?
ES中同时使用should和must导致只有must生效解决方案
谷粒商城笔记
HyperBDR云容灾深度解析一:云原生跨平台容灾,让数据流转更灵活
动手学深度学习_AlexNet