20110416 whos afraid of netsh - plembo/onemoretech GitHub Wiki

title: Who's afraid... of netsh? link: https://onemoretech.wordpress.com/2011/04/16/whos-afraid-of-netsh/ author: lembobro description: post_id: 51 created: 2011/04/16 20:35:36 created_gmt: 2011/04/16 20:35:36 comment_status: open post_name: whos-afraid-of-netsh status: publish post_type: post

Who's afraid... of netsh?

One nice little utility that Windows 7 includes is netsh, a command line tool that’s been around since Windows XP that lets you view and modify various network settings. This came in handy today when I had to figure out what the best channel was for my home wireless routers to listen on.

The basic syntax for wifi network discovery is pretty simple:

**netsh wlan show networks mode=bssid**

Here’s a sampling of the output I got by running it:

SSID 2 : 2WIRE383
    Network type            : Infrastructure
    Authentication          : WPA-Personal
    Encryption              : TKIP
    BSSID 1                 : 00:26:50:1b:43:49
         Signal             : 10%
         Radio type         : 802.11g
         Channel            : 2
         Basic rates (Mbps) : 1 2 5.5 11
         Other rates (Mbps) : 6 9 12 18 24 36 48 54
	
SSID 3 : TP-LINK_E09274
    Network type            : Infrastructure
    Authentication          : WPA2-Personal
    Encryption              : CCMP
    BSSID 1                 : 00:27:19:e0:92:74
         Signal             : 2%
         Radio type         : 802.11g
         Channel            : 6
         Basic rates (Mbps) : 1 2 5.5 11
         Other rates (Mbps) : 6 9 12 18 24 36 48 54
	
SSID 4 : area51
    Network type            : Infrastructure
    Authentication          : WPA2-Personal
    Encryption              : CCMP
    BSSID 1                 : 00:1f:f3:c2:7d:24
         Signal             : 0%
         Radio type         : 802.11n
         Channel            : 8
         Basic rates (Mbps) : 1 2 5.5 11
         Other rates (Mbps) : 6 9 12 18 24 36 48 54
	
SSID 5 : D04B01E03
    Network type            : Infrastructure
    Authentication          : Open
    Encryption              : WEP
    BSSID 1                 : 00:21:29:91:0d:7d
         Signal             : 4%
         Radio type         : 802.11g
         Channel            : 6
         Basic rates (Mbps) : 1 2 5.5 11
         Other rates (Mbps) : 6 9 12 18 24 36 48 54

Note: I’ve redacted my own network and a few others that use the owner’s real names as part of the SSID. I like my neighbors.

Looking through the channel allocations that I captured its pretty clear that my neighbors are mostly crowded in around the lower channels. As a result, I’ll be staking my claim to one of the upper ones. Because I’m a good neighbor I’ll refrain from going pure 802.11n and hogging 2 channels (the fact that the Kindle can’t do wireless n is also an important consideration).

Copyright 2004-2019 Phil Lembo