HCIP PPP/HDLC、GRE/MGRE实验


AR1:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
Jul 10 2022 19:18:15-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R1-GigabitEthernet0/0/0]ip pool p0
Info: It's successful to create an IP address pool.
[R1-ip-pool-p0]netbios-type
[R1-ip-pool-p0]network 192.168.1.0 mask 24
[R1-ip-pool-p0]gateway-list 192.168.1.1
[R1-ip-pool-p0]dns-list 192.168.1.255
[R1-ip-pool-p0]q
[R1]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]dhcp select global 
[R1-GigabitEthernet0/0/0]q
[R1]int s4/0/0
[R1-Serial4/0/0]ip add 15.0.0.1 24
[R1-Serial4/0/0]


 AR2:

<Huawei>sys 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.2.1 24
Jul 10 2022 19:26:01-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R2-GigabitEthernet0/0/0]q
[R2]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[R2]ip policy-based-route
[R2]ip pool p0
Info: It's successful to create an IP address pool.    
[R2-ip-pool-p0]netbios-type
[R2-ip-pool-p0]network 192.168.2.0 mask 24
[R2-ip-pool-p0]gateway-list 192.168.2.1    
[R2-ip-pool-p0]dns-list 192.168.2.255
[R2-ip-pool-p0]int g0/0/0
[R2-GigabitEthernet0/0/0]dhcp select global 
[R2-GigabitEthernet0/0/0]int s4/0/0
[R2-Serial4/0/0]ip add 25.0.0.1 24
[R2-Serial4/0/0]


AR3:

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.3.1 24
Jul 10 2022 19:29:58-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R3-GigabitEthernet0/0/0]int s4/0/0
[R3-Serial4/0/0]ip add 35.0.0.1 24
[R3-Serial4/0/0]q    
[R3]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[R3]ip pool po
Info: It's successful to create an IP address pool.
[R3-ip-pool-po]network 192.168.3.0 mask 24
[R3-ip-pool-po]gateway-list 192.168.3.1
[R3-ip-pool-po]dns-list 192.168.3.255
[R3-ip-pool-po]int g0/0/0    
[R3-GigabitEthernet0/0/0]dhcp select global 
AR4

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R4
[R4]dh    
[R4]dhcp en    
[R4]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[R4]ip po    
[R4]ip policy-based-route
[R4]ip pool p0
Info: It's successful to create an IP address pool.
[R4-ip-pool-p0]network 192.168.4.0 mask 24
[R4-ip-pool-p0]gateway-list 192.168.4.1
[R4-ip-pool-p0]dns-list 192.168.4.255
[R4-ip-pool-p0]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 45.0.0.1 24
[R4-GigabitEthernet0/0/0]
Jul 10 2022 19:36:24-08:00 R4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 192.168.4.1 24
[R4-GigabitEthernet0/0/1]
Jul 10 2022 19:36:37-08:00 R4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R4-GigabitEthernet0/0/1]dhcp select global
[R4-GigabitEthernet0/0/1]q
[R4]
AR5

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R5
[R5]int s3/0/0
[R5-Serial3/0/0]ip add 15.0.0.2 24
[R5-Serial3/0/0]
Jul 10 2022 19:45:06-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP IPCP on the interface Serial3/0/0 has entered the UP state. 
[R5-Serial3/0/0]int s3/0/1
[R5-Serial3/0/1]ip add 25.0.0.2 24
[R5-Serial3/0/1]
Jul 10 2022 19:45:25-08:00 R5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol PPP IPCP on the interface Serial3/0/1 has entered the UP state. 
[R5-Serial3/0/1]int s4/0/1
[R5-Serial4/0/1]ip add 35.0.0.2 24
[R5-Serial4/0/1]
Jul 10 2022 19:45:40-08:00 R5 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol PPP IPCP on the interface Serial4/0/1 has entered the UP state. 
[R5-Serial4/0/1]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 45.0.0.2 24
[R5-GigabitEthernet0/0/0]
Jul 10 2022 19:45:56-08:00 R5 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R5-GigabitEthernet0/0/0]int l0
[R5-LoopBack0]ip add 5.5.5.1 24
[R5-LoopBack0]
给每台路由器上写上缺省
[r1]ip route-static 0.0.0.0 0 15.0.0.2
[r2]ip route-static 0.0.0.0 0 25.0.0.2
[r3]ip route-static 0.0.0.0 0 35.0.0.2
[r4]ip route-static 0.0.0.0 0 45.0.0.2
R1和R5的PAP认证并且R5是主认证方

