Se for implementar os gateways com uma interface OAM, complete os seguintes passos.

  1. Adicione uma interface adicional à VM (ETH2).

    VMware: se for pretendido um VNIC dedicado para gestão/OAM, adicione outro vNIC do tipo vmxnet3. Tem de repetir o passo anterior, ou seja, clicar novamente em OK e depois em Editar definições (Edit Settings) para poder criar uma nota do endereço MAC vNIC.

    vcg-edit-settings-new-network

    KVM: se for pretendido um VNIC dedicado para gestão/OAM, certifique-se de que tem uma rede libvirt chamada oam-network. Em seguida, adicione as seguintes linhas à estrutura XML da VM:

    …..
    </controller>
    <interface type='network'>
      <source network='public_interface'/>
      <vlan><tag id='#public_vlan#'/></vlan>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x11' function='0x0'/>
    </interface>
    <interface type='network'>
      <source network='inside_interface'/>
      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x12' function='0x0'/>
    </interface>
    <interface type='network'> 
      <source network='oam_interface'/>
      <vlan><tag id='#oam_vlan#'/></vlan>
      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x13' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/3'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
  2. Configure o ficheiro network-config com a interface adicional.
    version: 2
    ethernets:
      eth0:
        addresses:
          - #_IPv4_Address_/mask#
      mac_address: #_mac_Address_#
        gateway4: #_IPv4_Gateway_#
        nameservers:
          addresses:
            - #_DNS_server_primary_#
            - #_DNS_server_secondary_#
          search: []
        routes:
          - to: 0.0.0.0/0
            via: #_IPv4_Gateway_#
            metric: 1
     
      eth1:
        addresses:
          - #_MGMT_IPv4_Address_/Mask#
        mac_address: #_MGMT_mac_Address_#
        nameservers:
          addresses:
            - #_DNS_server_primary_#
            - #_DNS_server_secondary_#
          search: []
        routes:
          - to: 0.0.0.0/0
            via: #_MGMT_IPv4_Gateway_#
           metric: 13
      
       eth2:
        addresses:
          - #_OAM_IPv4_Address_/Mask#
        nameservers:
          addresses:
            - #_DNS_server_primary_#
            - #_DNS_server_secondary_#
          search: []
        routes:
          - to: 10.0.0.0/8
            via: #_OAM_IPv4_Gateway_#
          - to: 192.168.0.0/16
            via: #_OAM_IPv4_Gateway_#