天天看點

Solaris為單塊網卡裝備多個IP

作者:bychina    ,solaris單網卡裝備多IP:,root@shrsa2#

作者: bychina   

solaris單網卡裝備多IP:

root@shrsa2 # ifconfig -a

lo0: flags=1000849 mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

bge0: flags=1000843 mtu 1500 index 2

inet 10.221.15.19 netmask ffffff80 broadcast 10.221.15.127

ether 0:14:4f:75:1c:a4

這裡隻要一個可用實體網卡bge0,由于有一個利用軟體在斥地時與某個牢固ip綁定,是以需求裝備爽IP,但是隻要一個網卡,若何辦呢。

在win裡填加多個ip很利便,unix異樣可以。

ifconfig bge0:1 plumb

ifconfig bge0:1 211.136.159.199 netmask 255.255.255.0 up

此時ifconfig -a可以看到填加的IP了:

bge0:1: flags=1000843 mtu 1500 index 2

inet 211.136.159.199 netmask ffffff00 broadcast 211.136.159.255

root@shrsa2 #

  

需求留意的中央。bge0;0不能添加,隻能從bge0:1--2---3---等。

要是需求删除這個虛拟接口:

ifconfig bge0:1 unplumb

plumb是加載驅動的參數,plumb應該是解除安裝了吧!

相幹的收集參數裝備檔案有:

/etc/hostname.pcn0 #ip位址對了就可以

/etc/hosts #10.221.15.19 shrsa2 shrsa2. loghost

/etc/netmasks #這裡的内容一定要留意用收集号和相對應的10進制掩碼表現。

/etc/defaultrouter #網關位址

版權聲明:

原創作品,容許轉載,轉載時請務必以超連結形式标明文章 原始來由 、作者資訊和本聲明。否則将深究法律責任。

繼續閱讀