激活网卡,配置IP地址 假如网卡名称为pcn0
) G1 B) }4 G% ~. d3 A ifconfig -a #查看网卡信息" [/ [0 I, `" m" Q# a% [
ifconfig pcn0 plumb #激活网卡
. m8 C' |% ~/ t, J ifconfig pcn0 unplumb #关闭网卡
3 |1 D. L) K; }0 W ifconfig pcn0 192.168.1.133 netmask 255.255.255.0 up #配置IP地址9 W6 s, p* ]4 M4 e
solaris要上网还需要配置以下四个文件:
9 n$ j' K, \- L2 Y! G9 j /etc/hosts or /etc/inet/hosts
9 Q9 ~9 @: f. f& x4 p /etc/defaultrouter. V8 U0 L0 V* ?, L. Z
/etc/resolv.conf
3 d, Z0 f6 W" r5 e# K" G; v# K /etc/nsswitch.conf4 I X" B( g4 r8 m
其中defaultrouter与resolv.conf两个文件需要新建
0 m- h9 m9 d$ i! {7 N: B) i+ r 配置:
2 @( L# t3 b8 K# y% e) z& z /etc/hosts or /etc/inet/hosts
3 p2 \4 w% ?% B" b3 X: z- B 127.0.0.1 localhost* Z" U$ q$ g5 \* S- w
192.168.0.3 lion loghost
! u! B: B" T% C: P+ r. K; ^ /etc/defaultrouter; u, U1 F# F/ O' j) C3 i6 r
192.168.1.1
' \8 s% M. B4 ^9 O# w( _ /etc/resolv.conf
{, ]2 c8 v$ p9 { nameserver 202.96.64.68
- _1 q8 _% `; f /etc/nsswitch.conf% J' U* ]' z7 v1 L
hosts: files dns |