| 308 | == FreeBSD `Ifconfig` shinanigans. == |
| 309 | FreeBSD's `ifconfig` combines the features of `ifconfig` and `iwconfig` in Linux. For example, you can get a list of AP's, you can do: |
| 310 | {{{ |
| 311 | $ ifconfig wlan0 list scan |
| 312 | SSID/MESH ID BSSID CHAN RATE S:N INT CAPS |
| 313 | kitchen 08:86:3b:a0:20:f2 6 54M 8:0 100 EP HTCAP WPA RSN WME WPS |
| 314 | WINMAIN c4:7d:4f:37:2d:f0 6 54M 15:0 102 ES HTCAP WME |
| 315 | front.door 08:86:3b:d7:f4:6c 6 54M 5:0 100 EP RSN HTCAP WME WPS |
| 316 | }}} |
| 317 | And so on. |
| 318 | |
| 319 | Another thing that you can do (unintentionally or otherwise) is to assign multiple network addresses to a single interface. The `add` keyword lets you do this intentionally: |
| 320 | {{{ |
| 321 | $ sudo ifconfig wlan0 inet 192.168.206.1 add |
| 322 | $ ifconfig wlan0 |
| 323 | wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 |
| 324 | ether 00:1c:bf:9a:61:c7 |
| 325 | inet 192.168.206.120 netmask 0xffffff00 broadcast 192.168.206.255 |
| 326 | inet 192.168.206.1 netmask 0xffffff00 broadcast 192.168.206.255 |
| 327 | nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> |
| 328 | media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g |
| 329 | status: associated |
| 330 | ssid WINMAIN channel 6 (2437 MHz 11g) bssid c4:7d:4f:37:2d:f0 |
| 331 | country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60 |
| 332 | protmode CTS bintval 102 |
| 333 | }}} |
| 334 | On wired interfaces, assigning addresses with `ifconfig [iface] inet [address]` will have the same effect, which may not be what you want, especially when you expect the old address to just be replaced by your new one^2^. In this case, you can remove the unwanted address with `-alias`: |
| 335 | {{{ |
| 336 | $ sudo ifconfig wlan0 inet 192.168.206.1 -alias |
| 337 | $ ifconfig wlan0 |
| 338 | wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 |
| 339 | ether 00:1c:bf:9a:61:c7 |
| 340 | inet 192.168.206.120 netmask 0xffffff00 broadcast 192.168.206.255 |
| 341 | nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> |
| 342 | media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g |
| 343 | status: associated |
| 344 | ssid WINMAIN channel 6 (2437 MHz 11g) bssid c4:7d:4f:37:2d:f0 |
| 345 | country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60 |
| 346 | protmode CTS bintval 102 |
| 347 | }}} |
| 348 | |