DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th July 2009
gosha gosha is offline
Spam Deminer
 
Join Date: Jun 2008
Location: China
Posts: 256
Default router sees my wireless mac addres but I cannot ping it

OpenBSD 4.5 stable.
Hello,
I suddenly don't have wireless connection, but don't know since when, because these days I was connecting through cable.
Well, this is ifconfig:
Code:
iwn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr my mac address
	priority: 0
	groups: wlan
	media: IEEE802.11 autoselect (OFDM24 mode 11g)
	status: active
	ieee80211: nwid mylan chan 6 bssid router mac address 239dB wpapsk <not displayed> wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip
	inet6 fe80::222:faff:fef5:62fa%iwn0 prefixlen 64 scopeid 0x2
	inet 192.168.1.102 netmask 0xffffff00 broadcast 192.168.1.255
my router sees my mac address but does not seem to give a ip address, it gives it if I connect through cable though.
Anyway, I cannot ping:
Code:
$ ping 192.168.1.1 
PING 192.168.1.1 (192.168.1.1): 56 data bytes
	ping: sendto: Host is down
ping: wrote 192.168.1.1 64 chars, ret=-1
ping: sendto: Host is down
ping: wrote 192.168.1.1 64 chars, ret=-1
ping: sendto: Host is down
ping: wrote 192.168.1.1 64 chars, ret=-1
ping: sendto: Host is down
ping: wrote 192.168.1.1 64 chars, ret=-1
ping: sendto: Host is down
ping: wrote 192.168.1.1 64 chars, ret=-1
I did not change anything from the last time I used it, what could it be?
I've tried turning off router and modem and rebooting. Nothing.
Reply With Quote
  #2   (View Single Post)  
Old 25th July 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Just a guess (since you did not post your complete ifconfig):

Your wired and wireless NICs are using the same subnet. You have a routing problem. See the trunk(4) man page for the appropriate way to manage this.
Reply With Quote
  #3   (View Single Post)  
Old 25th July 2009
gosha gosha is offline
Spam Deminer
 
Join Date: Jun 2008
Location: China
Posts: 256
Default

actually, before posting I did try to completly disactivate the wired nic, removing its hostname.em0 and now it shows as "status: no carrier"
Reply With Quote
  #4   (View Single Post)  
Old 26th July 2009
gosha gosha is offline
Spam Deminer
 
Join Date: Jun 2008
Location: China
Posts: 256
Default

ok guys, sometimes I really feel stupid!
I've set up the trunk interface as suggested by jggimi (by the way, thanks a lot, I didn't know its existence), and now by miracle wireless started to work. But why? I did switch off the ethernet card altoghether. Really cannot understand.
Now wireless works, but if I plug in the ethernet cable, running ifconfig will show em0 as active, but then I cannot browse the internet, it hangs there looking up.

Here are the settings:
Code:
$ cat /etc/hostname.em0 
up
Code:
$ cat /etc/hostname.iwn0 
up chan 6 nwid mylan wpa wpapsk mykey
Code:
$ cat /etc/hostname.trunk0 
trunkproto failover trunkport em0 trunkport iwn0 192.168.1.102 netmask 255.255.255.0
ifconfig wireless:
Code:
$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33204
	priority: 0
	groups: lo
	inet 127.0.0.1 netmask 0xff000000
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	lladdr macaddress
	priority: 0
	trunk: trunkdev trunk0
	media: Ethernet autoselect (none)
	status: no carrier
	inet6 fe80::21f:16ff:fe1f:dae3%em0 prefixlen 64 scopeid 0x1
iwn0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	lladdr macaddress
	priority: 0
	trunk: trunkdev trunk0
	groups: wlan
	media: IEEE802.11 autoselect (OFDM12 mode 11g)
	status: active
	ieee80211: nwid mylan chan 6 bssid macaddress 240dB wpapsk <not displayed> wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip
	inet6 fe80::222:faff:fef5:62fa%iwn0 prefixlen 64 scopeid 0x2
enc0: flags=0<> mtu 1536
	priority: 0
trunk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr macaddress
	priority: 0
	trunk: trunkproto failover
		trunkport iwn0 active
		trunkport em0 master
	groups: trunk egress
	media: Ethernet autoselect
	status: active
	inet 192.168.1.102 netmask 0xffffff00 broadcast 192.168.1.255
	inet6 fe80::21f:16ff:fe1f:dae3%trunk0 prefixlen 64 scopeid 0x5
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33204
	priority: 0
	groups: pflog
