一.实验拓扑图

二.实验要求
1. R6为isp,接口IP地址均为公有地址;该设备只能配置IP地址,之后不能再对其进行任何配置;
2. R1-R5为局域网,私有IP地址192.168.1.0/24,请合理分配;
3. R1,R2,R4,各有两个环回地址;R5,R6各有一个环回地址;所有路由器上环回均代表连接用户的接口;
4. R3下的两台PC通过DHCP自动获取IP地址;
5. 选路最佳,路由表尽量小,避免环路;
6. R1-R5均可以访问R6的环回;
7. R6telnetR5的公有IP地址时,实际登录到R1上;
8. R4与R5正常通过1000M链路,故障时通过100M链路;
三.实验步骤
1.划分网段
192.168.1.0/24
192.168.1.0000 0000/24
192.168.1.0/27-----骨干
R1-R2:192.168.1.0000 0000/30----192.168.1.0/30
R2-R4:192.168.1.0000 0100/30----192.168.1.4/30
R3-R4:192.168.1.0000 1000/30----192.168.1.8/30
R1-R3:192.168.1.0000 1100/30----192.168.1.12/30
R4-R5:192.168.1.0001 0000/30----192.168.1.16/30
R4-R5:192.168.1.0001 0100/30----192.168.1.20/30
R1环回:192.168.1.001 00000/27----192.168.1.32/27
192.168.1.001 0 0000/28----192.168.1.32/28
192.168.1.001 1 0000/28----192.168.1.48/28
R2环回:192.168.1.010 00000/27----192.168.1.64/27
192.168.1.0100 0000/28----192.168.1.64/28
192.168.1.0101 0000/28----192.168.1.80/28
R4环回:192.168.1.011 00000/27----192.168.1.96/27
192.168.1.0110 0000/28----192.168.1.96/28
192.168.1.0111 0000/28----192.168.1.112/28
R5环回:192.168.1.100 00000/27----192.168.1.128/27
R3-LW1:192.168.1.101 00000/27--192.168.1.160/27
2.配置ip
R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.130
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add192.168.1.13 30
[R1]interface LoopBack 0
[R1-LoopBack0]ip add 192.168.1.33 28
[R1]interface LoopBack 1
[R1-LoopBack1]ip add 192.168.1.49 28
R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.1.230
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.1.530
[R2]interface LoopBack 0
[R2-LoopBack0]ip add 192.168.1.65 28
[R2]interface LoopBack 1
[R2-LoopBack1]ip add 192.168.1.81 28
R3
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add192.168.1.14 30
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 192.168.1.930
[R3-GigabitEthernet0/0/1]int g0/0/2
[R3-GigabitEthernet0/0/2]ip add192.168.1.161 27
R4
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.1.630
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add192.168.1.10 30
[R4-GigabitEthernet0/0/1]int g0/0/2
[R4-GigabitEthernet0/0/2]ip add192.168.1.17 30
[R4-GigabitEthernet0/0/2]int g4/0/0
[R4-GigabitEthernet4/0/0]ip add192.168.1.21 30
[R4]interface LoopBack 0
[R4-LoopBack0]ip add 192.168.1.97 28
[R4]interface LoopBack 1
[R4-LoopBack1]ip add 192.168.1.113 28
R5
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add192.168.1.18 30
[R5-GigabitEthernet0/0/0]int g0/0/2
[R5-GigabitEthernet0/0/2]ip add192.168.1.22 30
[R5-GigabitEthernet0/0/2]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 12.0.0.1 24
[R5]interface LoopBack 0
[R5-LoopBack0]ip add 192.168.1.129 27
R6
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[R6]interface LoopBack 0
[R6-LoopBack0]ip add 1.1.1.1 24
3.配置静态路由
R1
[R1]ip route-static 192.168.1.32 27192.168.1.2
[R1]ip route-static 192.168.1.4 30192.168.1.2
[R1]ip route-static 192.168.1.96 27192.168.1.2
[R1]ip route-static 192.168.1.96 27192.168.1.14
[R1]ip route-static 192.168.1.16 30192.168.1.2
[R1]ip route-static 192.168.1.16 30192.168.1.14
[R1]ip route-static 192.168.1.20 30192.168.1.2
[R1]ip route-static 192.168.1.20 30192.168.1.14
[R1]ip route-static 192.168.1.8 30192.168.1.14
[R1]ip route-static 192.168.1.160 27192.168.1.14
[R1]ip route-static 192.168.1.128 27192.168.1.2
[R1]ip route-static 192.168.1.128 27192.168.1.14
R2
[R2]ip route-static 192.168.1.96 27192.168.1.6
[R2]ip route-static 192.168.1.16 30192.168.1.6
[R2]ip route-static 192.168.1.20 30192.168.1.6
[R2]ip route-static 192.168.1.128 27192.168.1.6
[R2]ip route-static 192.168.1.8 30192.168.1.6
[R2]ip route-static 192.168.1.160 27192.168.1.6
[R2]ip route-static 192.168.1.160 27192.168.1.1
[R2]ip route-static 192.168.1.12 30192.168.1.1
[R2]ip route-static192.168.1.32 27 192.168.1.1
R3
[R3]ip route-static 192.168.1.32 27192.168.1.13
[R3]ip route-static 192.168.1.0 30192.168.1.13
[R3]ip route-static 192.168.1.64 27192.168.1.13
[R3]ip route-static 192.168.1.64 27 192.168.1.10
[R3]ip route-static 192.168.1.4 30192.168.1.10
[R3]ip route-static 192.168.1.96 27192.168.1.10
[R3]ip route-static 192.168.1.16 30192.168.1.10
[R3]ip route-static 192.168.1.20 30192.168.1.10
[R3]ip route-static 192.168.1.128 27192.168.1.10
R4
[R4]ip route-static 192.168.1.160 27192.168.1.9
[R4]ip route-static 192.168.1.12 30192.168.1.9
[R4]ip route-static 192.168.1.32 27192.168.1.9
[R4]ip route-static 192.168.1.32 27192.168.1.5
[R4]ip route-static 192.168.1.0 30192.168.1.5
[R4]ip route-static 192.168.1.64 27192.168.1.5
[R4]ip route-static192.168.1.128 27 192.168.1.18
[R4]ip route-static192.168.1.128 27 192.168.1.22
R5
[R5]ip route-static 192.168.1.96 27192.168.1.17
[R5]ip route-static 192.168.1.96 27192.168.1.21
[R5]ip route-static 192.168.1.8 30192.168.1.17
[R5]ip route-static 192.168.1.8 30192.168.1.21
[R5]ip route-static 192.168.1.160 27192.168.1.17
[R5]ip route-static 192.168.1.160 27192.168.1.21
[R5]ip route-static 192.168.1.12 30192.168.1.17
[R5]ip route-static 192.168.1.12 30192.168.1.21
[R5]ip route-static 192.168.1.32 27192.168.1.17
[R5]ip route-static 192.168.1.32 27192.168.1.21
[R5]ip route-static 192.168.1.0 30192.168.1.17
[R5]ip route-static 192.168.1.0 30192.168.1.21
[R5]ip route-static 192.168.1.64 27 192.168.1.17
[R5]ip route-static 192.168.1.64 27192.168.1.21
[R5]ip route-static192.168.1.4 30 192.168.1.17
[R5]ip route-static192.168.1.4 30 192.168.1.21
测试:

4.配置DHCP
[R3]ip pool aa
[R3-ip-pool-aa]network 192.168.1.160 mask27
[R3-ip-pool-aa]gateway-list 192.168.1.161
[R3-ip-pool-aa]dns-list 114.114.114.1148.8.8.8
[R3-ip-pool-aa]dhcp enable
[R3]int g0/0/2
[R3-GigabitEthernet0/0/2]dhcp select global

5.配置telnet
[R1]aaa
[R1-aaa]local-user zhangsan privilege level15 password cipher zhangsan
[R1-aaa]local-user zhangsan service-typetelnet
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
测试:

6.R5上配置acl,允许192.168.1.0/24
[R5]acl 2000
[R5-acl-basic-2000]rule permit source192.168.1.0 0.0.0.255
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]natoutbound 2000
7.配置缺省
[R1]ip route-static0.0.0.0 0 192.168.1.2
[R1]ip route-static0.0.0.0 0 192.168.1.14
[R2]ip route-static 0.0.0.0 0 192.168.1.6
[R3]ip route-static 0.0.0.0 0 192.168.1.10
[R4]ip route-static0.0.0.0 0 192.168.1.18
[R4]ip route-static0.0.0.0 0 192.168.1.22
[R5]ip route-static0.0.0.0 0 12.0.0.2
测试:

8.配置端口映射
[R5]nat server protocol tcp globalcurrent-interface 23 inside 192.168.1.1 23
9.配置浮动路由
[R4]ip route-static 0.0.0.0 0 192.168.1.22preference 61
[R5]ip route-static 0.0.0.0 0 192.168.1.21preference 61
10.避免环路
[R1]ip route-static 192.168.1.32 27 null0
[R2]ip route-static 192.168.1.64 27 null0
[R4]ip route-static 192.168.1.96 27 null0