找回密码
 注册
查看: 998|回复: 0

华为路由器:PPPOE配置模拟实验及NAT配置

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-3-16 09:39:09 | 显示全部楼层 |阅读模式
实验环境2 v5 {! J$ {! p0 C  h9 D

% }5 @6 v3 e; K  w) `2 f; Apppoe-client上面的接口信息
1 ]# c; |) X( v* L
% a, v1 A7 U4 [: N[AR1]dis ip interface brief 0 S% E& O7 u' Y9 {) y( q
*down: administratively down
7 `5 S. u- i7 P  ?4 J- D" w$ f^down: standby
/ |7 V1 l2 `, J. o& Z(l): loopback
3 O  j% k3 G5 g* n5 O' n(s): spoofing
( s( P# A6 R" ?) z& U7 y) d/ j; BThe number of interface that is UP in Physical is 2
' x. ^0 r8 A, ~6 a% CThe number of interface that is DOWN in Physical is 1
: R0 P! R: u( i) nThe number of interface that is UP in Protocol is 13 ~9 N3 y2 K" c% i8 E* `1 H
The number of interface that is DOWN in Protocol is 2
4 p* v! \  y' G/ v- x7 t5 X
# J) p) O9 E. U3 MInterface                         IP Address/Mask      Physical   Protocol  - E: l& d# T9 x: E& t
GigabitEthernet0/0/0              unassigned           up         down      
+ e, B$ m, J+ m+ v& f0 S" Z& @1 [' BGigabitEthernet0/0/1              192.168.1.254/24     down       down      & j7 Y9 d6 d+ c6 n, U9 f2 `
NULL0                             unassigned           up         up(s)     
: ~* ~, b. M/ X- n6 x4 t: [5 s
6 g& T. R+ r1 r9 e
配置了基于接口的DHCP
" _& l0 y" a; ?1 U/ c2 w0 b9 Q4 ]% i! z  {
interface GigabitEthernet0/0/10 J5 \! n6 Z. a: F  `6 D4 {
ip address 192.168.1.254 255.255.255.0
# x" T" S& Y2 H$ G3 I, X dhcp select interface  F- T2 a9 m( \. L
dhcp server dns-list 8.8.8.8
6 ?6 G# a! s7 h) A( T dhcp server domain-name pokes.com# Q0 X0 o( O4 D( q% E
6 M, K+ u8 d% }0 V' }
注意事项:AR1、AR2的物理接口g0/0/0不配地址., n/ s- T, [* E

; p1 I0 b  ?8 S& C4 A6 H$ ?一、pppoe-server的配置6 v, p* J; L, V+ M
1、pppoe-server 配置地址池% c0 k+ n9 O1 [. {/ r
[pppoe-server]ip pool pokes            #创建名为pokes的地址池,名字可以随便起,后面要调用
' [+ W! q7 B3 x& U. U( }0 j* {$ }Info: It's successful to create an IP address pool.4 e8 Y* a7 d( \5 ~1 t. ~" q3 O
[pppoe-server-ip-pool-pokes]network 10.1.12.0 mask 24   #地址池为10.1.12.0/24
5 @0 `$ H" n& Z2 y5 J- j  k$ E3 @[pppoe-server-ip-pool-pokes]dis th
( B# g& i/ W5 [  i. q" T[V200R003C00]
8 Y: g8 u: }$ \, l1 K  q#$ L' |7 E" I/ p$ z$ j& U
ip pool pokes
1 i3 t& w1 I3 b7 `, q* R network 10.1.12.0 mask 255.255.255.0
- y) r/ m, \% S+ n; d0 v# f#
8 z( s3 i6 ?1 P% L2 Rreturn
/ b- z7 j& {5 q/ U2 j' ?[pppoe-server-ip-pool-pokes]q
' _  ]+ I. F5 [; O* T! u* R
( S' ^! @7 h& _; g2 t2、配置虚拟口关联地址池
% N5 ?  j) B2 W0 K" x8 Y: A配置虚拟口关联地址池,即创建Virtual-Template 1模版。! ?' v# w7 c6 q/ S1 g# P6 Z

6 E: L! R  s. \; a; V[pppoe-server]interface Virtual-Template 1    #创建虚拟接口1
1 a) K8 b2 @5 A[pppoe-server-Virtual-Template1]ip add 10.1.12.2 24                   #虚拟接口1的地址
$ Y4 Z( n# B/ `0 m4 R, i) @8 @. W[pppoe-server-Virtual-Template1]ppp authentication-mode chap   #认证类型
1 P& K2 I9 K6 `( {[pppoe-server-Virtual-Template1]remote address pool pokes      #客户端的地址池pokes
# Q$ B6 w# P" T  b8 _1 `[pppoe-server-Virtual-Template1]dis th* D! a% w. p! {" ?9 ~1 {8 ?
interface Virtual-Template1
8 M2 @  p9 e0 O6 D8 l ppp authentication-mode chap
9 V6 A$ |5 W  D- Y2 R; k remote address pool pokes
) E7 K% d: w% z5 D1 T8 o ip address 10.1.12.2 255.255.255.0
+ Z% R5 [! Q% l6 E1 S; y
" {7 S6 I4 t( ^6 U" Y' P- s[pppoe-server]int g0/0/0        - n, I5 x2 Q5 }
[pppoe-server-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1   #将虚拟接口1关联到g0/0/0接口0 U8 J' ^; D+ r
[pppoe-server-GigabitEthernet0/0/0]dis th2 R0 X, _- N" b/ S3 X8 f6 P9 m" ~
[V200R003C00]: r' r4 j6 k- Z3 D9 J) p
#
" [' d3 }) R$ ~: U7 O0 K# J4 F7 [interface GigabitEthernet0/0/0
- X( G. ]+ ^  D/ s! s' { pppoe-server bind Virtual-Template 14 }- [7 A/ o# D$ C9 V  w
#6 _& F+ V8 [' n0 d  i
return* B+ A8 Q7 }8 D" c: a1 q  {1 j
[pppoe-server-GigabitEthernet0/0/0]; }. B$ e+ e' a

0 i1 c; k3 ^0 {$ A9 ^- |# m  `3、创建pppoe拨号的账号. e, H% ?' Z+ ~/ p! V# A
按理我们应该创建pppoe拨号的账号。
+ D7 t/ [. V% ]3 I8 b这里为了演示拨号失败,我们这里先不新建账号,后面再新建。
, h/ M) J+ l5 v/ O) e5 M
7 t, e  j- w& t4 _8 j" l7 ]二、pppoe-client的配置
5 ^' e3 o8 V8 S[pppoe-client]dialer-rule   " V- S( G; P2 ~! m
[pppoe-client-dialer-rule]dialer-rule 1 ?
  h8 `; F2 a, C5 E* m* u: R% J  acl   Permit or deny based on access-list   / g1 r, N5 u* c! M2 b
  ip    Ip
! v4 b# x7 `/ X6 m  ipv6  Ipv6       
) V( F( R0 v4 d5 [: a. t[pppoe-client-dialer-rule]dialer-rule 1 ip permit   #创建拨号规则,允许ip流量触发拨号* K# i! n4 m1 V: ~6 M# o0 s# |- S8 @

+ N7 b$ R8 d/ K8 _7 J[pppoe-client]interface Dialer 1
7 j7 q  J4 U1 M" _Jul 15 2021 18:55:22-08:00 pppoe-client %%01IFPDT/4/IF_STATE(l)[0]:Interface Dia5 e& |5 l3 u. z# H8 }5 b
ler1 has turned into UP state.
7 w4 z0 ?# R3 C0 s' C, ~[pppoe-client-Dialer1]ip add        ( J1 r. K, [8 i
[pppoe-client-Dialer1]ip address ppp       
- B: W3 t. O& H0 x) @[pppoe-client-Dialer1]ip address ppp-negotiate  #地址采用ppp协商* G/ T, S% t0 Y( I

0 \( B7 v( d7 o: w[pppoe-client]interface Dialer 1                #创建接口拨号组14 s2 ~7 |: w8 p( }! p" z  t; u
[pppoe-client-Dialer1]ip address ppp-negotiate  #ip地址采用ppp协商
# F, V" p) h7 \/ d6 H0 u[pppoe-client-Dialer1]dialer user zhprny        #此用户不用于认证,是标识作用以及和dialer绑定
( X; }5 K8 |  i% f1 [[pppoe-client-Dialer1]dialer bundle 1           #设备通过Dialer bundle将物理接口与拨号接口关联起来。8 C# H  |' v0 w% d
[pppoe-client-Dialer1]dialer-group 1             #放到一个拨号访问组1中
2 j2 X  a- E7 I& ?# n+ }/ P9 g[pppoe-client-Dialer1]ppp chap user pokes        #指定dialer1接口的编号,拨号账号) W/ p* S6 H: c. w4 ?/ T
[pppoe-client-Dialer1]ppp chap password 123456   #拨号的密码
( n  T- X9 C2 p" q$ X
5 P/ O; z$ E$ i2 c3 U
) v0 E; P9 t  {* a- ^5 E[pppoe-client-Dialer1]dis th1 \2 ^# Y! S9 W3 j5 w
[V200R003C00]
6 b* c, Y4 z8 t' k  [#
: n- v6 ?0 B$ Z2 v; ~$ E+ _/ Winterface Dialer19 e# a7 e; l4 c* @5 l
link-protocol ppp
: G# n* \5 r1 }, N: ] ppp chap user pokes
. }$ F! ]- _0 K/ U ppp chap password cipher %$%$I/!'WCyd<7p[~8;,>51L,$sl%$%$2 i0 d" Z% E9 F' U, G) D; G9 O) g
ip address ppp-negotiate
7 N1 e* q9 I& J( f dialer user zhprny% l* r$ ?, d$ V
dialer bundle 1) |  }$ Q% x. y, p
dialer-group 1  [0 R- x; c) ^

# c4 z5 K6 `. h, W, c; _  }[pppoe-client-GigabitEthernet0/0/0]" J( j1 O& y/ u' ]
Jul 15 2021 19:07:54-08:00 pppoe-client %%01IFNET/4/LINK_STATE(l)[0]:The line pr, Y. o7 \% L; r3 Z9 w8 n
otocol PPP on the interface Dialer1:0 has entered the UP state.  #PPP已进入启动状态
: E. h% I, W+ D! A6 i% ?[pppoe-client-GigabitEthernet0/0/0]0 f# O! |" h, X* Z
Jul 15 2021 19:07:54-08:00 pppoe-client %%01IFNET/4/LINK_STATE(l)[1]:The line pr
9 f+ R/ y. P) j  c- k& gotocol PPP on the interface Dialer1:0 has entered the DOWN state. #PPP已进入关闭状态
; L- C+ j* }1 \5 i. Q  }8 c
2 m; n9 s3 n# ]( }1 s#不停的循环。。。。
: v. G- h1 E0 E  K7 S
1 s+ j( q+ f: [) q9 X- B& P$ l/ ~+ C$ e, k9 \4 M3 D
#原因是没有认证成功,因为我们在PPPOE-server上面还没有创建认证用户和密码
; B5 e; V, Z) W& F; K0 ~$ I! e9 m7 S3 Q) g" F6 D
三、pppoe服务器上新建认证用户( o: v+ ]5 B" ^" G0 q+ L
我们到服务器上直接新建认证用户:
! j0 ?4 c! H" B0 q# t3 C
0 C! ?( f8 A2 }, Q5 \. A* z0 C[pppoe-server]aaa
, b: c/ {7 `* H# H[pppoe-server-aaa]local-user pokes password cipher 1234562 D" R4 E9 Y2 m! |7 g, V
Info: Add a new user.# l0 z0 p- l! s9 t$ z6 c
[pppoe-server-aaa]local-user pokes service-type ppp    #类型为ppp3 J% ^' x3 J# T: d
7 J+ V* O, J+ d% L- @: Q3 W
6 u  K7 ]. S2 E3 ]  _7 m
四、客户端验证结果; o+ w) ~* t3 V$ ]" p
1、认证成功信息
" t3 C3 p( j# {% o3 q$ |& a% R然后客户端就会出现认证成功的提示:- l: l* X( h& M/ S/ _

8 T: K5 R, U: I: A[pppoe-client-GigabitEthernet0/0/0]
8 p2 M8 d/ m0 v+ o6 G' Y4 `: xJul 15 2021 19:09:23-08:00 pppoe-client %%01IFNET/4/LINK_STATE(l)[10]:The line p) H9 R  Y1 B+ B  h
rotocol PPP on the interface Dialer1:0 has entered the UP state. + X% F( B* s+ e5 I8 y
[pppoe-client-GigabitEthernet0/0/0]8 o& G) u$ Q; a" M$ n1 X) v
Jul 15 2021 19:09:23-08:00 pppoe-client %%01IFNET/4/LINK_STATE(l)[11]:The line p) q  j2 z2 e1 C* O
rotocol PPP IPCP on the interface Dialer1:0 has entered the UP state.
  U' y& V# E/ N1 ~! O. P; [5 q4 o[pppoe-client-GigabitEthernet0/0/0]q
