GRE
[r3]ip route-static 0.0.0.0 0.0.0.0 23.1.1.1
[r1]ip route-static 0.0.0.0 0.0.0.0 12.1.1.2
r1上ping23.1.1.2
[r1]interface Tunnel0/0/0 创建隧道接口
[r1-Tunnel0/0/0]ip address 100.1.1.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre 定义使用通用路由封装
[r1-Tunnel0/0/0]source 12.1.1.1
[r1-Tunnel0/0/0]destination 23.1.1.2
[r3]interface Tunnel 0/0/0 创建隧道接口
[r3-Tunnel0/0/0]ip address 100.1.1.2 24
[r3-Tunnel0/0/0]tunnel-protocol gre 定义使用通用路由封装
[r3-Tunnel0/0/0]source 23.1.1.2
[r3-Tunnel0/0/0]destination 12.1.1.1
要想环回192.168.1.1 ping 192.168.2.1
[r1] ip route-static 192.168.2.0 255.255.255.0 Tunnel0/0/0
[r3]ip route-static 192.168.1.0 255.255.255.0 Tunnel0/0/0
ISP上没有192.168.和10.1.1.0网段,只有12.1.1.0 与23.1.1.0网段
MGRE
预先配地址写环回
[r1]ip route-static 0.0.0.0 0.0.0.0 14.1.1.2
[r2]ip route-static 0.0.0.0 0.0.0.0 24.1.1.2
[r3]ip route-static 0.0.0.0 0.0.0.0 34.1.1.2
可实现公网通r1可以ping24.1.1.1 34.1.1.1
Hdlc封装技术—修改网络类型
[r1]int s4/0/0
[r1-Serial4/0/0]link-protocol hdlc
[r4]int s4/0/0
[r4-Serial4/0/0]link-protocol
hdlc
R2与r4 pap认证
主认证方
[isp]aaa
[isp-aaa]local-user kaikai password cipher kaikai123
Info: Add a new user.
[isp-aaa]int s3/0/0
[isp-Serial3/0/0]link-protocol ppp
[isp-Serial3/0/0]ppp authentication-mode pap
被认证方
[r2]int s4/0/0
[r2-Serial4/0/0]link-protocol ppp
[r2-Serial4/0/0]ppp pap local-user kaikai password cipher kaikai123
R2与r3 chap认证 主认证方
[isp]aaa
[isp-aaa]local-user meimei password cipher meimei123
Info: Add a new user.
[isp-aaa]local-user meimei service-type ppp
[isp]int s4/0/1
[isp-Serial4/0/1]link-protocol ppp
[isp-Serial4/0/1]ppp authentication-mode chap
被认证方
[r3]int s4/0/0
[r3-Serial4/0/0]link-protocol ppp
[r3-Serial4/0/0]ppp chap user meimei
[r3-Serial4/0/0]ppp chap password cipher meimei123
中心站点配置
[r1]int t0/0/0 创建tunnel口
[r1-Tunnel0/0/0]ip address 10.1.1.1 24 配置接口ip地址
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp 先修改接口模式为多点GRE
[r1-Tunnel0/0/0]source 14.1.1.1 再定义公有的源IP地址
[r1-Tunnel0/0/0]nhrp entry multicast dynamic 本地成为NHRP中心,同时可以进行伪广播
[r1-Tunnel0/0/0]nhrp network-id 100
默认为0号,该网段内所有节点tunnel接口必须为相同域
[r2]int t0/0/0
[r2-Tunnel0/0/0]ip address 10.1.1.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source s4/0/0
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp entry 10.1.1.1 14.1.1.1 register
[r3]interface t0/0/0
[r3-Tunnel0/0/0]ip address 10.1.1.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source s4/0/0
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry 10.1.1.1 14.1.1.1 register
Rip配置让环回通
[r1]rip 1
[r1-rip-1]version 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 10.0.0.0
[r2]rip 1
[r2-rip-1]version 2
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 10.0.0.0
[r3]rip 1
[r3-rip-1]version 2
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 10.0.0.0
Rip 的水平分割,从此口进不从此口出。
故须
[r1]int t0/0/0
[r1-Tunnel0/0/0]undo rip split-horizon