{
    "content": [
        {
            "type": "text",
            "text": "# veth (man)\n\n## NAME\n\nveth - Virtual Ethernet Device\n\n## DESCRIPTION\n\nThe 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\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "veth",
        "section": "",
        "mode": "man",
        "summary": "veth - Virtual Ethernet Device",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 36,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            }
        ],
        "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 device 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\nLinux man-pages 6.7                          2023-10-31                                      veth(4)",
                "subsections": []
            }
        }
    }
}