DHCP的配置(以华为eNSP为例)

如有错误,敬请谅解!

此文章仅为本人学习笔记,仅供参考,如有冒犯,请联系作者删除!!!

基础知识介绍:

⽹络组建步骤:

    1、拓扑设计

    2、IP地址规划--按照拓扑中划分的⽹络范围,规划⽹络位不同的IP地址

    3、配置

        1)配置各个节点的IP地址

        2)路由--全⽹可达

        3)测试--ping

        4)策略

        5)优化 安全

        6)排错

    4、维护和升级 

成为dhcp服务器的条件:

    1.必有有真实物理⽹卡或连接⼴播域的真实物理接⼝

    2.必须有合法的ip地址

 拓扑图:

DHCP的配置(以华为eNSP为例)_第1张图片

设置用户名及登陆密码:

[Huawei]aaa
[Huawei-aaa]local-user admin privilege level 15 password cipher admin
[Huawei-aaa]local-user admin service-type terminal
[Huawei-aaa]local-user guest privilege level 0 password cipher guest
Info: Add a new user.
[Huawei-aaa]local-user guest service-type terminal

[Huawei]user-interface console 0
[Huawei-ui-console0]authentication-mode aaa

开始配置端口:

接口g0/0/0/ IP: 

[Huawei]interface g0/0/0	
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.1 24


[Huawei]dhcp enable
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip pool 01
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-01]network 192.168.1.0 mask 255.255.255.0
[Huawei-ip-pool-01]gateway-list 192.168.1.1
[Huawei-ip-pool-01]dns-list 8.8.8.8 114.114.114.114

[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select global 
[Huawei-GigabitEthernet0/0/0]quit

接口g0/0/1 IP:

[Huawei]interface g0/0/1	
[Huawei-GigabitEthernet0/0/0]ip address 172.16.1.1 24

[Huawei]dhcp enable
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/0]ip pool 02
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-01]network 172.16.1.0 mask 255.255.255.0
[Huawei-ip-pool-01]gateway-list 172.16.1.1
[Huawei-ip-pool-01]dns-list 8.8.8.8 114.114.114.114

[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/0]dhcp select global 
[Huawei-GigabitEthernet0/0/0]quit

查看接口IP:

[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.1/24       up         up        
GigabitEthernet0/0/1              172.16.1.1/24        up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s) 

查看PC是否获得DHCP服务:

PC>ipconfig

Link local IPv6 address...........: fe80::5689:98ff:fef1:6b15
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.1.254
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.1.1
Physical address..................: 54-89-98-F1-6B-15
DNS server........................: 8.8.8.8
                                    114.114.114.114

查看接口g0/0/0  DHCP:

[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]dis th
[V200R003C00]
#
interface GigabitEthernet0/0/0
 ip address 192.168.1.1 255.255.255.0 
 dhcp select global
#
return

测试:

PC>ping 172.16.1.254

Ping 172.16.1.254: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 172.16.1.254: bytes=32 seq=2 ttl=127 time=47 ms
From 172.16.1.254: bytes=32 seq=3 ttl=127 time=63 ms
From 172.16.1.254: bytes=32 seq=4 ttl=127 time=78 ms
From 172.16.1.254: bytes=32 seq=5 ttl=127 time=78 ms

--- 172.16.1.254 ping statistics ---
  5 packet(s) transmitted
  4 packet(s) received
  20.00% packet loss
  round-trip min/avg/max = 0/66/78 ms

实验截图:

DHCP的配置(以华为eNSP为例)_第2张图片  

以上过程即为所求,欢迎同行朋友予以斧正!万分感谢!

你可能感兴趣的:(网络专栏,华为,其他,网络安全,tcp/ip)