一、拓扑图
二、需求
- 整张网络使用192.168.1.0/24网段进行划分
- R2,R2,R3,R4均有两个环回来模拟用户网段
- R5使用DHCP为PC分配IP地址
- R2,R3,R4,R5开启telnet功能;账号/密码:admin/admin
- 完成所有路由器的静态路由配置,要求使用最简化路由表的方式
- 全网可达
三、需求分析
- 划分网段
- 配置IP地址
- 配DHCP
- 配telnet
- 配路由:未知网段/汇总网段
- 缺省路由
- 空接口路由
- 浮动静态路由
四、所有配置的截图或文字描述及测试
1.划分网段
192.168.1.0/24
192.168.1.000 00000--192.168.1.0/27
192.168.1.000 000 00--192.168.1.0/30--192.168.1.1-1.2
192.168.1.000 000 00
192.168.1.000 000 01
192.168.1.000 000 10
192.168.1.000 000 11
192.168.1.000 001 00--192.168.1.4/30--192.168.1.5-1.6
192.168.1.000 010 00--192.168.1.8/30
192.168.1.000 011 00--192.168.1.12/30
192.168.1.000 100 00--192.168.1.16/30
192.168.1.000 101 00--192.168.1.20/30
192.168.1.000 110 00
192.168.1.000 111 00
192.168.1.001 00000--192.168.1.32/27--R1环回
192.168.1.001 0 0000--192.168.1.32/28
192:168.1.001 1 0000--192.168.1.48/28
192.168.1.010 00000--192.168.1.64/27--R2环回
192.168.1.010 0 0000--192.168.1.64/28
192.168.1.010 1 0000--192.168.1.80/28
192.168.1.011 00000--192.168.1.96/27--R3环回
192.168.1.96/28
192.168.1.112/28
192.168.1.100 00000--192.168.1.128/27--R4环回
192.168.1.128/28
192.168.1.144/28
192.168.1.101 00000--192.168.1.160/27
192.168.1.110 00000
192.168.1.111 00000
2.配置IP地址
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 30
[r1-GigabitEthernet0/0/1]ip address 192.168.1.5 30
[r1-LoopBack0]ip address 192.168.1.33 28
[r1-LoopBack1]ip address 192.168.1.49 28
[r2-GigabitEthernet0/0/0]ip address 192.168.1.2 30
[r2-GigabitEthernet0/0/1]ip address 192.168.1.9 30
[r2-LoopBack0]ip address 192.168.1.65 28
[r2-LoopBack1]ip address 192.168.1.81 28
[r3-GigabitEthernet0/0/0]ip address 192.168.1.6 30
[r3-GigabitEthernet0/0/1]ip address 192.168.1.13 30
[r3-LoopBack0]ip address 192.168.1.97 28
[r3-LoopBack1]ip address 192.168.1.113 28
[r4-GigabitEthernet0/0/0]ip address 192.168.1.10 30
[r4-GigabitEthernet0/0/1]ip address 192.168.1.14 30
[r4-GigabitEthernet0/0/2]ip address 192.168.1.17 30
[r4-GigabitEthernet4/0/0]ip address 192.168.1.21 30
[r4-LoopBack0]ip address 192.168.1.129 28
[r4-LoopBack1]ip address 192.168.1.145 28
[r5-GigabitEthernet0/0/0]ip address 192.168.1.18 30
[r5-GigabitEthernet0/0/1]ip address 192.168.1.22 30
[r5-GigabitEthernet0/0/2]ip address 192.168.1.61 27
3.配DHCP
[r5]dhcp enable
[r5]ip pool aa
[r5-ip-pool-aa]network 192.168.1.160 mask 27
[r5-ip-pool-aa]gateway-list 192.168.1.161
[r5-ip-pool-aa]dns-list 8.8.8.8
[r5-GigabitEthernet0/0/2]dhcp select global
4.配telnet
[r2]user-interface vty 0 4
[r2-ui-vty0-4]authentication-mode aaa
[r2]aaa
[r2-aaa]local-user admin password cipher admin privilege level 15
[r2-aaa]local-user admin service-type telnet
[r3]user-interface vty 0 4
[r3-ui-vty0-4]authentication-mode aaa
[r3]aaa
[r3-aaa]local-user admin password cipher admin privilege level 15
[r3-aaa]local-user admin service-type telnet
[r4]user-interface vty 0 4
[r4-ui-vty0-4]authentication-mode aaa
[r4]aaa
[r4-aaa]local-user admin password cipher admin privilege level 15
[r4-aaa]local-user admin service-type telnet
[r5]user-interface vty 0 4
[r5-ui-vty0-4]authentication-mode aaa
[r5]aaa
[r5-aaa]local-user admin password cipher admin privilege level 15
[r5-aaa]local-user admin service-type telnet
5.配路由:未知网段/汇总网段
[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.64 27 192.168.1.2
[r1]ip route-static 192.168.1.96 27 192.168.1.6
[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
[r2]ip route-static 192.168.1.4 30 192.168.1.1
[r2]ip route-static 192.168.1.12 30 192.168.1.10
[r2]ip route-static 192.168.1.32 27 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
[r2]ip route-static 192.168.1.128 27 192.168.1.10
[r3]ip route-static 192.168.1.0 30 192.168.1.5
[r3]ip route-static 192.168.1.8 30 192.168.1.14
[r3]ip route-static 192.168.1.32 27 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
[r3]ip route-static 192.168.1.128 27 192.168.1.14
[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.64 27 192.168.1.9
[r4]ip route-static 192.168.1.96 27 192.168.1.13
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
[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.18
[r5]ip route-static 192.168.1.0 30 192.168.1.17
[r5]ip route-static 192.168.1.4 30 192.168.1.17
[r5]ip route-static 192.168.1.8 30 192.168.1.17
[r5]ip route-static 192.168.1.12 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.64 27 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.17
[r5]ip route-static 192.168.1.128 27 192.168.1.17
7. 空接口路由
[r1]]ip route-static 192.168.1.32 27 NULL 0
[r2]]ip route-static 192.168.1.64 27 NULL 0
[r3]]ip route-static 192.168.1.96 27 NULL 0
[r4]]ip route-static 192.168.1.128 27 NULL 0
8.浮动静态路由