配置 DHCP
作者:互联网
配置 DHCP
步骤1
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.0.12.1 24
[R1-GigabitEthernet0/0/1]quit
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address 10.0.12.3 24
[R3-GigabitEthernet0/0/1]shutdown
[R3-GigabitEthernet0/0/1]quit
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]ip address 10.0.23.3 24
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S1
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]sysname S2
步骤2
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]undo shutdown
步骤3
[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/9]shutdown
[S1-GigabitEthernet0/0/9]quit
[S1]interface GigabitEthernet 0/0/10
[S1-GigabitEthernet0/0/10]shutdown
[S1-GigabitEthernet0/0/10]quit
[S1]interface GigabitEthernet 0/0/13
[S1-GigabitEthernet0/0/13]shutdown
[S1-GigabitEthernet0/0/13]quit
[S1]interface GigabitEthernet 0/0/14
[S1-GigabitEthernet0/0/14]shutdown
[S2]interface GigabitEthernet 0/0/6 [S2-GigabitEthernet0/0/6]shutdown
[S2]interface GigabitEthernet 0/0/7
[S2-GigabitEthernet0/0/7]shutdown
[S2-GigabitEthernet0/0/7]quit
[S2]interface GigabitEthernet 0/0/9
[S2-GigabitEthernet0/0/9]shutdown
[S2-GigabitEthernet0/0/9]quit
[S2]interface GigabitEthernet 0/0/10
[S2-GigabitEthernet0/0/10]shutdown
[S2-GigabitEthernet0/0/10]quit
[R1]interface GigabitEthernet 0/0/2
[R1-GigabitEthernet0/0/2]ip address 10.0.23.1 24
[R1-GigabitEthernet0/0/2]shutdown
步骤4
[R1]dhcp enable
[R3]dhcp enabl
步骤5
[R1]ip pool pool1
Info: It's successful to create an IP address pool.
[R1-ip-pool-pool1]network 10.0.12.0 mask 24
[R1-ip-pool-pool1]gateway-list 10.0.12.1
[R1-ip-pool-pool1]lease day 1 hour 12
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]dhcp select global
[R3]ip pool pool2
Info: It's successful to create an IP address pool.
[R3-ip-pool-pool2]network 10.0.23.0 mask 24
[R3-ip-pool-pool2]gateway-list 10.0.23.3
[R3-ip-pool-pool2]lease day 1 hour 12
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]dhcp select global
在路由器上执行display ip pool name <name>命令,查看配置的IP地址池中的参数。
<R1>display ip pool name pool1
[S1]dhcp enable
[S1]interface Vlanif 1
[S1-Vlanif1]ip address dhcp-alloc
<S1>display ip interface brief
…output omit…
Interface |
|
|
IP Address/Mask |
Physical Protocol |
|||
MEth0/0/1 |
|
|
unassigned |
down down |
|||
NULL0 |
|
|
|
|
unassigned |
up up(s) |
|
Vlanif1 |
|
|
|
|
10.0.12.254/24 |
up up |
<R1>display ip pool name pool1
Pool-name |
: pool1 |
Pool-No |
: 0 |
Lease |
: 1 Days 12 Hours 0 Minutes |
Domain-name : -
DNS-server0 : -
NBNS-server0 : -
Netbios-type : -
Position : Local Status : Unlocked
Gateway-0 : 10.0.12.1
Network : 10.0.12.0
Mask : 255.255.255.0
VPN instance : --
--------------------------------------------------------------------------
Start End Total Used Idle(Expired) Conflict Disable
--------------------------------------------------------------------------
10.0.12.1 10.0.12.254 253 1 252(0) 0 0
-------------------------------------------------------------------------
<R3>display ip pool name pool2
步骤6
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]shutdown
[R3]interface GigabitEthernet 0/0/2
[R3-GigabitEthernet0/0/2]shutdown
标签:GigabitEthernet,R1,R3,ip,配置,GigabitEthernet0,interface,DHCP 来源: https://www.cnblogs.com/wangzhipeng414148874/p/11921985.html