Thursday, December 27, 2012

0 Configure network on Linux

 

Manage network interface

ifconfig
ifconfig eth0
ifconfig eth0 down
ifconfig eth0 up

image

 

Network Service

Use service command would bring up/down all the network interface. Use service command to control the internet adapter would also update the routing table.

 

service network status
service network stop
service network start

image

Network configuration file

We can modify the ifcfg-* configure file and bounce the network card to make the changes effective.

/etc/sysconfig/network-scripts/ifcfg-*

image

Below is the example of the ifcfg-eth0 file:

image

Default gateway

/etc/sysconifg/network

image

GATEWAY value can be overwrite by the ifcfg-* file.

DNS Server

/etc/resolve.conf

namesserver value can be overwritten by the parameter “DNS*” in the ifcfg-* file.

0 comments:

Post a Comment

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates