公司为了保密实现如下需要:
1公司内部PC1、PC2可以互访,并能访问公司内部服务器;
2公司外来人员PC3、PC4之间不可以互访,但是能访问公司内部服务器;
交换机SW1配置
<Huawei>
<Huawei>system-view
[Huawei]sysname SW1
[SW1]undo info-center enable
[SW1]vlan batch 10 20 30 100
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access
[SW1-GigabitEthernet0/0/1]port default vlan 20
[SW1-GigabitEthernet0/0/1]q
[SW1]interface GigabitEthernet 0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 20
[SW1-GigabitEthernet0/0/2]q
[SW1]interface GigabitEthernet 0/0/3
[SW1-GigabitEthernet0/0/3]port link-type access
[SW1-GigabitEthernet0/0/3]port default vlan 10
[SW1-GigabitEthernet0/0/3]q
[SW1]interface GigabitEthernet 0/0/4
[SW1-GigabitEthernet0/0/4]port link-type access
[SW1-GigabitEthernet0/0/4]port default vlan 10
[SW1-GigabitEthernet0/0/4]q
[SW1]interface GigabitEthernet 0/0/20
[SW1-GigabitEthernet0/0/20]port link-type access
[SW1-GigabitEthernet0/0/20]port default vlan 30
[SW1-GigabitEthernet0/0/20]q
[SW1]
配置VLAN30为主VLAN(被访问的服务器组)
[SW1]vlan 30
[SW1-vlan30]mux-vlan
[SW1-vlan30]subordinate group 20 ;20为互通型VLAN
[SW1-vlan30]subordinate separate 10 ;10为隔离型VLAN
查看配置
启用MUX-VLAN
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port mux
[SW1-GigabitEthernet0/0/1]port mux-vlan en
[SW1-GigabitEthernet0/0/1]port mux-vlan enable
[SW1-GigabitEthernet0/0/2]port mux-vlan enable
[SW1-GigabitEthernet0/0/3]port mux-vlan enable
[SW1-GigabitEthernet0/0/4]port mux-vlan enable
[SW1-GigabitEthernet0/0/20]port mux-vlan enable
再看一下MUX-VLAN情况;
经过测试,满足需求,配置完成。