-   Linux - Networking (
-   -   Zoom modem/switch & linux<->linux network: DHCP / Static ? (

tredegar 01-16-2005 05:01 AM

Zoom modem/switch & linux<->linux network: DHCP / Static ?
I am going round in circles here, and would appreciate some help....

Zoom X5 ADSL Modem/Firewall/5-port Switch (such a lovely piece of kit, I'd swear it's running linux!) connected to eth0 on each of 2 pc's running MDK 9.1 and 10.1 OE.

When I boot, it says "Bringing up eth0....FAILED. But I think that's just a Mandrake thing and it doesn't seem to matter. I connect to the internet at boot time by putting these commands at the end of /etc/rc.d/rc.local:

ifdown eth0
dhclient eth0

Both machines happily access the internet.

Each machine is assigned a network address like and by the Zoom. These numbers change as they are assigned by the Zoom's DHCP server, and cannot be relied on to stay the same.

/etc/resolv.conf just says nameserver
/etc/hosts just has localhost
hostname returns localhost for both computers

If I go to the other computer, and find out what its address is, I can ping it as ping

I would like to set up my network so that I can move files between both machines and I am not sure how to do this: everybody else seems to be using samba (for windows shares), and it seems I need nfs.

The nfs HOWTOs assume that my machines have a static IP, which they don't, or that I am running a dhcp server (which I am not - as I understand it, the Zoom is my dhcp server and is in turn presumably a client for my ISP's dhcp server).

I have a web interface to the zoom (, but it is very difficult to understand and windows-centric.
Here is a link to it's manual:

How can I-

EITHER give my two linux machines static IP addresses eg and and still have them connect to the internet?

OR, better, fix it so I can refer to each machine by name? (hostname, netmask, broadcast, route, ifconfig, bang, head, against, wall).


dyw 01-16-2005 12:23 PM

I have the Zoom X4, and also love it. What you need to do is stop using its built-in DHCP server. Just assign each a private IP address. The Zoom X5 will not mind. Just make sure each one is a unique IP address. Use whatever network configuration utility you like to change it.

Then you may need to do whatever its equivalent to 'release and renew' is, to discard its old DHCP assigned address and use its new static one.

Note that it is your LAN IP address that now becomes static - all your machines and the Zoom X5 all share a single WLAN (Internet) IP address that may or may not change depending on your ISP and your service plan.

After that, if you'd like to refer by name, the simplest thing is to edit the hosts file.

tredegar 01-16-2005 12:32 PM

Well, perseverance, poking-about and head-scratching seems to have paid off at last.

I found this really simple guide to networking: (Thanks Chris!)

Much of this is lifted from that. Anyway, this is what I did:

Edited out the bits in /etc/rc.d/rc.local that I used to use to connect to the Zoom. If you haven't made a kludge like this then you won't have to undo it!

Bring the current connection down:
ifdown eth0

Chris says Edit /etc/sysconfig/network-scripts/ifcfg-eth0:

IPADDR= # or whatever your IP address is to be - see above
NETMASK= # or if your IP address is 10.x.x.x
NETWORK= # or if your IP address is 10.x.x.x or if your IP address is 192.168.2.x
BROADCAST= # or if your IP address is 10.x.x.x or if your IP address is 192.168.2.x

So I set it like this:

IPADDR=            # or whatever your IP address is to be - see above
NETMASK=          # or if your IP address is 10.x.x.x
NETWORK=          # or if your IP address is 10.x.x.x or if your IP address is 192.168.2.x
BROADCAST=  # or if your IP address is 10.x.x.x or if your IP address is 192.168.2.x

Note, I initally tried setting the IPADDR to, which is outside the range that the Zoom's dhcp server serves up by default, because I did not want the dhcp server to serve up an address that I had already allocated if I plugged in yet another computer at some time. But that meant that I could ping the p4 ( and (The zoom) but trying to access google gave "The connection to was refused". Setting the IPADDR to (static) didn't cause this problem. Maybe it's something to do with the Zoom's firewall? So I have turned off the Zoom's dhcp server (, Advanced Setup, Disable DHCP Server, Save Settings, Reboot the Zoom). It seemed the easiest thing to do.

Chris says /etc/resolv.conf should contain the nameserver address(es) - put the address of your ISPs nameserver right at the top. eg:

So I put nameserver in resolv.conf, as is the address of the Zoom.

The default gateway and your hostname go in /etc/sysconfig/network:

GATEWAY= # or the IP address of your gateway device - your default gateway

So I put


I just made up the name, it doesn't seem to matter as it's MY network. is the address of the Zoom, and it is plugged into eth0.

But the command hostname still returned localhost. So I said, as root:


The address of the other PC is, so I added a line to /etc/hosts that says: p4

Now I can ping p4 from p3, and once I had fixed up likewise, do the reverse. Best of all, this all survives a reboot.

Hope this helps someone else.

tredegar 01-16-2005 12:34 PM

Thanks dyw - you beat my reply by 9mins!

dyw 01-16-2005 09:31 PM

You're welcome - glad to be of help. Help some, be helped some... :)

reakinator 11-08-2007 11:24 PM

is this possible to do and still have dhcp?
I know this post is old, but I need to do something very similar, with the same zoom x5 adsl router:

I'm attempting to set up a file/web server at an office that needs dhcp for visiting clients. It is apparent that the server (which is on a linux machine running Ubuntu Server 7.10) needs a static IP. To do this, the above instructions explain the dhcp serving has to be turned off in the zoom x5. However, then all the computers in the office need to be assigned IP's statically, which is where the problem is.

Does anyone know a way to give the server a static IP, where it can use ssh, LAMP, and ftp, and still provide dhcp for the other computers within the office?

thanks in advance,

tredegar 11-09-2007 01:14 AM

Ubuntu is debian-based, and does things differently.
To give the server a static IP edit the file /etc/network/interfaces
Find the bit that refers to eth0 and make it look like this:

auto eth0
iface eth0 inet static
# These settings might be for a small 192.168.0.x network
# broadcast
# address
# netmask
# gateway

In both cases the gateway address is the address of the zoom

In /etc/resolv.conf you need the address of the zoom:
(assuming the zoom is at

Then restart the interface (as root)
ifdown eth0
ifup eth0

You can leave the zoom serving up dhcp for other computers if you like, but I have found life easier if they all have static IPs. If you do this, make sure all the PCs /etc/hosts files are referring to the other PCs static addresses:

cat /etc/hosts
# You must have this line: it's the loopback interface  localhost
# List all the pcs here, with their static IPs    p3    p4 server    rio samson    red

reakinator 11-10-2007 11:22 PM

Okay, looks to be a little simpler than I thought. I also have another question pertaining to the zoom x5. I need to open up port 22, but I haven't been able to do so yet. Here are the settings I have under the 'ip filtering' button:

RuleID I/F Apply Stateful Inspection Direction Rule Action
22 ALL Disable Incoming Accept N/A

In I/F Log Option Oper. Status
N/A Disable - Up

Does any of this look troublesome, or do I need to change some other settings?

thanks for helping me figure this out,

tredegar 11-11-2007 03:41 AM


I need to open up port 22, but I haven't been able to do so yet.
I no longer have that modem/router, so you'll have to read the manual to work out port forwarding.
You need to accept connections to port 22 on your router, and forward them to the LAN IP number of your PC, port 22.

All times are GMT -5. The time now is 04:29 PM.