• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

A Bit of Networking Help Please.

argedion

The TechnoFrog
I have a print/file server that every time my router is reset give the printer a different IP address. I would like to make this a Static IP but am not aware how. I have about 9 devices that connect to the internet from the router. I want to keep the dynamic Ip's for those devices however the 1 server I want to have a static. It is a Linux Server just basic samba / with cups I share the printer with my wife so its important that she have access to it but her windows machine is stupid and wont scan for and adjust for the Ip. (Windows 7 Home Premium)

TIA
 
I'm thinking that likely you're router is giving out the dhcp addresses? If so, there should be a configuration in there somewhere to adjust that, or you might be able to route all your traffic through a secondary server (like the print server) and have that hand out addresses either statically or dynamically.

I set up a file server that also functions as a 'hot spot' in that anyone will have access to the files over 802.11 ... the only thing is, we have dial up, so no one gets actual internet access. Because of this, I set it up to do all the addresses statically (because I guess dhcpd isn't included in that ubuntu server)...

So you *can* do it, it just might be a pain.

But I'm guessing that your router has either a configuration web page or some form of console connection that you can issue commands over. You should be able to give out say 192.168.0.5-20 to your devices and set the print server up as say 192.168.0.4 just as an example.

If you list your router someone might have more specific help than what I've just said. ;) Good luck though!
 
@argedion, which router and which printer is this?
Anyways, the general idea is...
1. find the MAC address of the printer
2. go into the router to assign a static IP address for this MAC address.
3. reboot both the router and printer
4. reinstall printer driver (or edit software port) if necessary
Good luck.


edit: i probably should mention this too... on some printers, we can also assign the IP address from the printer (via the little screen on the printer, if any)... but don't do it here. Always set the static IP on the router. If we set the IP on the printer, it may/will not work if we switch the router brand/model, or give/sell this printer to someone else who will plug it into the network there because the 192.168.xx.yy may be different (the xx part on the other router may/will be different).

edit2: to find the MAC address of the printer... either
a) look for it on a label behind/on the printer
b) look for it via the small screen/menu on the printer or a printout of the network config... or
c) look for it in the connected devices (or current DHCP assignment) page on the router
 
I have a print/file server that every time my router is reset give the printer a different IP address. I would like to make this a Static IP but am not aware how. I have about 9 devices that connect to the internet from the router. I want to keep the dynamic Ip's for those devices however the 1 server I want to have a static. It is a Linux Server just basic samba / with cups I share the printer with my wife so its important that she have access to it but her windows machine is stupid and wont scan for and adjust for the Ip. (Windows 7 Home Premium)

I would recommend static network addresses for servers, anyway. It's much easier that way.

You can set up a static network address by changing your /etc/sysconfig/network-scripts/ifcfg-xxxx file (xxxx is the name of your network interface, like eth0, em1, p33p1, etc...)

For example, here is the ifcfg file on one of my machines that has a static network address.

Code:
NM_CONTROLLED="yes"
BOOTPROTO=none
DEVICE="p33p2"
ONBOOT=yes
HWADDR=6C:62:6D:7C:0C:31
TYPE=Ethernet
IPADDR0=192.168.1.20
PREFIX0=24
GATEWAY0=192.168.1.254
DNS1=192.168.1.254
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System p33p2"

chances are, on your system, these are the only 5 lines you will need to change:

Code:
BOOTPROTO=none ------------------------     BOOTPROTO=dhcp tells it to use DHCP and dynamic addressing
IPADDR0=192.168.1.20  ------------------- network address you wish to assign
PREFIX0=24 --------------------------------- netmask - equilivant to 255.255.255.0
GATEWAY0=192.168.1.254 ---------------- address of router/gateway
DNS1=192.168.1.254 ----------------------- address of your DNS server (I used my router address, which pulls DNS from my ISP)

Thanks for the quick response and help. I'll report back how it worked out.

---------- Post added 6th July 2012 at 05:45 AM ---------- Previous post was 5th July 2012 at 09:19 PM ----------

Ok I first created a file but it didn't work. (did not have on in natively) so went opended up Network Manager. clicked on IP4 settings and changed the method to Manual
then added ipaddress, netmask, gateway
Dns server is same as router

clicked saved rebooted and it all worked well. So then I unplugged inet connection rebooted and again all was well. SAME IP all the way around :) thanks bro

answered from fedora.com this is the solution
 
The challenge you run into by doing it from the computer is that the router may still try to hand out that address. What you should do is set up an address reservation in the router, based on the MAC address of the device that needs to keep the same address.

The other option is to keep a range of addresses as DHCP from the router (20 may suit you, for some headroom), then make your static IP outside that range but still on the same subnet.
 
On my router (BT Home Hub(Thompson/Speedtouch)) there's an admin option to allow devices to 'keep' IP addresses. So, my devices all still have default dynamic IP settings but they always get assigned the same IP address by the router when they request an address. It might be worth you going through your router's admin pages to see if your setup has similar functionality.
 
If you have a Linksys router you should find a 'DHCP Reservation' configuration screen that lets you reserve a particular IP address for a particular device by its MAC address. I have about 8 devices (I lose count) setup this way currently and its very reliable.
 
trying to do this and i keep getting invalid ip route. I'm not a networking expert know just enough to network at home but can't seem to get a static using this method what am I doing wrong?



btw this is a linksys 2000
TIA
 
Ok Think I've figured it out. I was on the wrong page. After going through the router setup I found DCHP Reservation. I clicked the button assigned the mac to the ip i wanted and saved the config I rebooted and its all working good.
 
Back
Top Bottom