一、实验要求
1、R6为ISP,接口IP地址均为公有地址,该设备只能配置IP地址,之后不能再对其进行任何配置
2、R1-R5为局域网,私有IP地址192.168.1.0/24,请合理分配;
3、R1、R2、R4,各有两个环回IP地址;R5,R6各有一个环回地址;所有路由器上环回均代表连接用户的接口
4、R3下面的两台Pc通过DHCP自动获取IP地址;
5、选路最佳,路由表尽量小,避免环路;
6、R1-R5均可以访问R6的环回;
7、在R1上配置telnet服务,使R6能通过R5的公有地址telnet到R1上;
8、R4与R5正常通过1000M链路,故障时通过100M链路;
二、实验拓扑图
三、实验思路
1、配置IP地址部分、并配置DHCP、telnet服务
2、配置静态路由,并且汇总和配置缺省路由,由于R4和R5是浮动路由,配置静态路由时修改100M链路的优先级为61
3、R1、R2、R4由于汇总,容易出现路由黑洞,做空接口防环处理,实现私网互通
4、私网内的设备通过在R5上配置EASY IP访问互联网。实现公私网互通
5、R5配置NAT SERVER把Telnet的Telnet服务发布到公网上,使ISP可以访问
四、实验步骤
1)配置接口ip地址
R1:
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.1.5 30
[r1-LoopBack1]int l0
[r1-LoopBack0]ip add 192.168.1.33 28
[r1-LoopBack0]int l1
[r1-LoopBack1]ip add 192.168.1.49 28
R2:
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.1.9 30
[r2-LoopBack0]ip add 192.168.1.65 28
[r2-LoopBack0]int l1
[r2-LoopBack1]ip add 192.168.1.81 28
R3:
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.1.6 30
[r3-GigabitEthernet0/0/0]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.1.13 30
[r3-GigabitEthernet0/0/1]int g0/0/2
[r3-GigabitEthernet0/0/2]ip add 192.168.1.97 27
R4:
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.1.14 30
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.1.10 30
[r4-GigabitEthernet0/0/1]int g0/0/2
[r4-GigabitEthernet0/0/2]ip add 192.168.1.17 30
[r4-GigabitEthernet0/0/2]int g4/0/0
[r4-GigabitEthernet4/0/0]ip add 192.168.1.21 30
[r4-GigabitEthernet4/0/0]int l0
[r4-LoopBack0]ip add 192.168.1.129 28
[r4-LoopBack0]int l1
[r4-LoopBack1]ip add 192.168.1.145 28
R5:
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.1.18 30
[r5-GigabitEthernet0/0/0]int g0/0/1
[r5-GigabitEthernet0/0/1]ip add 192.168.1.22 30
[r5-GigabitEthernet0/0/1]int g0/0/2
[r5-GigabitEthernet0/0/2]ip add 12.0.0.1 24
[r5]int l0
[r5-LoopBack0]ip add 192.168.1.161 27
r6:
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[r6-GigabitEthernet0/0/0]int l0
[r6-LoopBack0]ip add 1.0.0.1 24
2)配置telnet和DHCP服务
telnet:
[r1]aaa
[r1-aaa]local-user long password cipher 123456 privilege level 15
[r1-aaa]local-user long service-type telnet
[r1]user-interface vty 0 4
[r1-ui-vty0-4]authentication-mode aaa
DHCP:
[r3]dhcp enable
[r3]ip pool aa
[r3-ip-pool-aa]network 192.168.1.96 mask 27
[r3-ip-pool-aa]gateway-list 192.168.1.97
[r3-ip-pool-aa]dns-list 114.114.114.114
[r3-ip-pool-aa]int g0/0/2
[r3-GigabitEthernet0/0/2]dhcp select global
3)配置缺省路由,并且进行汇总、配置缺省和空接口防环
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 27 192.168.1.6
[r1]ip route-static 192.168.1.16 30 192.168.1.2
[r1]ip route-static 192.168.1.160 27 192.168.1.2
[r1]ip route-static 192.168.1.20 30 192.168.1.2
[r1]ip route-static 192.168.1.16 30 192.168.1.6
[r1]ip route-static 192.168.1.160 27 192.168.1.6
[r1]ip route-static 192.168.1.20 30 192.168.1.6
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[r1]ip route-static 192.168.1.96 27 192.168.1.6
[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
[r1]ip route-static 192.168.1.32 27 NULL 0 #空接口防环
R2:
[r2]ip route-static 192.168.1.128 27 192.168.1.10
[r2]ip route-static 192.168.1.16 30 192.168.1.10
[r2]ip route-static 192.168.1.160 27 192.168.1.10
[r2]ip route-static 192.168.1.20 30 192.168.1.10
[r2]ip route-static 192.168.1.12 30 192.168.1.10
[r2]ip route-static 192.168.1.96 27 192.168.1.10
[r2]ip route-static 192.168.1.96 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.32 27 192.168.1.1
[r2]ip route-static 192.168.1.64 27 NULL 0 #空接口防环
[r2]ip route-static 0.0.0.0 0 192.168.1.10 #缺省
R3:
[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.8 30 192.168.1.14
[r3]ip route-static 192.168.1.128 27 192.168.1.14
[r3]ip route-static 192.168.1.16 30 192.168.1.14
[r3]ip route-static 192.168.1.160 27 192.168.1.14
[r3]ip route-static 192.168.1.20 30 192.168.1.14
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip route-static 0.0.0.0 0 192.168.1.14 #缺省
R4:
[r4]ip route-static 192.168.1.160 27 192.168.1.18
[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
[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
[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.160 27 192.168.1.22 pre 61
[r4]ip route-static 192.168.1.128 27 NULL 0 #空接口防环
[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 #缺省
R5:
[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip route-static 192.168.1.8 30 192.168.1.17
[r5]ip route-static 192.168.1.64 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.32 27 192.168.1.17
[r5]ip route-static 192.168.1.4 30 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.17
[r5]ip route-static 192.168.1.12 30 192.168.1.17
[r5]ip route-static 192.168.1.128 27 192.168.1.21 pre 61 # 修改路由的优先级
[r5]ip route-static 192.168.1.8 30 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.64 27 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.0 30 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.32 27 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.4 30 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.96 27 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.12 30 192.168.1.21 pre 61
[r5]ip route-static 0.0.0.0 0 12.0.0.2 #缺省
4)R5上配置EASY IP
[r5]acl 2000
[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r5]int g0/0/2
[r5-GigabitEthernet0/0/2]nat outbound 2000
5)R5配置NAT SERVER把Telnet的Telnet服务发布到公网上
[r5-GigabitEthernet0/0/2]nat server protocol tcp global current-interface 23 inside 192.168.1.5 23
测试公网远程登录私网内的telnet:(使用R5接口的公网IP访问)
测试1000Mb/s链路故障,100Mb/s链路是否可通