一.拓补图
二.需求
1、整张网络使用192.168.1.0/24网段进行划分
2、R1、R2、R3、R4均有两个环回来模拟用户网段
3、R5使用DHCP为PC分配IP地址
4、R2、R3、R4、R5开启Telnet功能;账号密码:admin/admin
5、使用R1进行Telnet测试登录其他设备
6、完成所有路由器的静态路由配置,要求使用最简化路由表的方式
7、全网可达
三、需求分析
1.子网划分(VLSM)
2.手动配除PC1和PC2其他的IP地址
3.在R5路由器上用DHCP协议分别给PC1、PC2配置IP地址
4.用telnet协议分别在R2、R3、R4.R5创建一个名称和密码都为admin的用户账号,并可以在R1上分别远程登录他们
5.静态路由
四、配置截图或文字描述
1.子网划分
192.168.1.0/24
11000000.10101000.00000001 000 00000 --->192.168.1.0/27
11000000.10101000.00000001 001 00000--->192.168.1.32/27
11000000.10101000.00000001 010 00000--->192.168.1.64/27
11000000.10101000.00000001 011 00000--->192.168.1.96/27
11000000.10101000.00000001 100 00000--->192.168.1.128/27
11000000.10101000.00000001 101 00000--->192.168.1.160/27
11000000.10101000.00000001 110 00000--->192.168.1.192/27
11000000.10101000.00000001 111 00000--->192.168.1.224/27
2.配IP
R1
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.66 27
[R1-GigabitEthernet0/0/0]
Jul 22 2024 15:22:03-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]q
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 192.168.1.33 27
Jul 22 2024 15:22:58-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[R1-GigabitEthernet0/0/1]q
[R1]
R2
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.1.67 27
Jul 22 2024 15:25:25-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R2-GigabitEthernet0/0/0]q
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.1.97 27
Error: The specified address conflicts with another address.
[R2-GigabitEthernet0/0/1]q
[R2]
R3
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address 192.168.1.34 27
Error: The address already exists.
[R3-GigabitEthernet0/0/0]q
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address 192.168.1.130 27
Error: The address already exists.
[R3-GigabitEthernet0/0/1]q
[R3]
R4
[R4]interface GigabitEthernet 0/0/0
[R4-GigabitEthernet0/0/0]ip address 192.168.1.98 27
Error: The address already exists.
[R4-GigabitEthernet0/0/0]q
[R4]interface GigabitEthernet 0/0/1
[R4-GigabitEthernet0/0/1]ip address 192.168.1.129 27
Error: The specified address conflicts with another address.
[R4-GigabitEthernet0/0/1]q
[R4]interface GigabitEthernet 0/0/2
[R4-GigabitEthernet0/0/2]ip address 192.168.1.161 27
Error: The address already exists.
[R4-GigabitEthernet0/0/2]q
[R4]interface GigabitEthernet 4/0/0
[R4-GigabitEthernet4/0/0]ip address 192.168.1.193 27
[R4-GigabitEthernet4/0/0]
Jul 22 2024 15:32:07-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet4/0/0 has entered the UP state.
[R4-GigabitEthernet4/0/0]q
[R4]
R5
[R5]interface GigabitEthernet 0/0/0
[R5-GigabitEthernet0/0/0]ip address 192.168.1.162 27
[R5-GigabitEthernet0/0/0]q
[R5]interface GigabitEthernet 0/0/1
[R5-GigabitEthernet0/0/1]ip address 192.168.1.1 27
Error: The address already exists.
[R5-GigabitEthernet0/0/1]q
[R5]interface GigabitEthernet 0/0/2
[R5-GigabitEthernet0/0/2]ip address 192.168.1.194 27
Error: The address already exists.
[R5-GigabitEthernet0/0/2]q
[R5]
3.DHCP配PC1,PC2的IP
[R5-ip-pool-aa]netbios-type
[R5-ip-pool-aa]network 192.168.1.0 mask 27
[R5-ip-pool-aa]gate
[R5-ip-pool-aa]gateway-list 192.168.1.1
[R5-ip-pool-aa]lease day 4 hour 0 minute 0
[R5-ip-pool-aa]q
[R5]interface GigabitEthernet 0/0/1
[R5-GigabitEthernet0/0/1]dhcp select global
[R5-GigabitEthernet0/0/1]
PC1
PC2
4.telnet 协议
eg:
[R4]telnet server enable
Error: TELNET server has been enabled
[R4]user-interface vty 0 4
[R4-ui-vty0-4]authentication-mode aaa
[R4-ui-vty0-4]q
[R4]aaa
[R4-aaa]local-user admin password cipher admin
[R4-aaa]local-user admin privilege level 15
[R4-aaa]local-user admin service-type telnet
[R4-aaa]
R1远程登录R2、R3、R4、R5
5.静态路由的创建
eg:
[R5]ip route-static 192.168.1.64 27 192.168.1.161
[R5]ip route-static 192.168.1.64 27 192.168.1.193
删除:
[R5]undo ip route-static 192.168.1.32 27 192.168.1.161
R1
R2
R3
R4
R5
6.环回接口
eg:
R1
[R1-LoopBack0]q
[R1]interface LoopBack 1
[R1-LoopBack1]ip address 192.168.3.0 24
Error: The specified IP address is invalid.
R1
R2
R3
R4
R5
7.修改优先级
[R4]ip route-static 192.168.1.193 27 192.168.1.194 preference 90
五、验证测试结果
全网通
ping ip地址
R1
R2
R3
R4
R5
PC1
PC2