SUN的入门培训资料5
上一篇 / 下一篇 2007-11-12 11:57:06 / 个人分类:linux
?-DG*tW [7j0http://www.xxlinux.com/linux/article/unix/rumen/2006-06-25/2114_5.html
p7L{ tL(b#T051Testing软件测试网VotH&i Xetc/netmasks文件中写:
TwW%y`0172.16.255.0 255.255.255.0
P:P1r5jCiJ
I04. ifconfig命令 51Testing软件测试网QY3|#uO9wWzQ"? M/p
检测网络端口状态
!p@'`7c+b]9n J,B0#ifconfig -a 51Testing软件测试网)OLa5bS"]$x
配置网络端口地址
%[5t2Chj8^AF0#ifconfig le0 172.16.255.1 netmask 255.255.255.0
z k+H ~-F_N*J0配置网络端口状态 51Testing软件测试网x W^%M$m(f
#ifconfig le0 up/down
Wu3bEf3OY3E0配置网络端口是否可用
d"e7G~ e6nXK0#ifconfig le0 plumb/unplumb 51Testing软件测试网@]/\/d'NCa[
5. ping命令
O4EQOM0检测网络状态 51Testing软件测试网 _*I8v.G
L{U!F
测试网络速度 51Testing软件测试网.y2iM
C9ld
(2)路由和网关
k)^1W$F
kI01. /etc/defaulrouter文件
bO#t4j {-}6O0Xp
b0/etc/defaulrouter文件配置系统的缺省路由,防止不必要的路由进程,适用于只有一个路由器通向其它网段的网络。系统安装时并没有该文件,是用户自己创建的。文件内容是缺省路由的地址。
T;y~.V)E?0#cat /etc/defaultrouter 51Testing软件测试网yv]:J}X
172.16.255.254 51Testing软件测试网,fRB2{6H"|
优点:
7FB4e)P-n
F5V`
]O
m0占用资源少,只有一条路由条目。
Y5Qi.c&t0(3)DNS客户端的设置 51Testing软件测试网 @u9b
TGti1_
1. /etc/resolv.conf文件
9s/e rBG mh0记录DNS服务器的地址和域名
"G,R]vH&AF%V:w0关键字:
;]2MBO{|;ZQW0domainname
,P9Bv'X$s7^0nameserver 51Testing软件测试网(i~m3eIjV
# more /etc/resolv.conf
6A
t+?3NMg0nameserver 172.16.255.3 51Testing软件测试网\FM"E*T:|/k
F
domainname sunrise.com.cn
}-Jpu7x3I9s051Testing软件测试网'{p*J4b)I|P)lr
2. /etc/nsswitch.conf文件
+Bk }*vL.ohX9x0
:`j:}_t\,N0U0记录主机名的搜索顺序等信息 51Testing软件测试网.mniTih*~
# more /etc/nsswitch.conf
&C[5S9u,P
W!o9O0#
s;diY d0# /etc/nsswitch.dns: 51Testing软件测试网3|"@}9F?O:Gx
#
0r6Bd T)P)C-i/A0# An example file that could be copied over to /etc/nsswitch.conf; it uses 51Testing软件测试网4D](Gv(UG&pCp
# DNS for hosts lookups, otherwise it does not use any other naming service. 51Testing软件测试网.m5l7Yhn3`tsA8h5UQ
#
4Sc"q&{*mev0# "hosts:" and "services:" in this file are used only if the 51Testing软件测试网A!MV9C_+L
a'R'o
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports. 51Testing软件测试网LOc*l.D_:P
51Testing软件测试网%n`1?(h7}!Uz"]4uo5@
passwd: files 51Testing软件测试网|%d5?+j}vc's
group: files 51Testing软件测试网@Z!s8]LW-t
# You must also set up the /etc/resolv.conf file for DNS name 51Testing软件测试网\H}"H#rcn
# server lookup. See resolv.conf(4).
b Qr+U
^$VX0hosts: files dns 51Testing软件测试网.MN%Yk*r8de6c
ipnodes: files 51Testing软件测试网5C0|*n{4~#a,y
… 51Testing软件测试网un!?1B8bA0zn
…
.d [;g*^Q,AZ:m"n0
J
^)i%sOt(v0将这个文件的hosts记录配置成hosts: files dns51Testing软件测试网SO5oKB/k
够用了,不过再补点Sun搞的售前资料做开场白:
r4S D5M.eX_MU0
$Ix
_YL(}jPr0Sun Solaris介绍:
y5}(Cp)p0e051Testing软件测试网'W'BU4Q'v/`\&A