目录
一,拓扑图与需求
二,需求分析
1,基于192.168.1.0/24 划分网段
2,配手工IP
3,通过DHCP服务,给PC4和PC5分配IP地址、网关、掩码、DNS服务器IP地址
4,通过使用域名成功访问HTTP服务器
5,配置telnet
6,验证
三,配置过程
在DHCP服务器的配置
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.100 25
[r1-GigabitEthernet0/0/0]
Jul 21 2024 16:38:06-08:00 r1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]q
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.200 25
Jul 21 2024 16:38:35-08:00 r1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]q
配置充当telnet客户端
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname Client
[Client]interface g0/0/0
[Client-GigabitEthernet0/0/0]ip address 192.168.1.20 25
[Client-GigabitEthernet0/0/0]
Jul 21 2024 16:47:50-08:00 Client %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Client-GigabitEthernet0/0/0]
配置充当telnet服务器
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[server]sysname Server
[Server]interface g0/0/0
[Server-GigabitEthernet0/0/0]ip address 192.168.1.220 25
Jul 21 2024 16:49:45-08:00 Server %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Server-GigabitEthernet0/0/0]
配置其余IP地址
通过DHCP服务,给PC4和PC5分配IP地址、网关、掩码、DNS服务器IP地址
[r1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r1]ip pool x
Info: It's successful to create an IP address pool.
[r1-ip-pool-x]network 192.168.1.0 mask 25
[r1-ip-pool-x]gateway-list 192.168.1.100
[r1-ip-pool-x]dns-list 8.8.8.8
[r1-ip-pool-x]excluded-ip-address 192.168.1.1 192.168.1.20
[r1-ip-pool-x]lease day 0 hour 1 minute 0
[r1-ip-pool-x]q
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]dhcp select global
[r1-GigabitEthernet0/0/0]q
[r1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r1]ip pool xi
Info: It's successful to create an IP address pool.
[r1-ip-pool-xi]network 192.168.1.129 mask 25
[r1-ip-pool-xi]gateway-list 192.168.1.200
[r1-ip-pool-xi]dns-list 8.8.8.8
[r1-ip-pool-xi]excluded-ip-address 192.168.1.130 192.168.1.140 192.168.1.220
[r1-ip-pool-xi]lease day 0 hour 1 minute 0
[r1-ip-pool-xi]q
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]dhcp select global
[r1-GigabitEthernet0/0/0]q
通过使用域名成功访问HTTP服务器
配置telnet
<Server>sy
Enter system view, return user view with Ctrl+Z.
[Server]ip route-static 0.0.0.0 0 192.168.1.200
[Server]telnet server enable
Error: TELNET server has been enabled
[Server]user-interface vty 0 4
[Server-ui-vty0-4]authentication-mode aaa
[Server-ui-vty0-4]q
[Server]aaa
[Server-aaa]local
[Server-aaa]local-user admin password cipher admin
[Server-aaa]local
[Server-aaa]local-user admin privilege level ?
INTEGER<0-15> Level value
[Server-aaa]local-user admin privilege level 15
[Server-aaa]local-user admin service-type telnet
[Server-aaa]q
[Server]
[Client]q
<Client>telnet 192.168.1.220
Press CTRL_] to quit telnet mode
Trying 192.168.1.220 ...
Connected to 192.168.1.220 ...
Login authentication
Username:admin
Password:
<Server>sy
Enter system view, return user view with Ctrl+Z.
[Server]sys123
^
Error: Unrecognized command found at '^' position.
[Server]sys
[Server]sysname 123
[123]
[123]
[123]