WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Can you setup Wifi with a static ip address?  (Read 12997 times)

Offline Trace

  • WikiUser
  • *
  • Posts: 20
Can you setup Wifi with a static ip address?
« on: January 29, 2014, 07:34:45 PM »
Hello all,

I have been trying to setup wifi in the latest coreplus to work with a static ip address?

I have tried everything (all the different scripts for bootlocal.sh etc.) I can find and udhcpc still runs.

Been at this for a couple of days now, I'm sure I am missing something really simple.

Can anyone help or point me in the right direction, is anyone else using tiny core with wifi and a static ip address?


Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Can you setup Wifi with a static ip address?
« Reply #1 on: January 29, 2014, 08:33:54 PM »
Boot with the nodhcp option.
Then you can ifconfig a static address.

Offline Trace

  • WikiUser
  • *
  • Posts: 20
Re: Can you setup Wifi with a static ip address?
« Reply #2 on: January 29, 2014, 09:13:43 PM »
I've tried that and udhcpc always runs, I've tried so many different things now that I'm sure I'm missing something right in front of me.

Can you please detail how exactly you would go about it.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Can you setup Wifi with a static ip address?
« Reply #3 on: January 29, 2014, 09:25:37 PM »
udhcpc is not expected to run automatically with boot code "nodhcp".
I suggest you boot with "nodhcp norestore" to exclude you have any scripts laying around somewhere and try to set an IP manually.
Code: [Select]
sudo ifconfig interface address
« Last Edit: January 30, 2014, 12:13:43 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline beerstein

  • Hero Member
  • *****
  • Posts: 523
Re: Can you setup Wifi with a static ip address?
« Reply #4 on: January 30, 2014, 03:40:27 AM »
Hi Trace:
Is your TCL system hooked via WIFI to a router which is set up using  DHCP?
If yes, this router assigns an IP address to your system. If you have a static IP address on your system the router can not see it.

I think - but I am not sure - First set up your TCL system using DHCP (automatic address assignment) then check which IP your system has been assigned  to. (using ifconfig)  It will be an address inside the routers address range. Make a note of it and assign this address as a static address to your TCL system. Then check if the  router still sees your system. Please let me know if it worked.
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Can you setup Wifi with a static ip address?
« Reply #5 on: January 30, 2014, 04:00:53 AM »
If you have a static IP address on your system the router can not see it.

How so?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11107
Re: Can you setup Wifi with a static ip address?
« Reply #6 on: January 30, 2014, 04:09:40 AM »
First set up your TCL system using DHCP (automatic address assignment) then check which IP your system has been assigned  to. (using ifconfig)  It will be an address inside the routers address range. Make a note of it and assign this address as a static address to your TCL system.

I'm no expert, but I thought it was good practise to set a static ip address outside of the dhcp address range?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Can you setup Wifi with a static ip address?
« Reply #7 on: January 30, 2014, 04:12:55 AM »
I'm no expert, but I thought it was good practise to set a static ip address outside of the dhcp address range?

Absolutely
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Trace

  • WikiUser
  • *
  • Posts: 20
Re: Can you setup Wifi with a static ip address?
« Reply #8 on: January 30, 2014, 09:21:20 AM »
OK .... here's some more facts:

Coreplus is installed on USB flashdrive from a latest version live CD.

nodhcp was chosen as one of the permanent boot options during install and is still there.

My hardware router has it's integrated DHCP turned off (we have multiple Xbox's here and have to use static addresses for each to avoid confusion).

Everything here laptop's, phone's, tablet's etc. are all set with individual static addresses and work with no problems.

What I am looking for is a way to setup my latest coreplus to automatically connect after booting with a static ip address.

From the way everybody is talking it seems like it should be really simple but for me no matter what I try when I try to connect and enter my tkip password .... it always starts UDHCPC and broadcasts for a lease .... which of course it never gets because DHCP is turned off in my hardware router.

I've tried different ways using nodhcp bootcode etc. and all the scripts and instructions I could find e.g.:

pkill udhcpc
ifconfig wlan0 (static address) netmask 255.255.255.0 up
route add default gw (gateway address)
echo "nameserver 8.8.8.8" > /etc/resolv.conf

and putting that in bootlocal.sh.

No matter what I try ... when I click on the wifi icon and enter my network and tkip key ..... UDHCPC always runs ????

I'll try the "nodhcp norestore"    and   "sudo ifconfig interface address"   but this seems very similar to what I've tried before.

Are you guys using static addresses over wifi?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Can you setup Wifi with a static ip address?
« Reply #9 on: January 30, 2014, 09:30:31 AM »
Don't run wifi.sh.

Offline Trace

  • WikiUser
  • *
  • Posts: 20
Re: Can you setup Wifi with a static ip address?
« Reply #10 on: January 30, 2014, 09:55:57 AM »
Aha... yes wifi.sh seems to be the problem .... always runs udhcpc.

Can you tell me how to do it without using wifi.sh?

And how to setup and execute my settings (inc. password etc.) to connect automatically when booting?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Can you setup Wifi with a static ip address?
« Reply #11 on: January 30, 2014, 09:58:22 AM »
WEP or WPA?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Trace

  • WikiUser
  • *
  • Posts: 20
Re: Can you setup Wifi with a static ip address?
« Reply #12 on: January 30, 2014, 10:01:57 AM »
wpa-tkip   ......... essid and password.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Can you setup Wifi with a static ip address?
« Reply #13 on: January 30, 2014, 10:09:45 AM »
You shouldn't be concerned at all about "to connect automatically when booting" before you have managed manually, and then you can script.
All the idea about "norestore" was that no scripts are run.

Look into wpa_supplicant and optionally wpa_gui or wpa_cli, they are all well documented; there is nothing specific to Core to it, with exception from bootlocal.sh for automatization purposes.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Trace

  • WikiUser
  • *
  • Posts: 20
Re: Can you setup Wifi with a static ip address?
« Reply #14 on: January 30, 2014, 10:28:18 AM »
Yes I tried the norestore instructions as well but dhcpc still ran and I don't know how to connect without using wifi.sh

Ok .... yes I'll look into that but I've already spent about 3 days researching.

I was hoping there was just a simple way of doing it ... it only takes seconds in Puppy and others.

Is nobody here using tc with a static address over wifi?

I really like the philosophy of tc but static ip is essential for me and this just seems like a huge amount of work.

This and slitaz are the only distro's I have problems with static ip's in and they both use UDHCPC.
 
Am I the only person wanting to do this?
« Last Edit: January 30, 2014, 10:33:16 AM by Trace »