Gestion des @ip virtuelles sous RHEL 6.4
Bonjour,
nous avons mis en place 2 adresses ip virtuelles en reprenant les configurations que nous avions sur RHEL 5.
Au redémarrage du serveur, les @ip virtuelles démarrent mal : il est nécessaire de les arrêter / redémarrer pour les faire fonctionner normalement.
Pourquoi ?
Configuration de l'@ip du serveur :
[root@dze-ecm-prd network-scripts]# cat ifcfg-eth0
HWADDR=00:50:56:89:33:1a
NAME=eth0
GATEWAY=192.168.220.254
DNS1=192.168.205.130
DNS2=10.77.7.130
DOMAIN=interne.ugap.fr
DEVICE=eth0
ONBOOT=yes
USERCTL=no
BOOTPROTO=static
NETMASK=255.255.255.0
IPADDR=192.168.220.227
PEERDNS=no
check_link_down() {
return 1;
}
configuration des @ip virtuelles :
[root@dze-ecm-prd network-scripts]# cat ifcfg-eth0:1
Please read /usr/share/doc/initscripts-*/sysconfig.txt
for the documentation of these parameters.
TYPE=Ethernet
DEVICE=eth0:1
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.220.241
USERCTL=no
IPV6INIT=no
ONPARENT=yes
PEERDNS=yes
GATEWAY=192.168.220.1
[root@dze-ecm-prd network-scripts]# cat ifcfg-eth0:2
Please read /usr/share/doc/initscripts-*/sysconfig.txt
for the documentation of these parameters.
GATEWAY=192.168.220.1
TYPE=Ethernet
DEVICE=eth0:2
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.220.245
USERCTL=no
IPV6INIT=no
ONPARENT=yes
PEERDNS=yes
Merci
Thierry Renoir
Responses
You can only have one GATEWAY address, so remove the gateway from eth0:1 and eth0:2, you shouldn't need the PEERDNS lines either.
If the "=== sysconfig.txt" lines are in your files, remove them or comment them out.
On RHEL6, you can use just "ifcfg-eth0" and "IPADDRn" as described in sysconfig.txt. For example:
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:50:56:89:33:1a
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPADDR1=192.168.220.227
IPADDR2=192.168.220.241
IPADDR3=192.168.220.245
NETMASK=255.255.255.0
GATEWAY=192.168.220.254
DNS1=192.168.205.130
DNS2=10.77.7.130
PEERDNS=no
DOMAIN=interne.ugap.fr
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
