- 首先构建拓扑图。

- 配置PC端IP。


- 配置交换机。
sysname sw1
vlan batch 10 20
interface Ethernet0/0/1
port link-type access
port default vlan 10
interface Ethernet0/0/2
port link-type access
port default vlan 10
interface Ethernet0/0/3
port link-type access
port default vlan 20
interface Ethernet0/0/4
port link-type access
port default vlan 20
interface vlanif 10
ip address 192.168.1.254 255.255.255.0
interface vlanif 20
ip address 192.168.2.254 255.255.255.0
- 进行ping命令检验。
由此可知,PC1和PC2相通,PC3和PC4相同,PC1和PC3不通,即PC1和PC2在同一vlan,PC3和PC4在同一vlan。

5338



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



