Skip to content

Instantly share code, notes, and snippets.

@idelsink
Created August 4, 2016 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save idelsink/bf0c3ac8df37af59f2dd5977339076f2 to your computer and use it in GitHub Desktop.
Save idelsink/bf0c3ac8df37af59f2dd5977339076f2 to your computer and use it in GitHub Desktop.
How to setup Ethernet on a Embest SBC9261-I

How to setup Ethernet on a Embest SBC9261-I

Assigning an IP Address

For eth0 interface.

ifconfig eth0 IP_ADDR netmask NETMASK up
# for example:
ifconfig eth0 192.168.0.13 netmask 255.255.255.0 up

Routing

Set the default gateway

route add default gw GATEWAY_ADDR eth0
# for example:
route add default gw 192.168.0.1 eth0

Add DNS server

Edit /etc/resolv.conf. If this does not exists, in my case, touch it or just open it in the editor.

vi /etc/resolv.conf

Add a name server, like so:

nameserver DNS-IP

Example:

nameserver 8.8.8.8
nameserver 8.8.4.4

Test

ping google.com
nslookup google.com
traceroute google.com

If all was done correctly, you should now have a working Internet connection.

Set on boot time

To setup this connection at boot edit the file:

/etc/init.d/rcS

Edit or add this to the file:

/sbin/ifconfig eth0 192.168.0.13 netmask 255.255.255.0 up
/sbin/route add default gw 192.168.0.1 eth0

Sources

This was perfect for the needed information: http://linuxguide.sourceforge.net/linux-ethernet.html

A random man page for the resolv.conf file: http://man7.org/linux/man-pages/man5/resolv.conf.5.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment