Network Environment

From BCCD 3.0

Jump to: navigation, search

BCCDv3 -- Configuring and Customizing


Contents

Overview

The BCCD does its best to automatically configure itself for your network environment using the bccd-nic-setup script. This script follows the BCCD Credo: Hit Enter Until It Works, Unless You Know Otherwise. There are some instances when you need to supply information or perform some manual steps, which means You Know Otherwise.

Here's some scenarios:

Head Node/Parent/First BCCD

This follows the BCCD Credo closely. bccd-nic-setup will prompt for what network you want other BCCD systems to connect to

Bccd select nic network.png

---you might think you only want one BCCD on the network, but one inevitably turns into more---and you should press enter. The script will then display any network information available from DHCP

Bccd eth0 dhcp other.png

to which you should hit enter. If the BCCD is unable to find network information for a NIC, it will default to skipping it.

Bccd eth1 skip.png

If you know what your network information is, you can select No and supply your own IP address, subnet mask, and optionally a gateway. If you don't specify a gateway, it will default to the IP address you type in.

Bccd eth1 ipaddr.png

Bccd eth1 netmask.png

Bccd eth1 gw.png

The system will now continue booting up, and start up a DHCP server in case you ever want other BCCD systems on this network. Note that the DHCP server only answers requests from BCCD clients, and will serve up addresses on the private 192.168.3.0/24 network so as not to interfere with other non-BCCD network clients.

Compute Node/Child/2nd-through-N BCCDs

Putting another BCCD on the network is easy. Make sure you already have a BCCD DHCP server on the network by following the steps above steps above. Then, simply bring another system on the network. If you have only a single NIC, you won't get a prompt at all, and the system will continue booting with the network information supplied by the BCCD server.

If you do have multiple NICs, you should a screen showing that your second system has found its BCCD server, and you'd just hit enter to accept those settings.

Bccd eth0 dhcp bccd.png

Your default route will point through the first BCCD server on the network, so you'll be able to access the Internet assuming the first BCCD server can access the Internet.

For any non-BCCD NIC prompts, you can just hit enter.

BCCD PXE booting

BCCD PXE booting is only supported from a liberated (not live CD) BCCD, and requires a NIC to have no other DHCP servers responding on it. PXE booting requires disabling the functionality that makes a BCCD DHCP server only respond to BCCD clients, so you don't want to run it on a network with another DHCP server.

Since the liberation takes your network configuration from the non-PXE-capable live CD mode, you'll have to reset your network configuration first. To do that, simply run

  sudo /bin/bccd-reset-network

as the bccd user. This will shutdown networking and any DHCP servers, and re-run /bin/bccd-nic-setup. Hit enter until you hit a NIC that is skippable, and select No.

Bccd eth1 skip.png

Assign eth1 an IP address and subnet mask, and optionally a gateway (most of the time you should leave this blank unless you absolutely know you need a gateway).

Bccd eth1 ipaddr.png Bccd eth1 netmask.png Bccd eth1 gw.png

Once you're through those steps, a screen will come up asking whether you want this NIC to be a PXE capable NIC. You should hit enter.

Bccd eth1 pxe.png

Any systems on the same network as the NIC you configured to be PXE-bootable will now get PXE boot traffic.

Bccd pxe boot.png

Wireless

There are three steps to configuring wireless internet: identifying the network to use, configuring encryption, and connecting to the network. Currently, this guide will support connecting to unencrypted/WPA/WPA2 networks, while a section for WEP will be added later.

Scanning for Networks

Assuming you have a wireless device, the first step is to determine which wireless network to use. Usually, you will have some idea of what it is, but it helps to gather information. The iwlist command will list all wireless networks that are currently broadcasting in range to a specific device:

It is important to note that just because a network does not appear in the listing does not mean the network does not exist. Some wireless networks are specifically set not to broadcast, which means their information won't appear. In this case, you need to get information from the network administrator about the name and encryption type of the network.

