搭建虚拟通道

目录

 一.首先给各个网段划分IP​编辑

 二.在ISP上给每个接口都配上IP

三.R1、R3之间为点到点的GRE

四.整个私有网络基于RIP全网可达

 五.使用PC访问R5环回


 一.首先给各个网段划分IP

 二.在ISP上给每个接口都配上IP

[ISP]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 6
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 6
The number of interface that is DOWN in Protocol is 3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              3.3.3.2/24           up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         5.5.5.1/24           up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial3/0/0                       2.2.2.2/24           up         up        
Serial3/0/1                       unassigned           down       down      
Serial4/0/0                       1.1.1.2/24           up         up        
Serial4/0/1                       4.4.4.2/24           up         up        

 1.R1和R5之间使用ppp的pap认证,R5为主认证方

[R1]aaa
[R1-aaa]local-user admin password cipher 123456	
[R1-aaa]local-user admin service-type ppp	
[R1-aaa]q
[R1]interface Serial 4/0/0	
[R1-Serial4/0/0]ppp authentication-mode pap
[ISP]int s4/0/0
[ISP-Serial4/0/0]ppp pap local-user admin password cipher 123456

###PPP会话是一次性会话,会话一旦建立,再配置认证将不生效,再下次会话建立时
才生效,所以下方重启接口了
[ISP-Serial4/0/0]shutdown 
[ISP-Serial4/0/0]undo shutdown 
[ISP-Serial4/0/0]display this 
[V200R003C00]
#
interface Serial4/0/0
 link-protocol ppp
 ppp pap local-user admin password cipher %$%$::i-%`5&4%z^qW-Se5^4,+\*%$%$
 ip address 1.1.1.2 255.255.255.0 
#
return

2.R4和R5之间使用ppp的chap认证,R5为主认证方

[R4-Serial4/0/0]ppp chap user admin
[R4-Serial4/0/0]ppp chap password cipher 123456
[ISP]int s4/0/1
[ISP-Serial4/0/1]ppp authentication-mode chap
[ISP-Serial4/0/1]shutdown 
[ISP-Serial4/0/1]undo shutdown 
[R4-Serial4/0/0]display this
[V200R003C00]
#
interface Serial4/0/0
 link-protocol ppp
 ppp chap user admin
 ppp chap password cipher %$%$Pu^NH.P<BV]0NmQLHzKS,+e~%$%$
 ip address 4.4.4.1 255.255.255.0 
#
return

3.R2和R5使用HDLC封装

[R2]int s4/0/0
[R2-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
Sep 17 2022 19:10:50-08:00 R2 %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed 
the configuration that will change the encapsulation protocol of the link and th
en selected Y. 
[ISP-Serial3/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
Sep 17 2022 19:12:22-08:00 ISP %%01IFNET/4/CHANGE_ENCAP(l)[8]:The user performed
 the configuration that will change the encapsulation protocol of the link and t
hen selected Y. 
[ISP-Serial3/0/0]display this
[V200R003C00]
#
interface Serial3/0/0
 link-protocol hdlc
 ip address 2.2.2.2 255.255.255.0 
#
return

三.R1、R3之间为点到点的GRE

[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ip add 192.168.5.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre
[R1-Tunnel0/0/0]source 1.1.1.1
[R1-Tunnel0/0/0]destination 3.3.3.1
Sep 17 2022 19:21:40-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[R3]interface Tunnel 0/0/0
[R3-Tunnel0/0/0]ip add 192.168.5.2 24
[R3-Tunnel0/0/0]tunnel-protocol gre
[R3-Tunnel0/0/0]source 3.3.3.1
[R3-Tunnel0/0/0]destination 1.1.1.1

  2.R1/R2/R4构建一个MGRE环境,R1为中心站点

[R1]int Tunnel 0/0/1
[R1-Tunnel0/0/1]ip add 192.168.6.1 24	
[R1-Tunnel0/0/1]tunnel-protocol gre p2mp 
[R1-Tunnel0/0/1]source 1.1.1.1
Sep 17 2022 19:39:34-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface Tunnel0/0/1 has entered the UP state. 
[R1-Tunnel0/0/1]nhrp network-id 100
[R4]int Tunnel 0/0/1
[R4-Tunnel0/0/1]ip add 192.168.6.3 24
[R4-Tunnel0/0/1]tunnel-protocol gre p2mp 	
[R4-Tunnel0/0/1]source Serial 4/0/0
[R4-Tunnel0/0/1]nhrp network-id 100
[R4-Tunnel0/0/1]nhrp entry 192.168.6.1 1.1.1.1 register 
[R2]int Tunnel 0/0/1
[R2-Tunnel0/0/1]ip add 192.168.6.2 24
[R2-Tunnel0/0/1]tunnel-protocol gre p2mp 	
[R2-Tunnel0/0/1]source Serial 4/0/0
[R2-Tunnel0/0/1]nhrp network-id 100
[R2-Tunnel0/0/1]nhrp entry 192.168.6.1 1.1.1.1 register 

四.整个私有网络基于RIP全网可达

 五.使用PC访问R5环回

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

Gur.

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

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

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

打赏作者

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

抵扣说明:

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

余额充值