路由表 - 預設網關和追蹤路由差異

路由表 - 預設網關和追蹤路由差異

我使用的是 16.04,但存在一個差異,似乎會減慢我機器的網路存取速度。

我在一台 PC 上,使用 USB WIFI 裝置而不是主機板上的乙太網路連接埠連接到網際網路。

我的網際網路閘道的 IP 位址是192.168.1.1 (我用來存取路由器設定畫面的 IP 位址)

wifi介面的IP位址是192.168.1.21

我用來DHCP獲取兩個(有線和wifi)介面的IP位址(ifconfig如果需要,我可以包括輸出。省略以使問題相對簡短)

命令結果netstat -nr如下

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.2     0.0.0.0         UG        0 0          0 wlxec086b08251b
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 wlxec086b08251b
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 wlxec086b08251b

命令的輸出traceroute -n askubuntu.com如下

ejaz@ejaz-i5:~$ traceroute -n askubuntu.com
traceroute to askubuntu.com (151.101.129.69), 30 hops max, 60 byte packets
 1  192.168.1.2  3.297 ms  4.386 ms  5.111 ms
 2  * * *
 3  10.6.0.205  34.579 ms  40.183 ms  42.802 ms
 4  * * *
 5  xxx.xxx.xx.xxx  40.704 ms  41.341 ms  43.437 ms
 6  xxx.xxx.xx.xxx  44.187 ms  42.549 ms  42.612 ms
 7  10.0.3.182  42.607 ms  18.529 ms  27.290 ms
 8  xxx.xxx.xxx.xxx  43.253 ms  33.357 ms  40.347 ms
 9  xxx.xxx.xxx.xxx  60.037 ms  69.855 ms  57.101 ms
10  xxx.xxx.xxx.xxx  68.677 ms xxx.xxx.xxx.xxx  67.130 ms xxx.xxx.xxx.xxx  48.943 ms
11  xxx.xxx.xxx.xxx  55.302 ms  53.171 ms  56.792 ms
12  195.22.198.206  158.724 ms  166.306 ms  184.680 ms
13  195.22.205.153  189.038 ms  178.890 ms 195.22.196.215  182.389 ms
14  93.186.128.157  180.999 ms  175.675 ms  167.954 ms
15  129.250.2.50  186.880 ms  189.032 ms  183.655 ms
16  129.250.2.113  195.188 ms 129.250.2.211  205.249 ms  205.641 ms
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

xxx.xxx.xx.xxx在實際輸出中包含正確的 IP 位址

問題

192.168.1.2我認為路由表中和 的輸出中的存在traceroute代表了一個問題,因為網路上沒有任何具有此位址的內容( 100% 遺失ping)。我在這個家庭網路上只有幾台電腦和一些電話。

我也認為每一個追蹤路由(和網路流量)請求從嘗試通訊開始192.168.1.2,但超時會減慢這台電腦上的網路速度。

嘗試過的解決方案
我嘗試使用以下命令將錯誤的預設網關替換為我認為正確的預設網關

$ sudo route add default gw 192.168.1.1

$ sudo route del default gw 192.168.1.2

的輸出netstat -nr變更為顯示正確的網關,但traceroute仍向 發出請求192.168.1.2。這是否意味著路由配置是從其他地方選取的?我沒有使用靜態 IP 位址。

192.168.1.2另外,預設網關在我重新啟動系統後 重置。

有人可以解決一下嗎?或闡明一些情況。

其他問題
1.輸出ms中的值traceroute是否看起來是正常運作的4G網路連線的值? 2.輸出中第 17 行到第 30
行代表什麼?* * *traceroute

非常感謝您閱讀這個問題。

更新1

以下是nmap@stevieb 要求的輸出

ejaz@ejaz-i5:/var/lib/dhcp$ sudo nmap -sS -P0 -O 192.168.1.2

Starting Nmap 7.01 ( https://nmap.org ) at xxxx-xx-xx xx:xx xxx
Nmap scan report for 192.168.1.2
Host is up (0.020s latency).
Not shown: 995 closed ports
PORT    STATE    SERVICE
23/tcp  open     telnet
53/tcp  open     domain
80/tcp  filtered http
139/tcp open     netbios-ssn
445/tcp open     microsoft-ds
MAC Address: 8C:44:35:0A:34:62 (Shanghai BroadMobi Communication Technology)
Device type: general purpose
Running: Linux 2.6.X|3.X
OS CPE: cpe:/o:linux:linux_kernel:2.6 cpe:/o:linux:linux_kernel:3
OS details: Linux 2.6.32 - 3.5
Network Distance: 1 hop

OS detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 9.82 seconds

以下是ip addr show輸出

ejaz@ejaz-i5:/var/lib/dhcp$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp5s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether bc:ae:c5:bc:d7:e1 brd ff:ff:ff:ff:ff:ff
3: wlxec086b08251b: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether ec:08:6b:08:25:1b brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.21/24 brd 192.168.1.255 scope global dynamic wlxec086b08251b
       valid_lft 70411sec preferred_lft 70411sec
    inet6 fe80::c4ed:f502:38f0:6481/64 scope link 
       valid_lft forever preferred_lft forever

更新2

Ethernet network() Device not managed我在網路管理員選單中也看到兩個錯誤。我不確定這兩個條目是什麼時候開始出現的。

在此輸入影像描述

更新3

我做了一些更多的研究,發現這兩個介面是由我最近安裝的VMWare Player軟體創建的。

相關內容