实验五 VLAN配置 联系客服

发布时间 : 星期三 文章实验五 VLAN配置更新完毕开始阅读16eb045b33d4b14e852468e8

实验五 VLAN配置

一、实验目的

学会配置VLAN

二、实验内容

用packet tracer模拟实验环境,在两台交换机上共同建立起两个VLAN,配置好参数以及端口划分之后,能使得在不同交换机上在同一VLAN内的主机能通信。

三、实验过程及结论 实验拓扑结构图如下

Switch>en Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vlan 10 Switch(config-vlan)#exit Switch(config)#vlan 20 Switch(config-vlan)#exit Switch(config)#int f0/1

Switch(config-if)#switchport mode access Switch(config-if)#switchport access vvlan 10 ^

% Invalid input detected at '^' marker.

Switch(config-if)#switchport access vlan 10 Switch(config-if)#int fa0/2

Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#int fa0/24

Switch(config-if)#switchport mode trunkSwitch(config)#int fa0/2 Switch(config-if)#switchport access vlan 20

% Access VLAN does not exist. Creating vlan 20

Switch(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up

Switch(config-if)#switchport trunk allowed vlan all Switch(config-if)#no shut Switch(config-if)#exit Switch(config)#end Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#sh vlan

VLAN Name Status Ports ---- -------------------------------- --------- -------------------------------

1 default active Fa0/3, Fa0/4, 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, Gig1/1, Gig1/2 10 VLAN0010 active Fa0/1 20 VLAN0020 active Fa0/2 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1 enet 100001 1500 - - - - - 0 0 10 enet 100010 1500 - - - - - 0 0

20 enet 100020 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 0 0 1003 tr 101003 1500 - - - - - 0 0

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#int vlan 10 Switch(config-if)#

%LINK-5-CHANGED: Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

Switch(config-if)#ip address 192.168.0.3 255.255.255.128 Switch(config-if)#no shut Switch(config-if)#exit Switch(config)#int vlan 20 Switch(config-if)#

%LINK-5-CHANGED: Interface Vlan20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up s

% Ambiguous command: \

Switch(config-if)#ip address 192.168.1.2 255.255.255.128 Switch>en Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#vlan 10 Switch(config-vlan)#exit Switch(config)#vlan 20 Switch(config-vlan)#exit Switch(config)#int f0/1

Switch(config-if)#switchport mode access Switch(config-if)#switchport access vvlan 10 ^ % Invalid input detected at '^' marker.

Switch(config-if)#switchport access vlan 10 Switch(config-if)#int fa0/2

Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#int fa0/24

Switch(config-if)#switchport mode trunk

Switch(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up

Switch(config-if)#switchport trunk allowed vlan all Switch(config-if)#no shut Switch(config-if)#exit Switch(config)#end Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#sh vlan

VLAN Name Status Ports ---- -------------------------------- --------- -------------------------------

1 default active Fa0/3, Fa0/4, 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, Gig1/1, Gig1/2 10 VLAN0010 active Fa0/1 20 VLAN0020 active Fa0/2 1002 fddi-default act/unsup 1003 token-ring-default act/unsup 1004 fddinet-default act/unsup 1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------

1 enet 100001 1500 - - - - - 0 0 10 enet 100010 1500 - - - - - 0 0 20 enet 100020 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 0 0 1003 tr 101003 1500 - - - - - 0 0

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#int vlan 10 Switch(config-if)#

%LINK-5-CHANGED: Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

Switch(config-if)#ip address 192.168.0.3 255.255.255.128 Switch(config-if)#no shut Switch(config-if)#exit Switch(config)#int vlan 20 Switch(config-if)#

%LINK-5-CHANGED: Interface Vlan20, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up s

% Ambiguous command: \

Switch(config-if)#ip address 192.168.1.2 255.255.255.128