• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Linux Network Fault Tolerance
 

Linux Network Fault Tolerance

on

  • 3,501 views

Aula sobre Tolerância a falha nas interfaces de rede de um server Linux. Configuração de Bonding

Aula sobre Tolerância a falha nas interfaces de rede de um server Linux. Configuração de Bonding

Statistics

Views

Total Views
3,501
Views on SlideShare
2,706
Embed Views
795

Actions

Likes
1
Downloads
58
Comments
0

3 Embeds 795

http://www.madeira.eng.br 787
http://www.slideshare.net 7
http://madeira.eng.br 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Linux Network Fault Tolerance Linux Network Fault Tolerance Presentation Transcript

    • Frederico Madeira LPIC­1, LPIC­2, CCNA fred@madeira.eng.br www.madeira.eng.br Sistemas Distribuídos Linux Network Fault Tolerance
    • Bonding • O termo bonding significa agregação de portas • Transforma múltiplas interfaces de rede em uma só • Termos: ✔ Trunking na Sun ✔ Etherchannel na Cisco ✔ Bonding no Linux
    • Tipos • Modo 0 (balance-rr) ✔ Utiliza a política de round robin, transmitindo sequencialmente da primeira interface até a última. ✔ Garante tolerância a falhas e balanceamento de carga
    • Tipos • Modo 1 (active-backup) ✔ Transmite dados apenas em uma das interfaces slaves. ✔ A outra placa fica ativa, apenas se a primeira vier a falhar ✔ Garante tolerância a falhas
    • Tipos • Modo 4 (802.3ad) ✔ Permite agregar múltiplas interfaces em uma única. ✔ Implementa o padrão IEEE 802.3ad Dynamic link aggregation ✔ Garante tolerância a falhas
    • Configurando 1. Criar o arquivo da interface bond0 Entrar na pasta: /etc/sysconfig/network-scripts/ e criar o arquivo ifcfg-bond0 Este arquivo deverá ter o seguinte conteúdo: DEVICE=bond0 IPADDR=192.168.0.1 NETMASK=255.255.255.0 NETWORK=192.168.0.0 BROADCAST=192.168.0.255 ONBOOT=yes BOOTPROTO=none USERCTL=no
    • Configurando as Interfaces Slaves 2. Editar os arquivos ifcfg-eth<N> Entrar na pasta: /etc/sysconfig/network-scripts/ e editar os arquivos ifcfg-eth<N> das interfaces que farão parte do bond0. No nosso caso a eth0 e eth1. Ifcfg-eth0 Ifcfg-eth1 DEVICE=eth0 DEVICE=eth1 USERCTL=no USERCTL=no ONBOOT=yes ONBOOT=yes MASTER=bond0 MASTER=bond0 SLAVE=yes SLAVE=yes BOOTPROTO=none BOOTPROTO=none
    • Configurando o kernel para carregar a interface bond0 3. Criar o arquivo bonding.conf na pasta /etc/modprobe.d Adicionaro seguinte conteúdo: alias bond0 bonding options bond0 miimon=80 mode=1 Onde o mode=1 define o modo de operação, que no nosso caso é o active-backup Miimon=80 tempo em milisegundos em que o link é verificado.
    • Iniciando a interface 4. Reiniciando o serviço de rede: /etc/init.d/network restart [root@localhost ~]# ifconfig bond0 Link encap:Ethernet Endereço de HW 08:00:27:EB:AD:CD inet end.: 192.168.15.34 Bcast:192.168.15.255 Masc:255.255.255.0 UP BROADCASTRUNNING MASTER MULTICAST MTU:1500 Métrica:1 RX bytes:523226 (510.9 KiB) TX bytes:515258 (503.1 KiB) eth0 Link encap:Ethernet Endereço de HW 08:00:27:EB:AD:CD UP BROADCASTRUNNING SLAVE MULTICAST MTU:1500 Métrica:1 RX bytes:268194 (261.9 KiB) TX bytes:264991 (258.7 KiB) IRQ:10 Endereço de E/S:0xd020 eth1 Link encap:Ethernet Endereço de HW 08:00:27:EB:AD:CD UP BROADCASTRUNNING SLAVE MULTICAST MTU:1500 Métrica:1 RX bytes:255494 (249.5 KiB) TX bytes:251495 (245.6 KiB) IRQ:9 Endereço de E/S:0xd240
    • Verificando o status das interfaces [root@localhost modprobe.d]# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008) Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: eth0 MII Status: up MII Polling Interval (ms): 80 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth0 MII Status: up Link Failure Count: 0 Permanent HW addr: 08:00:27:eb:ad:cd Slave Interface: eth1 MII Status: up Link Failure Count: 0 Permanent HW addr: 08:00:27:3d:4f:cf
    • Gerando uma falha [root@localhost modprobe.d]# ifdown eth0 [root@localhost modprobe.d]# tail -f /var/log/messages Jan 22 21:17:14 localhost kernel: bonding: bond0: Removing slave eth0 Jan 22 21:17:14 localhost kernel: bonding: bond0: releasing active interface eth0 Jan 22 21:17:14 localhost kernel: bonding: bond0: making interface eth1 the new active one. [root@localhost modprobe.d]# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008) Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: eth1 MII Status: up MII Polling Interval (ms): 80 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth1 MII Status: up Link Failure Count: 0 Permanent HW addr: 08:00:27:3d:4f:cf
    • Frederico Madeira LPIC­1, LPIC­2, CCNA fred@madeira.eng.br www.madeira.eng.br Sistemas Distribuídos Network Fault Tolerance - Bonding