cisco交换机基于标记的vlan配置

2024-12-27 20:50:41
推荐回答(2个)
回答1:

如果f0/0-10的ip地址都使用同一网关地址的话,那就建议做pvlan.
楼主没理解我的意思吧,我建议你做一个cisco的私有vlan.华为那东西不就是把两个vlan都不打标记发出去而已嘛.

创建私有vlan 10:
vlan 10
private-vlan isolate

创建私有vlan 20:
vlan 20
private-vlan isolate

创建主vlan 30:
vlan 30
private-vlan primary
private-vlan asociation 10 20

接口0-5的配置:
switchport mode private-vlan host
switchport private-vlan host-association 30 10

接口6-10的配置:
switchport mode private-vlan host
switchport private-vlan host-association 30 20

在与3层设备相连的接口上(提供主和私有vlan对外的连同):
switchport mode private-vlan promiscuous
switchport private-vlan mapping 30(主vlan号) 20 10(私有vlan号)

最后关联私有vlan到主vlan上:
interface vlan 30
ip add x.x.x.x y.y.y.y
private-vlan mapping 10 20

你把那fa0/12的服务器划到vlan 30下就可以了.

回答2:

问下之间有连接路由或者有三层交换?没有的话,不能实现不同vlan之间通信哦,有的话,前提是不同vlan之间可以相互通信,重点是配置vlan10 vlan20不能相互通信

access-list 101 deny ip
access-list 101 premit any any
access-map name1
match ip address 1
action forward
vlan filter name1 vlan 10

access-list 102 deny ip
access-list 101 premit any any
access-map name2 match ip address 1
action forward
vlan filter name2 vlan 20