ubuntu网卡ip的配置
2017-07-28 16:24
363 查看
ifconfig 命令的结果 和 ip addr (或者查看具体网卡的是 ip addr show eth0) 看到的结果不一样, ip addr show eth0 可以看到eth0网卡上面的多个 ip, 而 ifconfig 只能看到 eth0 上面的一个ip
![](https://images2017.cnblogs.com/blog/575868/201707/575868-20170728134700352-1246485107.png)
![](https://images2017.cnblogs.com/blog/575868/201707/575868-20170728135007368-454494473.png)
现在我们已经成功添加了一个 ip 192.168.1.1
我们可以再继续给eth0这块网卡添加ip地址: ip addr add 192.168.1.2/24 dev eth0
![](https://images2017.cnblogs.com/blog/575868/201707/575868-20170728162135102-227767307.png)
删除ip地址也很简单
ip addr del 192.168.1.2/24 dev eth0
![](https://images2017.cnblogs.com/blog/575868/201707/575868-20170728134700352-1246485107.png)
![](https://images2017.cnblogs.com/blog/575868/201707/575868-20170728135007368-454494473.png)
现在我们已经成功添加了一个 ip 192.168.1.1
我们可以再继续给eth0这块网卡添加ip地址: ip addr add 192.168.1.2/24 dev eth0
![](https://images2017.cnblogs.com/blog/575868/201707/575868-20170728162135102-227767307.png)
删除ip地址也很简单
ip addr del 192.168.1.2/24 dev eth0
![](https://images2017.cnblogs.com/blog/575868/201707/575868-20170728162342477-546062516.png)
相关文章推荐
- Ubuntu下固定ip的网卡配置
- [工作笔记]一个ubuntu配置双网卡双网段IP走不同网关的脚本
- ubuntu网卡配置固定ip
- Ubuntu下单网卡多IP地址的配置
- Ubuntu下单网卡多IP地址的配置
- Ubuntu下单网卡多IP地址的配置
- Ubuntu下单网卡多IP地址的配置
- Ubuntu 与CentOS 6.5 配置单网卡双IP
- Ubuntu网卡基本配置
- linux单网卡上配置双IP
- ubuntu下配置网络(IP、网关、DNS)
- ubuntu配置ip dns
- Gentoo单网卡双IP配置方法
- (总结)Ubuntu Server 12.04 静态IP简洁配置
- 本机为win7,为虚拟机上ubuntu系统手动配置IP
- ubuntu配置虚拟ip
- ubuntu配置虚拟ip
- ubuntu命令和配置文件 修改IP
- linux下一个网卡配置多个ip【虚拟ip】