華為DHCP+VLANDHCP RELAY配置重點


拓撲如下:

1、SW和Router均需開啟DHCP enable,以及配置對應的vlan

2、DHCP RELAY信息配置在SW里面

3、DHCP POOL配置在Router里面

4、Router里面需要配置默認路由,網關指向SW的vlan10網關

5、連接dhcp客戶端的以太網接口均需配置好vlan模式。

 

SW配置:

vlan batch 10 20 30
dhcp enable
interface Vlanif10
 ip address 12.1.1.1 255.255.255.0
#
interface Vlanif20
 ip address 192.168.20.1 255.255.255.0
 dhcp select relay
 dhcp relay server-ip 12.1.1.2
#
interface Vlanif30
 ip address 172.17.30.1 255.255.255.0
 dhcp select relay
 dhcp relay server-ip 12.1.1.2

interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 10
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 20
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 30
#

Router配置:
vlan batch 10 20 30

dhcp enable
#
ip pool vlan20
 gateway-list 192.168.20.1
 network 192.168.20.0 mask 255.255.255.0
 excluded-ip-address 192.168.20.2 192.168.20.100
 dns-list 192.168.20.1
#
ip pool vlan30
 gateway-list 172.17.30.1
 network 172.17.30.0 mask 255.255.255.0
 lease day 8 hour 0 minute 0
 dns-list 172.17.30.1
#
interface GigabitEthernet0/0/0
 ip address 12.1.1.2 255.255.255.0
 dhcp select global
#
ip route-static 0.0.0.0 0.0.0.0 12.1.1.1




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM