solaris学习笔记4:配置网卡地址

solaris学习笔记4:配置两个网卡地址
 
参考:SA389-SG
 
Solaris10网卡配置相关文件:
  /etc/hostname.xxn:该文件用来定义网络接口,内容只有一项,或者是主机名,或者是与该网口关联的IPv4地址;
/etc/nodename:内容仅有一项,本地主机名;
/etc/inet/hosts:定义主机名和关联的IP地址(重启后,/etc/hosts文件内容与该文件一致);
一。给两块网卡配置同网段的两个地址
系统安装时配置了一个bge0网口,存在/etc/hostname.bge0文件,内容为主机名;
修改其内容为192.168.1.220;
配置第二块网卡bge1,ifconfig bge1 plumb/ifconfig bge1 up;
touch新建/etc/hostname.bge1,并vi内容为:192.168.1.221;
重启机器后,
# more /etc/hostname.bge0
192.168.1.220
# more /etc/hostname.bge1
192.168.1.221
# more /etc/inet/hosts
#
# Internet host table
#
::1     localhost
127.0.0.1       localhost
192.168.1.221   240-sol10       loghost
192.168.1.220   240-sol10       loghost
# more /etc/nodename
240-sol10
# more /etc/hosts
#
# Internet host table
#
::1     localhost
127.0.0.1       localhost
192.168.1.221   240-sol10       loghost
192.168.1.220   240-sol10       loghost
#
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index
 1
        inet 127.0.0.1 netmask ff000000
bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.1.220 netmask ffffff00 broadcast 192.168.1.255
        ether 0:3:ba:53:97:35
bge1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 192.168.1.221 netmask ffffff00 broadcast 192.168.1.255
        ether 0:3:ba:53:97:36
#
 

你可能感兴趣的:(职场,休闲,solaris网卡地址配置)