接口“ppp0”的奇怪默认路由器地址

man*_*que 4 linux gateway ifconfig ppp

我正在使用 3G 调制解调器为我的 Linux 机器提供互联网连接。

因此,当我发出命令时ifconfig,我会看到以下内容:

ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.223.229.136  netmask 255.255.255.255  destination 10.64.64.64
        ppp  txqueuelen 3  (Point-to-Point Protocol)
        RX packets 120  bytes 33390 (32.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 197  bytes 23842 (23.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Run Code Online (Sandbox Code Playgroud)

destination例如默认网关有什么问题?

根据我对PPP协议的理解,网络掩码是255.255.255.255,所以网关的IP地址应该是10.223.229.137或者类似的东西。

我想念什么?或者我们都在同一个网络上,因为地址是 A 类?

route -n给了我以下内容:

[root@server ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
Run Code Online (Sandbox Code Playgroud)

小智 6

如果 pppd 在 IPCP 期间未从对等方接收远程地址信息,则它会使用“hisaddr”的默认值。pppd 使用的地址是in的0x0a404040 + unit位置。通常显示为 10.64.64.64。(您可能看到的另一个默认地址是= 10.112.112.112,用于按需拨号接口)。unit0ppp00xa707070 + unit

我已经在 GSM 蜂窝调制解调器模拟的 PPP 接口中看到过这种情况。IPCP 用于通知主机其 GPRS IP 地址,但“另一端”没有真正的对等点,因此您得到的是假的。