加入收藏 | 设为首页 | 会员中心 | 我要投稿 云计算网_泰州站长网 (http://www.0523zz.com/)- 视觉智能、AI应用、CDN、行业物联网、智能数字人!
当前位置: 首页 > 服务器 > 搭建环境 > Unix > 正文

Solaris的网络配置过程

发布时间:2016-09-10 17:48:18 所属栏目:Unix 来源:站长网
导读:1. ifconfig -a查看接口的名字 -bash-3.00# ifconfig -a lo0: flags=2001000849UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL mtu 8232 index 1 inet 127.0.0.1

1. ifconfig -a查看接口的名字

-bash-3.00# ifconfig -a

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

pcn0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

inet 10.85.10.78 netmask ffffff00 broadcast 10.85.10.255

ether 0:c:29:36:9a:82

打开网络接口文件查看接口的名称

-bash-3.00# more /etc/hostname.pcn0

david

2. 修改host文件,使ip地址和接口一一对应

-bash-3.00# more /etc/hosts

::1     localhost

127.0.0.1       localhost

查看本栏目更多精彩内容:http://www.bianceng.cn/OS/unix/

10.85.10.78     david   loghost

3. 修改netmask

more/etc/netmsks

#more netmasks

10.85.10.0 255.255.255.0

4. 修改默认网关

-bash-3.00# more /etc/defaultrouter

10.85.10.165

5. 修改dns客户端

-bash-3.00# more resolv.conf

domain mysf

nameserver 218.104.78.2

6. 修改 /etc/nsswitch.conf 的12行

-bash-3.00# more /etc/nsswitch.conf

# You must also set up the /etc/resolv.conf file for DNS name

# server lookup.  See resolv.conf(4)。

hosts: files dns

从hosts:file改为hosts:files dns ,注意中间有空格。

7. 然后重启网络

-bash-3.00# ifconfig pcn0 down

-bash-3.00# ifconfig pcn0 up

(编辑:云计算网_泰州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读