您好,请知:
以下是HCL模拟器内DHCP的配置案例,请参考:
https://zhiliao.h3c.com/theme/details/96485
将交换机的名字修改为SW1:
[H3C]sysname SW1
在交换机分别创建VLAN 10、VLAN 20:
[SW1]vlan 10
[SW1-vlan10]quit
[SW1]vlan 20
[SW1-vlan20]quit
VLAN 10的IP设置为:192.168.10.1 255.255.255.0:
[SW1]int vlan 10
[SW1-Vlan-interface10]ip address 192.168.10.1 24
[SW1-Vlan-interface10]quit
VLAN 20的IP设置为:192.168.20.1 255.255.255.0:
[SW1]int vlan 20
[SW1-Vlan-interface20]ip address 192.168.20.1 24
[SW1-Vlan-interface20]quit
将GI1/0/1端口划分到VLAN 10:
[SW1]int gi 1/0/1
[SW1-GigabitEthernet1/0/1]port link-type access
[SW1-GigabitEthernet1/0/1]port access vlan 10
[SW1-GigabitEthernet1/0/1]quit
将GI1/0/2端口划分到VLAN 20:
[SW1]int gi 1/0/2
[SW1-GigabitEthernet1/0/2]port link-type access
[SW1-GigabitEthernet1/0/2]port access vlan 20
[SW1-GigabitEthernet1/0/2]quit
开启DHCP功能:
[SW1]dhcp enable
创建DHCP地址池,命名为VLAN10,分配网段、子网掩码、默认网关、DNS:
[SW1]dhcp server ip-pool vlan10
[SW1-dhcp-pool-vlan10]network 192.168.10.0 mask 255.255.255.0
[SW1-dhcp-pool-vlan10]gateway-list 192.168.10.1
[SW1-dhcp-pool-vlan10]dns-list 114.114.114.114
[SW1-dhcp-pool-vlan10]quit
[SW1]
创建DHCP地址池,命名为VLAN20,分配网段、子网掩码、默认网关、DNS:
[SW1]dhcp server ip-pool vlan20
[SW1-dhcp-pool-vlan20]network 192.168.20.0 mask 255.255.255.0
[SW1-dhcp-pool-vlan20]gateway-list 192.168.20.1
[SW1-dhcp-pool-vlan20]dns-list 114.114.114.114
[SW1-dhcp-pool-vlan20]quit
(0)
[H3C]dis inter vlan 1
Vlan-interface1
Current state: DOWN
Line protocol state: DOWN
Description: Vlan-interface1 Interface
Bandwidth: 100000 kbps
Maximum transmission unit: 1500
Internet protocol processing: Disabled
IP packet frame type: Ethernet II, hardware address: 40d3-800d-0102
或者在对端display mac-address可以看到
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论