Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9268288
  • 博文数量: 1669
  • 博客积分: 16831
  • 博客等级: 上将
  • 技术积分: 12594
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-25 07:23
个人简介

柔中带刚,刚中带柔,淫荡中富含柔和,刚猛中荡漾风骚,无坚不摧,无孔不入!

文章分类

全部博文(1669)

文章存档

2023年(4)

2022年(1)

2021年(10)

2020年(24)

2019年(4)

2018年(19)

2017年(66)

2016年(60)

2015年(49)

2014年(201)

2013年(221)

2012年(638)

2011年(372)

分类: 系统运维

2011-12-05 09:58:34

Solaris 网络 配置
分类: Linux 139人阅读 评论(0) 举报

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

-bash-3.00# ifconfig -a

lo0: flags=2001000849 mtu 8232 index 1

        inet 127.0.0.1 netmask ff000000

pcn0: flags=1000843 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

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:filedns ,注意中间有空格.


7. 然后重启网络

-bash-3.00# ifconfig pcn0 down

-bash-3.00# ifconfig pcn0 up

 

阅读(951) | 评论(0) | 转发(2) |
给主人留下些什么吧!~~