OS : Ubuntu 16.04 LTS (GNU/Linux 4.4.0-1009-raspi2 armv7l)
Ainsi, lorsque je me connecte à ma machine via ssh depuis Windows avec putty, je peux le faire avec l'IP 192.168.0.60 .
Maintenant, quand je liste mes appareils à partir de l'admin web du routeur, il montre qu'il utilise l'IP 192.168.0.109 .
Voici le résultat de la commande 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)
Et voici ce que j'ai en 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
Un autre élément à prendre en compte est que lorsque je redémarre le service de mise en réseau, il génère l'erreur suivante :
Job for networking.service failed because the control process exited with
error code. See "systemctl status networking.service" and "journalctl -xe" for details.
Il s'agit de la systemctl status networking.service de la production :
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'.
Remarquez la ligne suivante :
Mar 23 15:31:59 ubuntu systemd[1]: Failed to start Raise network interfaces.
Quelqu'un peut-il me dire ce qui se passe et comment je peux résoudre ce problème ?
Editer : Résultats de l'itinéraire -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