设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 1693|回复: 4
收起左侧

关于路由表中没有直连网络的信息

[复制链接]
发表于 2017-3-22 12:23:11 | 显示全部楼层 |阅读模式
贴上配置,感激不尽!!

Building configuration...
Current configuration : 1612 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
ip dhcp pool vlan10
network 172.16.1.0 255.255.255.0
default-router 172.16.1.1
ip dhcp pool vlan156
network 172.16.156.0 255.255.255.0
default-router 172.16.156.1
ip dhcp pool vlan20
network 172.16.2.0 255.255.255.0
default-router 172.16.2.1
dns-server 172.16.2.1
ip routing
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface FastEthernet0/1
switchport trunk native vlan 156
switchport trunk allowed vlan 10,20,156
!
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
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
ip address 172.16.1.1 255.255.255.0
!
interface Vlan20
ip address 172.16.2.1 255.255.255.0
!
interface Vlan156
ip address 172.16.156.1 255.255.255.0
!
ip classless
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end  


这是核心的,但是我show 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 not set
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Vlan10
C       172.16.156.0 is directly connected, Vlan156


vlan 20的网络为什么会没在里面,求教啊
发表于 2017-3-26 13:25:29 | 显示全部楼层
show vlan,
show span,
show int trunk,
沙发 2017-3-26 13:25:29 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2017-4-20 03:58:04 | 显示全部楼层
vlan 20 no shut down 了吗?
板凳 2017-4-20 03:58:04 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2017-11-15 11:00:29 | 显示全部楼层
把接口划分VLAN就可以了
地板 2017-11-15 11:00:29 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2017-11-15 11:00:35 | 显示全部楼层
把接口划分VLAN就可以了
5# 2017-11-15 11:00:35 回复 收起回复
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-5 20:33 , Processed in 0.078296 second(s), 9 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

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