视图
需求
1、通过DHCP服务,给PC4和PC5分配IP地址、网关、掩码、DNS服务器IP地址
2、Client-1要求手工配置IP地址,为192.168.1.1,可以通过该设备使用域名成功访问HTTP服务器
3、telnet客户端可以远程登录telnet服务器进行设备管理,并成功修改telnet服务器的名称为123
telnet设备登录的账号密码为:admin/admin
4、要求DHCP服务器需要排除被手工配置的IP地址;并修改租期时间为1小时;
5、最终实现每台终端都可以相互通讯(ping成功)
6、整个拓扑图使用192.168.1.0/24网段进行分配
分析
1.处PC3、PC4外,对其他设备都进行手工配置。
2.将192.168.1.0/24分成两个子网以供两个广播域使用。
3.要保证各设备之间都处于联通状态
搭建
一、基本配置
配置网关、client1、客户端以及三个服务端的IP地址等信息。
DHCP服务器
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys jia3
[jia3]int g0/0/0
[jia3-GigabitEthernet0/0/0]ip address 192.168.1.126 25
[jia3-GigabitEthernet0/0/0]q
[jia3]int g0/0/1
[jia3-GigabitEthernet0/0/1]ip address 192.168.1.254 25
[jia3]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.126/25 up up
GigabitEthernet0/0/1 192.168.1.254/25 up up
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
HTTP服务器
DNS服务器
Client1
二、 Client1通过使用域名访问HTTP服务器
三、telnet客户端远程登录telnet服务器进行设备管理
1.配置步骤
telent服务端配置
telnet客户端配置
[jia]interface g0/0/0
[jia-GigabitEthernet0/0/0]ip address 192.168.1.131 25
[jia]ip route-static 0.0.0.0 0 192.168.1.254
[jia]telnet server enable
[jia]user-interface vty 0 4
[jia-ui-vty0-4]authentication-mode aaa
[jia]aaa
[jia-aaa]local-user admin password cipher admin
[jia-aaa]local-user admin privilege level 15
[jia-aaa]local-user admin service-type telnet
telnet客户端配置
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.2 25
[Huawei]ip route-static 0.0.0.0 0 192.168.1.126
2.设备使用测试
<Huawei>telnet 192.168.1.131 --- 登录IP地址为192.168.1.131的设备
Press CTRL_] to quit telnet mode
Trying 192.168.1.131 ...
Connected to 192.168.1.131 ...
Login authentication
Username:admin
Password:
<jia>
四、通过DHCP协议进行IP地址分配
1.基础配置
[Huawei]dhcp enable
[Huawei]ip pool aijia
[Huawei-ip-pool-aijia]network 192.168.1.0 mask 25
[Huawei-ip-pool-aijia]gateway-list 192.168.1.126
[Huawei-ip-pool-aijia]dns-list 192.168.1.129
[Huawei-ip-pool-aijia]excluded-ip-address 192.168.1.1 192.168.1.2
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select global
[Huawei-ip-pool-one]lease day 0 hour 1 minute 0
[Huawei]ip pool two
[Huawei-ip-pool-wangyu]network 192.168.1.128 mask 25
[Huawei-ip-pool-two]gateway-list 192.168.1.254
[Huawei-ip-pool-two]dns-list 192.168.1.129
[Huawei-ip-pool-two]excluded-ip-address 192.168.1.130 192.168.1.132
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]dhcp select global
[Huawei-ip-pool-two]lease day 0 hour 1 minute 0
2.设备开启DHCP服务
打开PC4、PC5的IPv4配置,将IP获取方式改为DHCP,并打开自动获取DNS服务器地址
3.结果
通过在输入命令ipconfig,获取对应信息