Configure Network Connection with BeagleBoard Hardware

You can configure the IP settings of the BeagleBoard hardware by running Linux® shell commands directly on the BeagleBoard hardware.

To inspect and reconfigure the IP settings on a board that already has the new firmware, follow the procedure in this section that starts with "To configure the board to use DHCP or static IP settings".

To configure the IP settings while you are replacing the firmware on your BeagleBoard hardware, see Replace Firmware on BeagleBoard Hardware.

You may need to reconfigure the IP settings if your board:

  • Has unknown IP settings.

  • Is unreachable using a network connection.

  • Is being moved to a network or direct Ethernet connection that uses static IP settings.

  • Is being moved from a network that used static IP settings to one that uses DHCP services.

When you complete the procedure in this topic, the board should be able to communicate over the network to which it is connected.

Before starting the procedure in this topic, it helps to understand the conditions under which networks use DHCP or static IP settings:

  • If your board is connected to a network with DHCP services, such as an office LAN or a home network connected to the Internet, configure the board to use DHCP services. DHCP is a network service that automatically configures the IP settings of Ethernet devices connected to a network.

  • If your board is directly connected to an Ethernet port on your computer, or connected to an isolated network without DHCP services, configure the board to use static IP settings.

To configure the board to use DHCP or static IP settings:

  1. Open a serial command line session, as described in Connect to Serial Port on BeagleBoard Hardware

    Alternatively, if your board is connected to a monitor, keyboard, and mouse, you can log in to the Ubuntu™ desktop and open a terminal window.

  2. Display the contents of the /etc/network/interfaces file. Enter:

    cat /etc/network/interfaces 

    If the board is configured to use DHCP services (the default configuration), dhcp appears at the end of the following line:

    iface eth0 inet dhcp

    If the board is configured to use static IP settings, static appears at the end of the following line:

    iface eth0 inet static

  3. Create a backup of the /etc/network/interfaces file. Enter:

    sudo cp /etc/network/interfaces /etc/network/interfaces.backup

    Enter the root password when prompted (default: temppwd).

  4. Edit interfaces using a simple editor called nano. Enter:

    sudo nano /etc/network/interfaces
  5. Edit the last word of line that starts with iface eth0 inet.

    To use DHCP services, edit the line to say:

    iface eth0 inet dhcp

    To use static IP settings, edit the line to say:

    iface eth0 inet static

  6. For static IP settings, add lines for address, netmask, and gateway. For example:

    iface eth0 inet static

      Note:   For static IP settings:

      • The value of the subnet mask must be the same for all devices on the network.

      • The value of the IP address must be unique for each device on the network.

      For example, if the Ethernet port on your host computer has a network mask of and a static IP address of, set:

      • netmask to use the same network mask value,

      • address to an unused IP address, between and

  7. Tell nano to exit and save the changes:

    Press Ctrl+X.

    Enter Y to save the modified buffer.

    For "File Name to Write: interfaces", press Enter.

    The nano editor confirms that it "Wrote # lines" and returns control to the command line.

  8. Reboot your board for the settings to take effect:

    sudo shutdown -r now
  9. Test the IP settings by logging in to the board over a telnet session.

    Note:   You can use the ifconfig command to temporarily change the IP settings. Rebooting the board removes the ifconfig settings and restores the /etc/network/interfaces settings.

    To change the IP settings temporarily, open a Linux command line, and enter ifconfig, the device id, a valid IP address, netmask, and the appropriate network mask. For example:

    ifconfig eth0 netmask

Related Examples

Was this topic helpful?