首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubiquiti EdgeRouter在响应ICMP时使用默认路由而不是静态路由。

Ubiquiti EdgeRouter在响应ICMP时使用默认路由而不是静态路由。
EN

Server Fault用户
提问于 2019-09-27 10:46:42
回答 1查看 1.2K关注 0票数 0

我需要在两个路由器设备和它们背后的子网之间建立一个工作连接。除了一条静态路由之外,安装中的其他内容似乎都正常工作。以下是有关我的设置的基本信息:

代码语言:javascript
复制
Juniper:
Vlan95 10.250.0.1/24
Vlan1  192.168.1.1/21
Vlan1  192.168.4.1/21 (this interface has two default gateways due to ongoing development in the network)
fe-0/0/3 10.129.0.1/22

Ubiquiti:
eth2.620 10.250.0.3/24
eth2.100 192.168.8.1/24

routes - ubiquiti:
S    *> 0.0.0.0/0 [1/0] via xxx.xxx.xxx.xxx, eth0
C    *> 10.0.0.2/32 is directly connected, lo
C    *> 10.0.1.0/24 is directly connected, eth1
C    *> 10.0.2.0/24 is directly connected, eth2.200
S    *> 10.129.0.0/24 [1/0] via 10.250.0.1, eth2.620 (This works)
C    *> 10.250.0.0/24 is directly connected, eth2.620
C    *> 127.0.0.0/8 is directly connected, lo
C    *> 130.234.212.64/28 is directly connected, eth0
C       130.234.212.64/28 is directly connected, eth0
C    *> 192.168.0.0/24 is directly connected, eth1
S    *> 192.168.1.0/24 [1/0] via 10.250.0.1, eth2.620 (This doesn't seem to work)
S    *> 192.168.4.0/24 [1/0] via 10.250.0.1, eth2.620 (This does work)
S    *> 192.168.5.0/24 [1/0] via 10.250.0.1, eth2.620
C    *> 192.168.8.0/24 is directly connected, eth2.100
C    *> 192.168.24.0/22 is directly connected, eth2.14

在这个设置中,网络192.168.4.0/24和10.129.0.0/24工作。我可以平我的Ubiquiti路由器接口10.250.0.3从两个网络,我可以在两个网络中的IP地址从那个Ubiquiti IP地址。

然而,192.168.1.0/24的路线有所不同。它看起来根本不存在,因为当从192.168.1.99发出时,流量到达正确,但是不是从10.250.0.3通过接口eth2.620上的链接发送回Ubiquiti路由器,而是试图通过eth0发送它们,这是我的广域网地址。

我在ubiquiti上使用tcpdump验证了这一点。

下面是从10.129.0.18到10.250.0.3之间成功ICMP请求的转储:

代码语言:javascript
复制
user@device:~$ sudo tcpdump -i eth2.620 host 10.129.0.18
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2.620, link-type EN10MB (Ethernet), capture size 262144 bytes
13:37:40.836129 IP 10.129.0.18 > 10.250.0.3: ICMP echo request, id 1, seq 103, length 40
13:37:40.836302 IP 10.250.0.3 > 10.129.0.18: ICMP echo reply, id 1, seq 103, length 40
13:37:41.841624 IP 10.129.0.18 > 10.250.0.3: ICMP echo request, id 1, seq 104, length 40
13:37:41.841819 IP 10.250.0.3 > 10.129.0.18: ICMP echo reply, id 1, seq 104, length 40

这里是我试图从192.168.1.99到10.250.0.3 (摘自eth2.620)的一个转储:

代码语言:javascript
复制
user@device:~$ sudo tcpdump -i eth2.620 host 192.168.1.99
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2.620, link-type EN10MB (Ethernet), capture size 262144 bytes
13:38:45.563661 IP 192.168.1.99 > 10.250.0.3: ICMP echo request, id 1, seq 1364, length 40
13:38:50.564150 IP 192.168.1.99 > 10.250.0.3: ICMP echo request, id 1, seq 1365, length 40

下面是在192.168.1.99到10.250.0.3期间尝试ping时从eth0 (广域网接口)获取的转储:

代码语言:javascript
复制
user@device:~$ sudo tcpdump -i eth0 host 192.168.1.99
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:34:42.558520 IP 10.250.0.3 > 192.168.1.99: ICMP echo reply, id 1, seq 1353, length 40
13:34:47.558410 IP 10.250.0.3 > 192.168.1.99: ICMP echo reply, id 1, seq 1354, length 40
13:34:52.559685 IP 10.250.0.3 > 192.168.1.99: ICMP echo reply, id 1, seq 1355, length 40

在这个设置中有什么容易识别的问题吗?据我所见,静态路由的配置都是相同的。

EN

回答 1

Server Fault用户

回答已采纳

发布于 2019-10-01 07:55:26

我现在觉得有点傻了。在查看我即将在这里发布的配置时,我注意到,不久前,我创建了一个通往主办公室的IPSec隧道,因为当时我们似乎需要它来连接这两个地方。在IPSec配置中,定义远程网络为192.168.1.0/24,因此它试图将流量从广域网接口发送出去。

不幸的是,“显示ip路由”命令没有显示有关隧道的信息。虽然这可能是因为我之前已经禁用了隧道接口,但不知怎么的,这个设备仍然试图通过隧道引导流量。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/985873

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档