是否可以通过交换机删除/阻止 EIGRP 邻居连接?

网络工程 转变 eigrp
2022-02-02 20:12:19

我有 4 个路由器,它们通过多层交换机相互连接。是否可以通过交换机删除/阻止 EIGRP 邻居?

例如,我有这样的拓扑: 在此处输入图像描述

我想将 EIGRP 邻居从 RA 删除到 RB (10.10.0.2),但 PC0 和 PC1 在我通过 Switch 删除后仍然能够相互 ping 通。是否可以?谢谢。

Router0#sh ip eigrp ne
IP-EIGRP neighbors for process 10
H   Address         Interface      Hold Uptime    SRTT   RTO   Q   Seq
                                   (sec)          (ms)        Cnt  Num
0   10.10.3.2       Fa             13   00:14:48  40     1000  0   42
1   10.10.0.2       Fa0/0          11   00:11:53  40     1000  0   42

这是核心交换机配置:

 hostname Switch
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/1
 switchport trunk allowed vlan 10,20
 switchport trunk encapsulation dot1q
 switchport mode trunk
 spanning-tree portfast trunk
!
interface FastEthernet0/2
 switchport trunk allowed vlan 10,40
 switchport trunk encapsulation dot1q
 switchport mode trunk
 spanning-tree portfast trunk
!
interface FastEthernet0/3
 switchport trunk allowed vlan 30,40
 switchport trunk encapsulation dot1q
 switchport mode trunk
 spanning-tree portfast trunk
!
interface FastEthernet0/4
 switchport trunk allowed vlan 20,30
 switchport trunk encapsulation dot1q
 switchport mode trunk
 spanning-tree portfast trunk
!

Here's each router configuration:

-路由器0-

spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.10
 encapsulation dot1Q 10
 ip address 10.10.0.1 255.255.255.252
!
interface FastEthernet0/0.20
 encapsulation dot1Q 20
 ip address 10.10.3.1 255.255.255.252
!
interface FastEthernet0/1
 ip address 192.168.1.254 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router eigrp 10
 network 10.0.0.0
 network 192.168.0.0
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.3.0
 network 192.168.4.0
 no auto-summary
!
ip classless
ip route 192.168.0.0 255.255.255.0 FastEthernet0/1 
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

-路由器1-

spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.10
 encapsulation dot1Q 10
 ip address 10.10.0.2 255.255.255.252
!
interface FastEthernet0/0.20
 no ip address
 shutdown
!
interface FastEthernet0/0.30
 encapsulation dot1Q 30
 ip address 10.10.1.1 255.255.255.252
 shutdown
!
interface FastEthernet0/0.40
 encapsulation dot1Q 40
 ip address 10.10.1.1 255.255.255.252
!
interface FastEthernet0/1
 ip address 192.168.2.254 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router eigrp 10
 network 10.0.0.0
 network 192.168.0.0
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.3.0
 network 192.168.4.0
 no auto-summary
!
ip classless
ip route 192.168.0.0 255.255.255.0 FastEthernet0/1 
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

-路由器2-

spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.30
 encapsulation dot1Q 30
 ip address 10.10.2.1 255.255.255.252
!
interface FastEthernet0/0.40
 encapsulation dot1Q 40
 ip address 10.10.1.2 255.255.255.252
!
interface FastEthernet0/1
 ip address 192.168.3.254 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router eigrp 1
 auto-summary
!
router eigrp 10
 network 10.0.0.0
 network 192.168.0.0
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.3.0
 network 192.168.4.0
 no auto-summary
!
ip classless
ip route 192.168.0.0 255.255.255.0 FastEthernet0/1 
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

-路由器3-

spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.20
 encapsulation dot1Q 20
 ip address 10.10.3.2 255.255.255.252
!
interface FastEthernet0/0.30
 encapsulation dot1Q 30
 ip address 10.10.2.2 255.255.255.252
!
interface FastEthernet0/1
 ip address 192.168.4.254 255.255.255.0
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
router eigrp 10
 network 10.0.0.0
 network 192.168.0.0
 network 192.168.1.0
 network 192.168.2.0
 network 192.168.3.0
 network 192.168.4.0
 no auto-summary
!
ip classless
ip route 192.168.0.0 255.255.255.0 FastEthernet0/1 
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end
1个回答

已编辑

我要指出的第一件事是,当您仅分享部分信息时,我们必须做出假设,并且它们可能是错误的。您给我们的信息越多,我们的答案就会越好。

现在您已经提供了设备配置,我冒昧地创建了一个新图表来向您展示一种更好地表示您的网络的方法。这是一个逻辑视图,使路由器之间的互连更加清晰。

网络图

现在我们可以看到真实的拓扑结构,有多种方法可以实现您的目标。

选项 1您必须在所有路由器上配置静态邻居。eigrp neighbor命令使用单播问候而不是多播,因此您必须指定所有路由器上的邻居。例如:

router eigrp 1
network 10.0.0.0
network 192.168.0.0
neighbor 10.10.3.2 fa 0/0

选项 2. 在链路上配置被动接口:

router eigrp 1
passive-interface fa0/0.10

选项 3. 从路由域中删除接口。

router eigrp 10
network 10.10.3.0 0.0.0.3
network 192.168.1.0

请注意,EIGRP 不在接口 fa0/0.10 上运行