实验分析:
1 .R6为isp,接口IP地址均为公有有地址;该设备只能配置IP地址, 之后不能再对其进行任何配置;
r6只能配置IP, 所以r1--r5上需要配置指向r6的缺省路由;
2 .R1—R5为局域网,私有P地址192.168.1.6/24,请合理分配;
图中骨干链路只需俩个IP,因此分配/30的网段即可,r1,r2,r4的俩个环回用大的网段划分成俩个小网段(减少黑洞路由的出现),然后按须分配。
3.R3下的两台PC通过DHCP自动获取IP地址;
r3下启动DHCP服务
4.选路最佳,路由表尽量小,避免环路;
选路最佳需配置负载均衡,且经过的路由数目尽量少;
路由表尽量小则需进行汇总,与缺省路由通向的网段可省略;
避免环路需进行空接口配置。
5.R1—R5均可以访问R6的环回;
R1-R5为内网,R6为公网,需在边界路由器R5上配置nat服务(EASYIP)
6. R6 telnet R5的公有IP地址时,实际登陆到R1上;
R1上开启telnet服务,R5配置nat映射到R1的任意接口即可
7. R4与R5正常通过1000M链路,故障时通过100M链路;
R4与R5之间配置浮动静态路由,修改优先值。
实验配置:
R1的配置:
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip ad 192.168.1.1 30
[r1-GigabitEthernet0/0/0]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip ad 192.168.1.5 30
[r1-GigabitEthernet0/0/1]int l0
[r1-LoopBack0]ip ad 192.168.1.33 28
[r1-LoopBack0]int l1
[r1-LoopBack1]ip ad 192.168.1.49 28
[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.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.12 30 192.168.1.6
[r1]ip route-static 192.168.1.128 28 192.168.1.6
[r1]ip route-static 192.168.1.32 27 NULL 0
[r1]aaa
[r1-aaa]local-user aaa privilege level 15 password cipher 12345
Info: Add a new user.
[r1-aaa]local-user aaa service-type telnet
[r1-aaa]q
[r1]user-interface vty 0 4
[r1-ui-vty0-4]au
[r1-ui-vty0-4]authentication-mode aaa
[r1-ui-vty0-4]
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip ad 192.168.1.2 30
[r2-GigabitEthernet0/0/0]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.1.9 30
[r2-GigabitEthernet0/0/1]int l0
[r2-LoopBack0]ip ad 192.168.1.65 28
[r2-LoopBack0]int l1
[r2-LoopBack1]ip ad 192.168.1.81 28
[r2]ip route-static 0.0.0.0 0 192.168.1.10
[r2]ip route-static 192.168.1.128 28 192.168.1.10
[r2]ip route-static 192.168.1.128 28 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
[r3]dhcp enable
[r3]ip pool aa
Info: It's successful to create an IP address pool.
[r3-ip-pool-aa]network 192.168.1.128 mask 28
[r3-ip-pool-aa]gateway-list 192.168.1.129
[r3-ip-pool-aa]dns-list 8.8.8.8
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip ad 192.168.1.10 30
[r4-GigabitEthernet0/0/0]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip ad 192.168.1.14 30
[r4-GigabitEthernet0/0/1]
[r4-GigabitEthernet0/0/1]int g 0/0/2
[r4-GigabitEthernet0/0/2]ip ad 192.168.1.17 30
[r4-GigabitEthernet0/0/2]
[r4-GigabitEthernet0/0/2]int g 4/0/0
[r4-GigabitEthernet4/0/0]ip ad 192.168.1.21 30
[r4-GigabitEthernet4/0/0]
[r4-GigabitEthernet4/0/0]int l0
[r4-LoopBack0]ip ad 192.168.1.97 28
[r4-LoopBack0]int l1
[r4-LoopBack1]ip ad 192.168.1.113 28
[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 70
[r4]ip route-static 192.168.1.64 27 192.168.1.9
[r4]ip route-static 192.168.1.128 28 192.168.1.13
[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.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.0 24 NULL 0
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip ad 192.168.1.18 30
[r5-GigabitEthernet0/0/0]int g 0/0/1
[r5-GigabitEthernet0/0/1]ip ad 12.0.0.1 24
[r5-GigabitEthernet0/0/1]int g 0/0/2
[r5-GigabitEthernet0/0/2]ip ad 192.168.1.22 30
[r5-GigabitEthernet0/0/2]
[r5-GigabitEthernet0/0/2]int l0
[r5-LoopBack0]ip ad 192.168.1.145 28
[r5]ip route-static 0.0.0.0 0 12.0.0.2
[r5]ip route-static 192.168.1.0 24 192.168.1.17
[r5]ip route-static 192.168.1.0 24 192.168.1.21 pre
[r5]ip route-static 192.168.1.0 24 192.168.1.21 preference 70
[r5]acl 2000 (EASYIP 允许私网访问公网)
[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r5-acl-basic-2000]q
[r5]int g 0/0/1
[r5-GigabitEthernet0/0/1]nat outbound 2000
[r5-GigabitEthernet0/0/1]q
[r5]int g 0/0/1 (nat服务配置静态nat)
[r5-GigabitEthernet0/0/1]nat s
[r5-GigabitEthernet0/0/1]nat server p
[r5-GigabitEthernet0/0/1]nat server protocol tcp g
[r5-GigabitEthernet0/0/1]nat server protocol tcp global c
[r5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 in
[r5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 ins
ide 192.168.1.1 23
Warning:The port 23 is well-known port. If you continue it may cause function fa
ilure.
Are you sure to continue?[Y/N]:y
[r5-GigabitEthernet0/0/1]
R6只配置IP,此处略
实验结果:
dhcp获取IP地址
R1-R5可以访问R6的环回(只展示R1,其余已省略)
R6 telnet R5的公有IP地址时,实际登陆到R1上