下面是我的/etc/network/interfaces
的样子:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
但是,如果我通过.
我看到一个静态的192.168.1.96,其网罩为24,网关为192.168.1.2。
为了完整起见,以下是ifconfig的结果:
$ ifconfig
enp2s2 Link encap:Ethernet HWaddr 00:11:d8:39:2e:13
inet addr:192.168.1.96 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::211:d8ff:fe39:2e13/64 Scope:Link
inet6 addr: 2601:602:67f:f5c0:d0e2:7433:1cd5:d227/64 Scope:Global
inet6 addr: 2601:602:67f:f5c0:211:d8ff:fe39:2e13/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:720843 errors:0 dropped:361 overruns:0 frame:0
TX packets:394690 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:254038082 (254.0 MB) TX bytes:110719667 (110.7 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:999968 errors:0 dropped:0 overruns:0 frame:0
TX packets:999968 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:323242248 (323.2 MB) TX bytes:323242248 (323.2 MB)
发布于 2018-02-16 20:30:32
192.168.1.96
,并设置到192.168.1.2
的网关。/etc/network/interfaces.d/*
目录https://askubuntu.com/questions/1006878
复制相似问题