Linux Scroll

Just another site

ifconfig command

ifconfig – configure a network interface

Display info on all network interfaces:

$ ifconfig -a

* eth0 – Network card
* wlan0 – Wireless network card

Display current config for eth0:

$ ifconfig eth0

Activate eth0:

$ ifconfig eth0 up

Deactivate eth0:

$ ifconfig eth0 down

Assign IP address:

$ ifconfig eth0 netmask broadcast

Assign default gateway:

$ route add default gw

Assign multiple IP’s:

$ ifconfig eth0:0

$ ifconfig eth0:1

View current routing table:

$ route -n

# netstat -rn

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: