实验报文:
一、拓扑图
二、需求
1、通过DHCP服务,给PC4和PC5分配IP地址、网关、掩码、DNS服务器IP地址
2、Client1要求手工配置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网段进行分配
三、需求分析
因为要保证整个拓扑图使用192.168.1.0/24网段进行分配,所以需要对DHCP服务器进行分区处理。先对DHCP服务器配置IP地址、子网掩码,启动DHCP服务。而后再分别对telnet客户端及服务器Client1、DNS服务器、HTTP服务器配置IP地址、网关、子网掩码。最后一步步进行各个部分所需的操作。
四、所有配置的截图或文字描述
1,对DHCP服务器配置IP地址、子网掩码,启动DHCP服务的代码如下:
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.100 25
[Huawei-GigabitEthernet0/0/0]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.1.200 25
[Huawei-GigabitEthernet0/0/1]quit
[Huawei]display ip interface brief
*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.100/25 up up
GigabitEthernet0/0/1 192.168.1.200/25 up up
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]ip pool zhangsan
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-zhangsan]network 192.168.1.128 mask 25
[Huawei-ip-pool-zhangsan]gateway-list 192.168.1.100
[Huawei-ip-pool-zhangsan]dns-list 8.8.8.8
[Huawei-ip-pool-zhangsan]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select global
[Huawei-GigabitEthernet0/0/0]quit
[Huawei]ip pool lisi
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-lisi]network 192.168.1.0 mask 25
[Huawei-ip-pool-lisi]gateway-list 192.168.1.200
[Huawei-ip-pool-lisi]dns-list 8.8.8.8
[Huawei-ip-pool-lisi]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]dhcp select global
分别对PC4和PC5进行IPV4配置,勾选DHCP自动获取,点击应用
2,需求二过程如下图
3,
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.10 25
[Huawei-GigabitEthernet0/0/0]quit
[Huawei]display ip interface brief
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.10/25 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip add
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.150 25
[Huawei-GigabitEthernet0/0/0]quit
[Huawei]display ip interface brief
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.150/25 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
启用telnet服务
[Huawei]telnet server enable
[Huawei]user-interface vty 0 4
[Huawei-ui-vty0-4]aut
[Huawei-ui-vty0-4]authentication-mode aaa
[Huawei-ui-vty0-4]aaa
[Huawei-aaa]local-user admin password cipher admin privilege level 2
[Huawei-aaa]local-user admin service-type telnet
登录telnet服务器
<Huawei>telnet 192.168.1.150
Press CTRL_] to quit telnet mode
Trying 192.168.1.150 ...
Connected to 192.168.1.150 ...
Login authentication
Username:admin
Password:
<Huawei>sys
Enter system view, return user view with Ctrl+Z..
[Huawei]sysname 123
[123]quit
<123>
转回服务器界面
4,
[Huawei-ip-pool-zhangsan]excluded-ip-address 192.168.1.130 192.168.1.140
[Huawei-ip-pool-zhangsan]lease day 0 hour 1 minute 0
[Huawei-ip-pool-zhangsan]ip pool lisi
[Huawei-ip-pool-lisi]excluded-ip-address 192.168.1.1
[Huawei-ip-pool-lisi]lease day 0 hour 1 minute 0
五、所有ping测试结果验证
ping PC4:
<Huawei>ping 192.168.1.126
PING 192.168.1.126: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.126: bytes=56 Sequence=1 ttl=128 time=120 ms
Reply from 192.168.1.126: bytes=56 Sequence=2 ttl=128 time=50 ms
Reply from 192.168.1.126: bytes=56 Sequence=3 ttl=128 time=50 ms
Reply from 192.168.1.126: bytes=56 Sequence=4 ttl=128 time=50 ms
Reply from 192.168.1.126: bytes=56 Sequence=5 ttl=128 time=30 ms
--- 192.168.1.126 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/60/120 ms
ping PC5:
<Huawei>ping 192.168.1.254
PING 192.168.1.254: 56 data bytes, press CTRL_C to break
Request time out
Reply from 192.168.1.254: bytes=56 Sequence=2 ttl=127 time=60 ms
Reply from 192.168.1.254: bytes=56 Sequence=3 ttl=127 time=80 ms
Reply from 192.168.1.254: bytes=56 Sequence=4 ttl=127 time=60 ms
Reply from 192.168.1.254: bytes=56 Sequence=5 ttl=127 time=60 ms
--- 192.168.1.254 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 60/65/80 ms
ping telnet 服务器:
<Huawei>ping 192.168.1.150
PING 192.168.1.150: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.150: bytes=56 Sequence=1 ttl=254 time=130 ms
Reply from 192.168.1.150: bytes=56 Sequence=2 ttl=254 time=60 ms
Reply from 192.168.1.150: bytes=56 Sequence=3 ttl=254 time=70 ms
Reply from 192.168.1.150: bytes=56 Sequence=4 ttl=254 time=80 ms
Reply from 192.168.1.150: bytes=56 Sequence=5 ttl=254 time=60 ms
--- 192.168.1.150 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 60/80/130 ms
ping http 服务器:
<Huawei>ping 192.168.1.130
PING 192.168.1.130: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.130: bytes=56 Sequence=1 ttl=254 time=70 ms
Reply from 192.168.1.130: bytes=56 Sequence=2 ttl=254 time=70 ms
Reply from 192.168.1.130: bytes=56 Sequence=3 ttl=254 time=70 ms
Reply from 192.168.1.130: bytes=56 Sequence=4 ttl=254 time=70 ms
Reply from 192.168.1.130: bytes=56 Sequence=5 ttl=254 time=70 ms
--- 192.168.1.130 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 70/70/70 ms
ping PC4:
<123>ping 192.168.1.126
PING 192.168.1.126: 56 data bytes, press CTRL_C to break
Request time out
Reply from 192.168.1.126: bytes=56 Sequence=2 ttl=127 time=80 ms
Reply from 192.168.1.126: bytes=56 Sequence=3 ttl=127 time=80 ms
Reply from 192.168.1.126: bytes=56 Sequence=4 ttl=127 time=80 ms
Reply from 192.168.1.126: bytes=56 Sequence=5 ttl=127 time=90 ms
--- 192.168.1.126 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 80/82/90 ms
ping PC5:
<123>ping 192.168.1.254
PING 192.168.1.254: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.254: bytes=56 Sequence=1 ttl=128 time=90 ms
Reply from 192.168.1.254: bytes=56 Sequence=2 ttl=128 time=40 ms
Reply from 192.168.1.254: bytes=56 Sequence=3 ttl=128 time=60 ms
Reply from 192.168.1.254: bytes=56 Sequence=4 ttl=128 time=40 ms
Reply from 192.168.1.254: bytes=56 Sequence=5 ttl=128 time=40 ms
--- 192.168.1.254 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 40/54/90 ms
ping telnet 客户端:
<123>ping 192.168.1.3
PING 192.168.1.3: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.3: bytes=56 Sequence=1 ttl=254 time=70 ms
Reply from 192.168.1.3: bytes=56 Sequence=2 ttl=254 time=70 ms
Reply from 192.168.1.3: bytes=56 Sequence=3 ttl=254 time=60 ms
Reply from 192.168.1.3: bytes=56 Sequence=4 ttl=254 time=70 ms
Reply from 192.168.1.3: bytes=56 Sequence=5 ttl=254 time=60 ms
--- 192.168.1.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 60/66/70 ms
ping http 服务器:
<123>ping 192.168.1.130
PING 192.168.1.130: 56 data bytes, press CTRL_C to break
Reply from 192.168.1.130: bytes=56 Sequence=1 ttl=255 time=40 ms
Reply from 192.168.1.130: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 192.168.1.130: bytes=56 Sequence=3 ttl=255 time=30 ms
Reply from 192.168.1.130: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 192.168.1.130: bytes=56 Sequence=5 ttl=255 time=50 ms
--- 192.168.1.130 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/34/50 ms
经过检验证明设备之间都能正常进行通讯工作,实验完成。