ifconfig with wire plugged in:
Code:
$ ifconfig 
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33204
	priority: 0
	groups: lo
	inet 127.0.0.1 netmask 0xff000000
	inet6 ::1 prefixlen 128
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	lladdr macaddress
	priority: 0
	trunk: trunkdev trunk0
	media: Ethernet autoselect (100baseTX full-duplex)
	status: active
	inet6 fe80::21f:16ff:fe1f:dae3%em0 prefixlen 64 scopeid 0x1
iwn0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	lladdr macaddress
	priority: 0
	trunk: trunkdev trunk0
	groups: wlan
	media: IEEE802.11 autoselect (OFDM18 mode 11g)
	status: active
	ieee80211: nwid mylan chan 6 bssid macaddress 240dB wpapsk <not displayed> wpaprotos wpa1,wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip
	inet6 fe80::222:faff:fef5:62fa%iwn0 prefixlen 64 scopeid 0x2
enc0: flags=0<> mtu 1536
	priority: 0
trunk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	lladdr macaddress
	priority: 0
	trunk: trunkproto failover
		trunkport iwn0 
		trunkport em0 master,active
	groups: trunk egress
	media: Ethernet autoselect
	status: active
	inet 192.168.1.102 netmask 0xffffff00 broadcast 192.168.1.255
	inet6 fe80::21f:16ff:fe1f:dae3%trunk0 prefixlen 64 scopeid 0x5
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33204
	priority: 0
	groups: pflog
So, please, if anybody knows:
1 Why does it not work without trunk0? (I know you're not magicians, and are not here with me, try a guess).
2 How do a get the trunk thing working properly?

As always, thanks a lot!


Let me add some more. Although wireless works, I noticed it hangs every few minutes for a few minutes. Should this be a problem with the router (a cheap TP-LINK) or with my OpenBSD configuration?

Last edited by gosha; 26th July 2009 at 10:23 AM.
Reply With Quote
  #5   (View Single Post)  
Old 26th July 2009
asemisldkfj
-Guest-
 
Posts: n/a
Default

I'm not so sure trunk is what you're looking for here.

in the ifconfig -a you posted neither em0 or iwn0 have an IP address.

get rid of trunk.

what is your goal here? do you want to be able to use wireless while the cable is plugged in? or do you just want wireless to work when you unplug the cable?
Reply With Quote
  #6   (View Single Post)  
Old 26th July 2009
gosha gosha is offline
Spam Deminer
 
Join Date: Jun 2008
Location: China
Posts: 256
Default

Well, the initial goal was to simply have wireless work, but for some strange reason, it does work only through trunk. Which is fine for me.
From the trunk man pages:
Code:
     The following example uses an active failover trunk to set up roaming be-
     tween wired and wireless networks using two network devices.  Whenever
     the wired master interface is unplugged, the wireless failover device
     will be used:

           # ifconfig em0 up
           # ifconfig ath0 nwid my_net up
           # ifconfig trunk0 trunkproto failover trunkport em0 trunkport ath0 \
                   192.168.1.1 netmask 255.255.255.0
My understanding is: when the wire is plugged in, the system will automatically use em0, when it is unplugged, it will automatically use iwn0.
And it does switch, but em0 hangs there looking up.

Quote:
in the ifconfig -a you posted neither em0 or iwn0 have an IP addre
As you see from the man page, the ip address is given only to the trunk interface, and the "real" nics use that. This is how I understand it.
Reply With Quote
  #7   (View Single Post)  
Old 26th July 2009
asemisldkfj
-Guest-
 
Posts: n/a
Default

yeah, I can't help with the trunk failover thing as I've never done that. if you want to go back to just getting the wireless working I can try to help.
Reply With Quote
  #8   (View Single Post)  
Old 26th July 2009
gosha gosha is offline
Spam Deminer
 
Join Date: Jun 2008
Location: China
Posts: 256
Default

well, at this point, I'd love to have the trunk thing working, because it can be very practical
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD ping issue wooki FreeBSD General 1 2nd October 2009 04:10 PM
Connecting to wireless router TomAmundsen FreeBSD General 19 25th August 2008 10:14 PM
Cannot get new installed card to ping other machine Johnny2Bad FreeBSD Installation and Upgrading 2 10th June 2008 08:54 PM
Wireless Router Compat questions whispersGhost Solaris 11 2nd June 2008 09:16 AM
The Ping Torture of Tantalus" - A Greek tragedy exposing ARP and DNS J65nko Guides 0 6th May 2008 10:44 PM


All times are GMT. The time now is 02:37 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick