一,实验拓扑图及实验需求
二,分析实验需求并满足实验要求
1.先创建VLAN2,3
[SW1]VLAN batch 2 3
/*batch意为创建多个VLAN*/
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1]
Jul 29 2024 13:35:50-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 5, the c
hange loop count is 0, and the maximum number of records is 4095.
为几个接口都分配vlan
[SW1]interface GigabitEthernet 0/0/3
[SW1-GigabitEthernet0/0/3]port link-type access
[SW1-GigabitEthernet0/0/3]port default vlan 2
[SW1-GigabitEthernet0/0/4]port link-type access
[SW1-GigabitEthernet0/0/4]port default vlan 3
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 2 3
/*总路干*/
[SW1-GigabitEthernet0/0/1]port link-type allow
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 3
/*总路干*/
配置无误
2.DHCP配置(创建池塘)
[AR1]dhcp enable
[AR1]ip pool vlan2
Info: It's successful to create an IP address pool.
[AR1-ip-pool-vlan2]network 192.168.2.0 mask 24
[AR1-ip-pool-vlan2]gateway-list 192.168.2.254
[AR1-ip-pool-vlan2]dns-list 8.8.8.8
[AR1-ip-pool-vlan2]quit
[AR1]ip pool vlan3
Info: It's successful to create an IP address pool.
[AR1-ip-pool-vlan3]network 192.168.3.0 mask 24
[AR1-ip-pool-vlan3]gateway-list 192.168.3.254
[AR1-ip-pool-vlan3]dns-list 8.8.8.8
[AR1-ip-pool-vlan3]
[AR1-ip-pool-vlan3]quit
注意:一般VLAN几IP地址后面就是几!
实验结果:
能够正常通讯
实验成功,满足所有需求