7 G2 O4 I8 `! Y& v! e0 W/ V* B( O[pppoe-client]dis ip in b: a, ]$ V2 a. T! D+ U# a" K
*down: administratively down6 p! M+ ^7 _/ v* V* q% ?; `' z
^down: standby6 n3 J& N; N" Z( P
(l): loopback
& W* @1 I4 X* B% `/ h7 A9 M* U(s): spoofing2 ^% l/ o& y# d7 D$ N
The number of interface that is UP in Physical is 4
# Q% U) t5 N/ x) lThe number of interface that is DOWN in Physical is 0
- I4 |0 @! f3 Q  _! y/ bThe number of interface that is UP in Protocol is 3
% `& u: X( Y& {- }The number of interface that is DOWN in Protocol is 14 J5 W8 w+ r; E, v& s

) H' u3 \* h9 w8 n$ H& dInterface                         IP Address/Mask      Physical   Protocol  : [  ]+ J+ K2 b# p$ L
Dialer1                           10.1.12.254/32       up         up(s)     #拿到了PPPOE服务器上的地址6 o7 G' [0 _3 _$ [
GigabitEthernet0/0/0              unassigned           up         down      2 u/ i: T/ v5 _3 q4 x
GigabitEthernet0/0/1              192.168.1.254/24     up         up        
: D1 V& s. L, y2 W2 A8 z: bNULL0                             unassigned           up         up(s) - w7 h3 E: ~' r& ?$ K: v3 W