R1

<R1>sys
Enter system view, return user view with Ctrl+Z.
[R1]aaa
[R1-aaa]local-user wp password cipher 123456        ——添加用户
Info: Add a new user.
[R1-aaa]local-user wp service-type ppp
[R1-aaa]q     
[R1]int s4/0/0
[R1-Serial4/0/0]ppp au
[R1-Serial4/0/0]ppp authentication-mode pap        ——进入接口开启认证模式
R2

<R5>sys 
Enter system view, return user view with Ctrl+Z.
[R5]int s3/0/0
[R5-Serial3/0/0]ppp pap lo
[R5-Serial3/0/0]ppp pap local-user wp pa
[R5-Serial3/0/0]ppp pap local-user wp password ci
[R5-Serial3/0/0]ppp pap local-user wp password cipher 123456


R2与R5的CHAP认证,并且R5为主认证方

<R2>sys
Enter system view, return user view with Ctrl+Z.
[R2]aaa
[R2-aaa]local-user wp password cipher 123456
Info: Add a new user.
[R2-aaa]local-user wp service-type ppp
[R2-aaa]int s4/0/0
[R2-Serial4/0/0]ppp authentication-mode chap
<R5>sys
Enter system view, return user view with Ctrl+Z.
[R5]int s3/0/1
[R5-Serial3/0/1]ppp ch
[R5-Serial3/0/1]ppp chap u
[R5-Serial3/0/1]ppp chap user wp
[R5-Serial3/0/1]ppp cha
[R5-Serial3/0/1]ppp chap pa
[R5-Serial3/0/1]ppp chap password ci 
[R5-Serial3/0/1]ppp chap password cipher 123456
[R5-Serial3/0/1]
R3于R5之间使用HDLC封装

[R3]int s4/0/0
[R3-Serial4/0/0]lin
[R3-Serial4/0/0]link-protocol hd
[R3-Serial4/0/0]link-protocol hdlc 
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
Jul 10 2022 20:03:22-08:00 R3 %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed the configuration that will change the encapsulation protocol of the link and then selected Y. 
[R3-Serial4/0/0]
[R3-Serial4/0/0]
Jul 10 2022 20:03:22-08:00 R3 %%01PPP/4/PHYSICALDOWN(l)[1]:On the interface Serial4/0/0, PPP link was closed because the status of the physical layer was Down. 
[R3-Serial4/0/0]
Jul 10 2022 20:03:22-08:00 R3 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol PPP on the interface Serial4/0/0 has entered the DOWN state. 
[R3-Serial4/0/0]
Jul 10 2022 20:03:22-08:00 R3 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol PPP IPCP on the interface Serial4/0/0 has entered the DOWN state. 
[R3-Serial4/0/0]
<R5>sys
Enter system view, return user view with Ctrl+Z.
[R5]int s4/0/1
[R5-Serial4/0/1]lin
[R5-Serial4/0/1]link-protocol hd
[R5-Serial4/0/1]link-protocol hdlc 
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
Jul 10 2022 20:07:38-08:00 R5 %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed the configuration that will change the encapsulation protocol of the link and then selected Y. 
[R5-Serial4/0/11]
[R5-Serial4/0/1]q
RIP

R1:
[R1]rip
[R1-rip-1]ne
[R1-rip-1]network 192.168.1.0
[R1-rip-1]ne
[R1-rip-1]network 123.0.0.0
[R1-rip-1]
 
R2:
[R2]rip     
[R2-rip-1]ne
[R2-rip-1]network 192.168.2.0 
[R2-rip-1]network 123.0.0.0  
[R2-rip-1]
 
R3:
[R3]rip
[R3-rip-1]ne
[R3-rip-1]network 192.168.3.0
[R3-rip-1]ne
[R3-rip-1]network 123.0.0.0
[R3-rip-1]
 
