说明 AR4充当dhcp server ,实现AR4给vlan10和vlan 20内的设备分配ip地址
LSW6配置
[Huawei]int gi0/0/1
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[Huawei-GigabitEthernet0/0/1]qu
[Huawei]port-group group-member gi0/0/2 gi0/0/3
[Huawei-port-group]port link-t ac
[Huawei-port-group]port default vlan 10
LSW7配置
[Huawei]int gi0/0/1
[Huawei-GigabitEthernet0/0/1]port trunk vlan
[Huawei-GigabitEthernet0/0/1]port trunk a
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[Huawei-GigabitEthernet0/0/1]qu
[Huawei]port-g group-member gi0/0/2 gi0/0/3
[Huawei-port-group]port link-t ac
[Huawei-port-group]port default vlan 20
LSW8配置
[Huawei]vlan batch 10 20 1111
[Huawei]int gi0/0/3
[Huawei-GigabitEthernet0/0/3]port link-t t
[Huawei-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20
[Huawei-GigabitEthernet0/0/3]int gi0/0/2
[Huawei-GigabitEthernet0/0/2]port link-t tr
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20
[Huawei-GigabitEthernet0/0/2]int gi0/0/1
[Huawei-GigabitEthernet0/0/1]port link-t ac
[Huawei-GigabitEthernet0/0/1]port default vlan 1111
vlan配置ip地址
[Huawei-Vlanif1111]ip add 192.168.254.1 25
[Huawei-GigabitEthernet0/0/1]int vlan 20
[Huawei-Vlanif20]ip add 192.168.20.1 25
[Huawei-Vlanif20]int vlan 10
[Huawei-Vlanif10]ip add 192.168.10.1 25
dhcp相关
dhcp enable
[Huawei]int vlan 20
[Huawei-Vlanif20]dhcp select relay
[Huawei-Vlanif20]dhcp relay server-ip 192.168.254.2
[Huawei-Vlanif20]int vlan 10
[Huawei-Vlanif10]dhcp select relay
[Huawei-Vlanif10]dhcp relay server-ip 192.168.254.2
测试pc网关是否通?
测试通测试通之后开始配置AR4(dhcp server)
dhcp enable
ip pool vlan_20
network 192.168.20.1 mask 25
gateway-list 192.168.20.1
dns-list 192.168.20.1 192.168.2.1
ip pool vlan_10
network 192.168.10.1 mask 25
gateway-list 192.168.10.1
dns-list 192.168.10.1 192.168.2.1
int gi0/0/0
dhcp select global
ip add 192.168.254.2 25
ip route-static 0.0.0.0 0 192.168.254.1
pc选择dhcp方式得到ip
获得ip地址实验完成!不懂留言我~
网友评论