网络类型实验报告

在这里插入图片描述

在这里插入图片描述

因为拨号要在两台电脑之间没有联通之前,所以我们先搭建拨号

r1:
int s4/0/0
[r1-Serial4/0/0]ip add 12.1.1.2 24
将r1接口类型改为hdlc协议
[r1-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
r2:
[r2]int s4/0/0
[r2-Serial4/0/0]ip add 12.1.1.1 24
将r2接口类型改为hdlc协议
[r2-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
配置r2环回
[r2-Serial4/0/0]int lo0
[r2-LoopBack0]ip add 2.2.2.2 24
[r2]int s4/0/1
[r2-Serial4/0/1]ip add 22.1.1.1 24
[r2-Serial4/0/1]q

配置s4/0/1主认证方

进入3a起拨号
[r2]aaa
[r2-aaa]local-user r23 privilege level 15 password cipher 123456
Info: Add a new user.
将拨号类型设置为ppp
[r2-aaa]local-user r23 service-type ppp
[r2-Serial3/0/0]int s4/0/1
将设置成pap协议
[r2-Serial4/0/1]ppp authentication-mode pap

配置s3/0/0主认证方

[r2]int s3/0/0
[r2-Serial3/0/0]ip add 32.1.1.1 24
[r2-Serial3/0/0]q
[r2]aaa
[r2-aaa]local-user r24 password cipher 654321
Info: Add a new user.
[r2-aaa]local-user r24 service-type ppp
[r2]int s3/0/0
这个是chap协议
[r2-Serial3/0/0]ppp authentication-mode chap

配置s4/0/1被认证方

r3:
[r3]int s4/0/0
[r3-Serial4/0/0]ip add 22.1.1.2 24
[r3-Serial4/0/0]ppp pap local-user r23 password cipher 123456

配置s3/0/0被认证方

r4:
[r4]int s4/0/0
[r4-Serial4/0/0]ip add 32.1.1.2 24
[r4-Serial4/0/0]ppp chap user r24
[r4-Serial4/0/0]ppp chap password cipher 654321

然后配置公网

r1:
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.1 24
[r1-GigabitEthernet0/0/1]q
[r1]ip route-static 0.0.0.0 0 12.1.1.1
r3:
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.2.1 24
[r3-GigabitEthernet0/0/1]q
[r3]ip route-static 0.0.0.0 0 22.1.1.1
r4:
[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.3.1 24
[r4-GigabitEthernet0/0/1]q
[r4]ip route-static 0.0.0.0 0 32.1.1.1
pc1:
192.168.1.2
255.255.255.0
192.168.1.1
pc2:
192.168.2.2
255.255.255.0
192.168.2.1
pc3:
192.168.3.2
255.255.255.0
192.168.3.1

再配置nhrp服务

中心站点配置

r1:
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 192.168.4.1 24
给接口设置为gre的多分支站点
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
配置报头的源地址
[r1-Tunnel0/0/0]source 12.1.1.2
将r1设置为中心服务站点
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
设置范围为100
[r1-Tunnel0/0/0]nhrp network-id 100

分支站点配置

r3:
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ip address 192.168.4.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
将分支站点的源地址设置为接口
[r3-Tunnel0/0/0]source Serial 4/0/0
让r3去向r1注册
[r3-Tunnel0/0/0]nhrp entry 192.168.4.1 12.1.1.2 register
[r3-Tunnel0/0/0]nhrp network-id 100
r4:
[r4]int Tunnel 0/0/0
[r4-Tunnel0/0/0]ip address 192.168.4.4 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp
[r4-Tunnel0/0/0]source Serial 4/0/0
[r4-Tunnel0/0/0]nhrp entry 192.168.4.1 12.1.1.2 register
[r4-Tunnel0/0/0]nhrp network-id 100

之后起rip服务

r1:
[r1]rip 1
[r1-rip-1]ver 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.4.0
r3:
[r3]rip 1
[r3-rip-1]ver 2
[r3-rip-1]network 192.168.2.0
[r3-rip-1]network 192.168.4.0
r4:
[r4]rip 1
[r4-rip-1]ver 2
[r4-rip-1]network 192.168.3.0
[r4-rip-1]network 192.168.4.0

最后配置nat

r1:
[r1]acl 2000
[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]nat outbound 2000
r3:
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r3-acl-basic-2000]int s4/0/0
[r3-Serial4/0/0]nat outbound 2000
r4:
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r4-acl-basic-2000]int s4/0/0
[r4-Serial4/0/0]nat outbound 2000

这样配置完成,实验完成了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值