If you are able to find a suitable network, you now need to gather information about it. Run iwlist again, without any sort of grep. This will provide detailed information about each network -- find the network of interest within this output. Information about a device should look like the following:

Cell 04 - Address: 00:22:0D:E0:6A:99
          Channel: 56
          Frequency:5.28 GHz (Channel 56)
          Quality=35/70   Signal level=-75 dBm
          Encryption key:on
          ESSID:"NETWORK"
          Bit Rates:18 Mb/s; 24 MB/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
          Mode:Master
          Extra:tsf=0000015977e6102c
          Extra: Last beacon: 164ms ago
          IE: WPA Version 1
              Group Cipher : TKIP
              Pairwise Ciphers (2) : TKIP CCMP
              Authentication Suites (1) : PSK

The main bit to look for is the "IE" line -- note that in this example case, it indicates that the network is using WPA encryption.

Connecting to an Unencrypted Network

This step is usually simple:

$ sudo su
$ iwconfig [device] essid [SSID]
$ iwconfig [device] mode Managed
$ dhclient [device]

The iwconfig command configures wireless devices. The first line above sets the device to associate itself with the network of name "SSID". The second line tells the device to run in managed mode - "node connects to a network composed of many Access Points, with roaming" (see iwconfig(8)). This will work for most situations, and you will likely know/be told if you need a different mode. Finally, the dhclient command attempts to acquire an IP address on the specified device.

Connecting to a WPA/WPA2 Encrypted Network

Using WPA requires the WPA supplicant to be installed. This package is dependent on tftpd-hpa, a TFTP server. However, a different server/program may already be attached to the port that tftpd-hpa needs, preventing it from being installed. The first step is to check whether or not port 69 is free for UDP traffic:

$ netstat -a | grep ftp
$ netstat -nlp | grep 69

If some UDP service is indeed bound to port 69 (likely via tftp), we need to disable it so that we can install tftpd-hpa. Keep in mind that if you are PXE booting, it will not work after you disable this service. Our goal is to install tftpd-hpa, and have it running as a daemon and also able to handle PXE requests for us. Moving onward, the netstat commands will likely reveal that inetutils-inetd is the offending service, so disable it:

$ sudo /etc/init.d/inetutils-inetd stop

Then install the WPA supplicant:

$ sudo apt-get update
$ sudo apt-get install wpasupplicant

We now need to make sure that our new TFTP server can run, and that we can still PXE boot from this machine:

Firstly, in /etc/default/tftpd-hpa, make sure that RUN_DAEMON="yes" Then in /etc/inetd.conf, find the line:

 tftp  dgram udp wait  root  /usr/sbin/in.tftpd  /usr/sbin/in.tftpd -s /var/lib/tftpboot

If you cannot find it, create it. Then, change "udp" to "udp4". This is necessary because otherwise the behavior will default to udp6, for IPv6, which will not allow nodes to boot. Once this has been completed, all that's left is to restart the TFTP server and the inetutils.

$ sudo /etc/init.d/inetutils-inetd restart
$ sudo /etc/init.d/tftpd-hpa restart

With that, you are ready to connect to the wireless network. The first step in doing this is to generate a PSK (if you don't know the passphrase, contact your network administrator):

$ mkdir ~/wpa
$ wpa_passphrase [SSID] [passphrase] > ~/wpa/SSID.psk

With this PSK generated, you can proceed to connect to the network:

$ sudo su
$ iwconfig [device] essid "SSID"
$ iwconfig [device] mode Managed
$ wpa_supplicant -B -i[device] -c~/wpa/SSID.psk -Dwext
$ sleep 3
$ dhclient [device]

Note that you should delay a few seconds after executing the wpa_supplicant command before attempting to acquire an IP address (hence the sleep call). It takes a short amount of time to prepare for a WPA/WPA2 connection to be made, so connecting will fail until this has completed.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox