Difference between revisions of "Wireless Access Point FreeBSD"
From Teknologisk videncenter
m (New page: Cisco AIR-PI21AG-E-K9 adapter installed. FreeBSD installs right driver ==RC.CONF== <source lang=cli> ifconfig_em0="dhcp" gateway_enable="YES" dhcpd_enable="YES" ipnat_enable="YES" # Start ...) |
m (moved Wireless hotspot FreeBSD to Wireless Access Point FreeBSD) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
==ifconfig before script== | ==ifconfig before script== | ||
− | <source lang= | + | <source lang=cli> |
− | [root@ /etc]# ifconfig | + | [root@ /etc]# <input>ifconfig</input> |
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 | em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 | ||
options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC> | options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC> | ||
Line 18: | Line 18: | ||
media: Ethernet autoselect (1000baseT <full-duplex>) | media: Ethernet autoselect (1000baseT <full-duplex>) | ||
status: active | status: active | ||
− | ath0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290 | + | <notice>ath0</notice>: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290 |
ether 00:40:96:b2:b3:75 | ether 00:40:96:b2:b3:75 | ||
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect) | media: IEEE 802.11 Wireless Ethernet autoselect (autoselect) | ||
Line 34: | Line 34: | ||
#from man ath | #from man ath | ||
#Se http://www.freebsd.org/doc/handbook/network-wireless.html | #Se http://www.freebsd.org/doc/handbook/network-wireless.html | ||
− | ifconfig wlan0 create wlandev ath0 wlanmode hostap | + | <notice>ifconfig wlan0 create wlandev ath0 wlanmode hostap</notice> |
− | ifconfig wlan0 inet 10.168.139.1 netmask 0xffffff00 ssid FreeBSD weptxkey 1 wepmode on wepkey 1:0x1234567890 mode 11g | + | ifconfig wlan0 inet 10.168.139.1 netmask 0xffffff00 ssid FreeBSD weptxkey 1 wepmode on \ |
+ | wepkey 1:0x1234567890 mode 11g channel 1 | ||
sysctl net.inet.ip.forwarding=1 | sysctl net.inet.ip.forwarding=1 | ||
</source> | </source> | ||
+ | |||
==ifconfig after script== | ==ifconfig after script== | ||
<source lang=cli> | <source lang=cli> | ||
Line 56: | Line 58: | ||
inet 127.0.0.1 netmask 0xff000000 | inet 127.0.0.1 netmask 0xff000000 | ||
nd6 options=3<PERFORMNUD,ACCEPT_RTADV> | nd6 options=3<PERFORMNUD,ACCEPT_RTADV> | ||
− | wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 | + | <notice>wlan0</notice>: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 |
ether 00:40:96:b2:b3:75 | ether 00:40:96:b2:b3:75 | ||
inet 10.168.139.1 netmask 0xffffff00 broadcast 10.168.139.255 | inet 10.168.139.1 netmask 0xffffff00 broadcast 10.168.139.255 | ||
Line 66: | Line 68: | ||
dtimperiod 1 -dfs | dtimperiod 1 -dfs | ||
</source> | </source> | ||
+ | =Scanning nets= | ||
+ | <source lang=cli> | ||
+ | # <input>ifconfig wlan0 list scan</input> | ||
+ | SSID/MESH ID BSSID CHAN RATE S:N INT CAPS | ||
+ | DT3 00:17:0f:e7:a4:60 1 54M -75:-96 100 EPS RSN WME | ||
+ | VIAnet 00:26:99:0f:ae:40 1 54M -92:-96 100 ES WME | ||
+ | VIAnet 04:fe:7f:49:10:e0 1 54M -89:-96 102 ES WME | ||
+ | Global-11g 00:0c:e6:08:26:02 6 54M -84:-96 100 ES WME | ||
+ | Global-11g 00:0c:e6:08:22:02 6 54M -68:-96 100 ES WME | ||
+ | Global-11g 00:0c:e6:08:21:02 6 54M -87:-96 100 ES WME | ||
+ | VIAnet 00:26:99:33:f2:d0 6 54M -91:-96 100 ES WME | ||
+ | Global-11g 00:0c:e6:08:29:02 6 54M -94:-96 100 ES WME | ||
+ | VIAnet 00:26:99:33:fc:70 11 54M -91:-96 100 ES WME | ||
+ | X-BusOnline 00:1b:b1:02:81:45 1 54M -93:-96 100 ES WME ATH | ||
+ | </source> | ||
+ | {{Source cli}} | ||
[[Category:FreeBSD]][[Category:Network]] | [[Category:FreeBSD]][[Category:Network]] |
Latest revision as of 08:14, 8 May 2012
Cisco AIR-PI21AG-E-K9 adapter installed. FreeBSD installs right driver
RC.CONF
ifconfig_em0="dhcp"
gateway_enable="YES"
dhcpd_enable="YES"
ipnat_enable="YES" # Start ipnat function
ipnat_rules="/etc/ipnat.rules" # rules definition file for ipnat
ifconfig before script
[root@ /etc]# <input>ifconfig</input>
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
ether 70:f3:95:08:46:c7
inet 192.168.139.51 netmask 0xffffff00 broadcast 192.168.139.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
<notice>ath0</notice>: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 00:40:96:b2:b3:75
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
Script
Running the script below
#from man ath
#Se http://www.freebsd.org/doc/handbook/network-wireless.html
<notice>ifconfig wlan0 create wlandev ath0 wlanmode hostap</notice>
ifconfig wlan0 inet 10.168.139.1 netmask 0xffffff00 ssid FreeBSD weptxkey 1 wepmode on \
wepkey 1:0x1234567890 mode 11g channel 1
sysctl net.inet.ip.forwarding=1
ifconfig after script
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
ether 70:f3:95:08:46:c7
inet 192.168.139.51 netmask 0xffffff00 broadcast 192.168.139.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 00:40:96:b2:b3:75
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: running
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
<notice>wlan0</notice>: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:40:96:b2:b3:75
inet 10.168.139.1 netmask 0xffffff00 broadcast 10.168.139.255
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
status: running
ssid FreeBSD channel 7 (2442 MHz 11g) bssid 00:40:96:b2:b3:75
regdomain 55 indoor ecm authmode OPEN privacy ON deftxkey 1
wepkey 1:40-bit txpower 20 scanvalid 60 protmode CTS wme burst
dtimperiod 1 -dfs
Scanning nets
# <input>ifconfig wlan0 list scan</input>
SSID/MESH ID BSSID CHAN RATE S:N INT CAPS
DT3 00:17:0f:e7:a4:60 1 54M -75:-96 100 EPS RSN WME
VIAnet 00:26:99:0f:ae:40 1 54M -92:-96 100 ES WME
VIAnet 04:fe:7f:49:10:e0 1 54M -89:-96 102 ES WME
Global-11g 00:0c:e6:08:26:02 6 54M -84:-96 100 ES WME
Global-11g 00:0c:e6:08:22:02 6 54M -68:-96 100 ES WME
Global-11g 00:0c:e6:08:21:02 6 54M -87:-96 100 ES WME
VIAnet 00:26:99:33:f2:d0 6 54M -91:-96 100 ES WME
Global-11g 00:0c:e6:08:29:02 6 54M -94:-96 100 ES WME
VIAnet 00:26:99:33:fc:70 11 54M -91:-96 100 ES WME
X-BusOnline 00:1b:b1:02:81:45 1 54M -93:-96 100 ES WME ATH