我有一个带有多个 VLAN 的第 3 层交换机。
我创建了一个连接到第 2 层交换机的中继端口。
我现在可以从第 2 层交换机上的访问端口成功访问第 3 层交换机 VLAN。
但是,我不确定如何使交换机本身直接相互通信,即这样我就可以从一个交换机 telnet 到另一个交换机。
我应该创建一个“网络管理”VLAN 并在每个交换机上分配一个 IP 吗?我试过这个,但是每个交换机甚至不能在这个地址上 ping 自己。也许这是因为我没有将 VLAN 分配给任何接入端口,但是这看起来像是浪费了一个端口,因为我只希望它们通过中继端口进行通话。
解决此问题的标准方法是什么?
全三层交换机:
Current configuration : 5362 bytes
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname pac-inet-cs1
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
switch 1 provision ws-c3750g-24t
system mtu routing 1500
authentication mac-move permit
ip subnet-zero
ip routing
ip name-server 8.8.8.8
ip name-server 4.4.4.4
ip dhcp excluded-address 192.168.30.1 192.168.30.10
ip dhcp excluded-address 192.168.32.1 192.168.32.10
ip dhcp excluded-address 192.168.36.1 192.168.36.10
!
ip dhcp pool Vlan30
network 192.168.30.0 255.255.255.0
domain-name mailpac.net
default-router 192.168.30.1
dns-server 8.8.8.8
!
ip dhcp pool Vlan32
network 192.168.32.0 255.255.255.0
domain-name mailpac.net
default-router 192.168.32.1
dns-server 8.8.8.8
!
ip dhcp pool Vlan36
network 192.168.36.0 255.255.255.0
domain-name mailpac.net
default-router 192.168.36.1
dns-server 8.8.8.8
!
!
!
!
spanning-tree mode pvst
spanning-tree etherchannel guard misconfig
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
interface GigabitEthernet1/0/1
switchport access vlan 71
switchport mode access
!
interface GigabitEthernet1/0/2
switchport access vlan 71
switchport mode access
!
interface GigabitEthernet1/0/3
description Trunk to pac-inet-as1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet1/0/4
!
interface GigabitEthernet1/0/5
switchport access vlan 30
!
interface GigabitEthernet1/0/6
switchport access vlan 32
!
interface GigabitEthernet1/0/7
switchport access vlan 36
!
interface GigabitEthernet1/0/8
!
interface GigabitEthernet1/0/9
!
interface GigabitEthernet1/0/10
!
interface GigabitEthernet1/0/11
!
interface GigabitEthernet1/0/12
!
interface GigabitEthernet1/0/13
!
interface GigabitEthernet1/0/14
!
interface GigabitEthernet1/0/15
!
interface GigabitEthernet1/0/16
!
interface GigabitEthernet1/0/17
!
interface GigabitEthernet1/0/18
!
interface GigabitEthernet1/0/19
!
interface GigabitEthernet1/0/20
!
interface GigabitEthernet1/0/21
!
interface GigabitEthernet1/0/22
!
interface GigabitEthernet1/0/23
!
interface GigabitEthernet1/0/24
no switchport
ip address 192.168.70.2 255.255.255.0
!
interface Vlan1
no ip address
shutdown
!
interface Vlan15
description Inet Server Public
ip address 192.168.15.2 255.255.255.0
!
interface Vlan28
description Management VLAN
ip address 192.168.28.121 255.255.255.0
!
interface Vlan30
description Inet Client
ip address 192.168.30.1 255.255.255.0
!
interface Vlan32
description Inet Public Client
ip address 192.168.32.1 255.255.255.0
!
interface Vlan34
description Inet Direct Access
ip address 192.168.34.1 255.255.255.0
!
interface Vlan36
description Wi-Fi Management
ip address 192.168.36.1 255.255.255.0
!
interface Vlan38
description Wi-Fi Client
ip address 192.168.46.1 255.255.248.0
!
interface Vlan71
description Spectrum Public
ip address 192.168.71.1 255.255.255.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.70.1
ip http server
ip http secure-server
!
!
ip sla enable reaction-alerts
!
!
line con 0
line vty 0 4
password xxxxxx
login
line vty 5 15
password xxxxxx
login
全二层交换机:
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname pac-inet-as1
!
no aaa new-model
switch 2 provision ws-c3750g-48ts
ip subnet-zero
!
!
!
!
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface GigabitEthernet2/0/1
switchport access vlan 30
switchport mode access
!
interface GigabitEthernet2/0/2
!
interface GigabitEthernet2/0/3
!
interface GigabitEthernet2/0/4
!
interface GigabitEthernet2/0/5
!
interface GigabitEthernet2/0/6
!
interface GigabitEthernet2/0/7
!
interface GigabitEthernet2/0/8
!
interface GigabitEthernet2/0/9
!
interface GigabitEthernet2/0/10
!
interface GigabitEthernet2/0/11
!
interface GigabitEthernet2/0/12
!
interface GigabitEthernet2/0/13
!
interface GigabitEthernet2/0/14
!
interface GigabitEthernet2/0/15
!
interface GigabitEthernet2/0/16
!
interface GigabitEthernet2/0/17
!
interface GigabitEthernet2/0/18
!
interface GigabitEthernet2/0/19
!
interface GigabitEthernet2/0/20
!
interface GigabitEthernet2/0/21
!
interface GigabitEthernet2/0/22
!
interface GigabitEthernet2/0/23
!
interface GigabitEthernet2/0/24
!
interface GigabitEthernet2/0/25
!
interface GigabitEthernet2/0/26
!
interface GigabitEthernet2/0/27
!
interface GigabitEthernet2/0/28
!
interface GigabitEthernet2/0/29
!
interface GigabitEthernet2/0/30
!
interface GigabitEthernet2/0/31
!
interface GigabitEthernet2/0/32
!
interface GigabitEthernet2/0/33
!
interface GigabitEthernet2/0/34
!
interface GigabitEthernet2/0/35
!
interface GigabitEthernet2/0/36
!
interface GigabitEthernet2/0/37
!
interface GigabitEthernet2/0/38
!
interface GigabitEthernet2/0/39
!
interface GigabitEthernet2/0/40
!
interface GigabitEthernet2/0/41
!
interface GigabitEthernet2/0/42
!
interface GigabitEthernet2/0/43
!
interface GigabitEthernet2/0/44
!
interface GigabitEthernet2/0/45
!
interface GigabitEthernet2/0/46
!
interface GigabitEthernet2/0/47
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet2/0/48
!
interface GigabitEthernet2/0/49
!
interface GigabitEthernet2/0/50
!
interface GigabitEthernet2/0/51
!
interface GigabitEthernet2/0/52
!
interface Vlan1
no ip address
!
interface Vlan28
ip address 192.168.28.141 255.255.255.0
!
ip classless
ip http server
!
!
control-plane
!
line con 0
password xxxxxxx
login
line vty 0 4
password xxxxxxx
login
line vty 5 15
no login
!
Vlan 28 上的三层交换机生成树:
VLAN0028
Spanning tree enabled protocol ieee
Root ID Priority 32796
Address 0019.2f19.c800
Cost 4
Port 3 (GigabitEthernet1/0/3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32796 (priority 32768 sys-id-ext 28)
Address 0027.0dc6.5480
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi1/0/3 Root FWD 4 128.3 P2p
二层交换机在 Vlan 28 上没有生成树:
Spanning tree instance(s) for vlan 28 does not exist.