VM "Tap" Interface

Discussion in 'Proxmox VE: Networking and Firewall' started by masterdaweb, Feb 21, 2018.

  1. masterdaweb

    masterdaweb Member

    Joined:
    Apr 17, 2017
    Messages:
    76
    Likes Received:
    3
    Hello,

    When I used "ifconfig -a", I realized that the MAC Address for "TapXXX" interface is different from the MAC Address configured in Proxmox GUI:

    upload_2018-2-20_21-21-0.png

    upload_2018-2-20_21-22-3.png


    Shouldn't it be the same ?
     
  2. fabian

    fabian Proxmox Staff Member
    Staff Member

    Joined:
    Jan 7, 2016
    Messages:
    3,076
    Likes Received:
    468
    no, the network device inside the container gets the configured MAC.
     
  3. lethargos

    lethargos Member
    Proxmox VE Subscriber

    Joined:
    Jun 10, 2017
    Messages:
    71
    Likes Received:
    0
    Hi, could you possibly expand on this? Why are they not the same? At first sight, I'd say they should be one and the same and the host should have a switch-type of view of the network interfaces of the vms. Why is this happening? I've been trying to understand this for some time, but I still haven't been able to find an answer.
     
  4. fabian

    fabian Proxmox Staff Member
    Staff Member

    Joined:
    Jan 7, 2016
    Messages:
    3,076
    Likes Received:
    468
    the container runs in a different network namespace, so we use a veth pair to bridge that "gap". the configured MAC is the one we want the container to see (e.g., for static DHCP, ...), so we set it on the veth peer inside the container network namespace.
     
    lethargos likes this.
  5. lethargos

    lethargos Member
    Proxmox VE Subscriber

    Joined:
    Jun 10, 2017
    Messages:
    71
    Likes Received:
    0
    And how is the mac address that the host sees being used?
     
  6. wbumiller

    wbumiller Proxmox Staff Member
    Staff Member

    Joined:
    Jun 23, 2015
    Messages:
    600
    Likes Received:
    72
    It's not. It would only be used if you remove the veth (or tap for VMs) device from the bridge, configure an IP address on that device directly and used that to communicate with the guest.

    veth or tap devices behave like virtual ethernet cards. What you see on the host is your host side of it. The guest sees the other side. Every such card has a MAC addres. Since they're usually on a bridge, the mac address is usually unused.
     
    lethargos likes this.
  7. lethargos

    lethargos Member
    Proxmox VE Subscriber

    Joined:
    Jun 10, 2017
    Messages:
    71
    Likes Received:
    0
    Danke sehr!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice