设为首页收藏本站language 语言切换
查看: 3643|回复: 35
收起左侧

[求助] 三层交换出现的一个奇怪问题

[复制链接]
发表于 2015-5-3 23:47:30 | 显示全部楼层 |阅读模式
3鸿鹄币
1.jpg

为什么PC1和PC3不能通PC2和PC4呢?sw已经开启IP routing了的
SW配置文件里面红色字体那一条自动生成的,难道是它导致的?

SW:running-config
Building configuration...

Current configuration : 1691 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname sw
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
!
!
ip cef
no ip domain lookup
!
!
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
archive
log config
  hidekeys
!   
ip tcp synwait-time 5
ip ssh version 1
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
switchport mode trunk
!
interface FastEthernet1/1
switchport mode trunk
!
interface FastEthernet1/2
!

.
.!
!
interface FastEthernet1/15
!
interface Vlan1
no ip address
!
interface Vlan10
ip address 192.168.10.254 255.255.255.0
!
interface Vlan20
ip address 192.168.20.254 255.255.255.0
!
no ip http server
no ip http secure-server
!
ip forward-protocol nd
!
mac-address-table static cc01.0c08.0000 interface FastEthernet1/1 vlan 10
no cdp log mismatch duplex
!
control-plane
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
end

SW1:running-config
Building configuration...

Current configuration : 1733 bytes
!
! Last configuration change at 20:51:18 UTC Thu Apr 30 2015
!
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname sw1
!
boot-start-marker
boot-end-marker
!
logging discriminator EXCESS severity drops 6 msg-body drops EXCESSCOLL
logging buffered 50000
logging console discriminator EXCESS
!
no aaa new-model
no ip icmp rate-limit unreachable
!         
ip cef
!
no ip domain-lookup
no ipv6 cef
ipv6 multicast rpf use-bgp
!
spanning-tree mode pvst
spanning-tree extend system-id


vlan internal allocation policy ascending
!
ip tcp synwait-time 5
!         
interface Ethernet0/0
duplex auto
!
interface Ethernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface Ethernet0/2
duplex auto
!
interface Ethernet0/3
duplex auto
!
interface Ethernet1/0
switchport access vlan 10
switchport mode access
!
interface Ethernet1/1
switchport access vlan 10
switchport mode access
!
interface Ethernet1/2
switchport access vlan 20
switchport mode access
!
interface Ethernet1/3
switchport access vlan 20
switchport mode access
!
interface Ethernet2/0
duplex auto
!
.
.
.
!
interface Ethernet3/3
duplex auto
!
interface Vlan1
no ip address
shutdown
!
no ip http server
!
control-plane
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
end

SW2:running-config
Building configuration...

Current configuration : 1733 bytes
!
! Last configuration change at 20:51:35 UTC Thu Apr 30 2015
!
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname sw2
!
boot-start-marker
boot-end-marker
!
!
logging discriminator EXCESS severity drops 6 msg-body drops EXCESSCOLL
logging buffered 50000
logging console discriminator EXCESS
!
no aaa new-model
no ip icmp rate-limit unreachable
!         
ip cef
!
no ip domain-lookup
no ipv6 cef
ipv6 multicast rpf use-bgp
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
ip tcp synwait-time 5
!         
interface Ethernet0/0
duplex auto
!
interface Ethernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface Ethernet0/2
duplex auto
!
interface Ethernet0/3
duplex auto
!
interface Ethernet1/0
switchport access vlan 10
switchport mode access
!
interface Ethernet1/1
switchport access vlan 10
switchport mode access
!
interface Ethernet1/2
switchport access vlan 20
switchport mode access
!
interface Ethernet1/3
switchport access vlan 20
switchport mode access
!
interface Ethernet2/0
duplex auto
!
.
.
.
!
interface Ethernet3/3
duplex auto
!
interface Vlan1
no ip address
shutdown
!
no ip http server
!
control-plane
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
end




最佳答案

查看完整内容

肯定不是那句话引起的. 1.你PC1 PC2 PC3 PC4上面 默认网关配置了吗? 都要配置 如果上面的办法不行 2.请在3层交换机上用 show ip cef查看一下
发表于 2015-5-3 23:47:31 | 显示全部楼层
本帖最后由 lancewait 于 2015-5-4 00:58 编辑

肯定不是那句话引起的.
1.你PC1 PC2 PC3 PC4上面 默认网关配置了吗?  都要配置

如果上面的办法不行

2.请在3层交换机上用 show ip cef查看一下

