SO: Ubuntu 16.04 LTS (GNU / Linux 4.4.0-1009-raspi2 armv7l)
Então quando eu conecto a minha máquina através do ssh a partir do windows com putty, eu consigo fazer isso com o IP 192.168.0.60 .
Agora, quando estou listando meus dispositivos da web de administração do roteador, ele mostra que está usando o IP 192.168.0.109 .
Esta é a saída para o cmd ifconfig.
eth0 Link encap:Ethernet HWaddr b8:27:eb:86:e1:e0
inet addr:192.168.0.109 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:fe86:e1e0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2233 errors:0 dropped:0 overruns:0 frame:0
TX packets:1067 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:163132 (163.1 KB) TX bytes:167801 (167.8 KB)
E isso é o que eu tenho em etc / network / interfaces
auto eth0
iface eth0 inet static
address 192.168.0.60
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameserver 8.8.8.8
dns-nameserver 8.8.4.4
Outro fato a considerar é que, quando reinicio o serviço de rede, ele gera o seguinte erro:
Job for networking.service failed because the control process exited with
error code. See "systemctl status networking.service" and "journalctl -xe" for details.
Esta é a saída systemctl status networking.service :
networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
└─50-insserv.conf-$network.conf
Active: failed (Result: exit-code) since Thu 2017-03-23 15:31:59 UTC; 2min 1s ago
Docs: man:interfaces(5)
Process: 2046 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 2038 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list
Main PID: 2046 (code=exited, status=1/FAILURE)
Mar 23 15:31:58 ubuntu dhclient[2065]: DHCPREQUEST of 192.168.0.109 on eth0 to 255.255.255.255 port 67 (xid=0x6fc3c068)
Mar 23 15:31:58 ubuntu dhclient[2065]: DHCPACK of 192.168.0.109 from 192.168.0.1
Mar 23 15:31:58 ubuntu ifup[2046]: RTNETLINK answers: File exists
Mar 23 15:31:59 ubuntu ifup[2046]: bound to 192.168.0.109 -- renewal in 657200529 seconds.
Mar 23 15:31:59 ubuntu ifup[2046]: RTNETLINK answers: File exists
Mar 23 15:31:59 ubuntu ifup[2046]: Failed to bring up eth0.
Mar 23 15:31:59 ubuntu systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Mar 23 15:31:59 ubuntu systemd[1]: Failed to start Raise network interfaces.
Mar 23 15:31:59 ubuntu systemd[1]: networking.service: Unit entered failed state.
Mar 23 15:31:59 ubuntu systemd[1]: networking.service: Failed with result 'exit-code'.
Observe a seguinte linha:
Mar 23 15:31:59 ubuntu systemd[1]: Failed to start Raise network interfaces.
Alguém pode me dizer o que está acontecendo e como eu poderia consertar isso?
Editar: Resultados da rota -n:
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
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0