Set the Host Name and domain name of a Linux host
/Etc/hosts
Example
127.0.0.1 localhost. localdomain localhost
Generally, the hosts content defines the Host Name (hostname). Each act is a host. Each line consists of three parts, separated by spaces. The line starting with # is not explained by the system.
Part 1: network IP address;
Part 2: Host Name. Domain Name. Note that there is a halfwidth between host name and domain name, such as localhost. localdomain
Part 2: Host Name (host name alias) is actually the host name;
Of course, each line can also be two parts, namely the Host IP address and host name; for example, 192.168.1.195 Debian
======================================
Configure domain name resolution for a Linux host
/Etc/resolv. conf
Example: (up to 3)
Nameserver 202.96.134.133
Nameserver 202.96.128.143
Nameserver 202.96.68.38
=================================================
set Nic binding
the NIC configuration file must be edited first, directory:
/etc/sysconfig/network-scripts
bind the configuration file: The ifcfg-bond0 content is as follows:
device = bond0
ipaddr = 10.0.0.210
netmask = 255.255.255.0
broadcast = 10.0.0.255
network = 10.0.0.0
gateway = 10.0.0.1
onboot = Yes
type = Ethernet
============================== =
Nic configuration file: ifcfg-ethx:
device = ethx
onboot = Yes
bootproto = none
# Master = bond0
# slave = Yes
============ ==================< br> after these configurations are complete, configure/etc/modprobe. CONF file, add the following content:
alias bond0 bonding
options bond0 miimon = 100 mode = 0
Note: miimon is used for link monitoring. For example: miimon = 100, The system monitors the link connection status every Ms. If one line fails, it is transferred to another line. The value of mode indicates the working mode, which has a total, two or three modes, commonly used: 0, 1.
mode = 0 indicates that load balancing (round-robin) is a load balancing method, and both NICs work.
mode = 1 indicates that fault-tolerance (Active-Backup) provides redundancy, working in the active/standby mode, that is, by default, only one network card works, another one is used for backup.
================================================= ================< br> last edited/etc/rc. d/RC. add the following content to the local file:
ifenslave bond0 eth0 eth1