Setting up /etc/network/interfaces
8,463
Your question is a bit unclear, but in case you want to set custom DNS you can do it in few ways.
- add
dns-nameservers {IP}
to your interfaces file. - or add
nameserver {IP}
to/etc/resolv.conf
(this is not permanent solution).
Related videos on Youtube
Author by
Gary
Updated on September 18, 2022Comments
-
Gary over 1 year
I am setting up a connection to Optimum business with a static ip
- Ip address 47.x.x.62
- Default gateway 47.x.x.61
- subnet mask 255.255.255.252
- Primary DNS server 167.x.x.138
- Seconday DNS Server 167.x.x.4
I am trying to set up eth0 (eno1) to be on the static IP and eth1 (eno2) to be on the network (LAN) eno2 is up and working but eno1 is not.
I don't seem to be getting to commands to set up to the name server correct any suggestions?
# 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 # The primary network interface auto eno1 #iface eno1 inet dhcp iface eno1 inet static address 47.x.x.62 netmask 255.255.255.252 gateway 47.x.x.61 # The primary network interface auto eno2 #iface eno2 inet dhcp iface eno2 inet static address 192.168.1.5 netmask 255.255.255.0 gateway 192.168.1.1
-
Gary about 6 yearsthis is for ubuntu 16.04
-
Philippe Delteil about 6 yearseno2 is supposed to be statis as well? Are you sure the gateway is accepting static ips?
-
AsenM about 6 yearsWhat exactly is your problem?
-
Philippe Delteil about 6 yearsWhat do you mean by 'I don't seem to be getting to commands to set up to the name server correct' ? what name server?
-
Gary about 6 yearson my optimun business account i have to set up IP subnet gateway and primary/secondary dns server to access it
-
Gary about 6 yearsthe exact problem is I want eno1 directly to the internet and Its not on the net
-
Gary about 6 yearseno1 is set to static because Optimum business requires it eno2 is also set to static because i want it on the same LAN ip which is shut of from the WWW
-
Gary about 6 yearswhen i put dns-nameservers in on ifconfig I get host name lookup failure