Difference between revisions of "Ifconfig"

From Noah.org
Jump to navigationJump to search
m
m
Line 1: Line 1:
 
[[Category:Engineering]]
 
[[Category:Engineering]]
 +
[[Category: Networking]]
 
== Set static IP ==
 
== Set static IP ==
<pre>ifconfig eth0 192.168.0.2 netmask 255.255.255.0</pre>
+
<pre># ifconfig eth0 192.168.0.2 netmask 255.255.255.0</pre>
  
 
== Virtual Interfaces ==
 
== Virtual Interfaces ==
 
This is trivial in Linux. Just add a number to a real interface
 
This is trivial in Linux. Just add a number to a real interface
<pre>ifconfig eth0:1 192.168.0.3 netmask 255.255.255.0</pre>
+
<pre># ifconfig eth0:1 192.168.0.3 netmask 255.255.255.0</pre>
  
 
== Delete an interface ==
 
== Delete an interface ==
 
Use the 'down' command:
 
Use the 'down' command:
<pre>ifconfig eth0:1 down</pre>
+
<pre># ifconfig eth0:1 down</pre>

Revision as of 12:51, 30 January 2007

Set static IP

# ifconfig eth0 192.168.0.2 netmask 255.255.255.0

Virtual Interfaces

This is trivial in Linux. Just add a number to a real interface

# ifconfig eth0:1 192.168.0.3 netmask 255.255.255.0

Delete an interface

Use the 'down' command:

# ifconfig eth0:1 down