我对EIGRP有个问题。但是首先,下面是拓扑结构:

我做过EIGRP路由,但这有点奇怪。PC0 -> PC1可以ping,PC3 -> PC2可以ping。但是,我不能平PC0 -> PC2,PC0 -> PC3。这也发生在PC1上。以下是我所有的路由器配置:
-ROUTER0 0-
interface FastEthernet0/0
ip address 10.10.0.1 255.255.255.252
duplex auto
speed auto
!
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
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-ROUTER1 1-
interface FastEthernet0/0
ip address 10.10.0.2 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet0/0.30
encapsulation dot1Q 30
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
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-ROUTER2 2-
interface FastEthernet0/0
ip address 10.10.2.1 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet0/0.30
encapsulation dot1Q 30
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
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-ROUTER3 3-
interface FastEthernet0/0
ip address 10.10.2.2 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 10.10.3.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
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看来路线到了。但有人知道为什么会这样吗?谢谢。
发布于 2018-08-17 18:33:17
我已经创建了与图像显示的相同的拓扑结构,并将您的信任放入路由器,并且我能够从PC0中选择所有的PC。所有PC都有与路由器Fa0/1接口相同的/24网络中的IP地址,并且都将默认网关设置为路由器的IP (192.168.x.254)。
猫3560的配置:
interface FastEthernet0/1
switchport trunk allowed vlan 1,20
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
switchport trunk allowed vlan 1,30
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/3
switchport trunk allowed vlan 1,30
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/4
switchport trunk allowed vlan 1,20
switchport trunk encapsulation dot1q
switchport mode trunk
!此外,我还在交换机上创建了VLAN:
Switch(config)# vlan 20
Switch(config)# vlan 30平评结果:
C:\>ping 192.168.2.1
Pinging 192.168.2.1 with 32 bytes of data:
Request timed out.
Reply from 192.168.2.1: bytes=32 time<1ms TTL=126
Reply from 192.168.2.1: bytes=32 time<1ms TTL=126
Ping statistics for 192.168.2.1:
Packets: Sent = 3, Received = 2, Lost = 1 (34% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Control-C
^C
C:\>ping 192.168.3.1
Pinging 192.168.3.1 with 32 bytes of data:
Request timed out.
Reply from 192.168.3.1: bytes=32 time<1ms TTL=125
Reply from 192.168.3.1: bytes=32 time<1ms TTL=125
Ping statistics for 192.168.3.1:
Packets: Sent = 3, Received = 2, Lost = 1 (34% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Control-C
^C
C:\>ping 192.168.4.1
Pinging 192.168.4.1 with 32 bytes of data:
Request timed out.
Reply from 192.168.4.1: bytes=32 time<1ms TTL=126
Reply from 192.168.4.1: bytes=32 time=1ms TTL=126
Ping statistics for 192.168.4.1:
Packets: Sent = 3, Received = 2, Lost = 1 (34% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
Control-C
^C发布于 2018-08-18 09:10:27
在再次查看网络图并考虑了OP获得的提示(“子接口”)之后,我想我现在看到了它的意义所在。
这一答案假定:
有一个替代的设置,也解决了挑战,但需要L3切换(可能是EIGRP,为了好玩)也运行在Cat3560上。我更喜欢这种选择,但挑战似乎是双重的:在Cat3560上使用VLAN进行L2交换,以及(动态)路由器上带有子接口的路由,因此我们将为此而努力。
这将需要交换机上的一些VLAN:
vlan 10
name R0-to-R1
vlan 20
name R0-to-R3
vlan 30
name R3-to-R2
vlan 40
name R2-to-R1并将VLAN选择性地映射到路由器连接到的4个交换机端口:
int f0/1
description Router0 fa0/0
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 10,20
spanning-tree portfast trunk
int f0/2
description Router1 fa0/0
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 10,40
spanning-tree portfast trunk
int f0/3
description Router2 fa0/0
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 30,40
spanning-tree portfast trunk
int f0/4
description Router3 fa0/0
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 20,30
spanning-tree portfast trunk请注意:从技术上讲,没有必要在交换机端口上设置switchport trunk allowed vlan...。创建VLAN并将端口设置为mode trunk就足够了。在维护良好的环境中,在给定的开关端口上定义哪个(一组) VLAN(s)是可接受的,这是很好的实践。
然后,在每个路由器上,你需要
我将给出一个路由器的示例--其他路由器将留给读者作为练习。
!=========
!ROUTER 0
!========
int f0/0
description Switch0 fast0/1
int f0/0.10
description Router1 fast0/0.10 (via VLAN 10)
enapsulation dot1q 10
ip adress 10.10.0.1 255.255.255.252
int f0/0.20
description Router3 fast0/0.20 (via VLAN 20)
encapsulation dot1q 20
ip adress 10.10.3.1 255.255.255.252
int fa0/1
description LAN to PC0
ip address 192.168.1.1 255.255.255.0
router eigrp 1
!
! Summarization is for large networks with multiple hierarchies and
! tiers of routing.
! It just creates obstacles for a novice. Leave it off. (almost) always.
!
no auto-summary
!
! for the sake of clarity, add the to-be-EIGRP-activated
! interfaces with the host wildcard mask.
! in EIGRP, the network statements just define a filter list of IP adresses.
! Interfaces on the router that have an address matching the
! filter will be enanbled for EIGRP.
!
network 192.168.1.1 0.0.0.0
network 10.10.0.1 0.0.0.0
network 10.10.3.1 0.0.0.0
!
!
! good practice (optional): Don't be looking for EIGRP neighbors
! in "client subnets", where there won't be any.
! Make all interfaces passive, then explicitely enable
! the (sub)interfaces that will actually have to speak EIGRP
! to potential neighbors.
!
! YES, it is actually correct and valid to have the LAN
! side enabled for EIGRP, but then leave it passive.
passive-interface default
no passive-interface fast0/0.10
no passive-interface fast0/0.20https://networkengineering.stackexchange.com/questions/52604
复制相似问题