Difference between revisions of "Ifconfig"

From Tassadar
Jump to: navigation, search
 
(One intermediate revision by one user not shown)
Line 5: Line 5:
  
 
Displays your current network information, the equivalent to "''ipconfig /all''"
 
Displays your current network information, the equivalent to "''ipconfig /all''"
 +
  
 
''ifconfig e0a''
 
''ifconfig e0a''
  
 
Displays the networking information for just interface e0a.
 
Displays the networking information for just interface e0a.
 +
  
 
''ifconfig e0a 192.168.1.9 netmask 255.255.255.0''
 
''ifconfig e0a 192.168.1.9 netmask 255.255.255.0''
Line 15: Line 17:
  
  
It's important to note that the default gateway is not present in the NIC config, rather it's done through the [[route]] command.
+
It's important to note that the default gateway is not present in the NIC config, rather it's done through the [[route]] command. If you need to go back to DHCP, you actually just start up the DHCP client, like this:
 +
 
 +
 
 +
''dhclient e0a''

Latest revision as of 11:33, 30 October 2011

Ifconfig is the command-line tool that every Windows admin wishes he had. You can both check and set your IP address quickly, which makes it one of my favorite programs.


ifconfig -a

Displays your current network information, the equivalent to "ipconfig /all"


ifconfig e0a

Displays the networking information for just interface e0a.


ifconfig e0a 192.168.1.9 netmask 255.255.255.0

Sets interface e0a to the specified network settings


It's important to note that the default gateway is not present in the NIC config, rather it's done through the route command. If you need to go back to DHCP, you actually just start up the DHCP client, like this:


dhclient e0a