View Single Post
  #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