R4:
[R4]rip     
[R4-rip-1]ne
[R4-rip-1]network 192.168.4.0
[R4-rip-1]
MGRE环境搭建

MGRE所用192.168.5.0/24

R1

<R1>sys
Enter system view, return user view with Ctrl+Z.
[R1]int t0/0/0
[R1-Tunnel0/0/0]ip add 192.168.5.1 24
[R1-Tunnel0/0/0]tu
[R1-Tunnel0/0/0]tunnel-protocol gr
[R1-Tunnel0/0/0]tunnel-protocol gre p2
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R1-Tunnel0/0/0]so
[R1-Tunnel0/0/0]source 15.0.0.1
Jul 10 2022 22:20:44-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state. 
[R1-Tunnel0/0/0]
[R1-Tunnel0/0/0]ne
[R1-Tunnel0/0/0]nh
[R1-Tunnel0/0/0]nhrp ne
[R1-Tunnel0/0/0]nhrp network-id 100
[R1-Tunnel0/0/0]
R2

<R2>sys
Enter system view, return user view with Ctrl+Z.
[R2]int t0/0/0
[R2-Tunnel0/0/0]ip add 192.168.5.2 24
[R2-Tunnel0/0/0]tu
[R2-Tunnel0/0/0]tunnel-protocol gr
[R2-Tunnel0/0/0]tunnel-protocol gre p2
[R2-Tunnel0/0/0]so
[R2-Tunnel0/0/0]source s4/0/0
Jul 10 2022 22:23:25-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state. 
[R2-Tunnel0/0/0]
[R2-Tunnel0/0/0]nh
[R2-Tunnel0/0/0]nhrp ne
[R2-Tunnel0/0/0]nhrp network-id 100
[R2-Tunnel0/0/0]nh
[R2-Tunnel0/0/0]nhrp en
[R2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 re
[R2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register 
[R2-Tunnel0/0/0]
R2和R3同理

查看NHRP信息收集情况

R1为中心站点;R1,R4间为点到点的GRE

AR1

[R1]int t0/0/1
[R1-Tunnel0/0/1]ip add 192.168.6.1 24
[R1-Tunnel0/0/1]tu
[R1-Tunnel0/0/1]tunnel-protocol gr
[R1-Tunnel0/0/1]tunnel-protocol gre 
[R1-Tunnel0/0/1]so
[R1-Tunnel0/0/1]source 15.0.0.1
[R1-Tunnel0/0/1]de
[R1-Tunnel0/0/1]description 45.0.0.1
[R1-Tunnel0/0/1]
 AR4

[R4]int t0/0/1
[R4-Tunnel0/0/1]ip add 192.168.6.2 24
[R4-Tunnel0/0/1]tu
[R4-Tunnel0/0/1]tunnel-protocol g
[R4-Tunnel0/0/1]tunnel-protocol gre 
[R4-Tunnel0/0/1]so
[R4-Tunnel0/0/1]source 45.0.0.1
[R4-Tunnel0/0/1]de
[R4-Tunnel0/0/1]description 15.0.0.1
[R4-Tunnel0/0/1]
整个私有网络基于RIP全网可达

AR1:
[R1]rip
[R1-rip-1]v 2
[R1-rip-1]network 192.168.1.0 
[R1-rip-1]network 192.168.5.0
[R1-rip-1]network 192.168.6.0
 
AR2:
<R2>sys
Enter system view, return user view with Ctrl+Z.
[R2]rip
[R2-rip-1]v 2
[R2-rip-1]network 192.168.2.0
[R2-rip-1]network 192.168.5.0
[R2-rip-1]q
 
AR3:
<R3>sys
Enter system view, return user view with Ctrl+Z.
[R3]rip
[R3-rip-1]v 2
[R3-rip-1]network 192.168.2.0
[R3-rip-1]network 192.168.5.0
[R3-rip-1]network 192.168.3.0     
[R3-rip-1]
 
AR4:
[R4]rip
[R4-rip-1]v 2
[R4-rip-1]ne
[R4-rip-1]network 192.168.4.0
[R4-rip-1]network 192.168.6.0
[R4-rip-1]
 
所有PC设置私有IP为源IP,可以访问R5环回

给所有的边缘路由器接口做NAT转换

R1

[R1]acl 2000
[R1-acl-basic-2000]ru
[R1-acl-basic-2000]rule per
[R1-acl-basic-2000]rule permit so
[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R1-acl-basic-2000]int s4/0/0
[R1-Serial4/0/0]na
[R1-Serial4/0/0]nat ou
[R1-Serial4/0/0]nat outbound 2000
[R1-Serial4/0/0]
R2

[R2]acl 2000
[R2-acl-basic-2000]ru
[R2-acl-basic-2000]rule per
[R2-acl-basic-2000]rule permit so
[R2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[R2-acl-basic-2000]int s4/0/0
[R2-Serial4/0/0]na
[R2-Serial4/0/0]nat ou
[R2-Serial4/0/0]nat outbound 2000
[R2-Serial4/0/0]q  
R3

[R3]acl 2000 
[R3-acl-basic-2000]ru
[R3-acl-basic-2000]rule per
[R3-acl-basic-2000]rule permit s
[R3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[R3-acl-basic-2000]int s4/0/0
[R3-Serial4/0/0]na
[R3-Serial4/0/0]nat ou
[R3-Serial4/0/0]nat outbound 2000
[R3-Serial4/0/0]q
R4

<R4>sys
Enter system view, return user view with Ctrl+Z.
[R4]acl
[R4]acl 2000
[R4-acl-basic-2000]ru
[R4-acl-basic-2000]rule per
[R4-acl-basic-2000]rule permit ?
  fragment             Check fragment packet
  none-first-fragment  Check the subsequence fragment packet  
  source               Specify source address
  time-range           Specify a special time
  vpn-instance         Specify a VPN-Instance
  <cr>                 Please press ENTER to execute command 
[R4-acl-basic-2000]rule permit s
[R4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[R4-acl-basic-2000]int g0/0/0
[R4-GigabitEthernet0/0/0]na
[R4-GigabitEthernet0/0/0]nat ?
  outbound  Specify net address translation
  server    Specify NAT server
  static    Specify static NAT
[R4-GigabitEthernet0/0/0]nat ou
[R4-GigabitEthernet0/0/0]nat outbound 2000
[R4-GigabitEthernet0/0/0]q

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
HCIP实验中的OSPF是指Open Shortest Path First,是一种内部网关协议(IGP),用于在自治系统(AS)内部进行路由选择。在HCIP实验中,OSPF的配置包括实验拓扑、子网划分、基本配置、MGRE环境配置、OSPF配置、路由汇总、特殊区域和NAT配置等。\[1\] 在实验中,可以使用OSPF多进程重发布的方式解决重发布问题。例如,在非骨干区域a4中,可以使用OSPF进程1和进程2进行重发布。R9的配置示例为: ospf 1 router-id 9.9.9.9 import-route ospf 2 area 0.0.0.3 network 172.16.136.2 0.0.0.0 ospf 2 router-id 9.9.9.9 asbr-summary 172.16.160.0 255.255.224.0 import-route ospf 1 area 0.0.0.4 network 172.16.160.1 0.0.0.0 network 172.16.168.1 0.0.0.0 \[2\] 另外,实验中还涉及到AREA2/3的完全NSSA配置。例如,在AREA2中,R6、R11和R12的配置示例为: R6: ospf 1 area 2 nssa no-summary R11: ospf 1 area 2 nssa R12: ospf 1 area 2 nssa \[3\] 此外,实验中还包括NAT配置。例如,R3、R6和R7的NAT配置示例为: R3: acl 2000 rule 5 permit source 172.16.0.0 0.0.255.255 int s3/0/0 nat outbound 2000 R6: acl 2000 rule 5 permit source 172.16.0.0 0.0.255.255 int s4/0/0 nat outbound 2000 R7: acl 2000 rule 5 permit source 172.16.0.0 0.0.255.255 int s4/0/1 nat outbound 2000 \[3\] 以上是关于HCIP实验中OSPF的一些配置示例。 #### 引用[.reference_title] - *1* *2* *3* [HCIP——OSPF综合大实验](https://blog.csdn.net/After_GlowX/article/details/118708375)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值