Home > Uncategorized > Quick Primer: ethernet tcp/ip network interface config on linux

Quick Primer: ethernet tcp/ip network interface config on linux

This is a quick primer on how to configure a network interface on linux:

cd /sys/class/net/ethN #where N is the interface number, in this example, we'll use eth0
cat address
cd  /etc/sysconfig/network-scripts
ls ifcfg-eth*
#if there are some scripts present, you can copy them, and modify them... if not...
vim ifcfg-eth0

change the following values:

DEVICE=eth0
BOOTPROTO=none
HWADDR=[hardware address you obtained from cat /sys/class/net/etho/address]
ONBOOT=yes|no
NETWORK=169.254.100.0
NETMASK=255.255.255.0
IPADDR=168.254.100.100
TYPE=Ethernet

Save the file and exit vim: [esc][:][w][q]

ifup
Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: