{
    "mode": "man",
    "parameter": "veth",
    "section": "4",
    "url": "https://www.chedong.com/phpMan.php/man/veth/4/json",
    "generated": "2026-05-30T07:08:15Z",
    "sections": {
        "NAME": {
            "content": "veth - Virtual Ethernet Device\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The veth devices are virtual Ethernet devices.  They can act as tunnels between network name‐\nspaces to create a bridge to a physical network device in another namespace, but can also  be\nused as standalone network devices.\n\nveth  devices  are  always  created in interconnected pairs.  A pair can be created using the\ncommand:\n\n# ip link add <p1-name> type veth peer name <p2-name>\n\nIn the above, p1-name and p2-name are the names assigned to the two connected end points.\n\nPackets transmitted on one device in the pair are immediately received on the  other  device.\nWhen either devices is down the link state of the pair is down.\n\nveth  device  pairs are useful for combining the network facilities of the kernel together in\ninteresting ways.  A particularly interesting use case is to place one end of a veth pair  in\none  network namespace and the other end in another network namespace, thus allowing communi‐\ncation between network namespaces.  To do this, one can provide the netns parameter when cre‐\nating the interfaces:\n\n# ip link add <p1-name> netns <p1-ns> type veth peer <p2-name> netns <p2-ns>\n\nor, for an existing veth pair, move one side to the other namespace:\n\n# ip link set <p2-name> netns <p2-ns>\n\nethtool(8) can be used to find the peer of a veth network interface, using commands something\nlike:\n\n# ip link add veA type veth peer name veB   # Create veth pair\n# ethtool -S veA         # Discover interface index of peer\nNIC statistics:\npeerifindex: 16\n# ip link | grep '^16:'   # Look up interface\n16: veB@veA: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc ...\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "clone(2), networknamespaces(7), ip(8), ip-link(8), ip-netns(8)\n",
            "subsections": []
        },
        "COLOPHON": {
            "content": "This page is part of release 5.10 of the Linux  man-pages  project.   A  description  of  the\nproject,  information about reporting bugs, and the latest version of this page, can be found\nat https://www.kernel.org/doc/man-pages/.\n\n\n\nLinux                                        2020-11-01                                      VETH(4)",
            "subsections": []
        }
    },
    "summary": "veth - Virtual Ethernet Device",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "clone",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/clone/2/json"
        },
        {
            "name": "networknamespaces",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/networknamespaces/7/json"
        },
        {
            "name": "ip",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/ip/8/json"
        },
        {
            "name": "ip-link",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/ip-link/8/json"
        },
        {
            "name": "ip-netns",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/ip-netns/8/json"
        }
    ]
}