VLAN实验:三层交换原理思科认证
文章作者 100test 发表时间 2009:06:15 07:19:24
来源 100Test.Com百考试题网
Switch#vlan database
% Warning: It is recommended to configure VLAN from config mode,
as VLAN database mode is being deprecated. Please consult user
documentation for configuring VTP/VLAN in config mode.
Switch(vlan)# vlan 2 name marking
VLAN 2 added:
Name: marking
Switch(vlan)# vlan 3 name counting
VLAN 3 added:
Name: counting
2 分配端口
Switch(config)#interface FastEthernet0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface FastEthernet0/2
Switch(config-if)#switchport access vlan 2
Switch(config-if)#interface FastEthernet0/3
Switch(config-if)#switchport access vlan 3
Switch(config-if)#interface FastEthernet0/4
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#exit
Switch#
3 Show vlan 查看信息
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
2 marking active Fa0/1, Fa0/2
3 counting active Fa0/3, Fa0/4
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
1002 enet 101002 1500 - - - - - 0 0
1003 enet 101003 1500 - - - - - 0 0
其实做这个实验很简单就是划分子网,主要是为了说明三层交换机最本质工作原理,即一次路由,多次交换结合arp的工作原理,两台主机通讯时,传统的2层交换机进行arp广播寻找目标mac地址,,当目的主机在同一网段内时,不需涉及网关。否则由网关回复arp广播。
传统的2层交换模块不能实现网间互访,而三层交互交换机的三层路由模块把源和目的IP地址缓存交换机中,随后第3层中跨子网的包传送将不再由路由器来进行。实验中的三层交换机充当了传统网络中的路由器的角色,通过它可以实现网间互访。