ifconfig - Configure a Network Interface
Since most computers today are networked in some fashion, it is important to know how to set up a network basics for a Linux system. The ifconfig command can be used in two modes. One by issuing the command without options, the configuration of the existing interfaces can be examined. For example:
eth0 Link encap:Ethernet HWaddr 00:05:02:CE:DE:07
inetaddr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6304605 errors:96 dropped:0 overruns:0 frame:0
TX packets:1788262 errors:15 dropped:0 overruns:0 carrier:0
RX bytes:2363658996 (2254 Mb) TX bytes:191797033 (182.9 Mb)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:25256 errors:0 dropped:0 overruns:0 frame:0
TX packets:25256 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:8112246 (7.7 Mb) TX bytes:8112246 (7.7 Mb)
This shows the IP and other configuration information for the two network interfaces, eth0 (the Ethernet or LAN interface) and lo (the loop back interface). The IP address and other configuration information for the Ethernet interface, in this case eth0, can be reset in the following manner:
ifconfig eth0 ipaddress netmask newnetmask broadcast newbcastaddr
Where the new address information should be substituted for the words - ipaddress, newnetamsk, newbcastaddr. That this change properly took effect can be verified by reissuing the ifconfig command.
Home - Table Of Contents - Contact Us
CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com
Version 1.0 - Version Date: March 29, 2005
Adapted with permission from a work created by Tcat Houser et al.
CertiGuide.com Version © Copyright 2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.