setting linux dns
Hello Guys,
I’ve got a requirement on a couple of my debian systems to configure static IP and DNS settings as they’re being placed into a network environment which doesn’t support DHCP so it will be unable to lease its own details. This is something I’ve not done before with Linux, at least, not successfully :-D so thought I’d ask you guys your opinions on the best way to handle it. What I can tell you at the moment is that if I use the following settings on my windows notebook then I’m able to connect to the network and internet no trouble at all, so I’m guessing it’s simply a case of setting these same details on my voyage system. IP: 10.111.108.2 Subnet: 255.255.255.0 Gateway: 10.111.108.1 Primary DNS Server: 10.50.10.10 Secondary DNS Server: 10.50.10.11 I’ll need some nice simple Simon-Says step by steps for doing this otherwise I’m bound to get lost when trying to set it up. I do have some limited experience of modifying my /etc/network/interfaces file but certainly wouldn’t say I really know what I’m doing. Thanks chaps, I look forward to hearing your advice. Joe |
You can do this:
Code:
ifconfig eth0 10.111.108.2 netmask 255.255.255.0 up Code:
nameserver 10.50.10.10 |
Edit your /etc/network/interfaces
This is what a static network setting will look like. Make sure you comment out (prefix each line with a # sign) the DHCP setting, don't just delete it. Like so Code:
# The primary network interface Code:
#My static settings |
As suggested all I needed to do was edit my /etc/network/interfaces file to contain the following;
auto eth0 iface eth0 inet static address 10.111.108.30 netmask 255.255.255.0 gateway 10.111.108.1 dns-nameservers 10.50.10.10 10.50.10.11 Thanks for all your help guys! |
All times are GMT -5. The time now is 10:21 PM. |