ip 命令 和ifconfig 命令 删除IP
来源:互联网 发布:数据部门团建出行标语 编辑:程序博客网 时间:2024/06/07 00:08
使用ifconfig命令添加一个VIP后,如果需要将这个VIP删除,可以使用ifconfig VIP down命令。
但是,如果操作顺序不当,VIP会仍然留在系统缓存中,这时,使用ifconfig是看不到这个VIP的,但是,使用IP命令能够看到。
查看ip
ip -o -f inet addr show
删除ip
ip -f inet addr delete 10.0.64.102/32 dev tunl0
ip 与ifconfig 具体比较如下:
1 ifconfig tunl0 10.0.64.102 netmask 255.255.255.255 up
2 此时会有再运行 ifconfig 会看到如下
tunl0 Link encap:IPIP Tunnel HWaddr
inet addr:10.0.64.102 Mask:255.255.255.255
UP RUNNING NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
3 ifconfig tunl0 down
4 此时会有再运行 ifconfig 会看到如下
没有tunl0设备了
5 但是使用ip -o -f inet addr show
tunl0 inet 10.0.64.102/32 scope global tunl0
依然还有这个ip,说明在tunl0配置ip的时候使用ifconfig tunl0 down 是不能删除这个ip的,但是使用ifconfig确查看不到
--------------------如下步骤----------------------------------------
1 ifconfig tunl0 up
2 ifconfig tunl0:0 10.0.64.102 netmask 255.255.255.255 up
3 ifconfig tunl0:0 down
4 ifconfig tunl0 down
此时使用ip -o -f inet addr show 或者 ifconfig 都看不到ip 10.0.64.102
----------------------如下步骤---------------------------------------------------
1 ifconfig tunl0 up
2 ifconfig tunl0:0 10.0.64.102 netmask 255.255.255.255 up
3 ifconfig tunl0:1 10.0.64.103 netmask 255.255.255.255 up
4 ifconfig tunl0 down
此时使用ifconfig看不到任何ip
但是使用ip -o -f inet addr show,如下:
5: tunl0 inet 10.0.64.102/32 scope global tunl0:0
5: tunl0 inet 10.0.64.103/32 scope global tunl0:1
说明ip并没有删除
----------------------如下步骤---------------------------------------------------
1 ifconfig tunl0 up
2 ifconfig tunl0:0 10.0.64.102 netmask 255.255.255.255 up
3 ifconfig tunl0:1 10.0.64.103 netmask 255.255.255.255 up
4 ifconfig tunl0:0 down
5 ifconfig tunl0:1 down
6 ifconfig tunl0 down
此时使用ip -o -f inet addr show或者ifconfig看不到任何ip
说明 ip被删除了
- ip 命令 和ifconfig 命令 删除IP
- linux ip命令和ifconfig命令
- Linux ip命令、ifconfig命令
- Linux命令:ifconfig对应ip
- linux查看ip命令--ifconfig
- (转载)ip、ifconfig命令与IP
- linux ip命令代替ifconfig命令
- ifconfig命令查看ip及命令详解
- linux网络配置命令之ifconfig、ip和route
- linux网络配置命令之ifconfig、ip和route
- linux网络配置命令之ifconfig、ip和route
- liunux中的 【ifconfig】 命令 查看系统IP。
- linux ifconfig命令配置ip地址
- ifconfig命令来看网卡的IP
- Ubuntu ifconfig命令eth0没有IP 解决方法
- ifconfig命令,不显示IP地址
- Linux正则过滤命令ifconfig/ip提取IP地址
- 1.网络工具:ifconfig,ping,netstate,Redhat命令和图形化设置ip,finger,nslookup
- Maven--(1)
- 文章标题
- 3.1.struts.xml中package的namespace属性
- 【安全牛学习笔记】python实例
- 工程物料管理信息化建设(二)——材料编码
- ip 命令 和ifconfig 命令 删除IP
- Python与数据库简单交互
- Java环境变量配置
- Oracle数据库常用命令
- usaco(集合,水题但比较新颖)
- 字符串大小写逆置(神奇的ascll码)
- Unity试题整理(1)
- LINUX 下监听文件过多出现报错Error:watch ENOSPC
- 1003. 我要通过!(20)