Solaris 设置网卡IP地址

? ifconfig ifconfig用于配置网卡地址,改动后立即生效,但并不保存配置,下次启动后失效。 # ifconfig -a lo0: flags=849 mtu 8232 inet 127.0.0.1 netmask ff000000 hme0: flags=863 mtu 1500 inet 172.16.255.2 netmask ffff0000 broadcast 172.16.255.255 ether 8:0:20:ee:11:51 #ifconfig hme0 172.16.3.3 netmask 255.255.255.0 #ifconfig –a lo0: flags=849 mtu 8232 inet 127.0.0.1 netmask ff000000 hme0: flags=863 mtu 1500 inet 172.16.3.3 netmask ffffff00 broadcast 172.16.3.255 ether 8:0:20:ee:11:51 ? /etc/hosts 想要永久更改配置,则要更改配置文件,以网卡hme0为例: #more /etc/hostname.hme0 Sunland #more /etc/hosts 127.0.0.1 localhost 172.16.255.2 Sunland loghost #vi /etc/hosts #more /etc/hosts 127.0.0.1 localhost 172.16.3.3 Sunland loghost #more /etc/netmasks # # The netmasks file a

Published At
Categories with 服务器类
comments powered by Disqus