MGRE实验

1、规划IP地址

[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.2 24
[r1-GigabitEthernet0/0/0]int s0/0/0
[r1-Serial0/0/0]ip address 1.1.1.1 24
[r1-Serial0/0/0]display ip interface brief

 

[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.2.2 24
[r2-GigabitEthernet0/0/0]int s0/0/0
[r2-Serial0/0/0]ip address 3.3.3.1 24
[r2-Serial0/0/0]dis ip int b

 

 

[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip address 192.168.3.2 24
[r3-GigabitEthernet0/0/0]int s0/0/0
[r3-Serial0/0/0]ip address 4.4.4.1 24
[r3-Serial0/0/0]dis ip int b

 

 

[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip address 2.2.2.1 24
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.4.2 24
[r4-GigabitEthernet0/0/1]dis ip int b

 

[ISP]int Serial 0/0/0
[ISP-Serial0/0/0]ip address 1.1.1.2 24
[ISP-Serial0/0/0]int s0/0/1
[ISP-Serial0/0/1]ip address 3.3.3.2 24
[ISP-Serial0/0/1]int g0/0/0
[ISP-GigabitEthernet0/0/0]ip address 2.2.2.2 24
[ISP-GigabitEthernet0/0/0]int s0/0/2
[ISP-Serial0/0/2]ip address 4.4.4.2 24
[ISP]int LoopBack0
[ISP-LoopBack0]ip address 5.5.5.1 24
[ISP]dis ip int b

 

 r1 和r5之间使用ppp的pap认证,r5为主认证方

[r1]aaa
[r1-aaa]local-user admin password cipher 123456
[r1-aaa]local-user admin service-type ppp
[r1]int s1/0/0
[r1-Serial1/0/0]ppp authentication-mode pap

 

[ISP]int s1/0/0
[ISP-Serial1/0/0]ppp pap local-user admin password cipher 123456
[ISP-Serial1/0/0]shutdown
[ISP-Serial1/0/0]undo shutdown
[ISP-Serial1/0/0]display this
#
interface Serial1/0/0
 link-protocol ppp
 ppp pap local-user admin password cipher OUM!K%F<+$[Q=^Q`MAF4<1!!
 ip address 1.1.1.2 255.255.255.0
#
return

r2和r5之间使用ppp的chap认证,r5为主认证方

[r2]int s0/0/0
[r2-Serial0/0/0]ppp chap user admin
[r2-Serial0/0/0]ppp chap password cipher 123456
[ISP]int s0/0/1
[ISP-Serial0/0/1]ppp authentication-mode chap
[ISP-Serial0/0/1]shutdown
[ISP-Serial4/0/1]undo shutdown
[r2-Serial0/0/0]display this 
#
interface Serial0/0/0
 link-protocol ppp
 ppp chap user admin
 ppp chap password cipher OUM!K%F<+$[Q=^Q`MAF4<1!!
 ip address 3.3.3.1 255.255.255.0
#
return

r3和r5使用HDLC封装

[r3]int s4/0/0
[r3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
Sep 19 2022 19:10:50-08:00 r3 %%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-Serial2/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
Sep 19 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 4.4.4.2 255.255.255.0 
#
return

r1、r4之间为点到点的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
[r4]interface Tunnel 0/0/0
[r4-Tunnel0/0/0]ip add 192.168.5.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre
[r4-Tunnel0/0/0]source 2.2.2.1
[r4-Tunnel0/0/0]destination 1.1.1.1

r1/r2/r5构建一个MGRE环境,r1为中心站点

[r1]int Tunnel 0/0/1	
[r1-Tunnel0/0/1]ip address 192.168.6.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/1]source 1.1.1.1
Sep 19 2022 18:14:19-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/1 has entered the UP state. 
[r1-Tunnel0/0/1]nhrp network-id 100
[r2]int Tunnel 0/0/1
[r2-Tunnel0/0/1]ip add	
[r2-Tunnel0/0/1]ip address 192.168.6.3 24
[r2-Tunnel0/0/1]tunnel-protocol gre p2mp 	
[r2-Tunnel0/0/1]source Serial 1/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 
[ISP]int Tunnel 0/0/1
[ISP-Tunnel0/0/1]ip address 192.168.6.2 24
[ISP-Tunnel0/0/1]tunnel-protocol gre p2mp 
[ISP-Tunnel0/0/1]source Serial 1/0/0
[ISP-Tunnel0/0/1]nhrp network-id 100
[ISP-Tunnel0/0/1]nhrp entry 192.168.6.1 1.1.1.1 register 

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

​​​​​​​

 使用PC访问r5环回

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值