Iproute2

Iproute2 is a combined under one command collection of tools that are used to the IP network configuration (IPv4 and IPv6) to manipulate a Linux system.

The original author Alexey Kuznetsov (known for its QoS implementation in the Linux kernel ), the current maintainer is Stephen Hemminger. iproute2 uses netlink to communicate with the kernel or its network stack.

Iproute2 was developed as a replacement for the existing, in modern networks were often not usable "classical" network tools such as ifconfig, route, etc. It summarizes all of the configuration options that were previously done by these separate programs, the ip command together. The classic commands are replaced by iproute2 and on.

In addition, the package includes the command tc, which is used to monitor network traffic ( traffic control ).

Syntax

The individual parts of iproute2 be addressed in the following manner, the example here of address. The name can be shortened to the extent, as long as it is unique:

Ip addr [command ] [ arguments] To work with IPv6 calls to ip as follows:

Usage: ip addr { add | change | replace} ifaddr dev STRING [ LIFETIME ]                                                       [ CONFFLAG -LIST ]        ip addr del dev STRING ifaddr        ip addr { show | flush } [ dev STRING ] [ scope SCOPE - ID]                             [To PREFIX ] [ FLAG -LIST ] [label PATTERN] Ifaddr: = PREFIX | ADDR peer PREFIX           [Broadcast ADDR ] [ anycast ADDR ]           [Label STRING ] [ scope SCOPE - ID] SCOPE - ID: = [ host | link | global | NUMBER] FLAG -LIST: = [ FLAG -LIST ] FLAG FLAG: = [ permanent | dynamic | secondary | primary |            tentative | deprecated | dadfailed | temporary |            CONFFLAG -LIST ] CONFFLAG -LIST: = [ CONFFLAG -LIST ] CONFFLAG CONFFLAG: = [home | nodad ] LIFETIME: = [ valid_lft LFT ] [ preferred_lft LFT ] LFT: = forever | SECONDS As can be seen, the arguments are mostly couples as

Dev INTERFACE For example, all commands, see # Examples section.

Parts

Examples

Here are some examples for better understanding, which could occur in everyday use:

Assigning a fixed IP address and configure the routing table

Ip tunnel add mode sit remote sit0 192.0.2.32 local 10.10.4.2 ttl 255 ip link set up sit0 ip -6 route add :: / 0 dev sit0 Display the Routing and Neighbortabellen

Ip route show ip neigh show Forging the MAC address

  • Introduction to iproute2
416656
de