diff --git a/zk/Configuring_internet_connection_on_Debian.md b/zk/Configuring_internet_connection_on_Debian.md new file mode 100644 index 0000000..c16858d --- /dev/null +++ b/zk/Configuring_internet_connection_on_Debian.md @@ -0,0 +1,77 @@ +--- +tags: [networks, internet, Debian, linux, Ethernet] +--- + +## Ethernet + +First identify the name of your Ethernet interface with +[`ip addr show`](./View_IP_addresses.md). Example output: + +``` + enp1s0: mtu 1500 qdisc fq_codel state UP group default qlen 1000 + link/ether 40:b0:34:37:40:40 brd ff:ff:ff:ff:ff:ff + inet 192.168.178.53/24 brd 192.168.178.255 scope global enp1s0 +``` + +That last line is configured via `/etc/network/interfaces`. If you have not set +this up, the top line will say `DOWN` instead of `UP` and you will not have +internet access over Ethernet. + +The follwing example of `/etc/network/interfaces` is a common default: + +``` +auto enp1s0 +iface enp1s0 inet static + address 192.168.178.49 + netmask 255.255.255.0 + gateway 192.168.178.1 + dns-nameservers 8.8.8.8 8.8.4.4 +``` + +Sets the following: + +- connect automatically as soon as Ethernet port activated +- use the `enp1s0` interface and insist on static IP from [DHCP](./DHCP.md) +- use the static IP address `192.168.178.49` +- use standard subnet masking +- use Google as the preferred and fallback DNS + +Restart networking: + +```sh +sudo systemctl restart networking +``` + +Confirm connection again with `ip addr show` or +`sudo systemctl status networking`. + +## Turn the Ethernet interface on/off + +```sh +ifup enp1s0 +ifdown enp1s0 +``` + +### Use dynamic local IP address + +If you don't want to use a static IP, the contents of `/etc/network/interfaces` +is more minimal: + +``` +auto enp1s0 +iface enp1s0 inet dhcp +``` + +Basically you just let DHCP do the work of negotiating the IP address from the +router. + +## Contrast with other Linux operating systems + +Arch uses `systemd-resolvd` and NetworkManager. You won't find +`etc/network/interfaces`. + +To check network status on Arch use: + +```sh +systemctl status NetworkManager +``` diff --git a/zk/IP_addresses.md b/zk/IP_addresses.md index 3d837fa..ab18094 100644 --- a/zk/IP_addresses.md +++ b/zk/IP_addresses.md @@ -1,6 +1,5 @@ --- tags: [networks, internet] -created: Friday, August 16, 2024 --- ## IPv4 vs IPv6 diff --git a/zk/Network_scanning.md b/zk/Network_scanning.md index c37e3ef..f93039e 100644 --- a/zk/Network_scanning.md +++ b/zk/Network_scanning.md @@ -1,6 +1,6 @@ --- id: ippn -tags: [networks, procedural, Linux] +tags: [networks, procedural, Linux, dns] created: Monday, June 10, 2024 --- diff --git a/zk/View_IP_addresses.md b/zk/View_IP_addresses.md index 4776f6e..4f9b0f1 100644 --- a/zk/View_IP_addresses.md +++ b/zk/View_IP_addresses.md @@ -23,4 +23,4 @@ link/ether 90:2e:16:53:98:b9 brd ff:ff:ff:ff:ff:ffinet ``` The most important line is the third. This indicates my IP address -(`192.168.0.3/24`) including its subnet mask. +(`192.168.0.3/24`) including its [subnet mask](./IP_addresses.md).