1.需求分析:
r6为ISP,所以r6为公网地址,r5左边为私网地址
r5左边将IP地址192.168.1.0/24进行分配
r1,r2,r4上面有两个环回地址
可进行IP地址划分
如下图所示:
第二步,完成拓扑后,给路由器配IP地址:
r1:
r2:
r3:
r4:
r5:
r6:
用DHCP协议让r3为下面的pc端下放IP地址
[r3]dhcp enable
[r3]ip pool dsy
[r3-ip-pool-dsy]netbios-type
[r3-ip-pool-dsy]network 192.168.1.16 mask 30
[r3-ip-pool-dsy]gateway-list 192.168.1.17
[r3-ip-pool-dsy]dns-list 8.8.8.8
然后配置静态路由
r1:
[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.2
[r1]ip route-static 192.168.1.128 27192.168.1.6
[r1]ip route-static192.168.1.16 30 192.168.1.2
[r1]ip route-static192.168.1.20 30 192.168.1.6
r1]ip route-static192.168.1.96 27 192.168.1.6
r2:
[R2]ip route-static 0.0.0.0 0 192.168.1.10
[R2]ip route-static 192.168.1.32 27 192.168.1.1【R1环回】
[R2]ip route-static 192.168.1.4 30 192.168.1.1
r3:
[R3]ip route-static 0.0.0.0 0 192.168.1.14
[R3]ip route-static 192.168.1.32 27 192.168.1.5【R1环回】
[R3]ip route-static 192.168.1.0 30 192.168.1.5
r4:
[R4]ip route-static 0.0.0.0 0 192.168.1.18
[R4]ip route-static 0.0.0.0 0 192.168.1.22 preference 70 【修改优先级】
[R4]ip route-static 192.168.1.0 30 192.168.1.9
[R4]ip route-static 192.168.1.64 27 192.168.1.9【R2环回】
[R4]ip route-static 192.168.1.4 30 192.168.1.13
[R4]ip route-static 192.168.1.32 27 192.168.1.13【R1环回】
[R4]ip route-static 192.168.1.96 27 192.168.1.13【R3 pool】
r5:
[R5]ip route-static 192.168.1.0 24 192.168.1.17
[R5]ip route-static 192.168.1.0 24 192.168.1.21 preference 70【修改优先级】
[R5]ip route-static 0.0.0.0 0 12.0.0.2【缺省路由】
结果:不通