LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 10-14-2011, 03:39 PM   #1
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Rep: Reputation: Disabled
How to set up config for static IP? what are 'broadcast' and 'network' ips?


on voyage (debian based), I have /etc/network/interfaces set up similarly to;
Code:
auto wlan0
iface wlan0 inet static
address 192.168.1.149
netmask 255.255.255.0
broadcast 192.168.2.255
network 192.168.1.0
gateway 192.168.1.1
[wpa stuff]
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??
 
Old 10-14-2011, 03:56 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

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.
 
Old 10-14-2011, 05:20 PM   #3
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
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]
 
Old 10-14-2011, 05:25 PM   #4
cr0d0m
LQ Newbie
 
Registered: Sep 2011
Posts: 6

Rep: Reputation: Disabled
Broadcast isnt allways 255.
 
Old 10-14-2011, 05:27 PM   #5
cr0d0m
LQ Newbie
 
Registered: Sep 2011
Posts: 6

Rep: Reputation: Disabled
It depends of subnet mask.
 
Old 10-14-2011, 05:31 PM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

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.

Edit the file and make it look like following:

Code:
auto wlan0
iface wlan0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
Restart network services and then give it a try.

Make sure that you take a backup of network configuration file before making any changes.

Little bit curious why you want to change it to static instead of DHCP. Any particular reasons?

Last edited by T3RM1NVT0R; 10-14-2011 at 05:37 PM.
 
Old 10-14-2011, 05:50 PM   #7
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
i am setting up a music server, i want it to be accessible on the same IP always.

DHCP addresses are in the range 192.168.1.100-192.168.1.149. Subnet mask is 255.255.255.0
 
Old 10-14-2011, 06:15 PM   #8
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Code:
auto wlan0
iface wlan0 inet static
address 192.168.1.110
netmask 255.255.255.0
gateway 192.168.1.1
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.
 
Old 10-14-2011, 07:24 PM   #9
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
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'.
 
Old 10-15-2011, 05:05 AM   #10
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

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.
 
Old 10-16-2011, 09:31 PM   #11
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
i'd really like to get it set up as static.. i didn't think this would be difficult?
 
Old 10-22-2011, 12:02 PM   #12
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
So what is the 'formula' for broadcast and network IPs ??
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot set up network with suse vmware using bridged network config. lxvor SUSE / openSUSE 1 02-08-2009 03:50 PM
Network Configuration/Troubleshooting in Fedora 7 (static routing/hardware config) Linux_Questions Linux - Networking 20 10-15-2007 05:22 PM
Routing for eth0 and wlan0 with static IPs on the same network. kelvinlo Linux - Wireless Networking 3 10-15-2007 04:54 PM
how to config. network settings for having a static ip with a router kkeith Linux - Newbie 2 10-19-2005 05:00 AM
Static Network config for PCMCIA NIC in RH 7.2 jboo Linux - Networking 1 01-29-2002 08:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 08:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration