LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Static IP on wifi? (https://www.linuxquestions.org/questions/linux-newbie-8/static-ip-on-wifi-4175492315/)

Ryanms3030 01-23-2014 12:15 PM

Static IP on wifi?
 
I am only using Wifi on my CentOS server. To set the static IP would I still be setting it on the eth0 controller?

rtmistler 01-23-2014 01:21 PM

Sorry. That reads as two different questions.

To set a static WIFI IP address is one thing.

To set your eth0 address to static would affect the address for the cabled Ethernet. If you have no cable plugged in, you don't need to change anything for your eth0 settings.

Is your WIFI working fine? If so, are you looking to change the WIFI address? If not, and if everything is fine, no need to do anything.

Ryanms3030 01-23-2014 01:51 PM

Quote:

Originally Posted by rtmistler (Post 5103841)
Sorry. That reads as two different questions.

To set a static WIFI IP address is one thing.

To set your eth0 address to static would affect the address for the cabled Ethernet. If you have no cable plugged in, you don't need to change anything for your eth0 settings.

Is your WIFI working fine? If so, are you looking to change the WIFI address? If not, and if everything is fine, no need to do anything.

OK, so I'm using a computer as a home server. I can not easily connect a wired connection in the location it's in so it's using wifi right now. Everyone suggests that the server have a static ip. I'm using dhcp on the wifi right now and everything works fine. So I don't need to change just want to cover my bases in case the server gets a different address assigned at some point

rtmistler 01-23-2014 02:03 PM

You can assign a static IP for your wireless network. The wireless network is not eth0.

If you type ifconfig, do you see wlan0 or something appearing to be wireless?

If you type iwconfig, do you see wlan0 or something appearing to be wireless?

I'm not up on CentOS, but if you have an /etc/network/interfaces file, you can put in lines there to make your wireless a static IP. And I just searched for that to find that it doesn't use the /etc/network/interfaces file, it uses network scripts to do this.

A couple of things to do:

On your wireless router, make sure you have an address you can use that's not out of your DHCP pool. For instance DHCP may give out addresses in the 192.168.1.xxx network and give out address .100-.250 for DHCP. You can pick say address 192.168.1.99; it'll still be on that network but won't be duplicated by another wireless device which uses DHCP. Make sure you don't pick the router's address either; probably 192.168.1.1. But these addresses are examples; you should examine your network first before you start.

Then work at configuring your server to be the chosen IP address.

You should search for recommendations on how to set a static IP for your system type.

suicidaleggroll 01-23-2014 02:10 PM

Or instead you can configure your wireless router to always assign the same IP to the server's MAC address. That way the server can stay on DHCP, but you can rest assured that it will always have the same IP, controlled by the router.


All times are GMT -5. The time now is 12:45 AM.