要求如下
第一步:先划分IP,给接口配ip
进入接口,配IP,拿R1举例,配完所有接口IP。
<Huawei>system-view
[Huawei]sysname R5
[R5]interface G0/0/0
[R5-GigabitEthernet0/0/0]IP address 45.0.0.2 8
[R5-GigabitEthernet0/0/0]Q
[R5]interface Serial 3/0/0
[R5-Serial3/0/0]IP address 15.0.0.2 8
[R5-Serial3/0/0]Q
[R5]interface Serial 3/0/1
[R5-Serial3/0/1]IP address 25.0.0.2 8
[R5-Serial3/0/1]Q
[R5]interface Serial 4/0/0
[R5-Serial4/0/0]IP address 35.0.0.2 8
第二部:完成任务2
配置认证方R5
[r5]aaa 进入AAA密码账号空间
[r5-aaa]local-user zhanghao password cipher mima 设置账号和密码
[r5-aaa]local-user zhanghao service-type ppp 定义账号的服务对象
[r5-aaa]interface Serial 4/0/0 进入 Serial 4/0/0接口
[r5-Serial3/0/0]link-protocol ppp 修改链路层协议为ppp
[r5-Serial3/0/0]ppp authentication-mode pap 定义PPP认证模式
配置被认证方
[r1-Serial4/0/0]ppp pap local-userzhanghaopassword cipher mima 拨号,携带账号密码
第三步:完成任务2.1
[Huawei]interface Serial 4/0/0 进入特定接口
[Huawei-Serial4/0/0]link-protocol ppp 修改协议为ppp
认证方
[Huawei]aaa
[Huawei-aaa]local-user 账号 password cipher 密码 在AAA空间中创建账号和密码
[Huawei-aaa]local-user 账号 service-type ppp
调用
[Huawei]interface Serial 3/0/1 进入特定接口
[Huawei-Serial3/0/1]ppp authentication-mode chap 在接口选择认证协议chap
被认证方配置
[Huawei]interface Serial 4/0/0 进入接口
[Huawei-Serial4/0/0]ppp chap user 账号 输入账号[Huawei-Serial4/0/0]ppp chap password cipher 密码
第四步:完成2.3
不会
第五步:完成3
准备1:必须在边界路由器上配置缺省指向ISP设备。以保证公网IP之间的连通性
[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-Tunnel0/0/0]ip address 192.168.3.1 24 第二步配置IP地址(注意必须是私网地址)
[r1-Tunnel0/0/0]tunnel-protocol gre 第三步定义封装协议,选择隧道封装接口协议 gre协议 。
[r1-Tunnel0/0/0]source 12.0.0.1 第四步定义封装内容,源IP地址为自身物理接口IP地址(公网地址)
[r1-Tunnel0/0/0]destination 23.0.0.2 第五步定义封装内容,目标IP地址为建立隧道对端物理接口IP地址(公网地址)
[r1]ip route-static 192.168.2.0 24 192.168.3.2将陌生路由写入
[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip address 192.168.6.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre
[r1-Tunnel0/0/0]source 15.0.0.1
[r1-Tunnel0/0/0]description 45.0.0.1
[r1-Tunnel0/0/0]q
[r1]ip route-static 192.168.4.0 24 192.168.6.2
[r4]interface Tunnel 0/0/0
[r4-Tunnel0/0/0]ip address 192.168.6.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre
[r4-Tunnel0/0/0]source 45.0.0.1
[r4-Tunnel0/0/0]description 15.0.0.1
[r4-Tunnel0/0/0]q
[r4]ip route-static 192.168.1.0 24 192.168.6.1
配置mgre
中心的配置R1
[r1]interface Tunnel 0/0/1
[r1-Tunnel0/0/1]ip address 192.168.5.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]source 15.0.0.1
Jul 7 2024 21:44:06-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
<r2>system-view
[r2]interface Tunnel 0/0/1
[r2-Tunnel0/0/1]ip address 192.168.5.2 24
[r2-Tunnel0/0/1]tunnel-protocol gre p2mp
[r2-Tunnel0/0/1]source 25.0.0.1
Jul 7 2024 21:47:16-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/1 has entered the UP state.
[r2-Tunnel0/0/1]nhrp network-id 100
[r2-Tunnel0/0/1]nhrp entry 192.168.5.1 15.0.0.1 register
配置R3
<R3>system-view
[R3]interface Tunnel 0/0/1
[R3-Tunnel0/0/1]IP address 192.168.5.3 24
[R3-Tunnel0/0/1]tunnel-protocol gre p2mp
[R3-Tunnel0/0/1]source 35.0.0.1
[R3-Tunnel0/0/1]nhrp network-id 100
[R3-Tunnel0/0/1]nhrp entry 192.168.5.1 15.0.0.1 register
第五步:完成任务4
[r1]RIP 1
[r1-rip-1]version 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 15.0.0.0
[r1-rip-1]network 192.168.6.0
以上所有内容仅供参考,可能会出现错误
以上所有内容仅供参考,可能会出现错误
以上所有内容仅供参考,可能会出现错误
以上所有内容仅供参考,可能会出现错误
以上所有内容仅供参考,可能会出现错误
以上所有内容仅供参考,可能会出现错误