[Voyage-linux] Setting Static IP & DNS Server

Edwin Whitelaw (spam-protected)
Thu Nov 8 20:34:59 HKT 2007


Robert,

This is set in /etc/network/interfaces.

For the interface in question: (assume eth0)

auto eth0
iface eth0 inet static
address 10.111.108.2
netmask 255.255.255.0
broadcast 10.220.202.255
gateway 10.111.108.1

The auto line will cause this to occur on boot. If this interface isn't 
the correct path for the default gateway, you can omit the gateway line.

For DNS, the information is set in /etc/resolv.conf, ie.

search <your domain name>
nameserver 10.50.10.10
nameserver 10.50.10.11

I believe you need to edit the /ro/etc/resolv.conf (it's copied to 
/etc/resolv.conf during boot) file for it to be persistent over a reboot.

HTH.

Edwin

Robert Rawlins - Think Blue wrote:
>
> Hello Guys,
>
> I’ve got a requirement on a couple of my 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.
>
> Rob
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Voyage-linux mailing list
> Voyage-linux at list.voyage.hk
> http://list.voyage.hk/mailman/listinfo/voyage-linux

-- 
<=+=+=+==+=+=+==+=+=+=+=+=+=+=+=>
Edwin Whitelaw, P.E.
New River Valley Unwired, LLC
2200 Lonesome Dove Dr
Christiansburg, VA 24073
540-239-0318





More information about the Voyage-linux mailing list