1 A, c/ h, e. Y* ?2 p7 M  T$ N) @9 `
2、pppoe-server 信息
: ?! U7 U! u1 C$ _' l; G, a<pppoe-server>dis interface Virtual-Template 1! I# @& l+ V4 d) C- ^
Virtual-Template1 current state : UP$ A; ]2 l( o7 x3 N
Line protocol current state : UP
- l3 \/ g" B2 aLast line protocol up time : 2021-07-15 19:09:22 UTC-08:005 u6 X% S2 D2 Z4 \" U9 }6 R
Description:HUAWEI, AR Series, Virtual-Template1 Interface: \+ c  @4 {9 `( r3 Q" }) L1 S
Route Port,The Maximum Transmit Unit is 1492, Hold timer is 10(sec)
2 y; S! q) V( ^! U+ SInternet Address is 10.1.12.2/241 Z8 ^0 c  D; C$ [$ P7 W
Link layer protocol is PPP
9 i  A" V9 Y5 u7 m, I* P) q; ]6 e# FLCP initial
' v2 H4 X+ n+ Q! |# sPhysical is None
8 w- j$ f8 L; O. |# t2 Z8 c& S2 oCurrent system time: 2021-07-15 20:27:28-08:00# b& B0 Z& ^7 }/ c( _9 a
    Last 300 seconds input rate 0 bits/sec, 0 packets/sec9 l& t) q1 T' Z/ y
    Last 300 seconds output rate 0 bits/sec, 0 packets/sec
4 ^, F; ?8 [. l  t; K; w    Realtime 0 seconds input rate 0 bits/sec, 0 packets/sec) W, o9 \! t* ^  j
    Realtime 0 seconds output rate 0 bits/sec, 0 packets/sec7 b9 ^, s7 _) j, Z) ]9 Q9 f
    Input: 0 bytes- Y9 s2 u! h+ M
    Output:0 bytes+ |! X/ }" B6 c$ S9 P2 R* g. J
    Input bandwidth utilization  :    0%
