Securing and Optimizing Linux:RedHat Edition | All about OS

Configuring TCP/IP Networking manually with the command line

Категория: Securing and Optimizing

The ifconfig utility is the tool used to set up and configure your network card. You should understand this command in the event you need to configure the network by hand. An important note to take care with is when using ifconfig to configure your network devices; the settings will not survive a reboot.
• To assign the ethO interface the IP-address of 208.164.186.2 use the command: [root@deep /]# ifconfig ethO 208.164.186.2 netmask 255.255.255.0
NOTE: Usually, peoples will configure or change the TCP/IP networking manually only to make some test on the server. If you want to keep your TCP/IP values, it’s preferable to set them in the files related to networking functionality.
• To display all the interfaces you have on your server, use the command: [root@deep /]# ifconfig
The output should look something like this:
ethO Link encap:Ethernet HWaddr00:E0:18:90:1 B:56
inetaddr:208.164.186.2 Bcast:208.164.186.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTUM500 Metric:1 RX packets:1295 errors:0 dropped:0 overruns:0 frame:0 TX packets:1163 errors:0 dropped:0 overruns:0 carrierO collisions:0 txqueuelen:100 Interrupt: 11 Base address:0xa800
lo Link encap:Local Loopback
inetaddr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:139 errors:0 dropped:0 overruns:0 frame:0
TX packets:139 errors:0 dropped:0 overruns:0 carrierO
collisions:0 txqueuelen:O
NOTE: If the ifconfig tool is invoked without any parameters, it displays all interfaces you configured. An option of “-a” shows the inactive one as well.
To display all interfaces as well as inactive interfaces you may have, use the command: [root@deep /]# ifconfig -a

Страниц: 1 2 3 4 5

« Files related to networking functionality
Networking Firewall.Linux IPCHAINS »