目录
一、题目
二、实验要求
1、R6为isp,接口IP地址均为公有地址;该设备只能配置IP地址,之后不能再对其进行任何配置;
2、R1-R5为局域网,私有IP地址192.168.1.0/24,请合理分配;
3、所有路由器上环回,均代表连接用户的接口;
4、R3下的两台PC通过DHCP自动获取IF地址;
5、选路最佳,路由表尽量小,避免环路;
6、R1一R5t均可访问R6的环回;
7、R6telnetR5的公有IP地址时,实际登陆到R1上;
8、R4与R5正常通过1000链路,故障时通过10o兆链路;
三、实验拓扑图搭建
四、实验步骤
1.配置环回
R1
[R1-LoopBack0]ip address 192.168.1.33 28
[R1-LoopBack1]ip address 192.168.1.49 28
R2
[R2-LoopBack0]ip address 192.168.1.65 28
[R2-LoopBack1]ip address 192.168.1.81 28
R4
[R4-LoopBack0]ip address 192.168.1.129 28
[R4-LoopBack1]ip address 192.168.1.145 28
R5
[R5-LoopBack0]ip address 192.168.1.161 27
ISP
[ISP-LoopBack0]ip address 6.6.6.6 24
2.配置路由器接口ip
[R5-GigabitEthernet0/0/2]ip address 192.168.1.22 30
[R5-Ethernet4/0/0]ip address 192.168.1.18 30
[R5-GigabitEthernet0/0/1]ip address 56.1.1.1 24
[ISP-GigabitEthernet0/0/0]ip address 56.1.1.2 24
3.R3利用dhcp自动配置地址
[R3]dhcp enable
[R3]ip pool 1
[R3-ip-pool-1]network 192.168.1.96 mask 27
[R3-ip-pool-1]gateway-list 192.168.1.97
[R3-ip-pool-1]int g0/0/2
[R3-GigabitEthernet0/0/2]dhcp select global
4.写缺省路由
[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.22
[R5]ip route-static 0.0.0.0 0 56.1.1.2
5.内网全通
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.96 27 192.168.1.6
[R1]ip route-static 192.168.1.12 27 192.168.1.6
R2
[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
[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
[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.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
R5
[R5]ip route-static 192.168.1.32 27 192.168.1.21
[R5]ip route-static 192.168.1.64 27 192.168.1.21
[R5]ip route-static 192.168.1.96 27 192.168.1.21
[R5]ip route-static 192.168.1.128 27 192.168.1.21
[R5]ip route-static 192.168.1.0 30 192.168.1.21
[R5]ip route-static 192.168.1.4 30 192.168.1.21
[R5]ip route-static 192.168.1.8 30 192.168.1.21
[R5]ip route-static 192.168.1.12 30 192.168.1.21
6.防环
R1
[R1]ip route-static 192.168.1.32 27 NULL 0
R2
[R2]ip route-static 192.168.1.64 27 NULL 0
R4
[R4]ip route-static 192.168.1.128 27 NULL 0
7.NAT
[R5]acl 2000
[R5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R5-GigabitEthernet0/0/1]nat outbound 2000
8.TELNET
[R1]aaa
[R1-aaa]local-user lxm privilege level 15 password cipher 123456
[R1-aaa]local-user lxm service-type telnet
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
[R5-GigabitEthernet0/0/1]nat static protocol tcp global current-interface 23 ins
ide 192.168.1.33 23
9.浮动静态路由
[R4]ip route-static 0.0.0.0 0 192.168.1.18 preference 61
[R5]ip route-static 192.168.1.0 255.255.255.252 192.168.1.17 preference 61
[R5]ip route-static 192.168.1.4 255.255.255.252 192.168.1.17 preference 61
[R5]ip route-static 192.168.1.8 255.255.255.252 192.168.1.17 preference 61
[R5]ip route-static 192.168.1.12 255.255.255.252 192.168.1.17 preference 61
[R5]ip route-static 192.168.1.32 255.255.255.224 192.168.1.17 preference 61
[R5]ip route-static 192.168.1.64 255.255.255.224 192.168.1.17 preference 61
[R5]ip route-static 192.168.1.96 255.255.255.224 192.168.1.17 preference 61
[R5]ip route-static 192.168.1.128 255.255.255.224 192.168.1.17 preference 61