iproute2 vs net-tools

39 篇文章 0 订阅

 iproute2 vs net-toolsicon-default.png?t=M4ADhttps://linoxide.com/iproute2-vs-net-tools/

iproute2 package contains utilities for controlling and monitoring networking, IP address, and routing. It is a modern replacement for net-tools.

Iproute2 is an open-source project mainly focussed on network components of the Linux kernel. The commonly used utilities inside iproute2 are ip, ss, and bridge.

6M

56

Activision Blizzard Shareholders Vote in Favor of Microsoft’s $68.7 Billion Takeover Bid

The below table shows the iproute2 and deprecated net-tools Linux commands.

iproute2net-toolsNote
ip link showifconfig -aDisplay all interfaces
ip link set down/up eth0ifconfig eth0 up/downEnable (UP)/Disable (DOWN) Network Interface
ip addr add 192.168.0.10/24 dev eth0ifconfig eth0 192.168.0.10/24Assign an IPv4 address to Network Interface
ip addr del 192.168.0.10/24 dev eth0ifconfig eth0 0Delete an IPv4 address from Network Interface
ip addr show dev eth0ifconfig eth0Display IPv4 address of a Network Interface
ip -6 addr add fe80::f0b7:57ff:fe2f:5f0d/64 dev eth1ifconfig eth1 inet6 add fe80::f0b7:57ff:fe2f:5f0d/64Assign an IPv6 address to a Network Interface
ip -6 addr show dev eth0ifconfig eth0Display IPv6 address of a Network Interface
ip link set dev eth0 address 02:42:20:d2:28:36ifconfig eth0 hw ether 02:42:20:d2:28:36Change the MAC Address of a Network Interface
ip route showroute -nShow IP Routing Table
ip route add default via 192.168.0.1 dev eth0route add default gw 192.168.0.1 eth0Add a Default Route
ip route replace default via 192.168.0.1 dev enp0s3route del default gw 192.168.0.1 enp0s3Delete a Default Route
ip route add 10.24.32.0/24 via 192.168.0.1 dev enp0s3route add -net 10.24.32.0/24 gw 192.168.0.1 dev enp0s3Add a Static Route
ip route del 192.168.10.0/24route del -net 192.168.10.0/24Delete a Static Route
ssnetstatDisplay socket - listening tcp/udp
arp -an ip neighDisplay ARP Table
bridgebrctlManage bridge addresses and devices

iproute2 cheat sheet

Many Linux users still prefer to use legacy tools such as netstat, ifconfig, route etc. Iproute2 package tools are pretty faster and retrieve more information for example ss command is faster than netstat.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值