Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Networks and Servers using Beaglebone

You're reading from   Building Networks and Servers using Beaglebone Set up and configure a local area network and file server by building your own home-based multimedia server

Arrow left icon
Product type Paperback
Published in May 2015
Publisher
ISBN-13 9781784390204
Length 110 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
William Pretty William Pretty
Author Profile Icon William Pretty
William Pretty
Glenn Vander Veer Glenn Vander Veer
Author Profile Icon Glenn Vander Veer
Glenn Vander Veer
Arrow right icon
View More author details
Toc

Setting up a static IP on the BeagleBone

First, display the contents of the /etc/network/interfaces file. Run the following command:

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 line instead of dhcp.

The following screenshot shows the output of the cat /etc/network/interfaces command:

Setting up a static IP on the BeagleBone

Now, create a backup of the /etc/network/interfaces file by running the following command:

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

Now, edit the interfaces file with nano, as follows:

iface eth0 inet dhcp

Change the preceding command line to this:

iface eth0 inet static
Setting up a static IP on the BeagleBone

Now, enter the following command in the terminal:

ifconfig

On the command line, you will see something similar to what is shown in the following screenshot:

Setting up a static IP on the BeagleBone
You have been reading a chapter from
Building Networks and Servers using Beaglebone
Published in: May 2015
Publisher:
ISBN-13: 9781784390204
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image