光棍节一天让我郁闷的一件事 Vlan划分

SW1:192.168.0.2


     CLI session with the switch is open.
     To end the CLI session, enter [Exit].

 


Switch>
%LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/6, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/7, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/9, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/9, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/10, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/11, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down
Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#hostname
%Incomplete command.

Switch(config)#hostname Sw1
Sw1(config)#exit
Sw1#vlan database

Sw1(vlan)#vlan 2 name student
VLAN 2 added:
    Name:student
Sw1(vlan)#vlan 3 name teacher
VLAN 3 added:
    Name:teacher
Sw1(vlan)#exit
APPLY completed.
Exiting....
Sw1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Sw1(config)#int fastethernet 0/1
Sw1(config-if)#switchport access vlan 2
Sw1(config-if)#exit
Sw1(config)#int fastethernet 0/2
Sw1(config-if)#s
Sw1(config-if)#switchport access vlan 2
Sw1(config-if)#exit
Sw1(config)#int fastethernet 0/12
Sw1(config-if)#switchport access vlan 3
Sw1(config-if)#end

Sw1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Sw1(config)#int vlan 2
Sw1(config-if)#ip address 192.168.0.2 255.255.255.0
Sw1(config-if)#no shut
Sw1(config-if)#exit
Sw1(config)#interface fastethernet 0/12
Sw1(config-if)#switchport trunk encapsulation dot1q
Sw1(config-if)#switchport mode trunk
Sw1(config-if)#switchport access vlan 2
Sw1(config-if)#exit
Sw1(config)#int vlan 2

Sw1(config-if)#exit
Sw1(config)#end
Sw1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Sw1(config)#ip default-gateway 192.168.0.1
Sw1(config)#end

 

 

 

 

 

 

 

 

 

 

SW2:192.168.0.3


     CLI session with the switch is open.
     To end the CLI session, enter [Exit].

 


%LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/5, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/6, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/6, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/7, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/8, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/9, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/9, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/10, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down
%LINK-3-UPDOWN: Interface FastEthernet0/11, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down

Switch>en
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#h
Switch(config)#hostname Sw2
Sw2(config)#exit
Sw2#vlan database
Sw2(vlan)#exit
APPLY completed.
Exiting....
Sw2#int 
Sw2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Sw2(config)#int fastethernet 0/1
Sw2(config-if)#switchport access vlan 3
% Access VLAN does not exist. Creating vlan 3

Sw2(config-if)#exit
Sw2(config)#exit
Sw2#vlan database
Sw2(vlan)#vlan 3 name teacher
Sw2(vlan)#exit
APPLY completed.
Exiting....
Sw2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Sw2(config)#int fastethernet 0/1
Sw2(config-if)#switchport access vlan 3
Sw2(config-if)#exit
Sw2(config)#int fastethernet 0/2
Sw2(config-if)#switchport access vlan 3
Sw2(config-if)#exit
Sw2(config)#int fastethernet 0/12
Sw2(config-if)#switchport access vlan 3
Sw2(config-if)#end
Sw2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Sw2(config)#int vlan 2
Sw2(config-if)#exit
Sw2(config)#exit
Sw2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Sw2(config)#int vlan 3
Sw2(config-if)#ip address 192.168.0.3 255.255.255.
Sw2(config-if)#ip address 192.168.0.3 255.255.255.0
Sw2(config-if)#no shut
Sw2(config-if)#end
Sw2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.

Sw2(config)#ip default-gateway 192.168.0.1
Sw2(config)#end
Sw2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Sw2(config)#interface fastethernet 0/12
Sw2(config-if)#s
Sw2(config-if)#switchport trunk encapsulation dot1q
Sw2(config-if)#switchport mode trunk
Sw2(config-if)#switchport access vlan 3
Sw2(config-if)#end
Sw2#ping 192.168.0.1
% Unrecognized host or address, or protocol not running.
Sw2#ping 192.168.0.22
% Unrecognized host or address, or protocol not running.
Sw2#

 

 

 

 

 

 

 

 

 

pc1:192.168.0.11

 

 

 

 

Boson BOSS 5.0
Copyright 1998-2003 Boson Software, Inc.
Use the command help to get started

Press Enter to begin
C:>winipcfg
C:>ping 192.168.0.22
Pinging 192.168.0.22 with 32 bytes of data:

Reply from 192.168.0.22: bytes=32 time=60ms TTL=241
Reply from 192.168.0.22: bytes=32 time=60ms TTL=241
Reply from 192.168.0.22: bytes=32 time=60ms TTL=241
Reply from 192.168.0.22: bytes=32 time=60ms TTL=241
Reply from 192.168.0.22: bytes=32 time=60ms TTL=241

Ping statistics for 192.168.0.22:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms

 

C:>ping 192.168.0.33
Pinging 192.168.0.33 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.0.33:
     Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),
Approximate round trip times in milli-seconds:
     Minimum = 0ms, Maximum =  0ms, Average =  0ms

 

 

 

 

 

 

 

 

PC2:192.168.0.22

 

 

Boson BOSS 5.0
Copyright 1998-2003 Boson Software, Inc.
Use the command help to get started

Press Enter to begin
C:>winipcfg
C:>winipcfg
C:>ping 192.168.0.33
Pinging 192.168.0.33 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.0.33:
     Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),
Approximate round trip times in milli-seconds:
     Minimum = 0ms, Maximum =  0ms, Average =  0ms

 

 

 

 

 

 

 

 

PC:3192.168.0.33

 

 

 

Boson BOSS 5.0
Copyright 1998-2003 Boson Software, Inc.
Use the command help to get started

Press Enter to begin
C:>winipcfg
C:>winipcfg
C:>ping 192.168.0.33
Pinging 192.168.0.33 with 32 bytes of data:

Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241

Ping statistics for 192.168.0.33:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms

C:>ping 192.168.0.44
Pinging 192.168.0.44 with 32 bytes of data:

Reply from 192.168.0.44: bytes=32 time=60ms TTL=241
Reply from 192.168.0.44: bytes=32 time=60ms TTL=241
Reply from 192.168.0.44: bytes=32 time=60ms TTL=241
Reply from 192.168.0.44: bytes=32 time=60ms TTL=241
Reply from 192.168.0.44: bytes=32 time=60ms TTL=241

Ping statistics for 192.168.0.44:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms

 

 

 

 

 

 

 

 

PC4:192.168.0.44

 

 

Boson BOSS 5.0
Copyright 1998-2003 Boson Software, Inc.
Use the command help to get started

Press Enter to begin
C:>winipcfg
C:>ping 192.168.0.22
Pinging 192.168.0.22 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.0.22:
     Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),
Approximate round trip times in milli-seconds:
     Minimum = 0ms, Maximum =  0ms, Average =  0ms

C:>ping 192.168.0.33
Pinging 192.168.0.33 with 32 bytes of data:

Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241
Reply from 192.168.0.33: bytes=32 time=60ms TTL=241

Ping statistics for 192.168.0.33:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms

 

同一Vlan段之间能通信

可是我怎么弄都弄不了两个Vlan之间就是不能通信

真是郁闷啊

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值