例图
实验要求
PC通过DHCP自动获取ip地址
Client可以通过域名访问http服务器
<Huawei>sy
PC通过DHCP自动获取ip地址
Enter system view, return user view with Ctrl+Z.
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.1 24
Jul 12 2024 16:02:16-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Huawei-GigabitEthernet0/0/0]quit
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.1 24
Jul 12 2024 16:03:37-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[3]:The line protocol
IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[Huawei-GigabitEthernet0/0/1]q
[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 192.168.2.1/24 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 xiao
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-xiao]net
[Huawei-ip-pool-xiao]netbios-type
[Huawei-ip-pool-xiao]network 192.168.1.0 mask 24
[Huawei-ip-pool-xiao]gateway-list 192.168.1.1
[Huawei-ip-pool-xiao]dns-list 192.168.2.2
[Huawei-ip-pool-xiao]q
[Huawei]inter
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select global
[Huawei-GigabitEthernet0/0/0]q[Huawei]dhcp ena
[Huawei]dhcp enable
[Huawei]ip pool da
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-da]network 192.168.2.0 mask 24
[Huawei-ip-pool-da]gateway-list 192.168.2.1
[Huawei-ip-pool-da]dns-list 192.168.3.3
[Huawei-ip-pool-da]q
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]dhcp select global
[Huawei-GigabitEthernet0/0/1]q
Client通过域名访问http服务器
‘