I have a typical laptop situation. When I'm at my desk, I want to be hooked up to the network via ethernet, and when I want to sit on the back deck, I'd like to be on wireless.
I have ethernet setup for a static ip address, no problem.
I can connect wirelessly, but only via dhcpclient. When I connect to the router, it assigns a conflicting ip address that makes my laptop fight with the kid's xbox. Not sure if it's the router or the xbox's fault, tbh.
Is it possible to connect wifi with a static ip address that I specify? I've read the man page for dhclient, ifconfig and read the faq. If the answer is in one of those documents, I've completely overlooked it a number of times.
Thanks in advance.
My current /etc/hostname.iwn0 looks like the following:
inet 192.168.1.150 255.255.255.0 NONE
nwid Portal
wpakey passwordhidden
sudo sh /etc/netstart iwn0
then ping google.com
yields:
PING google.com (198.231.29.34): 56 data bytes
ping: sendto: Network is down
ping: wrote google.com 64 chars, ret=-1
2 packets transmitted, 0 packets received, 100.0% packet loss
BUT, I can sudo dhclient iwn0
and then ping google:
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 8.526/8.526/8.526/0.000 ms
So the example in the FAQ doesn't work, which is why I asked if there was something else that I might have missed.
!route add default 192.168.1.1
or whatever your gateway is) or in /etc/mygate (seemygate(5)
) – Aug 25 '15 at 16:10