ifconfig |
ifconfigifconfig is used to configure the network interfaces and parameters. {mosimage}
ifconfig interface parameters Example: If parameters are not given the interface and the configuration for that interface are given. If the interface is not indicated then it will list all available information for active interfaces.
Output
lo Link encap:Local Loopback
ifconfig eth0 up ifconfig eth0 down The interface needs to be chosen so that the correct interface is taken up or down. {mosimage} ifconfig ipaddress The ipaddress can be set for a network card using this option. It is important to indicate the network interface that should have the ipaddress. Example: ifconfig eth0 192.168.3.45 netmask 255.255.255.0 The ipaddress 192.168.3.45 and the netmask of 255.255.255.0 are added to the eth0 interface. ifconfig netmask The network mask can be set for a network card using this option. It is important to indicate the network interface that should have the netmask. Example: ifconfig eth0 netmask 255.255.255.0 The netmask of 255.255.255.0 is added to the eth0 interface.
|