- 积分
- 324
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 注册时间
- 2012-11-16
- 最后登录
- 1970-1-1
- 阅读权限
- 30
- 听众
- 收听
初级工程师
![Rank: 3](https://cdn.hh010.com/static/image/common/star_level1.gif) ![Rank: 3](https://cdn.hh010.com/static/image/common/star_level1.gif) ![Rank: 3](https://cdn.hh010.com/static/image/common/star_level1.gif)
|
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 试试
|