最近学习GNS3模拟器(以前一直用PT5.3),看的是“逆风飞扬”老师的学习视频。非常郁闷的是,按照视频里,使用3640添加16×××换模块做vlan隔离(不添加SVI)是没问题的,但是却一直失败。

 

两台路由器的配置如下:

R1#show run
Building configuration...

Current configuration : 1023 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
interface FastEthernet0/0
 switchport access vlan 2
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
 switchport access vlan 3
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
 switchport mode trunk
!
interface Vlan1
 no ip address
!
no ip http server
no ip http secure-server
!
!
control-plane
!
!
!
line con 0
 exec-timeout 0 0
 logging synchronous
line aux 0
line vty 0 4
!
!
end

注:GNS3版本是0.7.4all-in-one,3640的IOS版本为unzip-c3640-ik9o3s-mz.124-10.bin(和视频里的版本一样)PC用的是VPCS模拟。

主机的杀毒软件、防火墙都关闭了。为了预防路由器的端口状态为down,全都执行了shutdown后再执行no shutdown,显示端口状态也为up。

但同一个VLAN的PC就是没法ping通,提示host not reachable!

直接将PC接到GNS3提供的傻瓜交换机上,能ping通!

这是什么原因呢?

-------------------------------更新1:

只要设置好SVI,各PC就能通信了。看来用GNS3模拟交换机还是比较勉强。

 

---------------------------------更新2:

使用GNS3做交换实验的几点体会:

 

1、使用合适的IOS(推荐http://dl.dbank.com/c0kk4yb0vk   能做交换实验的3640 IOS)添加16×××换模块。

2、使用manual方式连线。

3、在vlan database模式下建立vlan,建立成功推出vlan database会看到提示信息。(注:某些较新的IOS支持全局配置模式下建立vlan)

4、查看vlan信息:show vlan-switch

5、进入端口范围: int  fa  0/0  -15 (注意空格)

6、建立SVI之前,就算同一个vlan的成员也无法通信(路由器中show  mac查看不到任何接入 交换端口的电脑的信息,不知道到原因是什么),建立SVI后,各PC先ping通自己的网关,才能ping通其它PC

 

总结:GNS3模拟交换实验确实不怎样,很多PT下能做的实验都不能做。做实验应该按实际的需要选择合适的模拟器。