I have deep problems with my LAN adapter configuration, using Debian 9.5, so I'll describe what's happened then raise my question.
While installing Debian 9.5, I gave the address I wanted to give to my Lan adapter (no DHCP) : 192.168.58.168 with netmask, network, broadcast and gateway: After installation, I first tried
ip a to check the network parameters, and noticed that my LAN adapter was called "ens33":
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000 link/ether 00:0c:29:3a:e1:17 brd ff:ff:ff:ff:ff:ff inet 192.168.58.168/24 brd 192.168.58.255 scope global ens33 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fe24:2134/64 scope link valid_lft forever preferred_lft forever
Then I edited
/etc/resolv.conf to add my 2 DNS and after that, the LAN worked perfectly well: I could ping all machines on my LAN and browse the web through Firefox.
Still, the docs I owned told me that the adapters were defined in the file
But when I displayed it with
cat, I was surprised to notice that the "ens33" interface didn't appear in that file, though I could ping it and though I could see it through
ip a . This looked strange to me...
Then after I've added a certain number of packages through
apt-get install, including
samba, I was satisfied to see that in Dolphin, all the machines of my Windows Domain LAN were visible, and I could even access to the shared directories of my Windows file server and play musical or video files with VLC: Great!
Then I restarted the PC, and nothing works any more: I don't have any LAN access, and if I type
ip a to see my LAN definitions, I can see that the "ens33" adapter has lost its properties:
ens33: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 00:0c:29:3a:e1:17 brd ff:ff:ff:ff:ff:ff
So I added the
ens33 section to the file
Now this file is as follows:
'# The loopback network interface auto lo iface lo inet loopback auto ens33 iface ens33 inet static address 192.168.58.168 netmask 255.255.255.0 network 192.168.58.0 broadcast 192.168.58.255 gateway 192.168.58.11 iface dns-nameservers 192.168.58.11 192.168.58.21
As you can see,
resolvconf added the 2 DNS I had defined in the file
because when I added them in the
resolv.conf file, they were automatically erased since I had installed resolvconf...
But it didn't solve the problem, even after reboot: So, I tried:
But the system answered:
ifup: /etc/network/interfaces:16: unknown or no address type and no inherits keyword specified ifup: couldn't read interfaces file "/etc/network/interfaces"
This "couldn't read interfaces file" is quite incomprehensible to me, because if I type:
it displays just what I reported above.
So, it seems that the "interfaces" file has no real power because:
1: In the beginning, ens33 didn't appear in that file, and still the network was fully operational
2: When I add the interface's definitions in that file, it has no effect on the machine
So I would like to know: Which Linux file(s) really fundamentally define(s) the LAN adapter's parameters ???