首页 > 其他 > 详细

(华为)DHCP与VLAN结合的应用

时间:2018-02-05 19:52:58      阅读:285      评论:0      收藏:0      [点我收藏+]
技术分享图片
1.通过搭建的拓扑图来实现PC的IP地址自动获取
2.配置思路:
⑴首先将PC机调到DHCP自动获取状态;
技术分享图片
⑵创建相应的VLAN,将VLAN放入对应的端口;
<Huawei>system-view
[SW2]vlan batch 10 20 30
[SW2]interface Eth0/0/2
[SW2-Ethernet0/0/2]port link-type access
[SW2-Ethernet0/0/2]port default vlan 10
[SW2]interface Eth0/0/3
[SW2-Ethernet0/0/3]port link-type access
[SW2-Ethernet0/0/3]port default vlan 20
[SW2]interface Eth0/0/1
[SW2-Ethernet0/0/1]port link-type trunk
[SW2-Ethernet0/0/1]port trunk allow-pass vlan all
<Huawei>system-view
[SW3]vlan batch 10 20 30
[SW3]interface Eth0/0/2
[SW3-Ethernet0/0/2]port link-type access
[SW3-Ethernet0/0/2]port default vlan 30
[SW3]interface Eth0/0/1
[SW3-Ethernet0/0/1]port link-type trunk
[SW3-Ethernet0/0/1]port trunk allow-pass vlan all

⑶在三层交换机上创建DHCP地址池,并开启;
<Huawei>system-view
[SW1]vlan batch 10 20 30
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[SW1-GigabitEthernet0/0/1]int g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type trunk
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[SW1]interface Vlanif 10
[SW1-Vlanif10]ip address 192.168.1.254 24
[SW1-Vlanif10]int vl20
[SW1-Vlanif20]ip address 192.168.2.254 24
[SW1-Vlanif20]int vl30
[SW1-Vlanif30]ip address 192.168.3.254 24
[SW1]dhcp enable
[SW1]ip pool vlan10
[SW1-ip-pool-vlan10]network 192.168.1.0 mask 24
[SW1-ip-pool-vlan10]gateway-list 192.168.1.254
[SW1-ip-pool-vlan10]dns-list 8.8.8.8
[SW1]ip pool vlan20
[SW1-ip-pool-vlan20]network 192.168.2.0 mask 24
[SW1-ip-pool-vlan20]gateway-list 192.168.2.254
[SW1-ip-pool-vlan20]dns-list 8.8.8.8
[SW1]ip pool vlan30
[SW1-ip-pool-vlan30]network 192.168.3.0 mask 24
[SW1-ip-pool-vlan30]gateway-list 192.168.3.254
[SW1-ip-pool-vlan30]dns-list 8.8.8.8
[SW1]interface Vlanif 10
[SW1-Vlanif10]dhcp select global
[SW1-Vlanif10]int vl20
[SW1-Vlanif20]dhcp select global
[SW1-Vlanif20]int vl30
[SW1-Vlanif30]dhcp select global
技术分享图片
技术分享图片

⑷ 验证;注意:华为获取的IP地址是从254往下开始分配的,思科是从1往上开始分配的;
PC1:
技术分享图片
PC2:
技术分享图片
PC3:
技术分享图片

(华为)DHCP与VLAN结合的应用

原文:http://blog.51cto.com/13562456/2069140

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!