* B# q9 `0 T" q# j6 J二、网卡设置如下:) D4 Z4 r2 ? K- e& Y
在第一台机器的双网卡的接法:把ADSL接在eth0上,把eth1接在HUB上。 . k5 j% A8 i i第一块网卡的ip设置:: e" C% W1 s) @, n
ip地址:192.168.0.13 X0 p) h( k+ M# t' r' r
掩码:255.255.255.0 8 c" x2 f( q7 ^# [% Q第二块网卡的设置 / w# D$ m! J+ }- Y8 e6 i8 H% qip地址:192.168.0.2( r$ R4 c4 n" o6 D# i7 J0 v
掩码:255.255.255.0* ~. X* r' K+ `; _# s, x; A- D
在这两块网卡中,不要设置网关。 8 Q5 R3 @& U% v' @8 ~++++++++++++++++++++++++++++++++++++++++1 ~- v4 c: l0 s3 a
第二台:Toshiba notebook的网卡设置! I5 D. y5 A3 c3 w
IP:192.168.0.6 . g5 \. w) T" ^' }& {8 }( p掩码:255.255.255.02 ~, `# Y! h3 U/ Y- p
网关:192.168.0.1 ) ]" _( @% t! Y3 f' \DNS:设置电信给的,或者下面的也行 $ t9 l% Q/ f2 q; D6 A; ~, P, B202.96.134.133 " i, G, P. k% `! H4 N202.96.168.68 3 d# `% o( R0 k' x: ^( s++++++++++++++++++++++++++++++++++++++++4 I/ R# w" q% F4 M P
第三台机器的网卡设置 ' g" j u, K8 vP:192.168.0.8 . \& b/ @5 c- { G掩码:255.255.255.0 4 Z2 J) H5 Y3 u2 } z. {& n. ~9 ]- ]网关:192.168.0.1 , }8 R% d6 z5 C, ^. j. H' BDNS:设置电信给的,或者下面的也行7 `, P3 q4 |9 P$ R, a4 E
202.96.134.133 / u, P: K t! w" V- R5 t: e2 v$ k202.96.168.68 - Z5 ]6 \9 b& u' v三、设置ppp拔号, & h6 K9 V1 v/ e1]删除原来的ppp的ADSL链接。 ( p5 p4 ^. R' c9 N如果redhat-config-network原来已经用 redhat-config-network设置的ppp的ADSL连接拔号,用下面的命令调用删除。, L ^* S: }. z6 _5 ]" P
#redhat-config-network6 S4 {: R3 R0 }7 e9 ]1 g
' w+ R4 _9 C# S2]在终端上以root权限运行 % @; t9 {. o* \- B, z# b#adsl-setup ' E* |7 p, t; ?. n: }6 ? i7 G 0 C4 Z! a% N8 W; k1 M6 Q L- _$ c n5 _ A
[root@LinuxSir02 root]# adsl-setup , x% Z% L* I' w: P9 A. x+ _- @1 M }$ n# t
Welcome to the ADSL client setup. First, I will run some checks on/ \% S, i; Y9 B0 m+ z: ^
your system to make sure the PPPoE client is installed properly.../ b( E2 K5 A g0 l5 g
7 C5 R8 d$ e# W% m) o
) Y) T; F8 O+ p# h
LOGIN NAME * ~5 R% P, c8 y6 u' u" c' |' u8 o9 ^/ [: I( {' M/ S9 `; |$ v, Z2 U9 u
Enter your Login Name (default root): ADSL提供商给的用户名,写在这里/ H! Y1 o+ H+ v/ R8 T% }! g1 p
2 G) i1 j, T! i TINTERFACE5 t$ v, U2 Z; ~) l
7 B$ w/ q, K1 t2 Q* W* iEnter the Ethernet interface connected to the ADSL modem & f$ X# ]* K' a# e; |$ x" a1 qFor Solaris, this is likely to be something like /dev/hme0.( O* s# s6 F( O1 N9 P
For Linux, it will be ethX, where 'X' is a number. / G) Z( G3 z+ z% l: L- o9 I(default eth0): eth0这是ADSL通过第一台机器的第一张网卡eth0提供上网. `8 }8 A' C: C6 v; w0 ^, r- O& U
6 M& k+ W# r9 ^ u' m. E; v
- ]) {/ N* d( [ E; p8 h
Do you want the link to come up on demand, or stay up continuously?. O* M+ D" b1 _8 B+ u' J' X
If you want it to come up on demand, enter the idle time in seconds& r6 @/ L/ w0 N2 M" l' x9 I
after which the link should be dropped. If you want the link to ( l4 K: {, K3 g% X: \stay up permanently, enter 'no' (two letters, lower-case.)5 ?& i1 C; P5 B0 q8 _. [+ |
NOTE: Demand-activated links do not interact well with dynamic IP 4 c z) W7 s* W- }( s' a; n v# @addresses. You may have some problems with demand-activated links.2 V9 R- T. Q; @7 r- H
Enter the demand value (default no):在这里按一下回车就行了。 ' B. j# ?: R5 Z' O, F7 F6 C# O8 F. \" c$ y! X
DNS ! `9 o- D& Q( t+ W( w- ^6 y& c0 ~9 l9 i" f. H/ r0 i6 Q0 d$ o' z
Please enter the IP address of your ISP's primary DNS server. 1 }! v g2 e+ y/ BIf your ISP claims that 'the server will provide dynamic DNS addresses',/ {% f( f" ^7 r. N" w
enter 'server' (all lower-case) here. - e' `7 w' \( S/ ^If you just press enter, I will assume you know what you are # H1 z- T- r ~8 d' S idoing and not modify your DNS setup. $ b4 ^; u, V" J2 o# k& V) r3 r$ J- VEnter the DNS information here: 202.96.134.133这是DSN,最好用你本地电信给的# | }9 A3 J, H
Please enter the IP address of your ISP's secondary DNS server. - S. I0 i% L/ J/ X& r0 GIf you just press enter, I will assume there is only one DNS server.4 b6 U' j! R0 O% M- J, |8 K
Enter the secondary DNS server address here: 202.96.168.68这是第二个DNS,也是电信给的。 9 |7 j! b- w6 h1 l, p/ q. e |8 x( V% a( |
PASSWORD4 H* f( X: y& ~: y5 [1 ]
8 R) k) i# v$ pPlease enter your Password:在这里把ADSL提供商给的密码写上 9 [, o5 g. I% F8 H' l4 E uPlease re-enter your Password: 8 d) v6 u* M& k2 v 0 z" X6 k$ U- iUSERCTRL $ b) [: r# E& E" f% n 6 _0 Q& u( G( N2 ZPlease enter 'yes' (two letters, lower-case.) if you want to allow * S/ l/ l0 z- G0 }normal user to start or stop DSL connection (default yes): yes' @1 p$ T$ \3 I2 M6 X
; D& i1 q# T7 B4 y4 z' P
FIREWALLING " i" K7 S7 |, w8 r5 J) Q& L9 A% V, r/ L# G* y/ Q j
Please choose the firewall rules to use. Note that these rules are 4 z4 i' s5 v7 x$ T5 G/ jvery basic. You are strongly encouraged to use a more sophisticated, q+ k2 v4 Z5 _; T
firewall setup; however, these will provide basic security. If you) R* |! u0 M( u/ v E6 \, n5 y
are running any servers on your machine, you must choose 'NONE' and! }' Z v& |5 ^. ]% C. b+ o
set up firewalling yourself. Otherwise, the firewall rules will deny + z [" Y0 f$ s. K' c saccess to all standard servers like Web, e-mail, ftp, etc. If you; \& z9 [8 M; l
are using SSH, the rules will block outgoing SSH connections which! P: i0 O4 w2 W0 A7 V9 @
allocate a privileged source port. % F" k+ S8 d5 d$ h- ^; [ ; X' j5 \, Q) F# N$ SThe firewall choices are: 6 o0 j3 b/ t4 e7 _& I: e5 |1 G0 - NONE: This script will not set any firewall rules. You are responsible% e. l/ g3 s+ p
for ensuring the security of your machine. You are STRONGLY 1 v: M3 j, Q) l5 Orecommended to use some kind of firewall rules. / h' F- W& [' |4 |1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation- H2 t% U0 z. x/ {5 B3 S
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway$ x1 Y2 T- q; I
for a LAN, ?# ^9 H3 X/ x
Choose a type of firewall (0-2): 2( P! p8 a9 U9 V
3 Y8 x3 y3 ]; O1 NStart this connection at boot time # V5 m) S9 H$ n* K3 E0 x" |# ~% s4 U) T3 l2 \/ T
Do you want to start this connection at boot time? $ Y% i, c* [& x& gPlease enter no or yes (default no):yes % m/ o) S$ q0 W+ g! ]3 T% m2 g * {) n% W( y1 ~$ L! l5 \** Summary of what you entered **1 |3 h" j' z& Z3 Y1 f5 z
5 b: P9 N* o# J9 H( i9 \
Ethernet Interface: eth0 ; G2 w* W9 H# v- a: ~User name: ADSL用户名 0 t; d2 N8 X4 p: OActivate-on-demand: No 0 l* ^) i& |2 i2 }2 a. JPrimary DNS: 202.96.134.133# ^( b/ b i5 @$ W& {/ }+ P
Secondary DNS: 202.96.168.68& O) I/ [0 Q' t! |9 s- A6 Y
Firewalling: MASQUERADE6 C" v' D5 ~0 n2 l' {0 ~- f7 h/ s
User Control: yes' w, F1 T9 G$ t- F, x9 g3 q8 b" x/ J8 u
Accept these settings and adjust configuration files (y/n)?y & P8 [9 P% j7 x) l ; E# ~# z8 ~2 P# N; ^6 z4 Y# @- t. O4 {
三、在/etc/rc.d/rc.local中加入如下:- h$ `* Z. R, J& c