建一个网站的费用媒体发布平台
物理拓扑图如下:
路由器R4的处理,其实在R4上加一条下一跳是1.4的缺省就行!!
接下来我们来看看实验要求:
1.使用MGRE 将R1/R3的私有网络号合成一个网络
2.R1和R5之间进行ppp的pap认证,R5为主认证方
3.R2和R5之间进行ppp的chap认证(基于主机名),R5为主认证方
4.R3和R5之间进行ppp的chap认证(不基于主机名),R5是主认证方
实验要求分析:
- 首先我们要选一个中心站点,此实验我选择R1!R2和R3为分支站点!
2.这里主要讲一下将其合成一个网络的命令的含义:
先说中心站点:
r1(config)#interface tunnel 0
//创建一个隧道接口0,其实隧道接口和物理接口一样
r1(config-if)#ip address 10.1.1.1 255.255.255.0
//因为它和物理接口一样所以它应该也要有IP地址
r1(config-if)#tunnel source serial 1/2
//这里我们可以理解为挖隧道,从s1/2口开始挖
r1(config-if)#tunnel mode gre multipoint
//因为我们要合成一个网络,所以目的地是多个,这里的multipoint相当于就是目的地多个的意思
r1(config-if)#ip nhrp map multicast dynamic
//这里就是可以理解为将这个站点设置成nhrp的sever
r1(config-if)#ip nhrp network-id 100
//这里就是创建一个编号为100的组,等其他分支站点加进来
r1(config)#interface tunnel 0
r1(config-if)#no ip split-horizon eigrp 90
//在中心站点作这个命令,关闭eigrp默认开启的水平分割
分支站点:
r2(config)#interface tunnel 0
r2(config-if)#ip address 10.1.1.2 255.255.255.0
r2(config-if)#tunnel source serial 1/2
r2(config-if)#tunnel mode gre multipoint
//上面解释请看中心站点
r2(config-if)#ip nhrp nhs 10.1.1.1
//告诉此分支站点,nhrp的服务器是在哪里,我们通过中心站点的tunnel接口地址来告诉它
r2(config-if)#ip nhrp map 10.1.1.1 15.1.1.1
//我们告诉它了tunnel接口地址,还得告诉它中心站点的物理接口地址
r2(config-if)#ip nhrp network-id 100
//加入进中心站点创建的编号为100的组(伪广播时就会给组中所有站点都伪广播一次)
r2(config-if)#ip nhrp map multicast 15.1.1.1
//在分支站点敲这个命令,当分支站点以组播或广播的IP为目标IP时,直接转成15.1.1.1这个ip地址
启动eigrp协议:
注意启动协议的时候宣告的网段,不要宣告外网网段,只宣告内网网段和隧道网段(因为你是让它走隧道而不是外网)
注意:每个有内网网段的还要写到外网的缺省!!!
下面是我的各个路由器的主要配置,大家可以参考一下:
R1:
hostname R1
!
interface Tunnel0
ip address 10.1.1.1 255.255.255.0
no ip redirects
ip nhrp map multicast dynamic
ip nhrp network-id 100
no ip split-horizon eigrp 90
tunnel source Serial1/1
tunnel mode gre multipoint
!
interface Serial1/0
ip address 192.168.1.4 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 15.1.1.1 255.255.255.0
encapsulation ppp
serial restart-delay 0
ppp pap sent-username xixi password 0 haha
!
router eigrp 90
network 10.0.0.0
network 192.168.1.0
auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 15.1.1.2
R2:
hostname R2
!
username r5 password 0 haha
username ccna password 0 haha
archive
log config
hidekeys
interface Loopback0
ip address 192.168.2.1 255.255.255.0
!
interface Tunnel0
ip address 10.1.1.2 255.255.255.0
no ip redirects
ip nhrp map 10.1.1.1 15.1.1.1
ip nhrp map multicast 15.1.1.1
ip nhrp network-id 100
ip nhrp nhs 10.1.1.1
tunnel source Serial1/1
tunnel mode gre multipoint
!
interface Serial1/1
ip address 25.1.1.2 255.255.255.0
encapsulation ppp
serial restart-delay 0
!
router eigrp 90
network 10.0.0.0
network 192.168.2.0
auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 25.1.1.1
!
R3:
hostname R3
!
username r3 password 0 haha
archive
log config
hidekeys
!
interface Loopback0
ip address 192.168.3.1 255.255.255.0
!
interface Tunnel0
ip address 10.1.1.3 255.255.255.0
no ip redirects
ip nhrp map multicast 15.1.1.1
ip nhrp map 10.1.1.1 15.1.1.1
ip nhrp network-id 100
ip nhrp nhs 10.1.1.1
tunnel source Serial1/0
tunnel mode gre multipoint
!
interface Serial1/0
ip address 35.1.1.2 255.255.255.0
encapsulation ppp
serial restart-delay 0
ppp chap hostname ccna
ppp chap password 0 haha
!
router eigrp 90
network 10.0.0.0
network 192.168.3.0
auto-summary
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 35.1.1.1
!
R4:
hostname R4
!
archive
log config
Hidekeys
!
interface Serial1/0
ip address 192.168.1.5 255.255.255.0
serial restart-delay 0
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.1.4
!
R5:
hostname R5
!
username xixi password 0 haha
username r5 password 0 haha
username r2 password 0 haha
username ccna password 0 haha
archive
log config
hidekeys
!
!
interface Serial1/0
ip address 15.1.1.2 255.255.255.0
encapsulation ppp
serial restart-delay 0
ppp authentication pap
!
interface Serial1/1
ip address 25.1.1.1 255.255.255.0
encapsulation ppp
serial restart-delay 0
ppp authentication chap
!
interface Serial1/2
ip address 35.1.1.1 255.255.255.0
encapsulation ppp
serial restart-delay 0
ppp authentication chap
!
总结:
此题巩固了我对MGRE的工作原理的认知,了解到了MGRE和动态路由协议的结合方式和需要注意什么!!还让我了解到了ppp的pap认证和chap的明文认证和挑战认证之间的区别!!