Solaris 10 上网配置

1. Enable the network card
#ifconfig hme0 plumb

ifconfig -a command should show following type of output which means device is enabled and is ready to configure ip address and netmask :

hme0: flags=842 mtu 1500
inet 0.0.0.0 netmask 0
ether 3:22:11:6d:2e:1f

2. Configuring ipaddress and netmask and making the interface status as up .
#ifconfig hme0 192.9.2.106 netmask 255.255.255.0 up
#ifconfig -a will now show the ip address , netmask and up status as follows :

hme0: flags=843 mtu 1500
inet 192.9.2.106 netmask ffffff00 broadcast 192.9.2.255
ether 3:22:11:6d:2e:1f


The file /etc/netmasks is used to define netmasks for ip addresses .

127.0.0.1, is the standard loop back route and 127.0.0.0 is the default loopback ipaddress used by the kernel when no interface is configured this will be the only entry dispalyed by the system on invoking ifconfig -a command..

如何设置DNS?
A:
(1)/etc/nsswitch.conf的hosts解析加上nis或/和dns,内容如下
hosts: files dns
(2)设置到DNS服务器网关于/etc/defaultrouter,内容如下
bash-3.00# cat /etc/defaultrouter
10.204.10.254
bash-3.00#
(3)设置DNS服务器的IP地址/etc/resolv.conf,内容如下
bash-3.00# cat /etc/resolv.conf
nameserver 10.204.0.17
nameserver 10.204.0.18
bash-3.00#
主机方面的信息:
bash-3.00# cat /etc/hosts
#
# Internet host table
#
#::1 localhost
127.0.0.1 localhost
10.204.10.55 RAC1 loghost
10.204.10.254 router
bash-3.00#
bash-3.00# cat /etc/netmasks
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
# network-number netmask
[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/66634/viewspace-1000445/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/66634/viewspace-1000445/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值