Net-tools to iproute2

From Leo's Notes
Revision as of 18:48, 4 March 2015 by 136.159.16.240 (talk) (Created page with "The following maps the deprecated network tools (ifconfig, route, netstat, etc) to the new ip command. {| class="wikitable" |- ! Old ! New |- | ifconfig | ip addr |- | ifconf...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 4 March 2015, at 18:48.

The following maps the deprecated network tools (ifconfig, route, netstat, etc) to the new ip command.

Old New
ifconfig ip addr
ifconfig $interface [up|down] ip link set dev $interface [up|down]
ifconfig $interface $ip netmask $netmask ip addr add $ip/$mask dev $interface
route add default gw $gateway ip route add default via $gateway
route add -net $net netmask $netmask gw $gateway ip route add $net/$mask via $gateway
route -n ip route

Like networking commands on switches and routers, you do not need to write the full command name so long as the beginning of the command is uniquely identifiable. For example, ip addr can be simplified to ip a and ip route can be simplified to ip r.