今天有人请教关于VLAN的试验,很久没有做了,所以就来做做,结果不成功,也不知道为什么,很纳闷
这是一个简单的用packet tracer 4.1做的关于VLAN在不同区域,能够与相同VLANping通的试验,不过,实验失败了,原因不详,请各位指导,给出意见!再次写过,下面听我细细道来
PC1:192.168.2.7--------f0/1 SW1
PC2:192.168.2.8--------f0/2 SW1
PC3:192.168.2.9--------f0/3 SW1
PC4:192.168.2.10------f0/5 SW1
        SW1  f0/4------------f0/4  SW2
PC5:192.168.3.7--------f0/1 SW2
PC6:192.168.3.8--------f0/2 SW2
PC7:192.168.3.9--------f0/3 SW2
         SW1 f0/6------------f0/6 SW3
我的配置SW1 show run后
S1# show run
Building configuration...
Current configuration : 1095 bytes
!
version 12.2
no service password-encryption
!
hostname S1
!
interface FastEthernet0/1
 switchport access vlan 2
!
interface FastEthernet0/2
 switchport access vlan 3
 switchport mode access
!
interface FastEthernet0/3
 switchport access vlan 2
!
interface FastEthernet0/4
  switchport mode trunk
!
interface FastEthernet0/5
 switchport access vlan 3
!
interface FastEthernet0/6
 switchport mode trunk
!
interface Vlan1
 no ip address
 shutdown
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
!
end
 
 
S1# show interfaces trunk
Port        Mode         Encapsulation  Status        Native vlan
Fa0/4       on           802.1q         trunking      1
Fa0/6       on           802.1q         trunking      1
Port        Vlans allowed on trunk
Fa0/4       1-1005
Fa0/6       1-1005
Port        Vlans allowed and active in management domain
Fa0/4       1,2,3,1002,1003,1004,1005
Fa0/6       1,2,3,1002,1003,1004,1005
Port        Vlans in spanning tree forwarding state and not pruned
Fa0/4       1,2,3,1002,1003,1004,1005
Fa0/6       1,2,3,1002,1003,1004,1005
 
SW2 配置showrun后
S2# show run
Building configuration...
Current configuration : 1022 bytes
!
version 12.2
no service password-encryption
!
hostname S2
!
interface FastEthernet0/1
 switchport access vlan 2
!
interface FastEthernet0/2
 switchport access vlan 3
!
interface FastEthernet0/3
 switchport access vlan 2
!
interface FastEthernet0/4
 switchport mode trunk
!
interface Vlan1
 no ip address
 shutdown
!
line con 0
!
line vty 0 4
 login
line vty 5 15
 login
!
end
S2# show interfaces trunk
Port        Mode         Encapsulation  Status        Native vlan
Fa0/4       on           802.1q         trunking      1
Port        Vlans allowed on trunk
Fa0/4       1-1005
Port        Vlans allowed and active in management domain
Fa0/4       1,2,3,1002,1003,1004,1005
Port        Vlans in spanning tree forwarding state and not pruned
Fa0/4       1,2,3,1002,1003,1004,1005
 
问题在于:我让PC1发包给同一个VLAN的PC5,但是会fail,到底是为什么
 
排除的问题
1、no shut
2、trunk我两边都sw mode trunk
                       sw trunk allowed vlan all
3、交换机单边的PC在同一个VLAN 能ping通
4、交换机SW1与SW2连接的那两个端口,SW1在闪烁,SW2的没闪烁
     我在想:会不会是packet tracer出问题了,我觉得我做的步骤都是没错的
 
 
问题解决,原来每个PC要配置成一个网段的,不同的交换机也要配置成一个网段...
 
另外vlan不在同一个网段,还要避免广播风暴,那么就要弄一个三层switch,或者路由器在交换机连接那个