remember that discussion about ever changing non-standard ways of defining network interfaces and ip addresses under /etc/network…
well guess what, canonical just came up with a completely new config file format X-D (guess, everything is a yaml.yml now)
hostnamectl; # tested on Operating System: Ubuntu 20.04.3 LTS Kernel: Linux 5.4.0-88-generic Architecture: x86-64
while temporarily adding a fixed ip to a interface “hack” like:
SUBNET=5;while true; do ifconfig enp2s0:4 192.168.$SUBNET.224 up; ip -c addr show; ping -c 3 192.168.$SUBNET.222; sleep 3; clear; done
this config will add the fixed ip 192.168.5.224 to enp0s3 in addition to a dhcp assigned address:
# this config file might be caleld something different ls -lah /etc/netplan/*.yaml # on ubuntu server 20.04.3 LTS it is vim /etc/netplan/00-installer-config.yaml # on ubuntu desktop 20.04.3 LTS it is vim /etc/netplan/01-network-manager-all.yaml # This is the network config written by 'subiquity' # manually modified: add a fixed ip to the interface enp0s3 (in addition to dhcp asigned address) # before that was called a virtual interface # ifconfig enp0s3:0 192.168.5.101 up network: ethernets: enp0s3: dhcp4: true addresses: - 192.168.5.224/24 version: 2 :wq # write and quit in vim # test out settings netplan try; # <- that is pretty clever :) Warning: Stopping systemd-networkd.service, but it can still be activated by: systemd-networkd.socket Do you want to keep these settings? Press ENTER before the timeout to accept the new configuration Changes will revert in 101 seconds
# apply the settings without try (WARNING ALL REMOTE WORKERS! THIS IS DANGER!) netplan apply # more verbose output netplan --debug apply # check what it has done ip -c a s
# + use dhcp assigned ip & route & gateway + use multiple fixed ips on the same interface # + modify OpenDNS.gr to be the primary dns "phonebook" dns resolve names server: 220.127.116.11, second: Google's dns server # manually modified: add a fixed ip to the interface enp0s3 (in addition to dhcp asigned address) # before that was called a virtual interface ifconfig enp0s3:0 192.168.5.101 up network: ethernets: enp0s25: dhcp4: true addresses: - 192.168.0.223/24 - 192.168.4.223/24 - 192.168.5.223/24 nameservers: addresses: - 18.104.22.168 # - 22.214.171.124 (CloudFlare) # - 126.96.36.199 (Google) version: 2 # for some reason ubuntu does not respect the order of the nameservers # so when multiple nameservers are enabled, it could prefer Google's over LibreDNS # apply and check netplan try # everything ok? netplan apply # check ip -c a
then double check to: https://libredns.gr/ to check if it works
unencrypted & non private fallbacks:
if for some reason, unencrypted dns queries are preferred try:
– 188.8.131.52 https://libreops.cc/radicaldns.html
also: of course, the default nameservers of 184.108.40.206 (cloudflare) and 220.127.116.11 (Google)
can be put there too.
BIND and DNS – the Phonebook of the internet – Berkeley Internet Name Domain – how to benchmark dns servers (find fastest) – LibreDNS
Fastest alternatives to Google’s DNS servers for StarLink users – how to manually dig-test dns nameservers
liked this article?
- only together we can create a truly free world
- plz support dwaves to keep it up & running!
- (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
- really really hate advertisement
- contribute: whenever a solution was found, blog about it for others to find!
- talk about, recommend & link to this blog and articles
- thanks to all who contribute!