ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Solaris 10 上网配置

Solaris 10 上网配置

原创 Linux操作系统 作者:ysjxjf 时间:2008-03-05 13:58:47 0 删除 编辑
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博客 ” ,链接:https://blog.itpub.net/66634/viewspace-1000445/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-04-24

  • 博文量
    376
  • 访问量
    3279053