一个VLAN是局域网 (LAN) 上运行在同一 IP 地址空间中的主机的逻辑子集。将主机分组到一个 VLAN 中具有明显的优势。例如,使用 VLAN,您可以:
WORD VLAN IDs of the allowed VLANs when this port is in trunking mode add add VLANs to the current list except all VLANs except the following none no VLANs remove remove VLANs from the current list
缺省值 Enable state STP enable for all VLANs 每VLAN 生成树 Enabling STP 开启 STP STP is enabled by default on VLAN 1 and on all newly created VLANs STP on a per-VLAN basis.The switch maintains a separate instance of STP for each VLAN (except on VLANs The vlan_id value can be 1 through 4096,except reserved VLANs 在1到4096上开启除保留VLAN以外的每VLAN STP。
none Administrative private-vlan trunk encapsulation: dot1q Administrative private-vlan trunk normal VLANs : none Administrative private-vlan trunk private VLANs: none Operational private-vlan: none Trunking VLANs Enabled: ALL :允许那些VLAN通信 Pruning VLANs Enabled: 2-1001 Capture Mode Disabled Capture VLANs Allowed: ALL Protected: false Appliance trust: none 二、配置VLAN Trunk
这个方式的优点是当网管人员已经将内部网段做好规划与分配的情况下,将可大辐降低网管人员规划并设置VLANs架构的复杂度。 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ Remote SPAN VLANs Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ Remote SPAN VLANs allowed on trunk Fa0/24 1-2,4-1005 Port Vlans allowed and active in management domain Fa0 /24 1,2 //valn3已不再trunk的allowed列表 Port Vlans in spanning tree forwarding state and
(*main_intf)->dot1ad_vlans : (*main_intf)->dot1q_vlans; vlan_table = vec_elt_at_index (em->vlan_pool , vlan_table_id); *vlan_intf = &vlan_table->vlans[outer_id]; qinq_table = vec_elt_at_index (em-> qinq_pool, (*vlan_intf)->qinqs); *qinq_intf = &qinq_table->vlans[inner_id]; } static_always_inline dot1q和dot1ad分别对应dot1q_vlans和dot1ad_vlans.
The following dynamic VLANs exist: 5, 7, 8, # 显示SwitchB上的动态VLAN信息。 The following dynamic VLANs exist: 5, 7, 8, # 显示SwitchE上的动态VLAN信息。 The following dynamic VLANs exist: 5, 8, # 显示SwitchB上的动态VLAN信息。 The following dynamic VLANs exist: 5, 8, # 显示SwitchE上的动态VLAN信息。 [SwitchE] display vlan dynamic No dynamic vlans exist!
Number of vPCs configured : 0 Peer Gateway : Disabled Dual-active excluded VLANs ------------------------------- Id Port Status Consistency Reason Active vlans Secondary IP, Host Reach Mode Nve Vni Configuration 1 None None Allowed VLANs - 1 1 Local suspended VLANs - - - 1 1 Local suspended VLANs - -
Bridge-Aggregation11 Creation Mode: Manual Aggregation Mode: Dynamic Loadsharing Type: Shar Management VLANs Aggregate Interface: Bridge-Aggregation10 Aggregation Mode: Static Loadsharing Type: Shar Management VLANs
| Switch1 | | VTP Server | | VLANs | Switch3 | | VTP Transparent | | VLANs
valid interface found)Feature VLAN:--------------VTP Operating Mode : ServerMaximum VLANs supported locally : 1005Number of existing VLANs : 5Configuration Revision : 0MD5 Enabled: ALLPruning VLANs Enabled: 2-1001Capture Mode DisabledCapture VLANs Allowed: ALL35. show interfaces allowed on trunkFa0/1 1-4094Fa0/2 1-4094Port Vlans allowed and active in management domainFa0/1 1,10,20,30,40Fa0/2 1,10,20,30,40Port Vlans in spanning tree forwarding
都是存储转发设备,但层 次不同 交换机:链路层设备(检查 链路层头部) 路由器:网络层设备(检查 网络层的头部) 都有转发表: 交换机:维护交换表,按照 MAC地址转发 路由器维护路由表,执行路由算法 VLANS 单个的交换机可以分成若干虚拟 LANs [ 物理上一个交换机 虚拟成多个局域网 ] 基于端口的VLAN 流量隔离: 从/到1-8端口 的流量只会涉及到1-8 也可以基于MAC地址进行VLAN定义 动态成员: 成员可以在 VLANs 之间动态分配 router 在VLANs间转发:通过路由器进行 转发 (就像他们通过各自的交换 机相联一样) 实际操作中,设备生产商可以提供: 交换机和路由器的单一设备 VLANs 互联多个交换机 如果有多个交换机,希望它们相连并且共享VLANs信息 方法1:各交换机每个VLAN一个端口和另外交换机相应 VLAN端口相连->扩展性问题 trunk port干线端口: 多个交换机共享定义的
注意,这两组VLANs必须是惟一的,SVIs不是为跨站点扩展2层域的VLANs而定义的。 仍然以下图为例,OTV边缘设备上的join interface可以直连到3层核心网。 OTV Inline to Carry Data VLANs and VLANs for Tenants’ Layer 3 Communication 五、VXLAN EV** Multifabric
SW3#show spanning-tree mst 1 ##### MST1 vlans mapped: 10 Bridge address aabb.cc00.0400 SW3#show spanning-tree mst 2 ##### MST2 vlans mapped: 20 Bridge address aabb.cc00.0400
permit allowed VLANs pvid Specify current Trunk port's PVID VLAN characteristics [H3C-GigabitEthernet0
reset saved-configuration <SWA> reboot 步骤二:观察缺省 VLAN 在交换机上查看 VLAN,如下所示: [SWA]display vlan The following VLANs 2 [SWB-vlan2]port GigabitEthernet 1/0/1 在交换机上查看有关 VLAN 2 的信息,如下所示: [SWA]display vlan The following VLANs : VLAN 0002 Tagged Ports: none Untagged Ports: GigabitEthernet1/0/1 [SWB]display vlan The following VLANs
enable_service q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron,q-lbaas,q-fwaas Q_AGENT=linuxbridge ENABLE_TENANT_VLANS KEYSTONE_SERVICE_HOST=$SERVICE_HOST ENABLED_SERVICES=n-cpu,q-agt,neutron Q_AGENT=linuxbridge ENABLE_TENANT_VLANS
Trunking: Disabled Access Mode VLAN: 0 ((Inactive)) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: ALL Trunking VLANs Active: 1,10,20,100 Protected: false Priority for untagged frames: 0 Override Trunking: Disabled Access Mode VLAN: 0 ((Inactive)) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: ALL Trunking VLANs Active: 1,10,20,100 Protected: false Priority for untagged frames: 0 Override
Robust的结论 THE BOTTOM LINE Support for 10/25/40/100 GbE LANs Robust L2 support including RSTP/MSTP, VLANs
o-hm,o-api,q-***,q-fwaas-v2,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron Q_AGENT=linuxbridge ENABLE_TENANT_VLANS KEYSTONE_SERVICE_HOST=$SERVICE_HOST ENABLED_SERVICES=n-cpu,q-agt,neutron Q_AGENT=linuxbridge ENABLE_TENANT_VLANS