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:
Both machines happily access the internet.
Each machine is assigned a network address like 10.0.0.4 and 10.0.0.5 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 10.0.0.2
/etc/hosts just has 127.0.0.1 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 10.0.0.4
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 (http://10.0.0.2), 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 192.168.1.1 and 192.168.1.2 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).
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.
Well, perseverance, poking-about and head-scratching seems to have paid off at last.
I found this really simple guide to networking:
http://web.onetel.net.uk/~showerail/...net_setup.html (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:
Chris says Edit /etc/sysconfig/network-scripts/ifcfg-eth0:
IPADDR=192.168.1.2 # or whatever your IP address is to be - see above
NETMASK=255.255.255.0 # or 255.0.0.0 if your IP address is 10.x.x.x
NETWORK=192.168.1.0 # or 10.0.0.0 if your IP address is 10.x.x.x or 192.168.2.0 if your IP address is 192.168.2.x
BROADCAST=192.168.1.255 # or 10.255.255.255 if your IP address is 10.x.x.x or 192.168.2.255 if your IP address is 192.168.2.x
So I set it like this:
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 10.0.0.2 in resolv.conf, as 10.0.0.2 is the address of the Zoom.
The default gateway and your hostname go in /etc/sysconfig/network:
GATEWAY=192.168.1.1 # or the IP address of your gateway device - your default gateway
So I put
But the command hostname still returned localhost. So I said, as root:
The address of the other PC is 10.0.0.12, so I added a line to /etc/hosts that says:
10.0.0.12 p4.home.net p4
Now I can ping p4 from p3, and once I had fixed up p4.home.net likewise, do the reverse. Best of all, this all survives a reboot.
Hope this helps someone else.
Thanks dyw - you beat my reply by 9mins!
You're welcome - glad to be of help. Help some, be helped some... :)
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,
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:
In /etc/resolv.conf you need the address of the zoom:
(assuming the zoom is at 10.0.0.2)
Then restart the interface (as root)
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:
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,
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 11:35 AM.|