我的 mac 路由表通常非常简单。
我知道它基于 bsd ,但是它在做什么或试图做什么。
我的路由表通常非常简单
但是第二个默认指向link5?
这是正常的吗,或者这是 IPV6 的疯狂行为?
有人能帮助我理解 OSX/BSD 在做什么吗?
nternet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.1.254 UGSc 22 0 en1
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 4 44102 lo0
169.254 link#5 UCS 0 0 en1
192.168.1 link#5 UCS 6 0 en1
192.168.1.1 0:18:39:6d:89:c5 UHLWIi 0 0 en1 739
192.168.1.189 50:ea:d6:86:26:91 UHLWIi 0 0 en1 798
192.168.1.194 127.0.0.1 UHS 0 0 lo0
192.168.1.203 5c:95:ae:dd:34:8d UHLWIi 0 0 en1 316
192.168.1.253 a:76:ff:b5:51:79 UHLWIi 0 0 en1 911
192.168.1.254 8:76:ff:b5:51:79 UHLWIi 32 204 en1 1117
192.168.1.255 ff:ff:ff:ff:ff:ff UHLWbI 0 7 en1
Internet6:
Destination Gateway Flags Netif Expire
::1 link#1 UHL lo0
fe80::%lo0/64 fe80::1%lo0 UcI lo0
fe80::1%lo0 link#1 UHLI lo0
fe80::%en1/64 link#5 UCI en1
fe80::21b:63ff:fec7:c486%en1 0:1b:63:c7:c4:86 UHLI lo0
fe80::223:12ff:fe01:d7fe%en1 0:23:12:1:d7:fe UHLWIi en1
ff01::%lo0/32 fe80::1%lo0 UmCI lo0
ff01::%en1/32 link#5 UmCI en1
ff02::%lo0/32 fe80::1%lo0 UmCI lo0
ff02::%en1/32 link#5 UmCI en1
-----------------------------------
Bizzare routing table here
Internet:
Destination Gateway Flags Refs Use Netif Expire
default link#5 UCS 113 0 en1
17.72.255.12 0:50:7f:5e:92:e2 UHLWIi 2 7 en1 1156
64.4.23.141 0:50:7f:5e:92:e2 UHLWIi 0 3 en1 1181
64.4.23.143 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1189
64.4.23.147 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1183
64.4.23.149 link#5 UHLWIi 0 1 en1
64.4.23.150 0:50:7f:5e:92:e2 UHLWIi 0 24 en1 1175
64.4.23.151 link#5 UHLWIi 0 1 en1
64.4.23.153 link#5 UHLWIi 0 1 en1
64.4.23.155 link#5 UHLWIi 0 1 en1
64.4.23.157 0:50:7f:5e:92:e2 UHLWIi 0 3 en1 1181
64.4.23.165 link#5 UHLWIi 0 2 en1
64.4.23.166 link#5 UHLWIi 0 1 en1
65.55.223.15 0:50:7f:5e:92:e2 UHLWIi 3 21 en1 1189
65.55.223.16 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1181
65.55.223.17 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1199
65.55.223.20 link#5 UHLWIi 0 1 en1
65.55.223.23 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1199
65.55.223.31 link#5 UHLWIi 0 1 en1
65.55.223.32 link#5 UHLWIi 0 1 en1
65.55.223.37 0:50:7f:5e:92:e2 UHLWIi 3 21 en1 1189
65.55.223.38 link#5 UHLWIi 0 1 en1
69.163.252.33 0:50:7f:5e:92:e2 UHLWIi 1 9 en1 1181
77.67.32.254 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1164
111.221.74.13 0:50:7f:5e:92:e2 UHLWIi 0 24 en1 1183
111.221.74.15 link#5 UHLWIi 0 1 en1
111.221.74.16 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1183
111.221.74.17 0:50:7f:5e:92:e2 UHLWIi 3 23 en1 1172
111.221.74.21 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1181
111.221.74.23 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1172
111.221.74.24 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1181
111.221.74.26 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1199
111.221.74.29 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1181
111.221.74.31 link#5 UHLWIi 0 1 en1
111.221.74.37 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1190
111.221.74.38 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1199
111.221.77.141 0:50:7f:5e:92:e2 UHLWIi 0 3 en1 1199
111.221.77.144 link#5 UHLWIi 0 1 en1
111.221.77.145 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1190
111.221.77.149 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1183
111.221.77.154 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1181
111.221.77.156 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1190
111.221.77.157 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1183
111.221.77.162 link#5 UHLWIi 0 1 en1
111.221.77.165 link#5 UHLWIi 0 1 en1
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 4 40073 lo0
157.55.56.140 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1199
157.55.56.141 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1181
157.55.56.143 link#5 UHLWIi 0 1 en1
157.55.56.147 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1183
157.55.56.148 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1183
157.55.56.149 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1189
157.55.56.150 link#5 UHLWIi 0 1 en1
157.55.56.157 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1172
157.55.56.158 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1175
157.55.130.143 link#5 UHLWIi 0 1 en1
157.55.130.144 link#5 UHLWIi 0 1 en1
157.55.130.145 0:50:7f:5e:92:e2 UHLWIi 0 24 en1 1181
157.55.130.152 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1199
157.55.130.153 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1172
157.55.130.155 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1189
157.55.130.156 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1186
157.55.130.157 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1189
157.55.130.158 0:50:7f:5e:92:e2 UHLWIi 0 3 en1 1172
157.55.130.160 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1189
157.55.130.162 0:50:7f:5e:92:e2 UHLWIi 3 21 en1 1193
157.55.130.166 link#5 UHLWIi 0 1 en1
157.55.235.141 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1193
157.55.235.142 link#5 UHLWIi 1 1 en1
157.55.235.144 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1172
157.55.235.145 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1172
157.55.235.149 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1181
157.55.235.151 link#5 UHRLWIi 0 36 en1
157.55.235.152 0:50:7f:5e:92:e2 UHLWIi 3 21 en1 1189
157.55.235.153 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1178
157.55.235.156 link#5 UHLWIi 0 2 en1
157.55.235.157 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1181
157.55.235.158 link#5 UHLWIi 0 1 en1
157.55.235.159 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1181
157.55.235.162 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1183
157.55.235.166 0:50:7f:5e:92:e2 UHLWIi 0 25 en1 1181
157.56.52.14 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1181
157.56.52.15 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1183
157.56.52.16 link#5 UHLWIi 0 1 en1
157.56.52.17 0:50:7f:5e:92:e2 UHLWIi 3 14 en1 1199
157.56.52.19 link#5 UHLWIi 0 1 en1
157.56.52.20 0:50:7f:5e:92:e2 UHLWIi 3 17 en1 1199
157.56.52.22 0:50:7f:5e:92:e2 UHLWIi 0 24 en1 1181
157.56.52.25 link#5 UHLWIi 0 1 en1
157.56.52.28 link#5 UHLWIi 0 1 en1
157.56.52.29 link#5 UHLWIi 0 1 en1
157.56.52.31 link#5 UHLWIi 0 1 en1
157.56.52.33 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1189
169.254 link#5 UC 1 0 en1
169.254.174.250 127.0.0.1 UHS 1 0 lo0
169.254.255.255 ff:ff:ff:ff:ff:ff UHLWb 0 2 en1
193.88.6.19 link#5 UHLWIi 0 1 en1
194.165.188.82 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1166
195.46.253.211 link#5 UHLWIi 0 1 en1
204.9.163.143 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1178
213.199.179.141 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1172
213.199.179.142 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1165
213.199.179.143 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1166
213.199.179.146 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1172
213.199.179.147 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1164
213.199.179.148 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1165
213.199.179.149 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1172
213.199.179.150 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1165
213.199.179.151 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1164
213.199.179.153 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1166
213.199.179.157 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1167
213.199.179.160 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1165
213.199.179.161 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1172
213.199.179.162 0:50:7f:5e:92:e2 UHLWIi 0 2 en1 1163
213.199.179.165 0:50:7f:5e:92:e2 UHLWIi 0 1 en1 1164
213.199.179.166 0:50:7f:5e:92:e2 UHLWIi 0 3 en1 1164
224.0.0.251 1:0:5e:0:0:fc UHmLWI 0 0 en1
255.255.255.255 ff:ff:ff:ff:ff:ff UHLWbI 0 2 en1
Internet6:
Destination Gateway Flags Netif Expire
::1 link#1 UHL lo0
fe80::%lo0/64 fe80::1%lo0 UcI lo0
fe80::1%lo0 link#1 UHLI lo0
fe80::%en1/64 link#5 UCI en1
fe80::21b:63ff:fec7:c486%en1 0:1b:63:c7:c4:87 UHLI lo0
fe80::223:12ff:fe01:d7fe%en1 0:23:12:1:d7:ff UHLWIi en1
ff01::%lo0/32 fe80::1%lo0 UmCI lo0
ff01::%en1/32 link#5 UmCI en1
ff02::%lo0/32 fe80::1%lo0 UmCI lo0
ff02::%en1/32 link#5 UmCI en1
答案1
我认为您找错地方了。在查看原始路由表之前,请先在“系统偏好设置”中的“网络偏好设置”窗格中检查基本网络设置。我非常确定您会看到您的 en1 端口具有自分配的 IP 地址 169.254.174.250,没有路由器地址。用户界面并不总是明确表明它处于自分配模式,但地址上的 169.254 前缀是一个明显的迹象。这意味着 DHCP 失败了,您的服务器没有分配正确的 IP 地址,因此它自行编造了一个(自分配),并且由于它没有办法编造路由器地址,因此它处于没有路由器的本地链接模式,也不知道如何脱离本地网络。
路由表看起来很奇怪的原因是,由于没有配置路由器,它会尝试到达一切在本地网络上(即,它会针对尝试访问的每个 IP 地址发送 ARP 请求)。本地网络上的某个东西(MAC 地址为 0:50:7f:5e:92:e2 的东西)正在回复这些 ARP 请求;它可能是路由器在执行某种 ARP 代理。因为netstat -r
OS X 将 ARP 表显示为路由表的一部分,所以您会看到服务器尝试访问的每个 IP 地址的 ARP 条目。
第一个解决方案:找出 DHCP 的问题并修复它。
第二种解决方案:服务器到底在 DHCP 上做什么?服务器几乎总是静态配置的,因此为其分配一个静态地址(在“网络”偏好设置窗格中,不是使用 ifconfig)。