静态路由综合实验(复习)
一.实验要求:
- R6为isp,接口IP地址均为公有地址;该设备只能配置IP地址,之后不能冉对其进行其他任何配置;
- R1-R5为局域网,私有IP地址192.168.1.0/24,请合理分配;
- R1,R2,R3,各有两个环回地址;R5,R6各有一个环回地址;所有路由器上环回均代表连接用户的接口;
- R4下的两台Pc通过DHCP自动获取IP地址;
- 选路最佳,路由表尽量小,避免环路;
- R1-R5均可以访问R6的环回
- R6telnetR5的公有IP地址时,实际登陆到R1上;
- R3与R5正常通过1000M链路,故障时通过100M链路
二.拓扑
三.需求分析
对192.168.1.0/24进行划分。确保地址的准确性,然后配置DHCP分配地址。设置路由连接R1-R6。配置telnet,设置链路
四.配置
-
R1
[r1]int g0/0/0 [r1-GigabitEthernet0/0/0]ip add 192.168.1.2 30 [r1-GigabitEthernet0/0/0]int g0/0/1 [r1-GigabitEthernet0/0/1]ip add 192.168.1.9 30 [r1]interface LoopBack 20 [r1-LoopBack20]ip add 192.168.1.65 28 [r1-LoopBack20]q [r1]interface LoopBack 21 [r1-LoopBack21]ip add 192.168.1.81 28 [r1-LoopBack21]q [r1]ip route-static 192.168.1.128 27 192.168.1.10 [r1]ip route-static 192.168.1.16 30 192.168.1.10 [r1]ip route-static 192.168.1.20 30 192.168.1.10 [r1]ip route-static 192.168.1.12 30 192.168.1.10 [r1]ip route-static 192.168.1.96 27 192.168.1.10 [r1]ip route-static 192.168.1.96 27 192.168.1.1 [r1]ip route-static 192.168.1.4 30 192.168.1.1 [r1]ip route-static 192.168.1.32 27 192.168.1.1 [r1]ip route-static 0.0.0.0 0 192.168.1.10 [r1]ip route-static 12.168.1.64 27 NULL 0
-
R2
[r2]int g0/0/0 [r2-GigabitEthernet0/0/0]ip address 192.168.1.1 30 [r2-GigabitEthernet0/0/0]int g0/0/1 [r2-GigabitEthernet0/0/1]ip address 192.168.1.5 30 [r2-GigabitEthernet0/0/1]q [r2]interface LoopBack 10 [r2-LoopBack10]ip address 192.168.1.33 28 [r2-LoopBack10]q [r2]interface LoopBack 11 [r2-LoopBack11]ip address 192.168.1.49 28 [r2]ip route-static 192.168.1.64 27 192.168.1.2 [r2]ip route-static 192.168.1.8 30 192.168.1.2 [r2]ip route-static 192.168.1.128 27 192.168.1.2 [r2]ip route-static 192.168.1.128 27 192.168.1.6 [r2]ip route-static 192.168.1.16 30 192.168.1.2 [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.2 [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.96 27 192.168.1.6 [r2]ip route-static 0.0.0.0 0 192.168.1.2 [r2]ip route-static 0.0.0.0 0 192.168.1.6 [r2]ip route-static 192.168.1.32 27 NULL 0 [r2]telnet server enable [r2]aaa [r2-aaa]local-user zhou password cipher ****** privilege level 15 Info: Add a new user [r2-aaa]local-user zhou service-type telnet [r2-aaa]q [r2]user-interface vty 0 4 [r2-ui-vty0-4]authentication-mode aaa [r2-ui-vty0-4]q
-
R3
[r3]int g0/0/0 [r3-GigabitEthernet0/0/0]ip add 192.168.1.10 30 [r3-GigabitEthernet0/0/0]int g0/0/1 [r3-GigabitEthernet0/0/1]ip add 192.168.1.14 30 [r3-GigabitEthernet0/0/1]int g0/0/2 [r3-GigabitEthernet6/0/0]ip add 192.168.1.17 30 [r3-GigabitEthernet6/0/]int g4/0/0 [r3-GigabitEthernet0/0/2]ip add 192.168.1.21 30 [r3-GigabitEthernet0/0/2]q [r3]interface LoopBack 40 [r3-LoopBack40]ip add 192.168.1.129 28 [r3-LoopBack40]interface LoopBack 41 [r3-LoopBack41]ip add 192.168.1.145 28 [r3-LoopBack41]q [r3]ip route-static 192.168.1.96 27 192.168.1.13 [r3]ip route-static 192.168.1.4 30 192.168.1.13 [r3]ip route-static 192.168.1.32 27 192.168.1.13 [r3]ip route-static 192.168.1.32 27 192.168.1.9 [r3]ip route-static 192.168.1.0 30 192.168.1.9 [r3]ip route-static 192.168.1.64 27 192.168.1.9 [r3]ip route-static 0.0.0.0 0 192.168.1.18 [r3]ip route-static 0.0.0.0 0 192.168.1.22 [r3]ip route-static 192.168.1.128 27 NULL 0 [r3]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
-
R4
[r4]int g0/0/0 [r4-GigabitEthernet0/0/0]ip add 192.168.1.6 30 [r4-GigabitEthernet0/0/0]int g0/0/1 [r4-GigabitEthernet0/0/1]ip add 192.168.1.13 30 [r4-GigabitEthernet0/0/1]int g0/0/2 [r4-GigabitEthernet0/0/2]ip add 192.168.1.97 27 [r4-GigabitEthernet0/0/2]q [r4]dhcp enable [r4]ip pool 3 Info: It's successful to create an IP address pool. [r4-ip-pool-3]network 192.168.1.96 mask 27 [r4-ip-pool-3]gateway-list 192.168.1.97 [r4-ip-pool-3]dns-list 8.8.8.8 114.114.114.114 [r4-ip-pool-3]q [r4]int g0/0/2 [r4-GigabitEthernet0/0/2]dhcp select global [r4-GigabitEthernet0/0/2]q [r4]ip route-static 192.168.1.32 27 192.168.1.5 [r4]ip route-static 192.168.1.0 30 192.168.1.5 [r4]ip route-static 192.168.1.64 27 192.168.1.5 [r4]ip route-static 192.168.1.64 27 192.168.1.14 [r4]ip route-static 192.168.1.8 30 192.168.1.14 [r4]ip route-static 192.168.1.128 27 192.168.1.14 [r4]ip route-static 192.168.1.16 30 192.168.1.14 [r4]ip route-static 192.168.1.20 30 192.168.1.14 [r4]ip route-static 0.0.0.0 0 192.168.1.14
-
R5
[r5]int g0/0/0 [r5-GigabitEthernet0/0/0]ip add 192.168.1.18 30 [r5-GigabitEthernet0/0/2]ip add 192.168.1.22 30 [r5-GigabitEthernet0/0/1]ip add 12.0.0.5 24 [r5]interface LoopBack 50 [r5-LoopBack50]ip add 192.168.1.161 27 [r5-LoopBack50]q [r5]ip route-static 192.168.1.128 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.96 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.32 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.64 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.128 27 192.168.1.21 [r5]ip route-static 192.168.1.12 30 192.168.1.21 [r5]ip route-static 192.168.1.96 27 192.168.1.21 [r5]ip route-static 192.168.1.4 30 192.168.1.21 [r5]ip route-static 192.168.1.32 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.64 27 192.168.1.21 [r5]ip route-static 192.168.1.8 30 192.168.1.21 [r5]ip route-static 0.0.0.0 0 12.0.0.6 [r5]acl 2000 [r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255 [r5-acl-basic-2000]q [r5]int g0/0/1 [r5-GigabitEthernet0/0/1]nat outbound 2000 [r5-GigabitEthernet0/0/1]q [r5]int g0/0/1 [r5-GigabitEthernet0/0/1]nat server protocol tcp global current-interface 23 inside 192.168.1.5 23 [r5]ip route-static 192.168.1.128 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 192.168.1.96 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.32 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.64 27 192.168.1.21 pre 61 [r5] ip route-static 192.168.1.8 30 192.168.1.21 pre 61
-
R6
[r6]int g0/0/0 [r6-GigabitEthernet0/0/0]ip add 12.0.0.6 24 [r6]interface LoopBack 60 [r6-LoopBack60]ip add 1.0.0.6 24 [r6-LoopBack60]q
五.验证