{
    "content": [
        {
            "type": "text",
            "text": "# ip-address (man)\n\n## NAME\n\nip-address - protocol address management\n\n## SYNOPSIS\n\nip [ OPTIONS ] address  { COMMAND | help }\nip address { add | change | replace } IFADDR dev IFNAME [ LIFETIME ] [ CONFFLAG-LIST ]\nip address del IFADDR dev IFNAME [ mngtmpaddr ]\nip address { save | flush } [ dev IFNAME ] [ scope SCOPE-ID ] [ metric METRIC ] [ to PREFIX ]\n[ FLAG-LIST ] [ label PATTERN ] [ up ]\nip address [ show [ dev IFNAME ] [ scope SCOPE-ID ] [ to PREFIX ] [ FLAG-LIST ] [ label PAT‐\nTERN ] [ master DEVICE ] [ type TYPE ] [ vrf NAME ] [ up ] ]\nip address { showdump | restore }\nIFADDR := PREFIX | ADDR peer PREFIX [ broadcast ADDR ] [ anycast ADDR ] [ label LABEL ] [\nscope SCOPE-ID ]\nSCOPE-ID := [ host | link | global | NUMBER ]\nFLAG-LIST := [ FLAG-LIST ] FLAG\nFLAG := [ [-]permanent | [-]dynamic | [-]secondary | [-]primary | [-]tentative | [-]depre‐‐\ncated | [-]dadfailed | [-]temporary | CONFFLAG-LIST ]\nCONFFLAG-LIST := [ CONFFLAG-LIST ] CONFFLAG\nCONFFLAG := [ home | mngtmpaddr | nodad | optimstic | noprefixroute | autojoin ]\nLIFETIME := [ validlft LFT ] [ preferredlft LFT ]\nLFT := [ forever | SECONDS ]\nTYPE := [ bridge | bridgeslave | bond | bondslave | can | dummy | hsr | ifb | ipoib |\nmacvlan | macvtap | vcan | veth | vlan | vxlan | ip6tnl | ipip | sit | gre | gretap |\nerspan | ip6gre | ip6gretap | ip6erspan | vti | vrf | nlmon | ipvlan | lowpan | gen‐‐\neve | macsec ]\n\n## DESCRIPTION\n\nThe address is a protocol (IPv4 or IPv6) address attached to a network device. Each device\nmust have at least one address to use the corresponding protocol. It is possible to have sev‐\neral different addresses attached to one device. These addresses are not discriminated, so\nthat the term alias is not quite appropriate for them and we do not use it in this document.\n\n## TLDR\n\n> IP Address management subcommand.\n\n- List network interfaces and their associated IP addresses:\n  `ip {{a|address}}`\n- Filter to show only active network interfaces:\n  `ip {{a|address}} {{s|show}} up`\n- Display information about a specific network interface:\n  `ip {{a|address}} {{s|show}} {{ethX}}`\n- Add an IP address to a network interface:\n  `sudo ip {{a|address}} {{a|add}} {{ip_address}} dev {{ethX}}`\n- Remove an IP address from a network interface:\n  `sudo ip {{a|address}} {{d|delete}} {{ip_address}} dev {{ethX}}`\n- Delete all IP addresses in a given scope from a network interface:\n  `sudo ip {{a|address}} {{f|flush}} {{ethX}} scope {{global|host|link}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (17 subsections)\n- **EXAMPLES**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "ip-address",
        "section": "",
        "mode": "man",
        "summary": "ip-address - protocol address management",
        "synopsis": "ip [ OPTIONS ] address  { COMMAND | help }\nip address { add | change | replace } IFADDR dev IFNAME [ LIFETIME ] [ CONFFLAG-LIST ]\nip address del IFADDR dev IFNAME [ mngtmpaddr ]\nip address { save | flush } [ dev IFNAME ] [ scope SCOPE-ID ] [ metric METRIC ] [ to PREFIX ]\n[ FLAG-LIST ] [ label PATTERN ] [ up ]\nip address [ show [ dev IFNAME ] [ scope SCOPE-ID ] [ to PREFIX ] [ FLAG-LIST ] [ label PAT‐\nTERN ] [ master DEVICE ] [ type TYPE ] [ vrf NAME ] [ up ] ]\nip address { showdump | restore }\nIFADDR := PREFIX | ADDR peer PREFIX [ broadcast ADDR ] [ anycast ADDR ] [ label LABEL ] [\nscope SCOPE-ID ]\nSCOPE-ID := [ host | link | global | NUMBER ]\nFLAG-LIST := [ FLAG-LIST ] FLAG\nFLAG := [ [-]permanent | [-]dynamic | [-]secondary | [-]primary | [-]tentative | [-]depre‐‐\ncated | [-]dadfailed | [-]temporary | CONFFLAG-LIST ]\nCONFFLAG-LIST := [ CONFFLAG-LIST ] CONFFLAG\nCONFFLAG := [ home | mngtmpaddr | nodad | optimstic | noprefixroute | autojoin ]\nLIFETIME := [ validlft LFT ] [ preferredlft LFT ]\nLFT := [ forever | SECONDS ]\nTYPE := [ bridge | bridgeslave | bond | bondslave | can | dummy | hsr | ifb | ipoib |\nmacvlan | macvtap | vcan | veth | vlan | vxlan | ip6tnl | ipip | sit | gre | gretap |\nerspan | ip6gre | ip6gretap | ip6erspan | vti | vrf | nlmon | ipvlan | lowpan | gen‐‐\neve | macsec ]",
        "tldr_summary": "IP Address management subcommand.",
        "tldr_examples": [
            {
                "description": "List network interfaces and their associated IP addresses",
                "command": "ip {{a|address}}"
            },
            {
                "description": "Filter to show only active network interfaces",
                "command": "ip {{a|address}} {{s|show}} up"
            },
            {
                "description": "Display information about a specific network interface",
                "command": "ip {{a|address}} {{s|show}} {{ethX}}"
            },
            {
                "description": "Add an IP address to a network interface",
                "command": "sudo ip {{a|address}} {{a|add}} {{ip_address}} dev {{ethX}}"
            },
            {
                "description": "Remove an IP address from a network interface",
                "command": "sudo ip {{a|address}} {{d|delete}} {{ip_address}} dev {{ethX}}"
            },
            {
                "description": "Delete all IP addresses in a given scope from a network interface",
                "command": "sudo ip {{a|address}} {{f|flush}} {{ethX}} scope {{global|host|link}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "(IPv6 only) only list addresses which are not in the process of duplicate address de‐ tection currently."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "(IPv6 only) only list addresses not being deprecated."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "(IPv6 only) only list addresses which have not failed duplicate address detection. temporary or secondary List temporary IPv6 or secondary IPv4 addresses only. The Linux kernel shares a single bit for those, so they are actually aliases for each other although the meaning dif‐ fers depending on address family."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "These flags are aliases for primary."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "This is an alias for temporary or secondary."
            }
        ],
        "examples": [
            "ip address show",
            "Shows IPv4 and IPv6 addresses assigned to all network interfaces. The 'show' subcommand",
            "can be omitted.",
            "ip address show up",
            "Same as above except that only addresses assigned to active network interfaces are shown.",
            "ip address show dev eth0",
            "Shows IPv4 and IPv6 addresses assigned to network interface eth0.",
            "ip address add 2001:0db8:85a3::0370:7334/64 dev eth1",
            "Adds an IPv6 address to network interface eth1.",
            "ip address delete 2001:0db8:85a3::0370:7334/64 dev eth1",
            "Delete the IPv6 address added above.",
            "ip address flush dev eth4 scope global",
            "Removes all global IPv4 and IPv6 addresses from device eth4. Without 'scope global' it",
            "would remove all addresses including IPv6 link-local ones."
        ],
        "see_also": [
            {
                "name": "ip",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/ip/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 39,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": [
                    {
                        "name": "ip address add - add new protocol address.",
                        "lines": 65
                    },
                    {
                        "name": "mngtmpaddr",
                        "lines": 12
                    },
                    {
                        "name": "optimistic",
                        "lines": 4
                    },
                    {
                        "name": "noprefixroute",
                        "lines": 6
                    },
                    {
                        "name": "autojoin",
                        "lines": 13
                    },
                    {
                        "name": "ip address delete - delete protocol address",
                        "lines": 4
                    },
                    {
                        "name": "ip address show - look at protocol addresses",
                        "lines": 43
                    },
                    {
                        "name": "tentative",
                        "lines": 3
                    },
                    {
                        "name": "-tentative",
                        "lines": 4
                    },
                    {
                        "name": "deprecated",
                        "lines": 3
                    },
                    {
                        "name": "-deprecated",
                        "lines": 3
                    },
                    {
                        "name": "dadfailed",
                        "lines": 3
                    },
                    {
                        "name": "-dadfailed",
                        "lines": 9
                    },
                    {
                        "name": "-temporary -secondary",
                        "lines": 3
                    },
                    {
                        "name": "primary",
                        "lines": 4
                    },
                    {
                        "name": "-primary",
                        "lines": 3
                    },
                    {
                        "name": "ip address flush - flush protocol addresses",
                        "lines": 17
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ip-address - protocol address management\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "ip [ OPTIONS ] address  { COMMAND | help }\n\n\nip address { add | change | replace } IFADDR dev IFNAME [ LIFETIME ] [ CONFFLAG-LIST ]\n\nip address del IFADDR dev IFNAME [ mngtmpaddr ]\n\nip address { save | flush } [ dev IFNAME ] [ scope SCOPE-ID ] [ metric METRIC ] [ to PREFIX ]\n[ FLAG-LIST ] [ label PATTERN ] [ up ]\n\nip address [ show [ dev IFNAME ] [ scope SCOPE-ID ] [ to PREFIX ] [ FLAG-LIST ] [ label PAT‐\nTERN ] [ master DEVICE ] [ type TYPE ] [ vrf NAME ] [ up ] ]\n\nip address { showdump | restore }\n\nIFADDR := PREFIX | ADDR peer PREFIX [ broadcast ADDR ] [ anycast ADDR ] [ label LABEL ] [\nscope SCOPE-ID ]\n\nSCOPE-ID := [ host | link | global | NUMBER ]\n\nFLAG-LIST := [ FLAG-LIST ] FLAG\n\nFLAG := [ [-]permanent | [-]dynamic | [-]secondary | [-]primary | [-]tentative | [-]depre‐‐\ncated | [-]dadfailed | [-]temporary | CONFFLAG-LIST ]\n\nCONFFLAG-LIST := [ CONFFLAG-LIST ] CONFFLAG\n\nCONFFLAG := [ home | mngtmpaddr | nodad | optimstic | noprefixroute | autojoin ]\n\nLIFETIME := [ validlft LFT ] [ preferredlft LFT ]\n\nLFT := [ forever | SECONDS ]\n\nTYPE := [ bridge | bridgeslave | bond | bondslave | can | dummy | hsr | ifb | ipoib |\nmacvlan | macvtap | vcan | veth | vlan | vxlan | ip6tnl | ipip | sit | gre | gretap |\nerspan | ip6gre | ip6gretap | ip6erspan | vti | vrf | nlmon | ipvlan | lowpan | gen‐‐\neve | macsec ]\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The address is a protocol (IPv4 or IPv6) address attached to a network device. Each device\nmust have at least one address to use the corresponding protocol. It is possible to have sev‐\neral different addresses attached to one device. These addresses are not discriminated, so\nthat the term alias is not quite appropriate for them and we do not use it in this document.\n\nThe ip address command displays addresses and their properties, adds new addresses and\ndeletes old ones.\n\n",
                "subsections": [
                    {
                        "name": "ip address add - add new protocol address.",
                        "content": "dev IFNAME\nthe name of the device to add the address to.\n\n\nlocal ADDRESS (default)\nthe address of the interface. The format of the address depends on the protocol. It is\na dotted quad for IP and a sequence of hexadecimal halfwords separated by colons for\nIPv6. The ADDRESS may be followed by a slash and a decimal number which encodes the\nnetwork prefix length.\n\n\npeer ADDRESS\nthe address of the remote endpoint for pointopoint interfaces.  Again, the ADDRESS may\nbe followed by a slash and a decimal number, encoding the network prefix length. If a\npeer address is specified, the local address cannot have a prefix length. The network\nprefix is associated with the peer rather than with the local address.\n\n\nbroadcast ADDRESS\nthe broadcast address on the interface.\n\nIt is possible to use the special symbols '+' and '-' instead of the broadcast ad‐\ndress. In this case, the broadcast address is derived by setting/resetting the host\nbits of the interface prefix.\n\n\nlabel LABEL\nEach address may be tagged with a label string.  In order to preserve compatibility\nwith Linux-2.0 net aliases, this string must coincide with the name of the device or\nmust be prefixed with the device name followed by colon.  The maximum allowed total\nlength of label is 15 characters.\n\n\nscope SCOPEVALUE\nthe scope of the area where this address is valid.  The available scopes are listed in\nfile /etc/iproute2/rtscopes.  Predefined scope values are:\n\nglobal - the address is globally valid.\n\nsite - (IPv6 only, deprecated) the address is site local, i.e. it is valid in‐\nside this site.\n\nlink - the address is link local, i.e. it is valid only on this device.\n\nhost - the address is valid only inside this host.\n\n\nmetric NUMBER\npriority of prefix route associated with address.\n\n\nvalidlft LFT\nthe valid lifetime of this address; see section 5.5.4 of RFC 4862. When it expires,\nthe address is removed by the kernel.  Defaults to forever.\n\n\npreferredlft LFT\nthe preferred lifetime of this address; see section 5.5.4 of RFC 4862. When it ex‐\npires, the address is no longer used for new outgoing connections. Defaults to for‐‐\never.\n\n\nhome   (IPv6 only) designates this address the \"home address\" as defined in RFC 6275.\n\n"
                    },
                    {
                        "name": "mngtmpaddr",
                        "content": "(IPv6 only) make the kernel manage temporary addresses created from this one as tem‐\nplate on behalf of Privacy Extensions (RFC3041). For this to become active, the\nusetempaddr sysctl setting has to be set to a value greater than zero.  The given ad‐\ndress needs to have a prefix length of 64. This flag allows to use privacy extensions\nin a manually configured network, just like if stateless auto-configuration was ac‐\ntive.\n\n\nnodad  (IPv6 only) do not perform Duplicate Address Detection (RFC 4862) when adding this ad‐\ndress.\n\n"
                    },
                    {
                        "name": "optimistic",
                        "content": "(IPv6 only) When performing Duplicate Address Detection, use the RFC 4429 optimistic\nvariant.\n\n"
                    },
                    {
                        "name": "noprefixroute",
                        "content": "Do not automatically create a route for the network prefix of the added address, and\ndon't search for one to delete when removing the address. Changing an address to add\nthis flag will remove the automatically added prefix route, changing it to remove this\nflag will create the prefix route automatically.\n\n"
                    },
                    {
                        "name": "autojoin",
                        "content": "Joining multicast groups on Ethernet level via ip maddr command does not work if con‐\nnected to an Ethernet switch that does IGMP snooping since the switch would not repli‐\ncate multicast packets on ports that did not have IGMP reports for the multicast ad‐\ndresses.\n\nLinux VXLAN interfaces created via ip link add vxlan have the group option that en‐\nables them to do the required join.\n\nUsing the autojoin flag when adding a multicast address enables similar functionality\nfor Openvswitch VXLAN interfaces as well as other tunneling mechanisms that need to\nreceive multicast traffic.\n\n"
                    },
                    {
                        "name": "ip address delete - delete protocol address",
                        "content": "Arguments: coincide with the arguments of ip addr add.  The device name is a required argu‐\nment. The rest are optional.  If no arguments are given, the first address is deleted.\n\n"
                    },
                    {
                        "name": "ip address show - look at protocol addresses",
                        "content": "dev IFNAME (default)\nname of device.\n\n\nscope SCOPEVAL\nonly list addresses with this scope.\n\n\nto PREFIX\nonly list addresses matching this prefix.\n\n\nlabel PATTERN\nonly list addresses with labels matching the PATTERN.  PATTERN is a usual shell style\npattern.\n\n\nmaster DEVICE\nonly list interfaces enslaved to this master device.\n\n\nvrf NAME\nonly list interfaces enslaved to this vrf.\n\n\ntype TYPE\nonly list interfaces of the given type.\n\nNote that the type name is not checked against the list of supported types - instead\nit is sent as-is to the kernel. Later it is used to filter the returned interface list\nby comparing it with the relevant attribute in case the kernel didn't filter already.\nTherefore any string is accepted, but may lead to empty output.\n\n\nup     only list running interfaces.\n\n\ndynamic and permanent\n(IPv6 only) only list addresses installed due to stateless address configuration or\nonly list permanent (not dynamic) addresses. These two flags are inverses of each\nother, so -dynamic is equal to permanent and -permanent is equal to dynamic.\n\n"
                    },
                    {
                        "name": "tentative",
                        "content": "(IPv6 only) only list addresses which have not yet passed duplicate address detection.\n\n"
                    },
                    {
                        "name": "-tentative",
                        "content": "(IPv6 only) only list addresses which are not in the process of duplicate address de‐\ntection currently.\n\n"
                    },
                    {
                        "name": "deprecated",
                        "content": "(IPv6 only) only list deprecated addresses.\n\n"
                    },
                    {
                        "name": "-deprecated",
                        "content": "(IPv6 only) only list addresses not being deprecated.\n\n"
                    },
                    {
                        "name": "dadfailed",
                        "content": "(IPv6 only) only list addresses which have failed duplicate address detection.\n\n"
                    },
                    {
                        "name": "-dadfailed",
                        "content": "(IPv6 only) only list addresses which have not failed duplicate address detection.\n\n\ntemporary or secondary\nList temporary IPv6 or secondary IPv4 addresses only. The Linux kernel shares a single\nbit for those, so they are actually aliases for each other although the meaning dif‐\nfers depending on address family.\n\n"
                    },
                    {
                        "name": "-temporary -secondary",
                        "content": "These flags are aliases for primary.\n\n"
                    },
                    {
                        "name": "primary",
                        "content": "List only primary addresses, in IPv6 exclude temporary ones. This flag is the inverse\nof temporary and secondary.\n\n"
                    },
                    {
                        "name": "-primary",
                        "content": "This is an alias for temporary or secondary.\n\n"
                    },
                    {
                        "name": "ip address flush - flush protocol addresses",
                        "content": "This command flushes the protocol addresses selected by some criteria.\n\n\nThis command has the same arguments as show except that type and master selectors are not\nsupported.  Another difference is that it does not run when no arguments are given.\n\n\nWarning: This command and other flush commands are unforgiving. They will cruelly purge all\nthe addresses.\n\n\nWith the -statistics option, the command becomes verbose. It prints out the number of deleted\naddresses and the number of rounds made to flush the address list.  If this option is given\ntwice, ip address flush also dumps all the deleted addresses in the format described in the\nprevious subsection.\n\n"
                    }
                ]
            },
            "EXAMPLES": {
                "content": "ip address show\nShows IPv4 and IPv6 addresses assigned to all network interfaces. The 'show' subcommand\ncan be omitted.\n\nip address show up\nSame as above except that only addresses assigned to active network interfaces are shown.\n\nip address show dev eth0\nShows IPv4 and IPv6 addresses assigned to network interface eth0.\n\nip address add 2001:0db8:85a3::0370:7334/64 dev eth1\nAdds an IPv6 address to network interface eth1.\n\nip address delete 2001:0db8:85a3::0370:7334/64 dev eth1\nDelete the IPv6 address added above.\n\nip address flush dev eth4 scope global\nRemoves all global IPv4 and IPv6 addresses from device eth4. Without 'scope global' it\nwould remove all addresses including IPv6 link-local ones.\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "ip(8)\n\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Original Manpage by Michail Litvak <mci@owl.openwall.com>\n\n\n\niproute2                                     20 Dec 2011                               IP-ADDRESS(8)",
                "subsections": []
            }
        }
    }
}