User Tools

Site Tools


progetti:cloud-areapd:best_practices:one_interface_2ip

1 Interface - 2 IPs

Author: Sergio Traldi

per le macchine BLADE, per avere un interfaccia con 2 addresses va detto a Fulvia su che porta e' attaccata tale blade server, a quel punto la porta va messa in trunck e non piu' in ACCESS (da Fulvia). Poi per la configurazione della macchina, una volta installata si procede come qui sotto. Si trovera' nel file:

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

DEVICE="eth0"
BOOTPROTO=static
HWADDR=".........."
IPADDR=193.206.210.X
NETMASK=255.255.255.0
ONBOOT="yes"
TYPE="Ethernet"
.....

Fare mv di quel file in /etc/sysconfig/network-scripts/ifcfg-eth0.1 e lasciare solo queste voci:

/etc/sysconfig/network-scripts/ifcfg-eth0.1
DEVICE="eth0.1"
BOOTPROTO=static
HWADDR=".........."
IPADDR=193.206.210.X
NETMASK=255.255.255.0
ONBOOT="yes"
TYPE="Ethernet"

supponiamo che poi esista la VLAN 19 che sia la rete dedicata alle virtuali di openstack creare quindi il file /etc/sysconfig/network-scripts/ifcfg-eth0.19

DEVICE="eth0.19"
BOOTPROTO=static
HWADDR=".........."
IPADDR=192.168.252.X
NETMASK=255.255.255.0
ONBOOT="yes"
TYPE="Ethernet"
VLAN=yes

Poi in teoria Packstack dovrebbe capire che la prima e' interfaccia pubblica mentre la seconda quella privata su cui poi crea le virtuali e fa tirare il dhcp.

CLOUD-AREA PRODUCTION Infrastructure settings

  • DNS private: 192.168.60.254
  • settings cluster MySQL:
  mysql-cluster-01.cloud.pd.infn.it (192.168.60.11)
  mysql-cluster-02.cloud.pd.infn.it (192.168.60.12)
  mysql-cluster-03.cloud.pd.infn.it (192.168.60.13)
  ha-proxy-01.cloud.pd.infn.it (192.168.60.21)
  ha-proxy-02.cloud.pd.infn.it (192.168.60.22)
  ha-proxy-03.cloud.pd.infn.it (192.168.60.23)
  • When connecting to MySQL, should be used the IP: 192.168.60.10 (mysql-cluster.cloud.pd.infn.it):
  mysql -u <user> -h 192.168.60.10 -P4306 <DB_NAME> -e "<SQL_QUERY>" (for failover mode)
  mysql -u <user> -h 192.168.60.10 -P3306 <DB_NAME> -e "<SQL_QUERY>" (for roundrobin mode)
  • Using failover mode the connections are allways send to the first macchine of the cluster MySQL (mysql-cluster-01). If this fails, HAProxy ises the other 2 as backup. Using roundrobin mode, HAProxy sends the connections to all 3 macchines by rotation .
progetti/cloud-areapd/best_practices/one_interface_2ip.txt · Last modified: 2014/01/24 22:16 by aiftim@infn.it

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki