iproute2应用
linux目前都支持ip命令,与ifconfig类似,但ifconfig的软件net-tools早不更新了,ip功能更强大,推荐使用iproute2套件。

ip可以完美替换常用的网络命令,用法如下:
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
ip [ -force ] -batch filename
where OBJECT := { link | address | addrlabel | route | rule | neighbor | ntable |
tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm |
netns | l2tp | fou | tcp_metrics | token | netconf }
OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
-h[uman-readable] | -iec |
-f[amily] { inet | inet6 | ipx | dnet | mpls | bridge | link } |
-4 | -6 | -I | -D | -B | -0 |
-l[oops] { maximum-addr-flush-attempts } | -br[ief] |
-o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |
-rc[vbuf] [size] | -n[etns] name | -a[ll] |?-c[olor]}
常用命令如下:
ip link
ip addr show eth0
ip addr add 192.168.0.100/24 dev eth0
ip addr del 192.168.0.100/24 dev eth0
ip route show
ip route get 10.42.0.47 ;获取ip地址的路由包从哪里来
ip route add default via 192.168.0.100
ip neighbour ;显示ARP MAC地址
ip link set ppp0 down ;断开连接,相当于ifconfig ppp0 down
ip link set ppp0 up ;连接,相当于ifconfig ppp0 up
ip route help
注意IP地址要有一个后缀,比如/24。这种用法用于在无类域内路由选择(CIDR)中来显示所用的子网掩码。
参考:
https://linux.cn/article-3144-1.html
iproute2应用的更多相关文章
- Network - 对比net-tools与iproute2
net-tools VS iproute2 net-tools与iproute2大比较
- [转] Linux TCP/IP网络小课堂:net-tools与iproute2大比较
PS:netstat选项是-planet,方便记忆 http://os.51cto.com/art/201409/450886.htm 如今许多系统管理员仍结合使用ifconfig.route.arp ...
- Linux网络管理常用命令:net-tools VS iproute2
Exported from workflowy! net-tools ifconfigifconfig命令:用于接口及地址查看和管理 route netstat arp iproute2 ip lin ...
- net-tools与iproute2
net-tools与iproute2 我们知道redhat系列发行版7x版本中最小化安装是没有net-tools工具包的,默认使用iproute2工具包,最直观的感受是ifconfig命令被ip命令所 ...
- iproute2学习笔记
一.替代arp, ifconfig, route等命令 显示网卡和IP地址 root@openstack:~# ip link list 1: lo: <LOOPBACK,UP,LOWER_UP ...
- iproute2 与 net-tools
https://linux.cn/article-4326-1.html https://blog.csdn.net/astrotycoon/article/details/52317288 如今很多 ...
- iproute2 对决 net-tools
如今很多系统管理员依然通过组合使用诸如ifconfig.route.arp和netstat等命令行工具(统称为net-tools)来配置网络功能,解决网络故障.net-tools起源于BSD的TCP/ ...
- linux网络工具iproute2的使用简介
一.写本文的目的 本文完全是自己在学习iproute2的过程中搜集的大杂烩,记录在这里,方便以后自己查询学习,图片都是来自网络,在此表示感谢! 二.简单了解iproute2工具套装 iproute2是 ...
- SS iproute2,nslookup,dig
从某种意义上说,iproute工具集几乎可以替代掉net-tools工具集,具体的替代方案是这样的:用途 net-tool(被淘汰) iproute2地址和链路配置 ifconfig ip ...
随机推荐
- odoo 模型继承
在odoo中有两种模型的继承机制(传统方式和委托继承方式) 重点:在__manifest__.py中找到depends,加上要继承的模块 'depends': ['account'] 注意继承的模型所 ...
- mvc返回多个结果集,返回多个视图
System.Web.Mvc.ViewPage<dynamic> public ActionResult Index() { IDictionary< ...
- supervisor 管理 celery
安装supervisor [root@ipv6-api ~]# pip3 install supervisor 生成配置文件 [root@ipv6-api ~]#echo_supervisord_c ...
- Gephi可视化(二)
继在园子里写的<Gephi可视化(一)——使用Gephi Toolkit创建Gephi应用>介绍了如何使用Gephi Toolkit工具集进行可视化编程后,本篇对Gephi Toolkit ...
- Python学习 ——正则表达式
正则表达式是一个特殊的字符序列,它能帮助你方便的检查一个字符串是否与某种模式匹配. re 模块使 Python 语言拥有全部的正则表达式功能. compile 函数根据一个模式字符串和可选的标志参数生 ...
- BZOJ2759一个动态树好题 LCT
题如其名啊 昨天晚上写了一发忘保存 只好今天又码一遍了 将题目中怕$p[i]$看做$i$的$father$ 可以发现每个联通块都是一个基环树 我们对每个基环删掉环上一条边 就可以得到一个森林了 可以用 ...
- memcached 数据库
安装 [root@node2 ~]# yum install memcached 启动 [root@node2 ~]# systemctl start memcached 连接 [root@node2 ...
- SSH使用自定义私钥进行登录
ssh -i /root/.ssh/id_rsa root@192.168.1.2 -i指定了私钥文件的路径
- 增益 Gain 分贝 dB
https://zh.wikipedia.org/wiki/%E5%88%86%E8%B2%9D 分贝(decibel)是量度两个相同单位之数量比例的单位,主要用于度量声音强度,常用dB表示. “分” ...
- 外卖ERP管理系统(二)
京门时代旗下外卖ERP管理系统是一款专注外卖行业的解决方案系统! 系统介绍: 1.外卖erp系统是一款集订单分发.一键派送.实时大屏监控.店铺进销存.仓储管理及数据分析为一体的智能化外卖管理系统.已服 ...