知识屋:更实用的电脑技术知识网站
所在位置:首页 > 操作系统 > linux

Solaris添加删除虚拟网卡IP

发布时间:2014-09-05 15:32:26作者:知识屋

Solaris添加删除虚拟网卡IP
 
一、查看当前网卡IP配置
  www.zhishiwu.com  
root@solaris # ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.0.3 netmask ffffff00 broadcast 192.168.0.255
groupname ipmp1
ether 0:14:4f:7a:2d:98
二、添加虚拟网卡IP
 
ifconfig ce0 addif 192.168.0.24 netmask 255.255.255.0
ifconfig ce0 addif 192.168.0.15 netmask 255.255.255.0
三、查看所有网卡IP配置
 
root@solaris # ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.0.3 netmask ffffff00 broadcast 192.168.0.255
groupname ipmp1
ether 0:14:4f:7a:2d:98
ce0:1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 2
inet 192.168.0.24 netmask ffffff00 broadcast 192.168.0.255
ce0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.0.15 netmask ffffff00 broadcast 192.168.0.255
四、删除虚拟网卡IP
 
ifconfig ce0 removeif 192.168.0.24
ifconfig ce0 removeif 192.168.0.15
五、查看所有网卡IP配置
 
root@solaris # ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.0.3 netmask ffffff00 broadcast 192.168.0.255
groupname ipmp1
ether 0:14:4f:7a:2d:98
 
(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)
收藏
  • 人气文章
  • 最新文章
  • 下载排行榜
  • 热门排行榜