沙发 2015-5-3 23:47:31 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-5-4 01:06:16 | 显示全部楼层
lancewait 发表于 2015-5-4 00:49
肯定不是那句话引起的.
1.你PC1 PC2 PC3 PC4上面 默认网关配置了吗?  都要配置

PC是用3560模拟的,不配网关也会向外发送数据的。配了网关也没有。
板凳 2015-5-4 01:06:16 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-5-4 01:47:27 | 显示全部楼层
lancewait 发表于 2015-5-4 00:49
肯定不是那句话引起的.
1.你PC1 PC2 PC3 PC4上面 默认网关配置了吗?  都要配置

sw#show ip cef   
Prefix              Next Hop             Interface
0.0.0.0/0           drop                 Null0 (default route handler entry)
0.0.0.0/32          receive
192.168.10.0/24     attached             Vlan10
192.168.10.0/32     receive
192.168.10.254/32   receive
192.168.10.255/32   receive
192.168.20.0/24     attached             Vlan20
192.168.20.0/32     receive
192.168.20.1/32     192.168.20.1         Vlan20
192.168.20.2/32     192.168.20.2         Vlan20
192.168.20.254/32   receive
192.168.20.255/32   receive
224.0.0.0/4         drop
224.0.0.0/24        receive
255.255.255.255/32  receive
这个是SHOW  IP CEF的结果。VLAN10和vlan20配置都是类似,为什么会这样呢。求解答。谢谢。
地板 2015-5-4 01:47:27 回复 收起回复
回复

使用道具 举报

发表于 2015-5-4 09:41:01 | 显示全部楼层
同意 ,先配置一下你的网关吧
5# 2015-5-4 09:41:01 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-5-4 10:25:03 | 显示全部楼层
zhangyapeng 发表于 2015-5-4 09:41
同意 ,先配置一下你的网关吧

配了默认网关了也没用
6# 2015-5-4 10:25:03 回复 收起回复
回复

使用道具 举报

发表于 2015-5-4 11:00:21 | 显示全部楼层
路过了解一下
7# 2015-5-4 11:00:21 回复 收起回复
回复

使用道具 举报

发表于 2015-5-4 11:27:37 | 显示全部楼层
看三层哪台,开了路由工功能没用,在全局模式下,IP ROUTING
8# 2015-5-4 11:27:37 回复 收起回复
回复

使用道具 举报

发表于 2015-5-4 11:52:10 | 显示全部楼层
ip default-gateway x.x.x.x 给PC加上网关
还有你PC地址怎么加的
9# 2015-5-4 11:52:10 回复 收起回复
回复

使用道具 举报

发表于 2015-5-4 12:03:13 | 显示全部楼层
本帖最后由 pancunzhu 于 2015-5-4 12:09 编辑

我是菜鸟,,路过看看
10# 2015-5-4 12:03:13 回复 收起回复
回复

使用道具 举报

发表于 2015-5-4 12:49:55 | 显示全部楼层
问问三层需不需要配路由呢?
11# 2015-5-4 12:49:55 回复 收起回复
回复

使用道具 举报

发表于 2015-5-4 19:55:13 | 显示全部楼层
不太懂3层交换机 随便说说哈
PC1 PC2怎么不在同一网段?PC3 PC4也不在啊! 同一个交换机下能这么连么?
SW上的VLAN10和VLAN20有IP地址,这应该是交换机的管理IP吧,按说还是得把接口配置上IP吧?
12# 2015-5-4 19:55:13 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-5-4 22:23:19 | 显示全部楼层
老朽 发表于 2015-5-4 19:55
不太懂3层交换机 随便说说哈
PC1 PC2怎么不在同一网段?PC3 PC4也不在啊! 同一个交换机下能这么连么?
S ...

PC1,2,3,4当然可以不在同一个vlan了。三层交换机和二层交换机开启了TRUNK链路,用来传输多VLAN数据。
13# 2015-5-4 22:23:19 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-5-4 22:24:16 | 显示全部楼层
pancunzhu 发表于 2015-5-4 12:49
问问三层需不需要配路由呢?

直接开启IP routing了的。作为直连路由,应该不需要配默认路由啦。
14# 2015-5-4 22:24:16 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2015-5-4 22:33:46 | 显示全部楼层
a1746117370 发表于 2015-5-4 11:52
ip default-gateway x.x.x.x 给PC加上网关
还有你PC地址怎么加的

pc加默认网关和你的命令是一样的。IP地址配置是进入接口后;用ip address 192.168.X.X 255.255.255.0添加的。这个已经在配置里面显示了的。应该是正确的。
15# 2015-5-4 22:33:46 回复 收起回复
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-12 02:18 , Processed in 0.082845 second(s), 23 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表