PPP
*PAP认证(r5-r1)
给予方
[r5-Serial3/0/0]remote address 10.0.0.1
获取方
[r1-Serial4/0/0]ip address ppp-negotiate
认证方
[r5-aaa]local-user admin password cipher 123456
[r5-aaa]local-user admin service-type ppp
[r5-Serial3/0/0]ppp authentication-mode pap
被认证方
[r1-Serial4/0/0]ppp pap local-user admin password cipher 123456
*chap认证(r5-r2)
给予方
[r5-Serial3/0/1]remote address 20.0.0.1
获取方
[r2-Serial4/0/0]ip address ppp-negotiate
认证方
[r5-Serial3/0/0]ppp authentication-mode chap
被认证方
[r2-Serial4/0/0]ppp chap user admin
[r2-Serial4/0/0]ppp chap password cipher 123456
HDLC封装(r5-r3)
R5
[r5]display interface Serial4/0/0
Link layer protocol is PPP
[r5-Serial4/0/0]link-protocol hdlc
Link layer protocol is nonstandard HDLC
[r5-Serial4/0/0]ip address 3.3.3.1 24
R3
[r3]display interface Serial 4/0/0
Link layer protocol is PPP
[r3-Serial4/0/0]link-protocol hdlc
Link layer protocol is nonstandard HDLC
[r3-Serial4/0/0]ip add 3.3.3.2 24
GRE配置(r1-r4)
1、创建隧道接口(两端都打通)
[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]
2、接口配置IP地址
[r1-Tunnel0/0/0]ip address 192.168.5.1 24
3、定义封装方式(GRE)
[r1-Tunnel0/0/0]tunnel-protocol gre
4、定义封装内容
[r1-Tunnel0/0/0]source 10.0.0.1
[r1-Tunnel0/0/0]destination 2.2.2.2
MGRE(r1-r2-r3)
NHRP ---下一条解析协议 -- 选一个IP的地址不会变的物理接口作为中心(NHS ---下一跳解析服务器)。--- HUB-SPOKE架构。
*中心(r1)MGRE配置
1、创建隧道接口(两端都打通)
[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]
2、接口配置IP地址
[r1-Tunnel0/0/0]ip address 192.168.6.1 24
3、定义封装方式(mGRE)
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
- 定义封装源IP
[r1-Tunnel0/0/0]source 10.0.0.1
5、创建NHRP域
[r1-Tunnel0/0/0]nhrp network-id 100
*分支(r2.r3)配置
1、创建隧道接口(两端都打通)
[r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]
2、接口配置IP地址
[r2-Tunnel0/0/0]ip address 192.168.6.2 24
3、定义封装方式(GRE)
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
4、定义封装源IP
[r2-Tunnel0/0/0]source Serial 4/0/0 -- 通过接口定义
5、加入中心创建NHRP域
[r2-Tunnel0/0/0]nhrp network-id 100
找中心上报映射信息
[r2-Tunnel0/0/0]nhrp entry 192.168.6.1 10.0.0.1 register
(先写中心隧道接口IP地址 再写中心物理接口IP地址)
[r1]display nhrp peer all -- 查看隧道接口和物理接口映射
RIP(r1.r2.r3.r4)
RIP协议
[r1]rip 1
[r1-rip-1]version 2
宣告
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.6.0
在中心r1上开启伪广播
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
RIP的水平分割
[r1-Tunnel0/0/0]undo rip split-horizon