Linux Networking

Getting your laptop, in particular, or any Linux box in general on the network can be an adventure. Sometimes it's as easy as clicking the networking icon. Other times it can be as difficult as putting ten pounds of matter in a five pound bag. It is hoped that what's described in this document will make this task a bit quicker and easier.

The natural order to take in using these pages is from the top down; however, it would also be wise to have a look at each page to see some of the commands and other ways to do the same things. The greatest strength of UNIX is that you can do the same thing more than one way. Unix's greatest weakness is (you guessed it), you can do the same thing more than one way. So look at the content on all the pages and decide what path seems the best to get your machine on the network.

There are several different icons that are used to identify the networking found on the file panel. The version and distribution of Linux you have installed will affect this, quite naturally. Holding the mouse pointer over an icon will generally display a message indicating what it represents.

computer monitors   Computer Monitors
 
radar beaming upwards   'Radar'
 
wireless bars   Connection Strength Bars (which usually also indicates connection strength)
 
Thick arrows pointing up and down next to each other   Thick up/down arrows
 

 

Wired and Wireless Network Device

What follows is a reasonably simple way to do initial configuration of the network devices (wired or wireless) on a newly built box, with all network device drivers in place. Particularly if you will be connecting with DHCP.

To see what if any network devices the system has found ...

A mouse over of the networking icon will produce a tag similar to this:
network icon mouseover
 
Right buttoning the icon will display a dialogue box similar to this:
right button of networking icon
 
Now select and click the Connection Information entry:
right button of networking icon
 
A dialogue box similar to this will appear:
right button of networking icon
 
The value (or lack of) in each field will tell you a lot about what the Ethernet or wireless connection is or isn't doing on the network.

What do each of those fields mean or represent?

