Linux - Network

About

Network management on Linux

Management

Configuration

Hostname

See Setting the hostname

DNS

See Linux - The DNS resolver (/etc/resolv.conf)

DHCP

vi /etc/sysconfig/network-scripts/ifcfg-eth0

Enter this parameter:

DHCP_HOSTNAME=yourhostname

See also Linux - ifconfig (Interface Configuration)

Dhcp Check:

sudo dhclient eth0

Host File

see Network - Hosts File

Ethernet Interface

Set up the ethernet network adapter interface (local connection)

The name of the interface is usually a driver name followed by a unit number, for example eth0 for the first Ethernet interface.

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.0.10 # A free ip number
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.1
ONBOOT=yes
NM_CONTROLLED=no

You can also config it with ifconfig.

Example:

ifconfig eth0 address 192.168.0.10  #IPADDR
ifconfig eth0 netmask 255.255.255.0 # netmask

Routing Table

See netstat

netstat -rn # for routing table

Stop and start the network Service

[root@di-obia-01 ~]# service network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:
Determining IP information for eth0... done.               [  OK  ]

The below statement will call the following scripts:

/etc/init.d/network stop
/etc/init.d/network start





Discover More
Init - SysV init Script

The init script are bash script that are run by the init daemon. see See sudo Each script will be run as a command and the structure of the command will look like: Where command is the actual...
Linux - /proc/sys/net/, networking configuration files

Common groups of information and parameters concerning the kernel are are set with the help of configuration files and grouped into directories and subdirectories within the /proc/ directory. /proc/sys/net/...
Linux - Machine Configuration

network configuration Set correct TIMEZONE In the NTP network time protocol configuration file, set the server with the following name: OS Choose y for all See
Linux - The DNS resolver (/etc/resolv.conf)

The file /etc/resolv.conf is used by the resolver. Two Domain Name System (DNS) resolver parameters (timeout and attempts) are set by default to low values when the operating system is installed. Typical...
Card Puncher Data Processing
Linux / Unix

Linux is an open source software and anyone can take it and create this own Linux (of distribution). It's why you can find a lot of distribution on the market : Red Hat Oracle Enterprise Linux (which...
Card Puncher Data Processing
OS - Network

See Linux:



Share this page:
Follow us:
Task Runner