誉天Cisco、RHCE、RHCA认证论坛[武汉CCNA.CCNP.CCIE.RHCE.RHCA培训]'s Archiver

寂寞的ID 发表于 2009-7-22 15:09

[ 求助]Dynamips做VLAN间路由试验

用dynamips做VLAN间路由试验,3台7200路由器(R1,R3,R4)由一台3640(S1)搭载交换模块连接。划分了10和11两个vlan(R3属于vlan10,R4属于VLAN11) ,vlan内部可以ping通(R3,R4可以ping通R1),但vlan间无法ping通.
R1上已使能ip routing。
不知道是否和模拟器有关系,请高手指教,多谢!

配置如下:
------------------
R1:
interface FastEthernet0/0
no ip address
duplex full
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
!
interface FastEthernet0/0.11
encapsulation dot1Q 11
ip address 192.168.11.1 255.255.255.0
!
--------------------

R3:
!
interface FastEthernet0/0
ip address 192.168.10.2 255.255.255.0
duplex full
!
ip default-gateway 192.168.10.1

---------------

R4:
interface FastEthernet0/0
ip address 192.168.11.2 255.255.255.0
duplex full
!         
ip default-gateway 192.168.11.1

------------------

S1:
!
interface FastEthernet0/0
switchport trunk allowed vlan 1,10,11,1002-1005
switchport mode trunk
!
interface FastEthernet0/1
switchport access vlan 10
!
interface FastEthernet0/2
switchport access vlan 11

interface Vlan1
ip address 192.168.1.2 255.255.255.0
no ip route-cache
!
interface Vlan10
no ip address
no ip route-cache
!
interface Vlan11
no ip address
no ip route-cache

------------------

S1 MAC address table

switch-1#show mac-address-table
Destination Address  Address Type  VLAN  Destination Port
-------------------  ------------  ----  --------------------
cc00.0f44.0000          Self          1     Vlan1
cc00.0f44.0000          Self         10     Vlan10
cc00.0f44.0000          Self         11     Vlan11
ca00.0f94.0000          Dynamic      10     FastEthernet0/1
ca00.1778.0000          Dynamic       1     FastEthernet0/0
ca00.1350.0000          Dynamic      11     FastEthernet0/2
ca00.1778.0000          Dynamic      11     FastEthernet0/0

windecember 发表于 2009-7-23 09:39

要实现VLAN间通信,可以使用三种方法:
1、SVI,交换虚拟接口,需要在三层交换机上配置Ip routing、及每个VLAN的IP地址,如:
ip routing
int vlan 10
ip add 192.168.10.1
int vlan 20
ip add 192.168.20.1
2、使用路由端口,其实也就是直接使用三层交换机的路由功能,需要在每个端口处配置no switchport,然后在配置IP地址即可。
3、以上两种方法均可在三层交换机上直接实现,如果是二层交换机,则必须使用单臂路由。
    根据楼主,配置所看,楼主应该是想用单臂路由,由于配置不全,楼主可以在R1上检查下路由,show ip route,查看是否存在10网段和11网段的路由。

lingshu98 发表于 2009-7-24 11:31

interface Vlan1
ip address 192.168.1.2 255.255.255.0
no ip route-cache

这个IP给去掉试看看!

860020100 发表于 2009-8-8 17:13

native vlan 需要单独封装在一个vlan中
建议在R1配一条:R1(config)#interface f0/0.1
                                                       encapsulation dot1Q 1 native

tan3000 发表于 2010-2-2 14:02

你要是用单臂路由,交换机上就不用int vlan了,就当纯2层交换机就行了,起trunk。如果s1充当三层交换机就需要int vlan,而且要打开路由功能,这样,上边那台路由器就不用单臂路由了

wdroom 发表于 2010-3-9 22:22

从楼主的配置来看,应该是单臂路由的配置法,我觉得没有什么问题,看一下R1的路由表是否存在两个网段的路由,和R1的int FastEthernet0/0是不是no shutdown.

misszq2008 发表于 2010-3-10 19:07

我认为是3640交换机ip routing功能的问题
1、把3640的ip routing 功能关闭,3640当2层交换机用,以上配置因该没有问题。
2、把3640的ip routing 功能打开(默认是打开的)当3层交换机用。然后int vlan 10 和int vlan 11 里将192.168.10.1 和192.168.20.1 分别配置进去,但R1就要配置其他网段了。
LZ应该是想用第一种方法配置单臂路由吧。。。

wdroom 发表于 2010-3-10 22:01

[i=s] 本帖最后由 wdroom 于 2010-3-10 22:09 编辑 [/i]

画个图好理解。

deyygy_1230 发表于 2010-3-11 11:47

没有封装,再看一下你的电脑配置是不是够,端口经常开关一下

sundance 发表于 2010-4-5 14:53

[b] [url=http://www.51chongdian.net/bbs/redirect.php?goto=findpost&pid=337187&ptid=17931]2#[/url] [i]windecember[/i] [/b]
其实还有一种方法你漏了,只是成本比较高而已,具体应用有局限性而已
就是为每个VLAN分配独立的接口
比如说有R1 sw PC-1  PC-2
R1和SW用2根线,分别划2个vlan,再把PC-1划到一个VLAN,PC-2划到另一个VLAN

sundance 发表于 2010-4-5 15:00

还有楼主,你这个既然做的是单臂,那就不要多余的配置了,我把详细配置给你做好了,你试试我的配置
R1
int f0/0.10
  encapsulation dot1q 10        //路由器子接口也要进行封装
  ip add 192.168.10.1 255.255.255.0
int f0/0.11
  encapsulation dot1q 20
  ip add 192.168.11.1 255.255.255.0
int f0/0
  no shu
  full

R3
no ip routing
int f0/0
  ip add 192.168.10.2 255.255.255.0
  no shu
  full
ip default-gateway 192.168.10.1

R4
no ip routing
int f0/0
  ip add 192.168.11.2 255.255.255.0
  no shu
  full
ip default-gateway 192.168.11.1


sw
int f0/0
  sw mo trunk
  sw trunk encapsulation dot1q    //你这里没封装,不过应该默认就封装了
int f0/1
  sw mo acc
  sw acc vlan 10
int f0/2
  sw mo acc
  sw acc vlan 20
到此单臂路由就完成了,也实现了VLAN间路由

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.