Interface :  
Which network device
Hardware Address :  
Media Access Control address (MAC address) is a unique identifier assigned to most network adaptors or network interface cards (NICs) by the manufacturer; for identification
Driver :  
The name of the program allowing higher-level computer programs to interact with a hardware device.
Speed :  
The connection speed of the network device (this is a maximum device speed and not the speed of the connection.
IP Address :  
The Internet Protocol address assigned to the network device
Broadcast Address :  
The network address that allows information to be sent to all nodes on a network, intranet, and Internet.
Subnet Mask :  
This is used to determine what subnet an IP address belongs to.
Default Route :  
Also known as the gateway of last resort, It is the network route used by a router when no other known route exists or a given IP packet's destination address.
Primary DNS :  
The first Domain Name Server identified by the system
Secondary DNS :  
The second(ary) Domain Name Server identified by the system if the first is down or too buzy this one will resolve IP's from computer this is identified on.

Now to do some configuration, if needed ...

Again; On the file panel right button the Network icon.
Edit Network Connections
 
The network devices the system sees will appear.
In this example there is only one, which save for laptops is the more common.
Wired Network Connections
 
Highlight the device to edit, by clicking once with the mouse pointer.
Edit Wired Network connection
 
This will also make the Edit button Edit Buttom live, Click IT!
 
And the dialogue box to change settings will appear.
This has been stretched out for ease of reading, it will not appear this wide with doing so.
Editing Auto ethzero
Note the four tabs. Only one of them is interesting and useful.
 
Click the IPV Settings Tab IPV Edit Tab to review and possibly edit settings.
 
In most cases (especially at home) DHCP will do what you need.
IPV4 Editing Auto eth0
 
For completeness the other choices are:
Method LOV Values
 
If you did want to set a static IP ...
Method LOV Values
Select Manual to do so (set a static IP)
 
Note the areas that are now live and not greyed-out
Method LOV Values


The Addresses entry box and the Add and Delete buttons can now be used.  
You can enter the IP, Netmask, and Gateway
Method LOV Values
After each, click under the next heading to the right of the previous.
Be sure of the values you are entering. They must be correct or the network device will fail to connect.
 
Method LOV Values
 
When all three are entered ... Click the Apply button. Apply Button
 

 

ifconfig

The first network related command I used was ifconfig. It is a command line program (a place you should become familiar with) & frankly a quick one to go to when suddenly negative network events are observed. I use ifconfig and the interfaces file most often. The man page for ifconfig will provide a good over-view of the command and its various options.

The following steps will generally bring up a network device. Keep in mind these are simple examples. I will use <generic>'s for IP and network device values. You will need to get real values to do this. Read the manual for the router you use at home. DHCP will general work on the Binghamton University campus. If you are attempting to connect to some other network you do not admin ... see the local network administrator where the machine will be running. The tuple's can be be very un-ordinary for some network configurations, particularly if vlans are in use.
 
The first line is a generic command ... fill in the < >.
The second line is an example.

What if anything does the system see network-wise?
01. ifconfig -a
There can be any number of network devices that can appear in the results. A laptop will generally have an ethernet port for an RJ45 as well as a wireless entry.
eth0      Link encap:Ethernet  HWaddr 00:d0:59:cb:dd:a3  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth1      Link encap:Ethernet  HWaddr 00:e6:5f:cb:30:90  
          inet addr:192.168.1.107  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe90::247:59ff:f0cb:136e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12015 errors:18176 dropped:0 overruns:0 frame:18176
          TX packets:11852 errors:73 dropped:0 overruns:0 carrier:73
          collisions:2196 txqueuelen:1000 
          RX bytes:9704452 (9.2 MB)  TX bytes:1884661 (1.7 MB)
          Interrupt:3 Base address:0x4100 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:7047 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7047 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:15576591 (15.5 MB)  TX bytes:15576591 (15.5 MB)
The IP was generated by DHCP from a wireless router, hence the 'private' nature. IP.
Enable the network device
02. ifconfig <network device> plumb
       ifconfig elxl0 plumb
'up' the network device
03. ifconfig <network device> <IP> netmask <netmask> up
       ifconfig elxl0 128.226.6.31 netmask 255.255.255.255 up
       OR in one step ...
       ifconfig elxl0 128.226.6.31 netmask 255.255.255.255 broadcast 128.226.6.1 up
Set Netmask
04. ifconfig <network device> netmask 255.255.255.<###>
       ifconfig elxl0 netmask 255.255.255.192
Set Broadcast
05. ifconfig <network device> broadcast <subnet> .<###>
       NOTE: the <###> can be calculated in this fashion ( 256 - [[netmasks 4th tuplet]] )
       ifconfig elxl0 broadcast 128.226.6.63     #Leading zeros[0] are not required.
Set Default Route
06. route add default 128.226.<subnet>.1
       route add default 128.226.6.1
Check it
07. netstat -rn

 

iwconfig & iwlist

This is provided for completeness and to supply a method to 'explore' the wireless devices capabilities connected to a particular wireless network. It is not a command you need or will use often, but it can be handy in some circumstances when you need what might other wise be a bit of obfuscated information.

The iwconfig and the iwlist man pages are a good place to start. To 'start' and set the basic networking parameters ifconfig will still be used. These are useful for setting wireless specific parameters. The Wikipedia page on Wireless Tools For Linux is good one to read as well.

iwconfig

Run iwconfig to see what it finds on your computer.
    [[ This will return meaningful results only if the computer you run this on has a wireless card in it. ]]
There will be any number of network devices appearing in the results. At the least a laptop will have an Ethernet port for an RJ45 as well as a wireless entry.
lo        no wireless extensions.

eth0      no wireless extensions.

irda0     no wireless extensions.

eth1      IEEE 802.11-DS  ESSID:"cmh8133"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:0F:66:4F:A8:DD   
          Bit Rate:11 Mb/s   Tx-Power=20 dBm   Sensitivity=0/65535  
          Retry limit:16   RTS thr:off   Fragment thr:off
          Encryption key:****-****-**   Security mode:open
          Power Management:off
          Link Quality=62/100  Signal level=-64 dBm  Noise level=-91 dBm
          Rx invalid nwid:96890  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:121  Invalid misc:468636   Missed beacon:0

wifi0     IEEE 802.11-DS  ESSID:"cmh8133"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:0F:66:4F:A8:DD   
          Bit Rate:11 Mb/s   Tx-Power=20 dBm   Sensitivity=0/65535  
          Retry limit:16   RTS thr:off   Fragment thr:off
          Encryption key:****-****-**   Security mode:open
          Power Management:off
          Link Quality=62/100  Signal level=-64 dBm  Noise level=-91 dBm
          Rx invalid nwid:96890  Rx invalid crypt:0  Rx invalid frag:0
So what does iwconfig do for me?
    It will do some important wireless specific set up for you.
iwconfig <wireless network device> <Extended Service Set ID> Sets the ESSID/SSID.
iwconfig <wireless network device> nickname <nick name> Sets the network device's nickname.
iwconfig <wireless network device> mode < operating mode > Sets the operating mode.
iwconfigw <ireless network device> enc < key > Sets the WEP encryption key.
iwconfig <wireless network device> channel <channel number as an integer> Sets the card's channel number

           Read The IWConfig Man Page For Detail On All Parameters This Command Can Set.
 

iwlist

Command options to iwlist are ...
iwlist <wireless network device> scanning <essid NNN> <last>
iwlist <wireless network device> frequency
iwlist <wireless network device> channel
iwlist <wireless network device> bitrate
iwlist <wireless network device> rate
iwlist <wireless network device> encryption
iwlist <wireless network device> keys
iwlist <wireless network device> power
iwlist <wireless network device> txpower
iwlist <wireless network device> retry
iwlist <wireless network device> ap
iwlist <wireless network device> accesspoints
iwlist <wireless network device> peers
iwlist <wireless network device> event
iwlist <wireless network device> auth
iwlist <wireless network device> wpakeys
iwlist <wireless network device> genie
iwlist <wireless network device> modulation
iwlist <wireless network device> frequency or channel
wnd0      22 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Current Frequency:2.462 GHz (Channel 11)
iwlist <wireless network device> bitrate or rate
wnd0      11 available bit-rates :
	  2 Mb/s
	  5.5 Mb/s
	  6 Mb/s
	  9 Mb/s
	  11 Mb/s
	  12 Mb/s
	  18 Mb/s
	  24 Mb/s
	  36 Mb/s
	  48 Mb/s
	  54 Mb/s
          Current Bit Rate:5 Mb/s
iwlist <wireless network device> encryption or keys or wpakeys
wnd0      3 key sizes : 40, 104, 128bits
          4 keys available :
		[1]: off
		[2]: off
		[3]: off
		[4]: off
          Current Transmit Key: [0]
          Security mode:open

  BTW: If a key is found it is not displayed in the clear.
iwlist <wireless network device> power
wnd0      Supported modes :
          		o Receive all packets (unicast & multicast)
          		o Receive Unicast only (discard multicast)
          		o Receive Multicast only (discard unicast)
          Fixed period  ;  min period:1.024ms
                           max period:67.1078s
          Fixed timeout ;  min timeout:1.024ms
                           max timeout:1.024s
          Current mode:off
iwlist <wireless network device> txpower
wnd0      8 available transmit-powers :
	  0 dBm  	(1 mW)
	  6 dBm  	(3 mW)
	  8 dBm  	(6 mW)
	  10 dBm  	(10 mW)
	  12 dBm  	(15 mW)
	  14 dBm  	(25 mW)
	  16 dBm  	(39 mW)
	  18 dBm  	(63 mW)
          Current Tx-Power:18 dBm  	(63 mW)
iwlist <wireless network device> retry
wnd0      Fixed limit    ;  min limit:0
                            max limit:255
          Current mode:off
iwlist <wireless network device> ap or accesspoints or peers
wnd0      Peers/Access-Points in range:
    00:25:84:FF:08:E1 : Quality=17/70  Signal level=-78 dBm  Noise level=-95 dBm
    00:19:07:36:87:63 : Quality=16/70  Signal level=-79 dBm  Noise level=-95 dBm
    00:25:84:FF:05:C2 : Quality=14/70  Signal level=-81 dBm  Noise level=-95 dBm
    00:19:07:07:04:73 : Quality=10/70  Signal level=-85 dBm  Noise level=-95 dBm
    00:25:84:FF:08:E2 : Quality=17/70  Signal level=-78 dBm  Noise level=-95 dBm
    00:19:07:07:04:71 : Quality=11/70  Signal level=-84 dBm  Noise level=-95 dBm
    00:19:07:36:87:60 : Quality=16/70  Signal level=-79 dBm  Noise level=-95 dBm
    00:25:84:FF:08:53 : Quality=8/70  Signal level=-87 dBm  Noise level=-95 dBm
    00:25:84:FF:08:E4 : Quality=16/70  Signal level=-79 dBm  Noise level=-95 dBm
    00:25:84:FF:08:54 : Quality=10/70  Signal level=-85 dBm  Noise level=-95 dBm
    00:19:07:07:04:74 : Quality=10/70  Signal level=-85 dBm  Noise level=-95 dBm
    00:19:07:07:04:72 : Quality=11/70  Signal level=-84 dBm  Noise level=-95 dBm
    00:25:84:FF:05:C3 : Quality=16/70  Signal level=-79 dBm  Noise level=-95 dBm
    00:25:84:FF:05:C1 : Quality=17/70  Signal level=-78 dBm  Noise level=-95 dBm
    00:19:07:36:87:61 : Quality=13/70  Signal level=-82 dBm  Noise level=-95 dBm
    00:25:84:FF:08:E0 : Quality=16/70  Signal level=-79 dBm  Noise level=-95 dBm
    00:19:07:36:87:64 : Quality=13/70  Signal level=-82 dBm  Noise level=-95 dBm
    00:25:84:FF:00:E3 : Quality=8/70  Signal level=-87 dBm  Noise level=-95 dBm
    00:25:84:FF:08:51 : Quality=9/70  Signal level=-86 dBm  Noise level=-95 dBm
    00:25:84:FF:05:C4 : Quality=17/70  Signal level=-78 dBm  Noise level=-95 dBm
    00:13:C3:F0:DF:02 : Quality=11/70  Signal level=-84 dBm  Noise level=-95 dBm
    00:25:84:FF:08:52 : Quality=10/70  Signal level=-85 dBm  Noise level=-95 dBm
iwlist <wireless network device> event
wnd0      Wireless Events supported :
          0x8B04 : Set Frequency/Channel (kernel generated)
          0x8B06 : Set Mode (kernel generated)
          0x8B15 : New Access Point/Cell address - roaming
          0x8B19 : Scan request completed
          0x8B1A : Set ESSID (kernel generated)
          0x8B2A : Set Encoding (kernel generated)
          0x8C02 : Custom driver event
          0x8C03 : Registered node
          0x8C04 : Expired node
iwlist <wireless network device> auth
wnd0      Authentication capabilities :
		WPA
		WPA2
		CIPHER-TKIP
		CIPHER-CCMP
          Current WPA version :
		disabled
          Current Key management :
		802.1x
		PSK
          Current Pairwise cipher :
		WEP-104
          Current Pairwise cipher :
		TKIP
          Current TKIP countermeasures : no
          Current Drop unencrypted : no
          Current Roaming control : no
          Current Privacy invoked : no
iwlist <wireless network device>
wnd0
Use iwlist to scan a wireless network.
These results are from the 149.125 class B network on campus.
     ath0      Scan completed :
     Cell 01 - Address: 00:25:84:FF:08:51
               ESSID:""
               Mode:Master
               Frequency:2.412 GHz (Channel 1)
               Quality=13/70  Signal level=-82 dBm  Noise level=-95 dBm
               Encryption key:off
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=102
     Cell 02 - Address: 00:25:84:FF:08:E1
               ESSID:"icd"
               Mode:Master
               Frequency:2.462 GHz (Channel 11)
               Quality=10/70  Signal level=-85 dBm  Noise level=-95 dBm
               Encryption key:off
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=102
     Cell 03 - Address: 00:19:07:07:04:72
               ESSID:"buwireless"
               Mode:Master
               Frequency:2.437 GHz (Channel 6)
               Quality=8/70  Signal level=-87 dBm  Noise level=-95 dBm
               Encryption key:off
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=100
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 04 - Address: 00:25:84:FF:05:C2
               ESSID:"buwireless"
               Mode:Master
               Frequency:2.412 GHz (Channel 1)
               Quality=15/70  Signal level=-80 dBm  Noise level=-95 dBm
               Encryption key:off
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=102
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 05 - Address: 00:25:84:FF:08:E2
               ESSID:"buwireless"
               Mode:Master
               Frequency:2.462 GHz (Channel 11)
               Quality=16/70  Signal level=-79 dBm  Noise level=-95 dBm
               Encryption key:off
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=102
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 06 - Address: 00:19:07:07:04:71
               ESSID:""
               Mode:Master
               Frequency:2.437 GHz (Channel 6)
               Quality=12/70  Signal level=-83 dBm  Noise level=-95 dBm
               Encryption key:off
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=100
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 07 - Address: 00:25:84:FF:08:52
               ESSID:"buwireless"
               Mode:Master
               Frequency:2.412 GHz (Channel 1)
               Quality=9/70  Signal level=-86 dBm  Noise level=-95 dBm
               Encryption key:off
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=102
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 08 - Address: 00:19:07:36:87:60
               ESSID:"buwireless"
               Mode:Master
               Frequency:2.462 GHz (Channel 11)
               Quality=13/70  Signal level=-82 dBm  Noise level=-95 dBm
               Encryption key:off
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=100
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 09 - Address: 00:25:84:FF:00:E1
               ESSID:""
               Mode:Master
               Frequency:2.437 GHz (Channel 6)
               Quality=5/70  Signal level=-90 dBm  Noise level=-95 dBm
               Encryption key:off
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=102
     Cell 10 - Address: 00:25:84:FF:08:E0
               ESSID:""
               Mode:Master
               Frequency:2.462 GHz (Channel 11)
               Quality=15/70  Signal level=-80 dBm  Noise level=-95 dBm
               Encryption key:off
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=102
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 11 - Address: 00:13:C3:F0:DF:03
               ESSID:"busecure"
               Mode:Master
               Frequency:2.412 GHz (Channel 1)
               Quality=13/70  Signal level=-82 dBm  Noise level=-95 dBm
               Encryption key:on
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=100
               IE: IEEE 802.11i/WPA2 Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : 802.1x
               IE: WPA Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : 802.1x
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 12 - Address: 00:19:07:36:87:63
               ESSID:"busecure"
               Mode:Master
               Frequency:2.462 GHz (Channel 11)
               Quality=10/70  Signal level=-85 dBm  Noise level=-95 dBm
               Encryption key:on
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=100
               IE: IEEE 802.11i/WPA2 Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : 802.1x
               IE: WPA Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : 802.1x
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 13 - Address: 00:25:84:FF:05:C3
               ESSID:"busecure"
               Mode:Master
               Frequency:2.412 GHz (Channel 1)
               Quality=8/70  Signal level=-87 dBm  Noise level=-95 dBm
               Encryption key:on
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=102
               IE: IEEE 802.11i/WPA2 Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : 802.1x
               IE: WPA Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : 802.1x
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 14 - Address: 00:25:84:FF:05:C4
               ESSID:""
               Mode:Master
               Frequency:2.412 GHz (Channel 1)
               Quality=16/70  Signal level=-79 dBm  Noise level=-95 dBm
               Encryption key:on
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=102
               IE: IEEE 802.11i/WPA2 Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : PSK
               IE: WPA Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : PSK
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 15 - Address: 00:19:07:07:04:73
               ESSID:"busecure"
               Mode:Master
               Frequency:2.437 GHz (Channel 6)
               Quality=12/70  Signal level=-83 dBm  Noise level=-95 dBm
               Encryption key:on
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=100
               IE: IEEE 802.11i/WPA2 Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : 802.1x
               IE: WPA Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : 802.1x
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 16 - Address: 00:25:84:FF:08:53
               ESSID:"busecure"
               Mode:Master
               Frequency:2.412 GHz (Channel 1)
               Quality=4/70  Signal level=-91 dBm  Noise level=-95 dBm
               Encryption key:on
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=102
               IE: IEEE 802.11i/WPA2 Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : 802.1x
               IE: WPA Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : 802.1x
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 17 - Address: 00:25:84:FF:08:54
               ESSID:""
               Mode:Master
               Frequency:2.412 GHz (Channel 1)
               Quality=7/70  Signal level=-88 dBm  Noise level=-95 dBm
               Encryption key:on
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=102
               IE: IEEE 802.11i/WPA2 Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : PSK
               IE: WPA Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : PSK
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 18 - Address: 00:19:07:07:04:74
               ESSID:""
               Mode:Master
               Frequency:2.437 GHz (Channel 6)
               Quality=2/70  Signal level=-93 dBm  Noise level=-95 dBm
               Encryption key:on
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=100
               IE: IEEE 802.11i/WPA2 Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : PSK
               IE: WPA Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : PSK
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
     Cell 19 - Address: 00:25:84:FF:08:E4
               ESSID:"busecure"
               Mode:Master
               Frequency:2.462 GHz (Channel 11)
               Quality=14/70  Signal level=-81 dBm  Noise level=-95 dBm
               Encryption key:on
               Bit Rates:2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s; 11 Mb/s
                         12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s; 48 Mb/s
                         54 Mb/s
               Extra:bcn_int=102
               IE: IEEE 802.11i/WPA2 Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : 802.1x
               IE: WPA Version 1
                   Group Cipher : TKIP
                   Pairwise Ciphers (2) : TKIP CCMP
                   Authentication Suites (1) : 802.1x
               Extra:wme_ie=dd180050f2020101800003a4000027a4000042435e0062322f00
       

 

NdisWrapper

This is an advanced bit to attempt. I don't recommend this be the first network related task you try. I offer this as it can be the only way to get some network devices to work. It was for the fob I bought first and then checked for compatibility later. A mistake I have not repeated. That said, you can do this if you are persistent and don't give up.

NdisWrapper will use Native Windows Drivers (.inf) 'processed' to work in Linux. I have indicated the file and package rev's I used, you will likely find different revisions as I first did this in the eighth year of the third millennium. The file names will likely match what you read here.
I discovered but have not used a graphical front end for ndiswrapper: ndisgtk.

Get the source.

  1. ndiswrapper.sourceforge.net
    sourceforge.net/projects/ndiswrapper/

Compile the source.

  1. cd /usr/local/src
  2. mkdir ndis;cd ndsi
  3. download the ndiswrapper-<current rev>.tar.gz
  4. gunzip ndiswrapper-<current rev>.tar.gz
  5. tar -xvf ndiswrapper-<current rev>.tar.gz
  6. make distclean
  7. make
  8. make install

   --or for some distros--

  1. apt-get install ndiswrapper-source # Source for the ndiswrapper Linux kernel module
  2. apt-get install ndiswrapper-utils # Userspace utilities for ndiswrapper

   --you can even get the deb files--

  1. /usr/bin/dpkg -i <file name 1>.deb
    .
    .
  2. /usr/bin/dpkg -i <file name n>.deb

The following packages are needed to `process` the <driver name>.inf file.

  1. apt-get install zip # for win zip'd files
  2. apt-get install unzip # for win zip'd files
  3. apt-get install unshield # for win .cab files

You will need kernel headers (check you kernel revision and match it.)

  1. apt-get install Linux-headers-<your kernel rev>
    for example: Linux-headers-2.6.35-22

Get the Windows Driver you want to use.

  1. Download the driver
  2. unzip <driver filename>.zip
  3. unshield -d <dir for cab contents> -x cabfile.cab
  4. find the <driver name>.inf to use

Use ndsiwrapper to `process` the driver for use.

  1. ndsiwrapper -i <driver name>.inf
  2. ndsiwrapper -l
    should report on sw and hw SO have the h/w correctly connected & powered up
  3. ndsiwrapper -m
  4. depmod -a
  5. modprobe ndsiwrapper
  6. configure the h/w as needed.
    I offer as an example some detail for a Netgear WG111 V2 Wifi Fob ...
    I used the instrunctions from the website: NdisWrapper - Install to configure mine.

I used the following commands to get my Netgear 111 to 'see' and 'talk' to the network ...

  1. unzip wg111v2_v1.0.0.5.zip
  2. unshield data2.cab
  3. ndiswrapper -i data2.inf
  4. ndiswrapper -m
  5. depmod -a
  6. modprobe ndiswrapper
  7. insmod `find / -name ndiswrapper.ko -print`
  8. vi /etc/network/interfaces Add the entires for wlan0
    [[ These happened to matched the entry for the cardbus wireless eithernet card I had already running in the machine. ]]
  9. ifdown wlan0; ifup wlan0
  10. Once I had the fob working, I had to manually create a startup file [[ S99wlan0 ]] to bring the fob up at boot time. This must be created in the rc*.d directory structure.
    I generally use /etc/rc3.d for my additions.

 

/etc/network/interfaces

The file located in /etc/network named interfaces is read during boot/initialization. This action will load network devices with parameters.


An all encompassing example can be seen here.
 
The interfaces file will have some settings after a build which were set dynamically or from data you entered during the build. The parameters can be modified and new entries made for additional network devices at any time using the text editor of your choice.
 
The following is a common, simple configuration that should usually work with a wireless card connecting to a correctly configured (but un-secured) wireless router
 
If you understand what the various settings/entries mean this is the easiest way to setup and re-setup the network devices on a Linux box.

auto lo
iface lo inet loopback
auto <network device>
iface <network device> inet dhcp

where <network device> is the device name of the Ethernet card in your system. Common possible names are ...

wlan0
wifi0
eth0 or eth1
Typing ifconfig -a will display the wireless device name, IF it is seen by the system.
 
If it is not seen, then it is very likely you need the specific Unix drivers for the device. When ever possible select a wireless card that has Linux drivers. Use the links below to find a compatible wireless card.

Example Interfaces File (most common entries shown)

To try some of these on your system ...
    - Copy and paste a set of entries.
    - Remove the leading comment pound sign #
    - Reboot or restart your network connection

######################################################################
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
#
# Stolen from http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/
#
# A "#" character in the very first column makes the rest of the line
# be ignored. Blank lines are ignored. Lines may be indented freely.
# A "\" character at the very end of the line indicates the next line
# should be treated as a continuation of the current one.
#
# The "pre-up", "up", "down" and "post-down" options are valid for all
# interfaces, and may be specified multiple times. All other options
# may only be specified once.
#
# See the interfaces(5) manpage for information on what options are
# available.
######################################################################

# We always want the loopback interface.
#
# auto lo
# iface lo inet loopback

# An example ethernet card setup: (broadcast and gateway are optional)
#
# auto eth0
# iface eth0 inet static
#     address 192.168.0.42
#     network 192.168.0.0
#     netmask 255.255.255.0
#     broadcast 192.168.0.255
#     gateway 192.168.0.1

# A more complicated ethernet setup, with a less common netmask, and a downright
# weird broadcast address: (the "up" lines are executed verbatim when the
# interface is brought up, the "down" lines when it's brought down)
#
# auto eth0
# iface eth0 inet static
#     address 192.168.1.42
#     network 192.168.1.0
#     netmask 255.255.255.128
#     broadcast 192.168.1.0
#     up route add -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.2
#     up route add default gw 192.168.1.200
#     down route del default gw 192.168.1.200
#     down route del -net 192.168.1.128 netmask 255.255.255.128 gw 192.168.1.2

# A more complicated ethernet setup with a single ethernet card with
# two interfaces.
# Note: This happens to work since ifconfig handles it that way, not because
# ifup/down handles the ':' any differently.
# Warning: There is a known bug if you do this, since the state will not
# be properly defined if you try to 'ifdown eth0' when both interfaces
# are up. The ifconfig program will not remove eth0 but it will be
# removed from the interfaces state so you will see it up until you execute:
# 'ifdown eth0:1 ; ifup eth0; ifdown eth0'
# BTW, this is "bug" #193679 (it's not really a bug, it's more of a
# limitation)
#
# auto eth0 eth0:1
# iface eth0 inet static
#     address 192.168.0.100
#     network 192.168.0.0
#     netmask 255.255.255.0
#     broadcast 192.168.0.255
#     gateway 192.168.0.1
# iface eth0:1 inet static
#     address 192.168.0.200
#     network 192.168.0.0
#     netmask 255.255.255.0

# "pre-up" and "post-down" commands are also available. In addition, the
# exit status of these commands are checked, and if any fail, configuration
# (or deconfiguration) is aborted. So:
#
# auto eth0
# iface eth0 inet dhcp
#     pre-up [ -f /etc/network/local-network-ok ]
#
# will allow you to only have eth0 brought up when the file
# /etc/network/local-network-ok exists.

# Two ethernet interfaces, one connected to a trusted LAN, the other to
# the untrusted Internet. If their MAC addresses get swapped (because an
# updated kernel uses a different order when probing for network cards,
# say), then they don't get brought up at all.
#
# auto eth0 eth1
# iface eth0 inet static
#     address 192.168.42.1
#     netmask 255.255.255.0
#     pre-up /path/to/check-mac-address.sh eth0 11:22:33:44:55:66
#     pre-up /usr/local/sbin/enable-masq
# iface eth1 inet dhcp
#     pre-up /path/to/check-mac-address.sh eth1 AA:BB:CC:DD:EE:FF
#     pre-up /usr/local/sbin/firewall

# Two ethernet interfaces, one connected to a trusted LAN, the other to
# the untrusted Internet, identified by MAC address rather than interface
# name:
#
# auto eth0 eth1
# mapping eth0 eth1
#     script /path/to/get-mac-address.sh
#     map 11:22:33:44:55:66 lan
#     map AA:BB:CC:DD:EE:FF internet
# iface lan inet static
#     address 192.168.42.1
#     netmask 255.255.255.0
#     pre-up /usr/local/sbin/enable-masq $IFACE
# iface internet inet dhcp
#     pre-up /usr/local/sbin/firewall $IFACE

# A PCMCIA interface for a laptop that is used in different locations:
# (note the lack of an "auto" line for any of these)
#
# mapping eth0
#    script /path/to/pcmcia-compat.sh
#    map home,*,*,*                  home
#    map work,*,*,00:11:22:33:44:55  work-wireless
#    map work,*,*,01:12:23:34:45:50  work-static
#
# iface home inet dhcp
# iface work-wireless bootp
# iface work-static static
#     address 10.15.43.23
#     netmask 255.255.255.0
#     gateway 10.15.43.1
#
# Note, this won't work unless you specifically change the file
# /etc/pcmcia/network to look more like:
#
#     if [ -r ./shared ] ; then . ./shared ; else . /etc/pcmcia/shared ; fi
#     get_info $DEVICE
#     case "$ACTION" in
#         'start')
#             /sbin/ifup $DEVICE
#             ;;
#         'stop')
#             /sbin/ifdown $DEVICE
#             ;;
#     esac
#     exit 0

# An alternate way of doing the same thing: (in this case identifying
# where the laptop is is done by configuring the interface as various
# options, and seeing if a computer that is known to be on each particular
# network will respond to pings. The various numbers here need to be chosen
# with a great deal of care.)
#
# mapping eth0
#    script /path/to/ping-places.sh
#    map 192.168.42.254/24 192.168.42.1 home
#    map 10.15.43.254/24 10.15.43.1 work-wireless
#    map 10.15.43.23/24 10.15.43.1 work-static
#
# iface home inet dhcp
# iface work-wireless bootp
# iface work-static static
#     address 10.15.43.23
#     netmask 255.255.255.0
#     gateway 10.15.43.1
#
# Note that the ping-places script requires the iproute package installed,
# and the same changes to /etc/pcmcia/network are required for this as for
# the previous example.

# Set up an interface to read all the traffic on the network. This
# configuration can be useful to setup Network Intrusion Detection
# sensors in 'stealth'-type configuration. This prevents the NIDS
# system to be a direct target in a hostile network since they have
# no IP address on the network. Notice, however, that there have been
# known bugs over time in sensors part of NIDS (for example see
# DSA-297 related to Snort) and remote buffer overflows might even be
# triggered by network packet processing.
#
# auto eth0
# iface eth0 inet manual
# 	up ifconfig $IFACE 0.0.0.0 up
#       up ip link set $IFACE promisc on
#       down ip link set $IFACE promisc off
#       down ifconfig $IFACE down

# Set up an interface which will not be allocated an IP address by
# ifupdown but will be configured through external programs. This
# can be useful to setup interfaces configured through other programs,
# like, for example, PPPOE scripts.
#
# auto eth0
# iface eth0 inet manual
#       up ifconfig $IFACE 0.0.0.0 up
#       up /usr/local/bin/myconfigscript
#       down ifconfig $IFACE down

 

Additional Links

Wifi
help.ubuntu.com/community/WifiDocs/WiFiHowTo
www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wireless.html
www.susegeek.com/wireless/iwconfig-wireless-interface-configuration-utility-in-linux

Linux Drivers
www.linux-drivers.org/network.html
www.linuxbasis.com/drivers.html#net
www.tux.org/pub/people/donald-becker/

Linux Compatible Network Devices - check before buying!!!
help.ubuntu.com/community/WifiDocs/WirelessCardsSupported
www.tuxmobil.org/pcmcia_linux.html
www.tux.org/pub/people/donald-becker/

 

Last Updated: 8/19/14