1) CentOS(RedHat) uses the file /etc/sysconfig/network to read the saved hostname at system boot. This is set using the init script /etc/rc.d/rc.sysinit
GATEWAY=192.168.0.2542) We define the nameserver for this system /etc/resolv.conf
HOSTNAME=www.mydomain.it
NETWORKING=yes
FORWARD_IPV6=yes
search mydomain.it3) Locally resolve node names to IP addresses /etc/hosts
nameserver 10.10.14.1
nameserver 10.10.14.2
127.0.0.1 localhost.localdomain localhost name name.mydomain.it4) Define the first ethernet connector /etc/sysconfig/network-scripts/ifcfg-eth0
::1 localhost6.localdomain6 localhost6 name name.mydomain.it
16.18.24.241 name.mydomain.it name
16.18.24.244 name.mydomain.it name
DEVICE=eth05) Copy this configuration file to a virtual one, which could be for example eth0:0
ONBOOT=yes
USERCTL=no
BOOTPROTO=none
NETMASK=255.255.255.128
IPADDR=192.168.0.241
PEERDNS=no
check_link_down() {
return 1;
}
TYPE=Ethernet
IPV6INIT=no
cp ifcfg-eth0 ifcfg-eth0:06) And than change the settings in the newly created file /etc/sysconfig/network-scripts/ifcfg-eth0:0
DEVICE=eth0:07) Restart the network to put it to work
ONBOOT=yes
USERCTL=no
BOOTPROTO=none
NETMASK=255.255.255.128
IPADDR=192.168.0.242
PEERDNS=no
check_link_down() {
return 1;
}
TYPE=Ethernet
IPV6INIT=no
service network restart
No comments:
Post a Comment