Here is what my /etc/network/interfaces
looks like:
# 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
However, if I use the GUI by...
- clicking on the network connection near the clock,
- clicking Edit Connections
- selecting the only choice in the list (in my case wired connection 1)
- picking Edit
- picking the IPv4 tab
I see a static 192.168.1.96 with a netmask of 24 and a gateway of 192.168.1.2.
- First off, how is it possible I have a netmask of 24? Shouldn't it be 255,255,255,0?
- Secondly, I no longer have any device at that gateway address (I did have till last week, but it is now gone) and my browser still works to get to the internet.`
- Third, where is this information stored if not in the /etc/network/interfaces` file?
Just for completeness, here are the results of 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)