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

[求助] 三层交换静态路由实验配置出错?求助

[复制链接]
发表于 2017-1-20 15:02:15 | 显示全部楼层 |阅读模式
3鸿鹄币
用的是Cisco Packet Tracer6.0,我查了下是不是要在三层上做TRUNK的时候加个L3SW2(config-if)#switchport mode trunk  access这个后面加一句?但我加过没用,都看得到直连路由,就是不能PING通!
C    192.168.1.0/24 is directly connected, FastEthernet0/24
C    192.168.2.0/24 is directly connected, GigabitEthernet0/1
C    192.168.10.0/24 is directly connected, Vlan10
C    192.168.20.0/24 is directly connected, Vlan20
S    192.168.30.0/24 [1/0] via 192.168.2.2
S    192.168.40.0/24 [1/0] via 192.168.2.2

Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line.  End with CNTL/Z.

L3SW1#
%SYS-5-CONFIG_I: Configured from console by console
writ
Building configuration...
[OK]
L3SW1#
L3SW1#
L3SW1#sho ip rou
L3SW1#sho ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 192.168.1.1 to network 0.0.0.0

C    192.168.1.0/24 is directly connected, FastEthernet0/24
C    192.168.2.0/24 is directly connected, GigabitEthernet0/1
C    192.168.10.0/24 is directly connected, Vlan10
C    192.168.20.0/24 is directly connected, Vlan20
S    192.168.30.0/24 [1/0] via 192.168.2.2
S    192.168.40.0/24 [1/0] via 192.168.2.2
S*   0.0.0.0/0 [1/0] via 192.168.1.1
L3SW1#
L3SW1#
L3SW1#
L3SW1#sho run
L3SW1#sho running-config
Building configuration...

Current configuration : 1550 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname L3SW1
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
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
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
no switchport
ip address 192.168.1.2 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no switchport
ip address 192.168.2.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
ip address 192.168.10.1 255.255.255.0
!
interface Vlan20
ip address 192.168.20.1 255.255.255.0
!
ip classless
ip route 192.168.30.0 255.255.255.0 192.168.2.2
ip route 192.168.40.0 255.255.255.0 192.168.2.2
ip route 0.0.0.0 0.0.0.0 192.168.1.1
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end

最佳答案

查看完整内容

额,描述不太清楚,你直连ping的哪个地址呢。不过思科模拟器默认没开启三层功能,在config视图下执行命令Switch(config)#ip routing 试试
发表于 2017-1-20 15:02:16 | 显示全部楼层
游客,如果您要查看本帖隐藏内容请登录
回复

使用道具 举报

发表于 2017-1-20 17:10:44 | 显示全部楼层
游客,如果您要查看本帖隐藏内容请登录
回复

使用道具 举报

发表于 2017-1-20 21:52:39 | 显示全部楼层
游客,如果您要查看本帖隐藏内容请登录
回复

使用道具 举报

 楼主| 发表于 2017-1-22 16:34:32 | 显示全部楼层
游客,如果您要查看本帖隐藏内容请登录
回复

使用道具 举报

发表于 2017-1-22 23:51:41 | 显示全部楼层
游客,如果您要查看本帖隐藏内容请登录
回复

使用道具 举报

发表于 2017-2-10 16:50:43 | 显示全部楼层
游客,如果您要查看本帖隐藏内容请登录
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-8-9 00:08 , Processed in 0.064265 second(s), 9 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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