一、操作环境: - }1 i3 {+ X" i9 n * w# a) Y4 L) N机器系统与配置:三台机器的关健部件+ A+ y E& M) e
第一台:台式机,双网卡,8139和8029,操作系统RedHat 8.0$ E8 Y( f8 }$ M* e9 }" \' N
第二台:Toshiba notebook,PC卡。RTL-8139/8139C/8139C+,操作系统RedHat 8.04 y9 \9 f* G% m- g3 y& o: p0 `: v
第三台:台式机,8029网卡,操作系统windowme: T z/ ^ |; k; W7 O
Hub[集线器]:Tp-Link 10M,8口: G' U6 [! |7 K$ i- B P
ADSL,乙太口,非路由。6 w! j4 f6 \) M8 I
: a- Z9 l7 |+ W% j; m/ w
二、网卡设置如下: 7 N) e" P' E% l) l9 ?在第一台机器的双网卡的接法:把ADSL接在eth0上,把eth1接在HUB上。 $ i2 ^- B, a1 o3 _9 a第一块网卡的ip设置: ) _2 \: u2 M. i5 y3 c& e$ P% g0 Qip地址:192.168.0.1 + _! _4 ?: ~7 Q, }- }掩码:255.255.255.0! L' U3 \) T/ n: U& F5 W8 }# n
第二块网卡的设置1 j# k2 T3 l7 w& _8 I- f3 d6 q
ip地址:192.168.0.2 & Z+ W# [6 r! q- Q掩码:255.255.255.0 0 ?7 O) M# s6 [' g在这两块网卡中,不要设置网关。 . [& s% Y% L8 L! w: O7 p++++++++++++++++++++++++++++++++++++++++ 2 N( i6 c7 ^+ Y3 V& D9 ?% C4 p第二台:Toshiba notebook的网卡设置 / l. e, W, o) E# dIP:192.168.0.6 , P5 M/ Y e6 C9 N: d掩码:255.255.255.0' H2 d/ H3 `. z) `" {* ? s1 _
网关:192.168.0.1 / F3 i! I8 o* b' ?% m" V- bDNS:设置电信给的,或者下面的也行- `- e, ]9 ?! M
202.96.134.133 % \1 G1 {, H' B2 u8 k" Q6 ?202.96.168.68. j+ H) A) E5 u& j& r
++++++++++++++++++++++++++++++++++++++++0 j$ ?/ w' `9 |
第三台机器的网卡设置 1 ^2 x4 O/ Q% V, p) [P:192.168.0.83 ?9 A: I# _( y! Y/ z' G( T) h3 m
掩码:255.255.255.0 + }& |$ I9 v7 |/ k网关:192.168.0.1 t$ ]. A8 w, N0 Z0 zDNS:设置电信给的,或者下面的也行3 p* W- f9 e2 _ W
202.96.134.1334 N5 P$ ?, d+ Y4 Z
202.96.168.68 # g/ z: e6 ~4 ^! E* a# f; j三、设置ppp拔号,( H& _' }' S/ y: ]
1]删除原来的ppp的ADSL链接。 f( B0 ]! I! F9 A% f* j# T如果redhat-config-network原来已经用 redhat-config-network设置的ppp的ADSL连接拔号,用下面的命令调用删除。. t! m. u3 G& c w6 O, ?+ _! A4 G% i- M
#redhat-config-network. S/ [" E* h' Z% b4 |
3 r' V s( u: z! v
2]在终端上以root权限运行2 \8 Y% i: \; ^3 W6 i+ @
#adsl-setup7 `8 h0 B- c0 [
! l7 S I0 a: P9 Z" o | + c @8 I7 k$ Y2 L/ E[root@LinuxSir02 root]# adsl-setup3 b+ X4 m7 v! B9 v
- a) Z2 J7 c5 y: g0 q* nWelcome to the ADSL client setup. First, I will run some checks on: U' s# W2 g7 S( v) C# i4 A
your system to make sure the PPPoE client is installed properly..., V( B4 v4 N9 f; c- H# j
; I Y$ J4 ~& T% E# [2 L A# z2 U
/ r9 e0 n2 T7 \; ^
LOGIN NAME $ m9 G8 q: ~3 {# ]9 H: @6 B5 c) {; U ~, U+ N: S$ @: i5 |
Enter your Login Name (default root): ADSL提供商给的用户名,写在这里1 x# ~7 J) } P" U% A7 t
" @+ @- S. u6 U. x( _ {
INTERFACE , D) D! @, L: S3 a/ F . l$ p. O p9 c+ ^. e7 K# AEnter the Ethernet interface connected to the ADSL modem 3 X& R3 S/ j5 M. wFor Solaris, this is likely to be something like /dev/hme0.2 H; y; {$ v2 {2 i2 ^
For Linux, it will be ethX, where 'X' is a number./ E* m/ q4 \! {3 J, ]
(default eth0): eth0这是ADSL通过第一台机器的第一张网卡eth0提供上网 6 }. u- H' h, H2 C5 x! J : ^+ k0 v5 H. n! q+ x 7 o6 r) q( R0 I' zDo you want the link to come up on demand, or stay up continuously?( ?6 I) _5 }. A7 K, a+ Y% `# h- ?
If you want it to come up on demand, enter the idle time in seconds 6 E$ X& r5 h- y9 ?2 Wafter which the link should be dropped. If you want the link to+ u+ s. o3 S7 L4 v* ^0 D- M
stay up permanently, enter 'no' (two letters, lower-case.)' h' `: J, l& M9 I Y
NOTE: Demand-activated links do not interact well with dynamic IP& l$ a" P* N! Q* _5 O* ]( j
addresses. You may have some problems with demand-activated links.% [& e9 A& q6 k
Enter the demand value (default no):在这里按一下回车就行了。$ m2 i% a% H& N6 S5 N( k
8 F2 K9 u/ L0 e6 S3 G7 c$ s: ]DNS/ `3 ~- Y, M7 l
$ e$ D# H$ e0 |" O0 e) x
Please enter the IP address of your ISP's primary DNS server.$ z2 n; ^! I, w: ?, `
If your ISP claims that 'the server will provide dynamic DNS addresses',+ j- ?! j4 O: P
enter 'server' (all lower-case) here.7 H! M; K( x2 }; H) C8 v: T
If you just press enter, I will assume you know what you are 3 p! c0 B+ ]+ K: @. P7 ^doing and not modify your DNS setup. # n: R( T5 I) s/ mEnter the DNS information here: 202.96.134.133这是DSN,最好用你本地电信给的' {* e: o f8 ]6 l3 ~# ?( Y, s
Please enter the IP address of your ISP's secondary DNS server.3 x; s. f& y! S6 q( i2 }7 o
If you just press enter, I will assume there is only one DNS server.& @ l1 A- p1 Z/ ^
Enter the secondary DNS server address here: 202.96.168.68这是第二个DNS,也是电信给的。$ ]5 d3 X( b! q, L. V; F
: d7 R" y" \( r" V6 n6 APASSWORD 4 I7 m9 P L" _$ D* V+ d5 w8 z& q# t e' P3 T
Please enter your Password:在这里把ADSL提供商给的密码写上 & f$ s6 I# }2 X% z: X5 E) UPlease re-enter your Password:9 E/ s- U. n7 I$ }4 @3 N8 B& ]* E
$ `9 \4 p0 \* W4 j1 z9 ^9 [7 Q0 q
USERCTRL: Q" a! y5 c$ }/ f% L2 l1 I! {* G7 p- H
* g1 d: U/ Y. X, S
Please enter 'yes' (two letters, lower-case.) if you want to allow; m8 a9 L6 i, J' x$ H
normal user to start or stop DSL connection (default yes): yes 5 E. T/ ^5 p# n) y3 e# k- L8 r: f/ l# c) `+ ~7 ?
FIREWALLING# {. _) e# G7 `/ u5 @" q! M
. d' W* |: g l% }& t5 g
Please choose the firewall rules to use. Note that these rules are - l$ t9 j2 W6 V9 {very basic. You are strongly encouraged to use a more sophisticated 7 d& g- ?. {, `0 k% q1 Ofirewall setup; however, these will provide basic security. If you 8 K) \! i. b/ f5 u9 n2 {$ sare running any servers on your machine, you must choose 'NONE' and 3 D& f5 o7 o+ d) Y: o. R/ Sset up firewalling yourself. Otherwise, the firewall rules will deny9 P5 g- _+ B0 c' H
access to all standard servers like Web, e-mail, ftp, etc. If you 5 T7 p! {1 h! C6 \) Y, ~are using SSH, the rules will block outgoing SSH connections which5 m& L' |( c0 S4 z* o
allocate a privileged source port.! n; y: t+ `- I
% {( Q2 G% H. g2 q T1 z0 BThe firewall choices are:, Q. G& M J9 X- T% g/ M
0 - NONE: This script will not set any firewall rules. You are responsible : ~% G1 N. \9 r% q4 g" q0 hfor ensuring the security of your machine. You are STRONGLY " }# `, z0 D7 o2 Frecommended to use some kind of firewall rules.% L" ]0 R5 u/ B
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation7 A* j& M j; I, f1 j9 H5 r% _
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway + ^$ a1 ?% C8 g# p, u6 c! V! g. e3 b/ ifor a LAN- S: @5 h* U {& ?- w
Choose a type of firewall (0-2): 2 - H6 y" k! y! \: Q) k# P. P# I1 t; w' L; e' M. }
Start this connection at boot time . T) M$ c/ w$ a K 9 b c9 Y9 o; H0 M, oDo you want to start this connection at boot time?- H' p9 R2 G/ G, G9 f8 o/ }7 b
Please enter no or yes (default no):yes5 w3 M( N* z! e5 }. U
! @% y" e: H7 l, U8 r- u** Summary of what you entered **, `$ {, J1 ?0 W- ]' R
% j/ S! M$ r, M# @' n
Ethernet Interface: eth0: L4 L: ]( E. s! M; g B
User name: ADSL用户名 6 u, N8 \' K' W5 zActivate-on-demand: No : y4 H) \' P2 ?% m0 SPrimary DNS: 202.96.134.133 * H& O+ ~7 V# O) c: K' P }7 DSecondary DNS: 202.96.168.68 & _) `, T+ \8 j$ TFirewalling: MASQUERADE 2 j" z# c" {$ C6 l8 g' EUser Control: yes 5 v/ R( J2 K- MAccept these settings and adjust configuration files (y/n)?y9 C# S( _& l, t, p
T5 a. n6 f: ]5 x0 a$ T a