一、操作环境:% w' {, S8 x) R- @; y q
4 Y' F" P, d7 c4 @" T
机器系统与配置:三台机器的关健部件 u, I" B' v8 k; p+ C
第一台:台式机,双网卡,8139和8029,操作系统RedHat 8.0" t8 I! ?2 p' K/ I
第二台:Toshiba notebook,PC卡。RTL-8139/8139C/8139C+,操作系统RedHat 8.0" J8 c8 r# }7 ^+ A* w+ I! ^( w/ @
第三台:台式机,8029网卡,操作系统windowme, K- r' h+ n$ `( B: Q G3 o
Hub[集线器]:Tp-Link 10M,8口 3 ?: M0 Q2 f* k& aADSL,乙太口,非路由。 8 f5 h! D3 ?0 v. A ' J* L6 V+ X1 A+ V二、网卡设置如下: 0 R( ~3 C! B5 U: e# ^6 E& c2 f在第一台机器的双网卡的接法:把ADSL接在eth0上,把eth1接在HUB上。 . X+ C5 V) X4 M第一块网卡的ip设置:+ }# X2 ]2 K5 I0 |2 {+ o
ip地址:192.168.0.1* u: x% p4 G6 L1 R* L
掩码:255.255.255.09 I% P4 B3 }! v* h
第二块网卡的设置 * j+ y9 I! h0 s8 s4 \* eip地址:192.168.0.22 B0 C' b( \$ f7 }. c/ y! i
掩码:255.255.255.03 f5 Y. W% k( {# J+ {; i$ s+ J
在这两块网卡中,不要设置网关。& D' s2 e" ?% E1 U3 d# q0 r7 U
++++++++++++++++++++++++++++++++++++++++2 n% t1 \' O1 o
第二台:Toshiba notebook的网卡设置7 R8 O9 b, W. `* @
IP:192.168.0.6 4 O2 o; q; J! n' {- G掩码:255.255.255.0+ _. B$ P3 |/ Q" D! ]
网关:192.168.0.1 # J6 y7 k' ]( l- t2 KDNS:设置电信给的,或者下面的也行! n9 Y2 }& @" u
202.96.134.133 ! T6 U G) w4 I; ^) f202.96.168.68) V- L# v& G0 {2 c+ J+ ?; Q" p
++++++++++++++++++++++++++++++++++++++++& W, _" M5 ]7 G8 v/ ^; \
第三台机器的网卡设置' j# D( H9 W1 A% u
P:192.168.0.80 h2 @% M% D" D5 [1 L. y
掩码:255.255.255.02 x% X3 n% _/ Y k0 v" H
网关:192.168.0.1 4 d8 U+ Y2 m$ mDNS:设置电信给的,或者下面的也行 ) d1 p6 H2 N @: p" ~" _# o& d202.96.134.1337 I4 b4 K+ p o$ S# |
202.96.168.68 " }. J/ Z9 S% J三、设置ppp拔号, 9 r$ }9 ^% j+ Q! `9 k1]删除原来的ppp的ADSL链接。 - k8 |( T9 G8 Y3 F( d如果redhat-config-network原来已经用 redhat-config-network设置的ppp的ADSL连接拔号,用下面的命令调用删除。- h0 U/ Y$ J. U
#redhat-config-network ( y" C# B6 R1 g9 U$ n' r* p) o# z% x1 m0 C
2]在终端上以root权限运行 ( i4 ]! J0 k6 l$ B+ p#adsl-setup " a, Q3 A0 O2 Z+ D) D 3 D/ D) A- P0 ^4 k0 f+ ^$ R* m: Z- _, }, ^) y; p- n4 I
[root@LinuxSir02 root]# adsl-setup " h+ P8 ]5 k6 Z6 h5 }3 O% V& m" T# ?& F0 H1 X A+ ?1 ]) \
Welcome to the ADSL client setup. First, I will run some checks on8 w4 M$ d7 m' I# l
your system to make sure the PPPoE client is installed properly...4 ~" }7 k [$ ?
, [ L" V6 Y$ u( b- i/ i
! c- C7 H* O# K" S- _8 @LOGIN NAME : m3 x. f( K( ^9 D, R/ i + N% i; K4 _* I4 r9 zEnter your Login Name (default root): ADSL提供商给的用户名,写在这里2 W& Q# x# t Z0 S
5 _( m9 c2 o. _
INTERFACE - N& G, [" G0 g# J/ l v: @) v( f& g" q }' R9 T" V# [
Enter the Ethernet interface connected to the ADSL modem G; ?8 l6 L+ `; kFor Solaris, this is likely to be something like /dev/hme0.7 a9 t7 t6 s) e, r4 O/ G" |
For Linux, it will be ethX, where 'X' is a number. 9 C* [( C! e3 `1 f' _(default eth0): eth0这是ADSL通过第一台机器的第一张网卡eth0提供上网3 `9 `" \* F" s6 b. ?1 F( L
1 F& y/ y$ }! y; d ( V( `' O$ J2 B- eDo you want the link to come up on demand, or stay up continuously? ; n5 T3 r* l2 O7 I }" X. LIf you want it to come up on demand, enter the idle time in seconds/ B+ \: N% g' ^7 y5 Y3 n1 g
after which the link should be dropped. If you want the link to ) N4 }0 J2 h0 R, zstay up permanently, enter 'no' (two letters, lower-case.)" g4 B" H" g: M2 Q. Y4 k; b8 `
NOTE: Demand-activated links do not interact well with dynamic IP, V8 I. J. X( ?2 B1 M' w- m
addresses. You may have some problems with demand-activated links.1 [0 y' }; t* R. n A8 ?
Enter the demand value (default no):在这里按一下回车就行了。 7 j- c: N B) g4 c! M# j; M& ^2 A# X) f- a$ Z6 K) I5 d
DNS8 U1 E- j9 m9 S
; l: K, g- x4 W) Y: w. dPlease enter the IP address of your ISP's primary DNS server. , x% }' d- |) c, Z# TIf your ISP claims that 'the server will provide dynamic DNS addresses', % n: N4 E9 ]+ _: m$ s# x: @" Fenter 'server' (all lower-case) here.- C" O! R' N0 p6 H- y5 Y- C5 c
If you just press enter, I will assume you know what you are! u9 E+ k% H, X5 T" f$ F( k
doing and not modify your DNS setup.3 K; H7 ]. T) c+ `/ E
Enter the DNS information here: 202.96.134.133这是DSN,最好用你本地电信给的- @4 C# Y( W K* ]
Please enter the IP address of your ISP's secondary DNS server. 9 z/ {1 c8 t* R: oIf you just press enter, I will assume there is only one DNS server.* l) _$ z' [/ P! ^
Enter the secondary DNS server address here: 202.96.168.68这是第二个DNS,也是电信给的。 ! r% @- J- A% ]' l3 _7 `5 s: ` ! {1 v! d- M) h# ?' ^: U6 KPASSWORD, B+ W. Y. M; R" G% l1 D% o
6 x$ E- S& u$ K) d1 T: APlease enter your Password:在这里把ADSL提供商给的密码写上 `- H0 v' R% H
Please re-enter your Password: % `# Q. [/ Y) [4 E2 [9 \) E7 t+ x+ l
USERCTRL " \# b. `5 P: j1 |) P$ Y% i# W, { 0 N7 u1 g& Y; i) J. ^+ X/ f* @Please enter 'yes' (two letters, lower-case.) if you want to allow - j. o y' K- _# h4 `1 N( |normal user to start or stop DSL connection (default yes): yes6 |& ]$ u" [2 n9 A' [
$ ~) g4 H, | E' ~9 l( N# LFIREWALLING+ C- r F* G4 x7 t
6 I2 s* I" B* h) H
Please choose the firewall rules to use. Note that these rules are # {- s% O7 l6 h- P% q) Uvery basic. You are strongly encouraged to use a more sophisticated! x! L6 l% } m; g: r( V# F
firewall setup; however, these will provide basic security. If you * n5 e. `4 V+ g, r5 uare running any servers on your machine, you must choose 'NONE' and8 b0 W% O: m7 K% Y
set up firewalling yourself. Otherwise, the firewall rules will deny$ v. e! n. w! t' \; c
access to all standard servers like Web, e-mail, ftp, etc. If you 3 _+ }, b) f8 \$ T, X/ ]) Q9 J' I3 [are using SSH, the rules will block outgoing SSH connections which3 q4 w: r1 ~. U( _' _" D* C
allocate a privileged source port. ) {! V1 P' f3 X) ~6 z C# v: z$ Z, }' IThe firewall choices are:) k# ]' C" }# X! M; |: w5 d& L
0 - NONE: This script will not set any firewall rules. You are responsible2 F0 m& a- S! q4 g
for ensuring the security of your machine. You are STRONGLY, w0 G) w. m6 N
recommended to use some kind of firewall rules. . g9 h0 n# b+ @# c5 Q! N1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation- C. S7 u1 n, u; m7 I [7 c
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway 1 H/ |; T; ?" w. j: I, Zfor a LAN5 p- m0 d) r; J) _! v/ c8 S
Choose a type of firewall (0-2): 2 V8 r; p3 i4 ?: S) x 0 e, d: Z p s. b# D* LStart this connection at boot time- z: T( |1 |" V6 c# }
) \' I" Q% e) b2 ~
Do you want to start this connection at boot time?9 H( d1 @; e6 Z* C& f) [
Please enter no or yes (default no):yes1 U2 i4 k5 @) v& L5 V5 K w
7 m7 P6 z5 p4 C** Summary of what you entered **4 @' \" P! I$ v t; \2 `* f) V, E6 B
2 x" J: }+ O$ d$ ^
Ethernet Interface: eth0 5 P7 ]9 |6 T; e( _User name: ADSL用户名 2 k5 R) J% ?6 f2 M {Activate-on-demand: No8 |. t1 f$ p8 I# b3 Z
Primary DNS: 202.96.134.133 6 F, _, W, I9 K7 h! F( A. eSecondary DNS: 202.96.168.68' q, [, c+ e+ y# k. m0 u+ M
Firewalling: MASQUERADE 2 b/ ?& ?, Z9 hUser Control: yes! ~! C0 |3 }& O7 d2 J
Accept these settings and adjust configuration files (y/n)?y7 ^& {7 u1 b2 |9 p( y* V" f4 P% `
4 m0 E$ N1 D& |