0 i/ a0 C! e4 [6 L6 i( Y8 U3 d    Output bandwidth utilization :    0%% V& S1 ~+ u; a/ E& `* O

8 T3 e$ n3 S6 x' R! X% G<pppoe-server>7 X' b+ C. E4 Z7 \
, e  n( c7 I' R7 B- \1 P- C6 ~

: f0 ]: A  Q8 V5 ]% p- {3 l$ m# j3、pppoe-client信息
7 @' j/ j' |/ A- Q& \<pppoe-client>dis interface Dialer 1: f- j4 T" M$ z9 u& i& W% T
Dialer1 current state : UP
+ @  Z) L8 N! z9 V3 n  oLine protocol current state : UP (spoofing)- q: k9 L7 ^! i9 F  j
Description:HUAWEI, AR Series, Dialer1 Interface
" Q. v. H7 j) B, [# rRoute Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
2 b/ k, `: N$ Z! H$ JInternet Address is negotiated, 10.1.12.254/320 D7 _% e: t0 m  E' A& w
Link layer protocol is PPP
" R  B4 \  I6 y3 X6 RLCP initial# E. ^* I( m# _$ [
Physical is Dialer8 ]7 P. u" h. ^- ^# i7 Y4 w9 }9 T, _
Current system time: 2021-07-15 20:23:56-08:00/ S+ w, Z! f- _' _: P5 f# Y
    Last 300 seconds input rate 0 bits/sec, 0 packets/sec
( z& L4 }/ N, T5 h1 x    Last 300 seconds output rate 0 bits/sec, 0 packets/sec
4 {& A0 W, w7 R$ o' c7 O" s    Realtime 0 seconds input rate 0 bits/sec, 0 packets/sec
3 x3 D' J4 K/ [. t! y+ O( L1 A* X    Realtime 0 seconds output rate 0 bits/sec, 0 packets/sec
* R9 H3 ]) k8 |6 A' \9 A% o0 Y% B+ J    Input: 0 bytes; b; N- j8 E1 j/ Y+ b
    Output:0 bytes
* Y9 d% \4 n6 c5 b/ A    Input bandwidth utilization  :    0%
5 ~, Z$ f! L+ {& f9 A# K    Output bandwidth utilization :    0%/ I  t" F- J7 a9 Q$ g
Bound to Dialer1:0:  S2 h, N: Z1 h) w  Z
Dialer1:0 current state : UP ,
5 W! z% ?. J' B- T1 PLine protocol current state : UP
: e( O" P+ }0 |. c* A; u
1 |: r% |5 ~6 B% BLink layer protocol is PPP' D) s* u( g6 u* s' |: o# t
LCP opened, IPCP opened
! }. e$ Y2 R  E0 Y; D& S2 z7 WPackets statistics:
% M) z4 a- U; H  Input packets:0,  0 bytes
, S' o! b+ b; b, F- y7 O) I( S  Output packets:4, 336 bytes. k+ i* x5 v, ~( O/ p8 r
  FCS error packets:07 y) ?! v5 [6 W5 D8 l  j! L
  Address error packets:0: U4 i! Z6 x3 ~, E7 y8 q3 s
  Control field control error packets:0. S/ t- v6 |! ~' p  R5 f" V
) p# j$ M) E% Y% e8 ^

