关于路由表中没有直连网络的信息
贴上配置,感激不尽!!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的网络为什么会没在里面,求教啊
show vlan,
show span,
show int trunk, vlan 20 no shut down 了吗?
把接口划分VLAN就可以了 把接口划分VLAN就可以了
页:
[1]