
1.PC1和PC3所在接口为access,属于vlan2;PC2、4、5、6处于同一网段,其中PC2可以访问PC4、5、6,但PC4可以访问PC5,不能访问PC6
2.PC5不能访问PC6
3.PC1、3与PC2、4、5、6不在同一个网段
4.所有PC通过DHCP获取IP地址,且PC1、3可以正常访问PC2、4、5、6
一、配置VLAN
SW1举例:
vlan batch 2 to 6
interface GigabitEthernet 0/0/1
port link-type access
port default vlan 2
interface GigabitEthernet 0/0/2
port hypvid pvid vlan 3
port hybrid untagged vlan 3 to 6
interface GigabitEthernet 0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 6
interface GigabitEthernet 0/0/4
port hybrid tagged vlan 2
port hybrid untagged vlan 3 to 6
display port vlan active
各VLAN表


二、配置DHCP
int g 0/0/0.1
ip address 192.168.1.1 24
dot1q termination vid 2
arp broadcast enable
int g 0/0/0
ip address 192.168.2.1 24
dhcp enable
ip pool dhcp1
Info: It's successful to create an IP address pool.
network 192.168.1.0 mask 24
gateway-list 192.168.1.1
dns-list 114.114.114.114 8.8.8.8
ip pool dhcp2
Info: It's successful to create an IP address pool.
network 192.168.2.0 mask 24
gateway-list 192.168.2.1
dns-list 114.114.114.114 8.8.8.8
dhcp select global
int g 0/0/0.1
dhcp select global
各PCIP地址





PC4pingPC5、6

PC5pingPC6

文章描述了一个网络环境中,PC之间的访问问题,涉及到VLAN划分(access和trunk端口),以及DHCP服务器的配置。PC2、4、5、6在同一网段但PC4不能访问PC6,PC1、3与他们不在同一网段。配置中提到DHCP分配IP地址并检查了PC间的ping测试。
1520

被折叠的 条评论
为什么被折叠?



