实验内容
实验要求
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、R6 telnet R5的公有地址时,实际登录到R1上;
8、R4与R5正常通过1000M链路,故障时通过100m链路;
实验步骤:
1.划分网段
2.给路由器配置ip地址
3.给R3配置dhcp
4.给路由器配置静态路由
5.给R5配置nat服务
6.给R1配置telent服务
7.p测试
一.
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
12.0.0.0/24
L0:1.1.1.0/24
R1:回环 192.168.1.32/27
192.168.1.32/28
192.168.1.48/28
R2:回环 192.168.1.64/27
192.168.1.64/28
192.168.1.80/28
R4:回环 192.168.1.128/27
192.168.1.128/28
192.168.1.144/28
R5:回环
192.168.1.160/27
R3:下面的网段
192.168.1.96/27
二.以R2为例
[R2]int e0/0/0
[R2-Ethernet0/0/0]ip add 192.168.1.2 30
[R2-Ethernet0/0/0]int e0/0/1
[R2-Ethernet0/0/1]ip add 192.168.1.5 30
[R2]int LoopBack 0
[R2-LoopBack0]ip add 192.168.1.65 28
[R2-LoopBack0]int LoopBack 1
[R2-LoopBack1]ip add 192.168.1.81 28
三.dhcp配置
[R3]dhcp enable
[R3]ip pool aa
[R3-ip-pool-aa]network 192.168.1.32 mask 27
[R3-ip-pool-aa]gateway-list 192.168.1.33
[R3-ip-pool-aa]dns-list 114.114.114.114 8.8.8.8
[R3-ip-pool-aa] quit
[R3]
[R3]int g 0/0/2
[R3-GigabitEthernet0/0/2]ip add 192.168.1.33 27
[R3-GigabitEthernet0/0/2]dhcp s
[R3-GigabitEthernet0/0/2]dhcp select g
[R3-GigabitEthernet0/0/2]dhcp select global
四.配置静态路由以r2为例(部分)
[R2]ip route-static 192.168.1.16 30 192.168.1.6
[R2]ip route-static 192.168.1.20 30 192.168.1.6
[R2]ip route-static 192.168.1.12 30 192.168.1.6
[R2]ip route-static 192.168.1.8 30 192.168.1.1
[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.13
[R2]ip route-static 192.168.1.32 28 192.168.1.1
[R2]ip route-static 192.168.1.48 28 192.168.1.1
[R2]ip route-static 192.168.1.128 28 192.168.1.6
[R2]ip route-static 192.168.1.144 28 192.168.1.6
[R2]ip route-static 192.168.1.160 27 192.168.1.6
五.nat服务
acl 2000
[R5-acl-basic-2000]rule 5 permit source 192.168.1.0 0.0.0.255
R5-GigabitEthernet0/0/1]nat outbound 2000
[R5]ip route-static 192.168.1.0 24 192.168.1.17
[R5]ip route-static 192.168.1.0 24 g0/0/1 192.168.1.21
[R5]
[R5]int e0/0/1
[R5-Ethernet0/0/1]nat server protocol tcp global current-interface 23 inside 19
2.168.1.2 23
6.配置telent服务
[R1]aaa
[R1-aaa]local-user yh privilege level 3 password cipher ******
[R1-aaa]local-user yh service-type telnet
[R1-aaa]user-int vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
[R1-ui-vty0-4]
[R5]int g 0/0/2
[R5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 inside 192.168.1.5 23
Are you sure to continue?[Y/N]:y
七.