两个交换机,一个上行链路 - 连接它们的最佳方式?

网络工程 路由 转变 堆叠 端口通道
2022-02-18 01:49:50

概述

我有两个 Arista 7050SX 交换机。他们不支持堆叠。但我基本上会将它们用作堆叠对(仅意味着管理两个单独的交换机)。

它们当前通过两个 qsfp 链路的端口通道连接在一起。没有lacp。中继端口,本机 vlan 10

交换机 2 通过 et1(可路由端口)上的 /30 连接到路由器。路由已启用。默认路由集。Vlan10 在 /26 ( ) 上有一个 IP,.2可以从网络上的其他地方访问(路由正在工作,我的静态路由已启动)。运行配置:

rj-sw02#show run
! Command: show running-config
! device: rj-sw02 (DCS-7050SX-64, EOS-4.19.3F)
!
! boot system flash:/EOS-4.19.3F.swi
!
transceiver qsfp default-mode 4x10G
!
hostname rj-sw02
!
spanning-tree mode mstp
!
no aaa root
!
clock timezone US/Eastern
!
vlan 10
   name phys-mgt
!
interface Port-Channel10
   description Switch Interconnect
   switchport trunk native vlan 10
   switchport trunk allowed vlan 1,10
   switchport mode trunk
!
interface Ethernet1
   no switchport
   ip address 172.16.64.2/30
!
interface Ethernet2
!
interface Ethernet3
!

...

interface Ethernet46
!
interface Ethernet47
!
interface Ethernet48
!
interface Ethernet49/1
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet49/2
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet49/3
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet49/4
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet50/1
!
interface Ethernet50/2
!
interface Ethernet50/3
!
interface Ethernet50/4
!
interface Ethernet51/1
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet51/2
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet51/3
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet51/4
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet52/1
!
interface Ethernet52/2
!
interface Ethernet52/3
!
interface Ethernet52/4
!
interface Management1
   ip address 192.168.1.1/24
!
interface Vlan10
   ip address 10.3.104.3/26
!
ip route 0.0.0.0/0 172.16.64.1
!
ip routing
!

交换机 1 与路由器没有直接连接。Vlan10 在与上面相同的 /26 上有一个 IP,并且是.3. 路由也被启用。默认 gw 是 /30 中的下一跳(并且需要遍历互连)。我无法从网络上的其他地方 ping(无法访问)。交换机可以互相 ping 通,我可以从 sw2 SSH 到 sw1* 运行配置:

rj-sw01#show run
! Command: show running-config
! device: rj-sw01 (DCS-7050SX-64, EOS-4.19.3F)
!
! boot system flash:/EOS-4.19.3F.swi
!
transceiver qsfp default-mode 4x10G
!
hostname rj-sw01
!
spanning-tree mode mstp
!
no aaa root
!
vlan 10
   name phys_mgt
!
interface Port-Channel10
   description Switch Interconnect
   switchport trunk native vlan 10
   switchport trunk allowed vlan 1,10
   switchport mode trunk
!
interface Ethernet1
!
interface Ethernet2
!

...

interface Ethernet47
!
interface Ethernet48
!
interface Ethernet49/1
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet49/2
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet49/3
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet49/4
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet50/1
!
interface Ethernet50/2
!
interface Ethernet50/3
!
interface Ethernet50/4
!
interface Ethernet51/1
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet51/2
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet51/3
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet51/4
   description Switches Interconnect
   channel-group 10 mode active
!
interface Ethernet52/1
!
interface Ethernet52/2
!
interface Ethernet52/3
!
interface Ethernet52/4
!
interface Management1
   ip address 192.168.1.1/24
!
interface Vlan10
   ip address 10.3.104.2/26
!
ip route 0.0.0.0/0 Port-Channel10 172.16.64.1
!
ip routing
!

目标

我已经用完了一台交换机上的端口,因此添加了第二台。我有一堆需要在交换机之间相互通信的主机。理论上,我创建的 PG 将实现这一点(假设我所有的 VLAN 都是该中继的一部分)(如果不是,请告诉我)。我还需要对两个交换机的 SSH 访问,这就是我被困在这里的地方。

问题 1:鉴于上述信息和配置,我做错了什么 - 为什么我无法到达第二个开关?

问题 2:这是解决此问题的最佳方法,还是我应该使用不同的配置策略来达到我想要的位置(本质上是一对堆叠)?

*我注意到当我重新启动未直接连接到路由器的 sw2 时,当它关闭时,我无法连接到 sw1

2个回答

您在交换机 1 上遇到问题。您的默认路由是到交换机不知道如何到达的地址。默认路由应该是ip route 0.0.0.0/0 10.3.104.3. 交换机 2 知道如何到达172.16.64.1,因为它位于直接连接的网络上,但交换机 1 不知道如何到达该网络,因此下一跳是交换机 2,而不是路由器。

通过 port-channel 或 ether-channel 将两台交换机与一个上行链路连接的最佳方式。将两条电缆绑定到单个实例中,并将每条电缆连接到每个交换机接口并将其配置为上行链路接口 ..i

您可以通过管理 IP 地址访问辅助交换机。在主交换机和从交换机上创建管理 VLAN 并配置管理 VLAN。并尝试通过分配给交换机的管理 IP 地址访问两台交换机。