IP地址网段划分
需要6个网段,所以192.168.1.0/24划分为8个网段
192.168.1.0/27
192.168.1.0/30 192.168.1.4/30 192.168.1.8/30 192.168.1.12/30
192.168.1.16/30 192.168.1.20/30 192.168.1.24/30 192.168.1.28/30
192.168.1.32/27
192.168.1.32/38 192.168.1.48/28
192.168.1.64/27
192.168.1.64/28 192.168.1.80/28
192.168.1.96/27
192.168.1.128/27
192.168.1.128/28 192.168.1.144/282
192.168.1.160/27
192.168.1.192/27
192.168.1.224/27
配置好网段后,让pc通过dhcp自动获取IP地址
配置r3
然后让pc自动获取ip地址
写缺省路由
[r1]ip route-static 0.0.0.0 0 192.168.1.2
[r1]ip route-static 0.0.0.0 0 192.168.1.6
[r2]ip route-static 0.0.0.0 0 192.168.1.10
[r3]ip route-static 0.0.0.0 0 192.168.1.14
[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 61
[r5]ip route-static 0.0.0.0 0 56.1.1.2
完善,写静态路由
[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.96 27 192.168.1.6
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.4 30 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.10
[r3]ip route-static 192.168.1.32 27 192.168.1.5
[r3]ip route-static 192.168.1.0 30 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.5
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r4]ip route-static 192.168.1.64 27 192.168.1.9
[r4]ip route-static 192.168.1.0 30 192.168.1.9
[r4]ip route-static 192.168.1.4 30 192.168.1.13
[r4]ip route-static 192.168.1.96 27 192.168.1.13
[r4]ip route-static 192.168.1.32 27 192.168.1.9
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r5]ip route-static 192.168.1.32 27 192.168.1.17
[r5]ip route-static 192.168.1.64 27 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.17
[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip route-static 192.168.1.0 30 192.168.1.17
[r5]ip route-static 192.168.1.4 30 192.168.1.17
[r5]ip route-static 192.168.1.8 30 192.168.1.17
[r5]ip route-static 192.168.1.12 30 192.168.1.17
[r5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.21 p61
[r5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.21 p 61
[r5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.21 p 61
[r5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.21 p 61
[r5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.21 p 61
[r5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.21 p 61
[r5]ip route-static 192.168.1.96 255.255.255.224 192.168.1.21 p 61
[r5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.21 p 61
在r5上配置nat
[r5]acl 2000
[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r5-acl-basic-2000]int g0/0/1
[r5-GigabitEthernet0/0/1]nat outbound 2000
使pc可以ping通r6
配置空接口,避免环路,将r1,r2,r4的环回汇总,写为空接口
通过端口映射,使r6登录r1
[r5]int g0/0/1
[r5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23
inside 192.168.1.33 23
完成实验