- 论坛徽章:
- 0
|
各位大侠遇到一个奇怪的问题。。。。
修改了系统的ip地址网关dns
ip地址修改过来了,但网关还是之前的没变化,导致无法上网
请看下面红色字体,之前的ip地址是192.168.1.16,GW:192.168.1.1
修改为192.168.0.16,GW:192.168.0.1
配置文件修改没问题,可是ifconfig看到的还是原来的,
root@nuc-1:~# cat /etc/network/interfaces
# interfaces(5) file used by ifup( and ifdown(
auto lo eth0 eth0:1
iface lo inet loopback
iface eth0 inet static
address 192.168.0.16
netmask 255.255.254.0
gateway 192.168.0.1
下面这里的红色的还是之前的
root@nuc-1:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr b8:ae:ed:e9:a7:f1
inet addr:192.168.0.16 Bcast:192.168.1.255 Mask:255.255.254.0
inet6 addr: fe80::baae:edff:fee9:a7f1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:346803 errors:0 dropped:2 overruns:0 frame:0
TX packets:4078 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23438187 (23.4 MB) TX bytes:374607 (374.6 KB)
Interrupt:20 Memory:aa100000-aa120000
eth0:1 Link encap:Ethernet HWaddr b8:ae:ed:e9:a7:f1
inet addr:10.2.0.2 Bcast:10.2.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:20 Memory:aa100000-aa120000
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:31320 errors:0 dropped:0 overruns:0 frame:0
TX packets:31320 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:23564363 (23.5 MB) TX bytes:23564363 (23.5 MB)
root@nuc-1:~# route -n -v
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
10.2.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.0.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
root@nuc-1:~#
|
|