Posts: 134
Joined: Sun Sep 30, 2012 10:10 pm
Location: Brasil

Wifi Static Ip

Wed Oct 31, 2012 4:59 am

Hello i want to setup Static Ip for my Wifi on Rpi.

Assuming that my Router is how must i configure the rest of the network interface.

iface wlan0 inet static
network ??????
broadcast ??????

I am wondering about network and broadcast. How can i figure out if this are the right values for me?

Thank you
Nr.1 Raspberry Pi Mod.B Rev.2 256Mb Ram (Raspbian)

Raspberry Pi Mod.B Rev.2 512Mb Ram (Maybe i´ll get one)

Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Wifi Static Ip

Wed Oct 31, 2012 5:05 am

You don't *need* network and broadcast so you can leave them out.
My Blog -
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post !

Posts: 517
Joined: Wed Oct 10, 2012 6:20 am
Location: Switzerland

Re: Wifi Static Ip

Wed Oct 31, 2012 6:31 am

For what it is worth:

You calculate those values usually based on your ip address and netmask.

You can find tcp/ip calculators on the internet, for example here is one:

Putting in your ip address and netmask in the second calculator on that page confirms the values you have are correct.

Posts: 3
Joined: Thu Dec 27, 2012 3:29 pm
Location: Nice, France

Re: Wifi Static Ip

Fri Jan 11, 2013 5:35 pm

Actually your netmask ( means that all the bits in the three first bytes of the address are designed for the network address (Type C) and the last byte for machines addresses.

So if your IP address is

192.168.1 are the network and
69 is your machine.

256 machines can be attached to that network range except that:

the first available address of the network (0) so is reserved for the network itself and
the last available (255) value is the broadcast address (for sending packages to all the machines on the network)

So finally you can have 254 different addresses.

If your network mask is i.e, means that only 192.168 are designed for the network and the other two bytes for the machines' addresses.

Hope it helps.

Posts: 99
Joined: Sat Dec 22, 2012 8:09 pm
Location: Calgary, AB, Canada

Re: Wifi Static Ip

Fri Jan 11, 2013 10:38 pm

What router do you have? You should be able to log in to the router and assign a static IP for the MAC address of your WiFi adapter. Nothing needs to be done on the Raspberry Pi.

Return to “General discussion”

Who is online

Users browsing this forum: NotRequired and 78 guests