" j6 |5 m  a1 s4 d) I4 x<pppoe-client>
( @) w" o  b5 C1 |" ^3 H9 K' T. L, I3 O9 ]. |
五、NAT的配置/ I, {, e! g& [& _$ v* V
用PC2直接ping 10.1.12.254是可以通的。10.1.12.254是AR1的g0/0/0口获取到的地址,其实就是我们常说的WAN口地址。8 H. k3 h) E2 V# q8 {% d
: F3 w6 W* A5 d& ]) g6 L
PC2>ping 10.1.12.254
- _. u% M6 V- _. Q8 w
3 Z3 _6 f4 U* l' p1 E! PPing 10.1.12.254: 32 data bytes, Press Ctrl_C to break- e3 t  t/ \1 E7 |+ T
From 10.1.12.254: bytes=32 seq=1 ttl=255 time=63 ms
5 f0 i7 I# b1 a- E4 M- g% JFrom 10.1.12.254: bytes=32 seq=2 ttl=255 time=31 ms
, V2 H! p# u; ~! W# |From 10.1.12.254: bytes=32 seq=3 ttl=255 time=47 ms
# M0 ?; w' R: O2 V5 JFrom 10.1.12.254: bytes=32 seq=4 ttl=255 time=31 ms+ |4 y. \4 ~  c
From 10.1.12.254: bytes=32 seq=5 ttl=255 time=47 ms. ~0 R/ u+ s! Z& J( D: o. }

5 A# _+ q4 f$ ]' V8 z& H--- 10.1.12.254 ping statistics ---
( G* t7 R( {( J  g9 @: W  5 packet(s) transmitted0 `: q) [( s! W' k, d# b5 G
  5 packet(s) received# P  k+ r3 l  j7 k( [
  0.00% packet loss
9 ^  Q0 e% q4 f$ I  round-trip min/avg/max = 31/43/63 ms. _3 l7 t* V' i9 b+ e. p6 ~2 ?0 I
- \" l# U+ J) i) |% F
PC2>ping 10.1.12.2
6 E$ X9 j4 Z  Q2 S. b5 V8 a) |  f+ Y# y* G% m, b! T
Ping 10.1.12.2: 32 data bytes, Press Ctrl_C to break8 x+ ]' g' Y/ a' B
Request timeout!
$ o5 |4 ?! `  U& mRequest timeout!
% T# E8 x$ z' m1 t4 W9 DRequest timeout!0 U" s* X2 ?/ u) S) @; E
Request timeout!5 T; X# C+ |% O
Request timeout!6 C- L, q4 O( K' _% T

1 z, M) H8 a$ f* h; w' `% ^--- 10.1.12.2 ping statistics ---
5 ^2 W! p' |2 D; v. O+ D0 h  5 packet(s) transmitted( q) ?/ E% x: F6 U6 B
  0 packet(s) received& o2 w( v- S4 P  C2 F4 y: @- \
  100.00% packet loss- p3 c1 c0 \* s( Y1 J
#但是无法ping通10.1.12.2$ \( C3 c2 V. M, T+ P# _, {9 v

; D1 Q$ T3 O( ?% `
: B% w0 U; U$ z+ T0 A无法ping通10.1.12.2的原因是:我们没有做NAT .接下来我们在pppoe-client上面做NAT
+ Q! _+ Z1 q" F/ U. `' _) p) _5 j9 W6 {/ q, F! M1 l
1、这里配置规则2000
3 [2 B2 c. X- }: R8 O6 m- N[pppoe-client]acl number 2000       
9 B5 j; w$ ?; N: r[pppoe-client-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.2559 i) g: t0 M+ D" G
& v& ?/ P5 k6 }+ g2 M+ ~+ C
2、将规则2000绑定到接口  C8 o( p7 Z0 v$ w
如下接口信息,需要注意的是pppoe的接口是Dialer1,并不是GigabitEthernet0/0/0口。我们必须将规则绑定在Dialer1口,最容易犯错的就是直接绑定在g0/0/0口。
: S& t) @" A  i
1 g& B1 I" q. H/ \. c) d[pppoe-client]dis ip int b
+ g8 R4 h+ z" x*down: administratively down
4 C1 k" j$ `1 i# U5 h2 k^down: standby
3 Y) |( z; }( ^; I6 n(l): loopback
3 x2 O) X, e" |- u5 g(s): spoofing! t- {# o' A  `1 ]
The number of interface that is UP in Physical is 4. q0 a$ p# y) @7 w7 }. e+ f
The number of interface that is DOWN in Physical is 0
6 W- H) Q  ^  p* G) s8 CThe number of interface that is UP in Protocol is 3  [) y0 |$ U% @1 j2 X; z. P; R6 N
The number of interface that is DOWN in Protocol is 13 ^( K0 t6 ]4 A5 M
( r- I$ D  T" B2 j" y
Interface                         IP Address/Mask      Physical   Protocol  4 l# o: k; V1 s
Dialer1                           10.1.12.254/32       up         up(s)     
' v: Q; g; e( ]- YGigabitEthernet0/0/0              unassigned           up         down      
+ m$ e" ?( r( p3 p0 FGigabitEthernet0/0/1              192.168.1.254/24     up         up        % q) _: M) E4 R5 i
NULL0                             unassigned           up         up(s)     
# i* [" S+ T# C, m$ t3 Q[pppoe-client]
$ i' K7 n) P" N9 M6 T" y6 B
1 T0 d& k* N  G6 d8 T4 }% I[pppoe-client]int Dialer 1       
8 ~8 s8 E, o0 T% @8 G: `) r[pppoe-client-Dialer1]nat outbound 2000
' f  |7 ]8 e- D" L" p[pppoe-client-Dialer1]dis th
" H" I, s3 m3 p+ D3 E8 y( a[V200R003C00]
$ [' @* v+ j; O% r1 Z#7 n; Q. B5 w; }& d2 _. Z/ a
interface Dialer18 C8 J0 Q% H5 I5 ?. S
link-protocol ppp* f: t, u: d& u0 l# l
ppp chap user pokes: J4 ~; p3 o4 J: T- N. Q* D+ z
ppp chap password cipher %$%$I/!'WCyd<7p[~8;,>51L,$sl%$%$; m4 |5 r$ z, r) D1 E& z/ |
ip address ppp-negotiate/ f! Y* D7 d, x9 y
dialer user zhprny/ h7 P" x  R* C! n1 Z# U3 P
dialer bundle 16 r# c; v; W6 C9 O
dialer-group 1- Q& P, l  Y; C. n; s
nat outbound 2000
" F9 c1 C" Z* a' d#
, E7 l: M* z- {5 m% Ireturn, n# [$ |5 F6 g2 @7 B3 X# b
[pppoe-client-Dialer1]0 J' ]' ^+ F5 A$ C8 N6 G& Y

$ W% ?# N# \7 \接下来我们就可以ping通10.1.12.2 了。
7 S! M2 I  ~! x3 B7 h1 f! [5 N2 D* m
% i2 y' u$ m- z8 n/ SPC2>ping 10.1.12.20 G; J* G( B# \; K& T9 W
- H# v( W+ Y( P/ i. X
Ping 10.1.12.2: 32 data bytes, Press Ctrl_C to break  P6 R* t6 N# t8 E+ |
From 10.1.12.2: bytes=32 seq=1 ttl=254 time=31 ms
- Q. d5 t' N' ~1 e; \% @From 10.1.12.2: bytes=32 seq=2 ttl=254 time=32 ms) l) p# A" z3 }/ t
From 10.1.12.2: bytes=32 seq=3 ttl=254 time=46 ms$ b  M9 x" O* y
From 10.1.12.2: bytes=32 seq=4 ttl=254 time=32 ms; R2 y2 [- K6 V) x& _0 s* u% z' _" x
From 10.1.12.2: bytes=32 seq=5 ttl=254 time=31 ms. y5 f0 V6 `4 s

0 }3 S9 F7 I8 ?6 J2 F2 v, }6 L--- 10.1.12.2 ping statistics ---1 j; {8 F# R" Y- v8 M
  5 packet(s) transmitted
' `. B2 b1 \& y" M0 q2 Y5 s  5 packet(s) received% g% e1 Y& F4 m" v# |
  0.00% packet loss6 ^$ _2 g0 E$ \* Q# m
  round-trip min/avg/max = 31/34/46 ms
# j; X# N( h+ Z6 m( P. j& ?7 f& X% M. f; C7 D# Z6 \
- I0 h* Z9 P, H0 h4 s
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:53 , Processed in 0.025894 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表