solaris下更改ip位址
1、ifconfig命令暫時修改
ifconfig用來配置網絡卡的ip位址,改動後即生效, 但並不儲存,下次啟動後失效。
#ifconfig -a --->得出網絡卡的名字,一般第一塊100m網絡卡名為
hme0
#ifconfig hme0 down --->先把網絡卡hme0的服務暫時停止
#ifconfig hme0 192.168.1.100 netmask 255.255.255.0 up --->啟動網絡卡
2、永久更改ip位址
需要修改以下幾個檔案
/etc/hosts 加入機器名和ip位址
例如: 192.168.1.100 sky100 loghost
/etc/inet/hosts networks netmasks 改3個檔案
/etc/net/*/hosts *為3個目錄,改3個目錄下的hosts
/etc/nodename
/etc/netmasks
例如: 192.168.1.0 255.255.255.0
/etc/hostname.hme0 更改網絡卡的ip位址
例如改為:192.168.1.100
/etc/defaultrouter 加入閘道器
例如:192.168.1.1
/etc/resolv.conf 加入dns伺服器
例如:nameserver 202.106.0.20
nameserver 202.106.196.115
修改檔案 /etc/nsswitch.conf
找到這一行hosts : files
修改為 hosts: files dns
即網域名稱不能在/etc/hosts裡找到的話,就會去dns解析。
更改完成後重新啟動即可.
更改了網絡卡/增加了網絡卡,系統不能自動啟動該介面服務,這時需要手動建立網口
服務:#ifconfig hme0 plumb
即可以為介面hme0建立網口服務
相應地,用ifconfig帶unplumb引數可以停止服務並關閉網路
/etc/hostname.hme0 網絡卡hme0的ip位址
/etc/hosts 網路中主機名的ip位址的對應表
/etc/netmasks 設定網路號及網路掩碼
/etc/nsswitch.conf 網域名稱解析的方法及順序
/etc/resolv.conf dns server的位址及網域名稱
/etc/defaultrouter 設定預設的閘道器位址
/etc/nodename 主機名
/etc/net/ticlts/hosts
/etc/net/ticots/hosts
/etc/net/ticotsord/hosts
solaris配置IP位址過程
本文 表示感謝 solaris 10 配置 ip 位址過程 一.快速配置 1.確定網絡卡介面名 kstat c net grep net name ce0 class net name ce1 class net 2.啟動介面 ifconfig ce0 plumb 3.設定ip ifconfig c...
solaris配置IP位址過程
solaris 10 配置 ip 位址過程 一.快速配置 1.確定網絡卡介面名 kstat c net grep net name ce0 class net name ce1 class net 2.啟動介面 ifconfig ce0 plumb 3.設定ip ifconfig ce0 10.24...
solaris配置IP位址過程
solaris 10 配置 ip 位址過程 一.快速配置 1.確定網絡卡介面名 kstat c net grep net name ce0 class net name ce1 class net 2.啟動介面 ifconfig ce0 plumb 3.設定ip ifconfig ce0 10.24...