How to set up config for static IP? what are 'broadcast' and 'network' ips?
Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm not sure how i'm meant to find out what to put for the 'network' and 'broadcast' values?? As is, it isn't connecting.
Note, the network was working OK with auto wlan0 and iface wlan0 inet dhcp, and the rest not there.
Also, what range am i meant to set my ip address-- should it be within the range of those assigned by DHCP or outside of that??
Network part appears to be fine but for broadcast part it should be: 192.168.1.255 instead of 192.168.2.255
As you said that it was working fine when it was set to acquire the IP from dhcp. You can give a try changing the broadcast address and then restarting the network.
The IP should be within the DHCP range. I have tried this before with broadband connection and it worked. I have never tried it with wireless. Also make sure that the IP that you are assigning as static shouldn't be in use.
these were copypasted from another example (although similar).. so is the broadcast ip always the same as the gateway but with 255 at the end?? (and the same for network but with 0).
If so, this isn't working for me?? [yes, i'm making sure the assigned IP isn't in use already]
Well the network and broadcast depend on how you have subnetted your network. As you said it wlan connection I assumed that you are using a WiFi router which is acting as a dhcp server as well. Usually these routers are configured to assign IPs in the 192.168.10 network range and thus the broadcast should be 192.168.1.255.
Chage your file to look like above. I am assuming that 192.168.1.110 is not in use if it in use then choose another IP. Restart the network and then give it a try.
Could you please let us know where this range configured? As it might be possible that just setting up a static IP will not work until the WiFi router / AP allows it.
done. Still not connecting/working. The range is listed in one of the admin pages of my router, which runs DD-WRT. I have set up a static IP before with this router (although with windows IIRC).
FWIW, my network/interfaces file also contains;
auto lo
iface lo inet loopback
iface eth0 inet dhcp
and then wpa-ssid and wpa-psk (and their values). Commenting out the eth0 and lo parts froze my bootup for 1 /2 mins at
Code:
[12.34567] ADDRCONF(NETDEV_UP): wlan0: link is not ready
Starting NFS common utilities: statd[ 12.23456] ADDRCNF(NETDEV_CHANGE): wlan0: link becomes ready
and also at 'Starting NFS common utilities: statd'.
Instead of setting up a static IP I would suggest increasing DHCP lesae time if possible. As you said that you want to make this server as music server. If you will configure longer lease time your system shouldn't be loosing the IP assigned to it.
The reason your boot up time is getting increased because network services tries to bind themselves on some IP. If you will comment out lo and eth both then they don't know which IP and they keep on trying to get that information.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.