思路及配置如下
1、配环回和IP地址(R4、R8不配环回)
2、检验地址配置(R4、R8测试各路连接)
3、配置左边的MGR网络(R1、R2、R3、R4)
(1)R1、R2、R3配置缺省
(2)检验下缺省
(3)启用Tunnel
【R1】
[R1]int Tunnel 0/0/0
[R1-Tunnel0/0/0]ip address 100.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 14.1.1.1
启用nhrp
[R1-Tunnel0/0/0]nhrp network-id 100
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
【R2】
[R2]int Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 100.1.1.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source 24.1.1.1
启用nhrp
[R2-Tunnel0/0/0]nhrp network-id 100
[R2-Tunnel0/0/0]nhrp entry 100.1.1.1 14.1.1.1 register
【R3】
[R3]int t 0/0/0
[R3-Tunnel0/0/0]ip address 100.1.1.3 24
[R3-Tunnel0/0/0]source 34.1.1.1
启用nhrp
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry 100.1.1.1 14.1.1.1 register
(4)查看我们的配置并检验
[R1]display nhrp peer all
[R1]ping 100.1.1.1
PING 100.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 100.1.1.1: bytes=56 Sequence=1 ttl=255 time=20 ms
Reply from 100.1.1.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 100.1.1.1: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 100.1.1.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 100.1.1.1: bytes=56 Sequence=5 ttl=255 time=1 ms
[R1]ping 100.1.1.2 PING 100.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 100.1.1.2: bytes=56 Sequence=1 ttl=255 time=50 ms
Reply from 100.1.1.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 100.1.1.2: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 100.1.1.2: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 100.1.1.2: bytes=56 Sequence=5 ttl=255 time=30 ms
[R1]ping 100.1.1.2 PING 100.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 100.1.1.2: bytes=56 Sequence=1 ttl=255 time=50 ms
Reply from 100.1.1.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 100.1.1.2: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 100.1.1.2: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 100.1.1.2: bytes=56 Sequence=5 ttl=255 time=30 ms
4、配置R3、R5之间的PPP双向认证
【R3】
[R3]int s4/0/0
[R3-Serial4/0/0]link-protocol ppp
[R3]aaa
[R3-aaa]local-user hello password cipher cisco
[R3-aaa]local-user hello service-type ppp
进行认证
[R3]interface s4/0/0
[R3-Serial4/0/0]ppp authentication-mode chap
[R3-Serial4/0/0]shutdown
[R3-Serial4/0/0]undo shutdown
查看
[R3-Serial4/0/0]display ip interface brief
我们的35.1.1.1/24处于up down状态
【R5】
启用认证
[R5]int s4/0/0
[R5-Serial4/0/0]ppp chap user hello
[R5-Serial4/0/0]ppp chap password cipher cisco
再次到R3查看状态
[R3-Serial4/0/0]dis ip int br
此时35.1.1.1/24处于up up状态(没有up的话就shutdown重启)
此时要做双向认证,所有R5上也要做
【R5】
[R5]aaa
[R5-aaa]local-user world password cipher cisco123
[R5-aaa]local-user world service-type ppp
[R5]int s4/0/0
[R5-Serial4/0/0]ppp authentication-mode chap
查看我们的接口状态
[R5-Serial4/0/0]dis ip int br
我们的35.1.1.2/24并没有启动起来
这时我们需要去R3上面斤进行配置
【R3】
[R3]int Serial 4/0/0
[R3-Serial4/0/0]ppp chap user world
[R3-Serial4/0/0]ppp chap password cipher cisco123
R3、R5都shundown重启下
此时我们的35.1.1.2/24处于双up状态
5、配置右边的MGRE区域(R5、R6、R7、R8)
(1)先配缺省
【R5】
[R5]ip route-static 0.0.0.0 0.0.0.0 58.1.1.2
【R6】
[R6]ip route-static 0.0.0.0 0 68.1.1.2
【R7】
[R7]ip route-static 0.0.0.0 0 78.1.1.2
(2)进行测试
<R5>ping 68.1.1.1
PING 68.1.1.1: 56 data bytes, press CTRL_C to break Reply from
68.1.1.1: bytes=56 Sequence=1 ttl=254 time=60 ms Reply from
68.1.1.1: bytes=56 Sequence=2 ttl=254 time=20 ms Reply from
68.1.1.1: bytes=56 Sequence=3 ttl=254 time=20 ms Reply from
68.1.1.1: bytes=56 Sequence=4 ttl=254 time=20 ms Reply from
68.1.1.1: bytes=56 Sequence=5 ttl=254 time=30 ms
<R5>ping 78.1.1.1
PING 78.1.1.1: 56 data bytes, press CTRL_C to break Reply from
78.1.1.1: bytes=56 Sequence=1 ttl=254 time=20 ms Reply from
78.1.1.1: bytes=56 Sequence=2 ttl=254 time=20 ms Reply from
78.1.1.1: bytes=56 Sequence=3 ttl=254 time=30 ms Reply from
78.1.1.1: bytes=56 Sequence=4 ttl=254 time=30 ms Reply from
78.1.1.1: bytes=56 Sequence=5 ttl=254 time=20 ms
(3)在R5、R6、R7之间启动MGRE
【R5】
[R5]int t0/0/0
[R5-Tunnel0/0/0]ip address 200.1.1.1 24
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp
[R5-Tunnel0/0/0]source 58.1.1.1
启用nhrp
[R5-Tunnel0/0/0]nhrp network-id 200
[R5-Tunnel0/0/0]nhrp entry multicast dynamic
【R6】
[R6]int t0/0/0
[R6-Tunnel0/0/0]ip address 200.1.1.2 24
[R6-Tunnel0/0/0]tunnel-protocol gre p2mp
[R6-Tunnel0/0/0]source 68.1.1.1
启用nhrp
[R6-Tunnel0/0/0]nhrp network-id 200
[R6-Tunnel0/0/0]nhrp entry 200.1.1.1 58.1.1.1 register
【R7】
[R7]int t0/0/0
[R7-Tunnel0/0/0]ip address 200.1.1.3 24
[R7-Tunnel0/0/0]tunnel-protocol gre p2mp
[R7-Tunnel0/0/0]source 78.1.1.1
启用nhrp
[R7-Tunnel0/0/0]nhrp network-id 200
[R7-Tunnel0/0/0]nhrp entry 200.1.1.1 58.1.1.1 register
(4)检验下我们的配置
[R5]dis nhrp peer all
<R6>ping 200.1.1.1 PING 200.1.1.1: 56 data bytes, press CTRL_C to break
Reply from200.1.1.1: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from200.1.1.1: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from200.1.1.1: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from200.1.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from200.1.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms
<R6>ping 200.1.1.3 PING 200.1.1.3: 56 data bytes, press CTRL_C to break
Reply from200.1.1.3: bytes=56 Sequence=1 ttl=255 time=70 ms
Reply from200.1.1.3: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from200.1.1.3: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from200.1.1.3: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from200.1.1.3: bytes=56 Sequence=5 ttl=255 time=20 ms
6、启用OSPF协议
【R1】
[R1]ospf 100 router-id 91.1.1.1
[R1-ospf-100-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[R1-ospf-100-area-0.0.0.0]network 100.1.1.1 0.0.0.0
[R1-ospf-100-area-0.0.0.0]int lo0
[R1-LoopBack0]ospf network-type broadcast
[R1-LoopBack0]int t0/0/0
[R1-Tunnel0/0/0]ospf network-type broadcast
【R2】
[R2]ospf 100 router-id 92.2.2.2
[R2-ospf-100-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-100-area-0.0.0.0]network 100.1.1.2 0.0.0.0
[R2-ospf-100-area-0.0.0.0]int lo0
[R2-LoopBack0]ospf network-type broadcast
[R2-LoopBack0]int t0/0/0
[R2-Tunnel0/0/0]ospf network-type broadcast
【R3】
[R3]ospf 100 router-id 93.3.3.3
[R3-ospf-100]area 0
[R3-ospf-100-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-ospf-100-area-0.0.0.0]network 100.1.1.3 0.0.0.0
[R3-ospf-100-area-0.0.0.0]network 35.1.1.1 0.0.0.0
[R3-ospf-100-area-0.0.0.0] int lo0
[R3-LoopBack0]ospf network-type broadcast
[R3-LoopBack0]int t0/0/0 [R3-Tunnel0/0/0]ospf network-type broadcast
【R5】
[R5]ospf 100
[R5]ospf 100 router-id 95.5.5.5
[R5-ospf-100]area 0
[R5-ospf-100-area-0.0.0.0]network 35.1.1.2 0.0.0.0
调整优先级
【R1】
[R1]int t 0/0/0
[R1-Tunnel0/0/0]ospf dr-priority 100
【R2】
[R2]int t 0/0/0
[R2-Tunnel0/0/0]ospf dr-priority 0
【R3】
[R3]int t 0/0/0 [R3-Tunnel0/0/0]ospf dr-priority 0
R1、R2、R3的tunnel接口都shundown重启一下
等待邻居关系建立
测试一下R2、R3环回的通信
7、启用RIP协议(R5-R6-R7-R8)
【R5】
[R5]rip 100
[R5-rip-100]version 2
[R5-rip-100]network 5.0.0.0
[R5-rip-100]network 200.1.1.0
【R6】
[R6]rip 100
[R6-rip-100]version 2
[R6-rip-100]network 6.0.0.0
[R6-rip-100]network 200.1.1.0
【R7】
[R7]rip 100
[R7-rip-100]version 2
[R7-rip-100]network 7.0.0.0
[R7-rip-100]network 200.1.1.0