组网图:
NetEye1的CLI命令配置:
NetEye@root> configure modeNetEye@root-system] interface ethernet 2
NetEye@root-system-if-eth2] working-type layer2-interface
NetEye@root-system-if-eth2] port mode access
NetEye@root-system-if-eth2] port access vlan 104
NetEye@root-system-if-eth2] exit
NetEye@root-system] interface ethernet s1p2
NetEye@root-system-if-eth-s1p2] working-type layer2-interface
NetEye@root-system-if-eth-s1p2] port mode access
NetEye@root-system-if-eth-s1p2] port access vlan 105
NetEye@root-system-if-eth-s1p2] exit
NetEye@root-system] interface ethernet 1
NetEye@root-system-if-eth1] working-type layer2-interface
NetEye@root-system-if-eth1] port mode trunk
NetEye@root-system-if-eth1] port trunk allowed vlan 104,105
NetEye@root-system-if-eth1] end
NetEye@root> save config
NetEye2的配置和1一样。只是注意相应的接口。
VLan的应用
某公司内有两个部门:A 和B,部门A 中又有两个小组:小组1 和小组2。通过划分VLAN 来实现同一部门之间以二层交换的方式通信,而不同部门之间的成员则以三层路由的方式通信。NetEye VLAN 划分如图2 所示:
配置命令:
NetEye@root> configure modeNetEye@root-system] vlan 201
NetEye@root-system-vlan201] hold ethernet 1,2
NetEye@root-system-vlan201] ip address 10.3.1.2 255.255.255.0
NetEye@root-system-vlan201] exit
NetEye@root-system] vlan 202
NetEye@root-system-vlan202] hold ethernet s1p2
NetEye@root-system-vlan202] ip address 192.168.1.6 255.255.255.0
NetEye@root-system-vlan202] end
NetEye@root> save config