DHCP实验

例图

实验要求

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服务器

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值