易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 990|回复: 0
收起左侧

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

[复制链接]
发表于 2022-3-16 09:39:09 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
实验环境
7 D9 N! f  a5 e4 B: j7 z" O6 V" w' H0 G
pppoe-client上面的接口信息
8 A: z8 g* p5 y8 \
8 `. O" S4 o1 e* ?9 T+ \  l[AR1]dis ip interface brief - M; _# d* z7 b* L% ?
*down: administratively down9 B* s$ S0 O+ ^! C1 _! T1 L! L
^down: standby
7 L0 t- y+ [' c. p& ]1 J(l): loopback
4 [" F+ S- k$ M" k. Y7 }(s): spoofing
$ F; w4 @& v- i$ X9 J% bThe number of interface that is UP in Physical is 2' f/ I; R8 G, }: F# b+ R! r
The number of interface that is DOWN in Physical is 1' @, q. H! K8 z" v# n% h, A' F
The number of interface that is UP in Protocol is 1; u3 u: Y$ U) S" O
The number of interface that is DOWN in Protocol is 2; i: z5 w  h) @- u# ^* K( g; ?

7 j9 B  J/ s+ F7 h+ V4 zInterface                         IP Address/Mask      Physical   Protocol  
" ?, K/ ?% [4 f7 Y3 n5 x! \GigabitEthernet0/0/0              unassigned           up         down      9 _$ x  x+ o. ]- w
GigabitEthernet0/0/1              192.168.1.254/24     down       down      
- X. L% }& K, h# WNULL0                             unassigned           up         up(s)     
) z1 D3 B2 d- _4 u; O
& j$ p( [/ G9 a8 O. s2 |: S) ?% p3 K* O( `1 w5 z2 i+ t
配置了基于接口的DHCP( [0 b) F& M0 V& S0 H

$ Z* y" k/ Y: F, t5 iinterface GigabitEthernet0/0/1
& L# v+ g. r0 V& s! i ip address 192.168.1.254 255.255.255.0 5 L7 U/ J: @8 r# h) F0 R6 W( v
dhcp select interface
, h. t% h0 l5 Z' F6 G8 r dhcp server dns-list 8.8.8.8 ' T' w6 G# U2 ^4 ]+ E9 z% N
dhcp server domain-name pokes.com
# l4 [/ V& q4 c- x" z& f! b8 @7 U8 a. w3 ]8 n& w) e
注意事项:AR1、AR2的物理接口g0/0/0不配地址.
' G( I  ^5 Z& d0 h5 r$ u; j: }+ S2 i
# r& _( I& X7 A* ?$ q' u一、pppoe-server的配置& M3 V+ X6 J3 G' `/ A
1、pppoe-server 配置地址池
3 R- |# X! [* c$ `* W; a[pppoe-server]ip pool pokes            #创建名为pokes的地址池,名字可以随便起,后面要调用9 j$ f/ U  x: }" l6 W1 o7 A" a
Info: It's successful to create an IP address pool.3 w% K" d3 j! r( z- h1 s
[pppoe-server-ip-pool-pokes]network 10.1.12.0 mask 24   #地址池为10.1.12.0/24; r0 i9 h+ ?: w- A
[pppoe-server-ip-pool-pokes]dis th' H, \6 |; P$ X" m2 n6 l
[V200R003C00]
1 w; G) R( g0 T5 s5 l2 ~0 I#4 F& M% _( `1 M
ip pool pokes
! Q) D3 i( O* f" a* o& N network 10.1.12.0 mask 255.255.255.0 : c1 [! a  K' d! P0 K
#4 g3 E+ e. ~3 q5 J4 D8 h$ G
return
/ P% f0 |" v/ y. W* p[pppoe-server-ip-pool-pokes]q* Q& K! w$ A  y# ^% K: g' R

) |3 g3 H0 J0 B2、配置虚拟口关联地址池8 }/ d8 K- i9 Z( L9 D4 W1 A4 V
配置虚拟口关联地址池,即创建Virtual-Template 1模版。
/ V: o# F6 [3 P3 M' ]3 f- c7 Y& N- h( W7 J
[pppoe-server]interface Virtual-Template 1    #创建虚拟接口1
9 s; M8 U5 x: E* o- z4 g" B[pppoe-server-Virtual-Template1]ip add 10.1.12.2 24                   #虚拟接口1的地址
: Q0 ?# T7 b( I1 B2 P" {8 X1 W[pppoe-server-Virtual-Template1]ppp authentication-mode chap   #认证类型
8 Z1 Z8 \! k. ?* u9 y1 x5 B  Z8 {[pppoe-server-Virtual-Template1]remote address pool pokes      #客户端的地址池pokes
: E' `" x$ X3 i9 O7 q5 ~[pppoe-server-Virtual-Template1]dis th
+ ~; p' X! p+ v. Yinterface Virtual-Template1: b+ L: A9 ~5 f
ppp authentication-mode chap
! J; K7 u( D8 o0 w$ B remote address pool pokes7 }* E8 x6 q7 t4 Q  r7 ?- u, D# ?
ip address 10.1.12.2 255.255.255.0
" B( N; X0 c% U# B, h
% H/ \; ^) f5 C5 j4 C[pppoe-server]int g0/0/0       
' Z% A; m# Y! a1 P7 U# ?/ I[pppoe-server-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1   #将虚拟接口1关联到g0/0/0接口7 R1 e# v+ @3 W/ A4 [
[pppoe-server-GigabitEthernet0/0/0]dis th6 h% Q3 U: B+ ^- v5 b1 x
[V200R003C00]
) h. o/ P" b* k" \! k7 O" M! k0 [0 x#: b  _" M# P4 v+ N3 A% G
interface GigabitEthernet0/0/0
1 ^) a: b! ?4 O( T1 }# S: m3 s pppoe-server bind Virtual-Template 1
) L' s0 v$ L9 p& s) l#
1 F& r, {- g# t% @return- |0 c7 `3 K$ T, m, x; G4 w6 d
[pppoe-server-GigabitEthernet0/0/0]" G. i/ |9 S+ s  A' `
' F  k# A* N1 k
3、创建pppoe拨号的账号* V3 C1 d9 S3 M4 B
按理我们应该创建pppoe拨号的账号。
- k7 o1 B0 j' A6 J1 U这里为了演示拨号失败,我们这里先不新建账号,后面再新建。9 l! K" l9 |$ D- U& ]( o/ K
( \3 e8 X5 G6 ]( h
二、pppoe-client的配置; ~3 T, |4 z: |* s7 Z* w* b2 h+ \
[pppoe-client]dialer-rule   
/ `1 K6 q' g2 q, \/ u[pppoe-client-dialer-rule]dialer-rule 1 ?  c. B# ^8 s9 J( n( J/ w. }, D
  acl   Permit or deny based on access-list   
& Q2 a' p: t% p5 i! J: O  Z  ip    Ip
# ]/ g$ h7 Y0 d, ^/ k  ipv6  Ipv6        + }; l" {! }7 h
[pppoe-client-dialer-rule]dialer-rule 1 ip permit   #创建拨号规则,允许ip流量触发拨号1 B( |  `% f9 o+ q/ R. y9 p( d- I

! w( f" L1 t- M1 f1 a[pppoe-client]interface Dialer 1
1 H2 T8 ^! @' H2 X( i0 lJul 15 2021 18:55:22-08:00 pppoe-client %%01IFPDT/4/IF_STATE(l)[0]:Interface Dia- E( l4 Z) u. Y% J
ler1 has turned into UP state.6 P# W1 `  z& E. \/ {
[pppoe-client-Dialer1]ip add       
  M$ }* F, U2 I3 W[pppoe-client-Dialer1]ip address ppp        6 \) ]& I2 A- j0 z9 y: H
[pppoe-client-Dialer1]ip address ppp-negotiate  #地址采用ppp协商
% W' g! E0 {7 G& _' A4 ?: ?6 E! p0 ~" _+ d" i& G* k$ g
[pppoe-client]interface Dialer 1                #创建接口拨号组1' ?9 H5 L5 [" i( P$ I2 D
[pppoe-client-Dialer1]ip address ppp-negotiate  #ip地址采用ppp协商/ m3 U6 D9 V1 o, r. x
[pppoe-client-Dialer1]dialer user zhprny        #此用户不用于认证,是标识作用以及和dialer绑定
& Z9 G. |" }3 u) |$ [9 w0 B, Q$ y[pppoe-client-Dialer1]dialer bundle 1           #设备通过Dialer bundle将物理接口与拨号接口关联起来。
% s: N7 y0 T# t, {: W6 E/ R/ A- B[pppoe-client-Dialer1]dialer-group 1             #放到一个拨号访问组1中
8 {/ d/ V) y) v0 q: j# S% P2 @: E[pppoe-client-Dialer1]ppp chap user pokes        #指定dialer1接口的编号,拨号账号
$ I. x- Y3 k& F; a[pppoe-client-Dialer1]ppp chap password 123456   #拨号的密码4 Z: O+ o* w( L+ ~
% y& D& L; |0 o3 U2 _, C
: B3 N6 r/ [: v2 y4 T) g: \
[pppoe-client-Dialer1]dis th) A1 }% I- c7 q+ ^: B' W
[V200R003C00]/ v! E. m; N; a& E6 p& \2 l# X
#
, i* s+ d" N$ W2 p3 W" zinterface Dialer1
( b2 o  B. L; d; I link-protocol ppp7 u/ c- g' ^0 G9 t' V# p9 v
ppp chap user pokes4 H1 b+ g( I1 p! r- T5 Y5 a' V8 Q" m
ppp chap password cipher %$%$I/!'WCyd<7p[~8;,>51L,$sl%$%$
% R$ Q4 H1 t4 |2 N; d) ~ ip address ppp-negotiate
* I2 |7 c! G+ F/ Y) G dialer user zhprny' R8 f  n9 W2 n" @* w& B% J5 b
dialer bundle 1
- Z: ?  r; [& F/ E# z, S dialer-group 1
9 E8 m, ^; F: T( T6 _) I6 m$ U/ A% {, E6 ^/ z  z
[pppoe-client-GigabitEthernet0/0/0]" e$ R. F0 |* t% g* Y
Jul 15 2021 19:07:54-08:00 pppoe-client %%01IFNET/4/LINK_STATE(l)[0]:The line pr- ^; H; |- B9 e, w
otocol PPP on the interface Dialer1:0 has entered the UP state.  #PPP已进入启动状态
% w' N/ r5 i4 @, p8 T[pppoe-client-GigabitEthernet0/0/0]0 y- K! n# E0 M
Jul 15 2021 19:07:54-08:00 pppoe-client %%01IFNET/4/LINK_STATE(l)[1]:The line pr
, j+ \' ]( W7 Gotocol PPP on the interface Dialer1:0 has entered the DOWN state. #PPP已进入关闭状态5 N- C/ b) D8 x- x0 q# D' m5 m
& b& s3 S3 j: T+ j" r: P5 t. m
#不停的循环。。。。
' ]0 P2 p* z/ l  j9 g
/ `. P  ?2 f- y' r! M! n7 y: U3 U5 o. r, E. H0 q; a
#原因是没有认证成功,因为我们在PPPOE-server上面还没有创建认证用户和密码) p+ X6 W4 i' P7 u! H
. N9 G) N/ C& ?8 C* F8 x# i
三、pppoe服务器上新建认证用户6 R  K0 X  T8 }
我们到服务器上直接新建认证用户:
3 x# D4 L4 q" Q+ z9 o1 R) u! x/ z# e) `  [2 e# @8 A" E& c/ r* R
[pppoe-server]aaa
4 K: b- S) S7 ^; Q[pppoe-server-aaa]local-user pokes password cipher 1234567 V) J8 G, f' |
Info: Add a new user.0 S# @: d' D. @! O4 W
[pppoe-server-aaa]local-user pokes service-type ppp    #类型为ppp  l! Z4 r' ^/ J9 _' S8 J  t
' }, \+ L/ Q4 P5 \
, U* B3 h% ~& X. Y# I  s! }5 b
四、客户端验证结果/ c3 i* ]0 V# [
1、认证成功信息( L" h, M2 j$ C# l# e
然后客户端就会出现认证成功的提示:& g' T8 h0 w2 M/ e- c/ |0 M# u

! m, @6 A1 S9 O0 Z* C& |' `* s[pppoe-client-GigabitEthernet0/0/0]3 h4 F8 u* k- |9 @
Jul 15 2021 19:09:23-08:00 pppoe-client %%01IFNET/4/LINK_STATE(l)[10]:The line p) }  R# z' }. ~) y# v1 `' p" G
rotocol PPP on the interface Dialer1:0 has entered the UP state. " \0 B5 K" ^. N: ?7 z+ P7 R
[pppoe-client-GigabitEthernet0/0/0]; w7 @% M& N0 c' p
Jul 15 2021 19:09:23-08:00 pppoe-client %%01IFNET/4/LINK_STATE(l)[11]:The line p
! E- H' y; Z8 Z: l! _/ krotocol PPP IPCP on the interface Dialer1:0 has entered the UP state.
9 v  \% S# u! ^5 p5 h# t) O[pppoe-client-GigabitEthernet0/0/0]q- |% R3 V- \- \0 N
[pppoe-client]dis ip in b
! U( R1 v2 W7 ]( u9 q% q# |*down: administratively down
! K9 Z( q3 P7 j0 K5 e- y^down: standby
, T3 Y" [3 B# X) M9 X(l): loopback  h' a* Q3 s  ]' x$ x& ^6 Z4 N
(s): spoofing
  C- W6 ^* j1 y! \* x  i6 a$ X: {The number of interface that is UP in Physical is 4
; ?6 b# M0 K' aThe number of interface that is DOWN in Physical is 0' S  r; Q3 B  c' F5 b2 g! o
The number of interface that is UP in Protocol is 3
- W( m4 a, f# U5 T& i0 B% yThe number of interface that is DOWN in Protocol is 13 J! |5 D' a7 H$ A5 x
( G1 A* U1 e6 Z$ K5 S6 _
Interface                         IP Address/Mask      Physical   Protocol  
# C& @! @, T( g+ b5 xDialer1                           10.1.12.254/32       up         up(s)     #拿到了PPPOE服务器上的地址
  x/ y9 W! K4 P* b& z3 G5 p( L2 `GigabitEthernet0/0/0              unassigned           up         down      
$ f! J7 ?' I; L2 \; cGigabitEthernet0/0/1              192.168.1.254/24     up         up        
( X7 g' r' G# gNULL0                             unassigned           up         up(s) 2 [! H1 D6 w$ l/ Q, l5 ~

6 ?* @1 U; k9 w- X1 l( w. k
2 n( {: L: [; ^2 U- F2、pppoe-server 信息/ z$ Q$ R5 j0 u6 f
<pppoe-server>dis interface Virtual-Template 1
) J' f$ {+ D( PVirtual-Template1 current state : UP
4 e& ^( d; h. V! tLine protocol current state : UP
9 J) F6 D  {  k( uLast line protocol up time : 2021-07-15 19:09:22 UTC-08:00
* u9 e/ O" l, j8 R8 o: H2 N' zDescription:HUAWEI, AR Series, Virtual-Template1 Interface8 ~3 @9 a- D& J- L! z/ n
Route Port,The Maximum Transmit Unit is 1492, Hold timer is 10(sec)+ N; ]" S8 t8 \4 f. D
Internet Address is 10.1.12.2/24
6 D7 T. I! A; h! C, [' V3 fLink layer protocol is PPP, z# ?& G/ F- f. i
LCP initial6 ]% U+ z+ b: A( o8 L
Physical is None7 k! Q5 |4 r" N5 S$ a
Current system time: 2021-07-15 20:27:28-08:00
5 q$ i* @* s$ h, ]    Last 300 seconds input rate 0 bits/sec, 0 packets/sec
( E6 u0 @9 M) Q) K& y1 X. P, F$ R& t! S    Last 300 seconds output rate 0 bits/sec, 0 packets/sec
' @: Y. a: g9 F" b% y8 t    Realtime 0 seconds input rate 0 bits/sec, 0 packets/sec. o* c- b5 L  ~5 x+ R9 Y* N
    Realtime 0 seconds output rate 0 bits/sec, 0 packets/sec9 Z# m5 V1 W) R( v+ r: v1 Y
    Input: 0 bytes" u. @* k+ i$ _0 y1 o2 S
    Output:0 bytes
( K6 w7 c" @6 W7 Z( I' }& Z- ?- u- P0 K    Input bandwidth utilization  :    0%* x+ u5 e0 L8 O( b1 V- z8 @
    Output bandwidth utilization :    0%
- P* d; k* i! J' J4 V  J  r1 E, Q" j3 H+ l
<pppoe-server>) \  A) `$ v! j  J2 f) E
* h/ R" u* ]! r- I- }9 ?

( I1 E" I7 |  _6 a" N2 u4 z8 c3、pppoe-client信息, n# o6 Q2 g1 c6 M7 M) Y
<pppoe-client>dis interface Dialer 1! z) y3 Z, b" }' r$ q% z) _
Dialer1 current state : UP0 _6 a, N8 s2 ~$ m
Line protocol current state : UP (spoofing)" a. U+ C% s" W5 O, W2 y# o" J, z. {
Description:HUAWEI, AR Series, Dialer1 Interface
# D* F. \  ~0 d8 D' q& e# GRoute Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec), M# }$ D( {1 j2 A" k
Internet Address is negotiated, 10.1.12.254/32+ t- t1 Z& C) B& G0 y4 z
Link layer protocol is PPP. B6 I8 k& j6 w. r+ Q$ I  n, K
LCP initial
% K6 D  I2 O# e" k8 T$ N3 ]2 PPhysical is Dialer
2 ]0 k4 {/ q8 M* F0 I  ?Current system time: 2021-07-15 20:23:56-08:00
& @& ?: N& |6 X9 |1 Y& k/ }8 H    Last 300 seconds input rate 0 bits/sec, 0 packets/sec! z7 v% X$ l) K6 m* c3 A/ m2 E
    Last 300 seconds output rate 0 bits/sec, 0 packets/sec
( b  `+ f9 @* l4 Q4 ]9 E" w. c    Realtime 0 seconds input rate 0 bits/sec, 0 packets/sec" ^5 z, @7 ~4 F) E/ ^- r( S* {. k
    Realtime 0 seconds output rate 0 bits/sec, 0 packets/sec" u7 M& T( W9 f
    Input: 0 bytes4 U; o( R6 ]" y7 U# _3 h+ A3 R9 A
    Output:0 bytes) p. p3 {2 g" {# ]% \
    Input bandwidth utilization  :    0%
7 c  ?$ U1 y- B" |/ W# J    Output bandwidth utilization :    0%
3 d- P* w1 p. a, Q- EBound to Dialer1:0:1 u0 r9 _6 p& O% P9 n* Q
Dialer1:0 current state : UP ,
6 e- R1 b9 x0 O7 JLine protocol current state : UP
) F  V( P' l9 u8 E! V! g$ H1 [) i0 D1 c
Link layer protocol is PPP
/ N/ M) b2 x( a3 u9 ]% l0 vLCP opened, IPCP opened) g- a" X* y) U
Packets statistics:1 `1 Z( W8 ]+ U/ L
  Input packets:0,  0 bytes4 ^, R2 O) J+ E5 u8 u/ s( d6 G
  Output packets:4, 336 bytes  G. g( r9 k2 F2 i" X5 i7 b
  FCS error packets:0+ m# `: C, `' G7 ?; b
  Address error packets:0
/ O" W) h3 r/ Y6 M  Control field control error packets:02 `6 S; U8 _" o! [

: v3 v  h+ B( |+ n9 y* G( c5 v& b' `+ c
<pppoe-client>* z7 h4 G$ h$ {/ C* \3 i) F2 x
+ I$ ], g% V& y1 Y: [
五、NAT的配置
' y! V  \# I( K7 x! l) Q: b4 ?用PC2直接ping 10.1.12.254是可以通的。10.1.12.254是AR1的g0/0/0口获取到的地址,其实就是我们常说的WAN口地址。$ R! V5 _9 b5 R) ]9 Y
- X- v: x6 s/ K( j% j
PC2>ping 10.1.12.2545 P6 o$ M8 y- |- l$ g% D# x" U

6 r/ m9 J9 \& h& Y1 iPing 10.1.12.254: 32 data bytes, Press Ctrl_C to break
; @3 a) v( a- |, h6 OFrom 10.1.12.254: bytes=32 seq=1 ttl=255 time=63 ms
; Z# G3 a! U7 }) zFrom 10.1.12.254: bytes=32 seq=2 ttl=255 time=31 ms7 F  M% Q# n" Y1 v* W" w' m
From 10.1.12.254: bytes=32 seq=3 ttl=255 time=47 ms7 f; w$ G' ?2 m# Z
From 10.1.12.254: bytes=32 seq=4 ttl=255 time=31 ms
. t( n4 Q% \) P( ^From 10.1.12.254: bytes=32 seq=5 ttl=255 time=47 ms( d6 ?1 x" I  h: @1 Z0 ]
5 x/ H( ~, r# q+ m  d
--- 10.1.12.254 ping statistics ---
2 a  m/ x% {8 V  5 packet(s) transmitted3 [$ `- T+ S# J% F; P, @
  5 packet(s) received
8 `9 `" O4 b* {, [  0.00% packet loss
% J  B& w/ E. y  round-trip min/avg/max = 31/43/63 ms% O  H, u1 o# A1 n3 F

2 N: X! O2 N' T9 UPC2>ping 10.1.12.22 T; m9 H1 V% Z/ F9 i1 {8 c! a5 Q

2 V4 J" [6 l9 j# |" s2 nPing 10.1.12.2: 32 data bytes, Press Ctrl_C to break
1 h% M, _! m) P! ^* vRequest timeout!
7 G5 {/ U$ g# [0 t! K. d9 c) x6 wRequest timeout!" K. d2 F& S' i+ r/ @: b. C9 m! T
Request timeout!6 X# @! [; E* X; \, [6 m1 J, r
Request timeout!
6 [8 T, m1 _3 K+ @  O/ m* BRequest timeout!
9 t7 T; j1 X* C; R2 j1 [" ^) w& L6 A0 E% v) F; l8 g' @
--- 10.1.12.2 ping statistics ---: ^& W+ L7 s1 t: _! n2 o# o+ Y
  5 packet(s) transmitted( g- p3 }6 [% G; p* t
  0 packet(s) received
- i1 t6 P0 r  Z9 |  L* a  100.00% packet loss, q3 P3 C4 _5 ~: d! Y$ E% }
#但是无法ping通10.1.12.2+ w4 C( e/ U6 y9 R8 q

( X! c! U& K) }( U# X$ j1 g
9 v" I+ e) P" w( i0 V无法ping通10.1.12.2的原因是:我们没有做NAT .接下来我们在pppoe-client上面做NAT
" d8 @( {9 W& o0 E6 M" `; i. t% `- s8 F
" }  P2 V& x9 V1 V- s* J1、这里配置规则2000
3 K& h' c& V; H. d[pppoe-client]acl number 2000       
7 ~4 t+ I* p6 T$ [! H[pppoe-client-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
9 ]/ _6 u7 r3 M5 S# ]2 A+ o2 e1 h/ T; F. u5 h: a
2、将规则2000绑定到接口
. j1 U* S$ p/ L6 H/ w& r) M! ~& D/ w如下接口信息,需要注意的是pppoe的接口是Dialer1,并不是GigabitEthernet0/0/0口。我们必须将规则绑定在Dialer1口,最容易犯错的就是直接绑定在g0/0/0口。6 C' p3 l: m$ p& G2 u: U* M" q
/ h% `. o! @3 z
[pppoe-client]dis ip int b
3 E9 j7 C( L  I# K# K$ @*down: administratively down) N$ Z- p( d& d
^down: standby1 |# W1 `9 \! S2 q
(l): loopback6 q: A- o5 M" P( r& r& r- O
(s): spoofing
, _4 L: \) \8 b& d" tThe number of interface that is UP in Physical is 4
. H- g/ y9 [5 \; |  }The number of interface that is DOWN in Physical is 0$ j! Z# o: N! |- z0 _0 d$ I0 l, `- _
The number of interface that is UP in Protocol is 3
7 H9 \  {1 ]3 s, I6 M6 a; E/ JThe number of interface that is DOWN in Protocol is 1; f2 Q; ~$ m0 D; E' ?6 s7 E( A
/ L' X  x& k/ ^0 d7 C
Interface                         IP Address/Mask      Physical   Protocol  
+ S( f, j9 z$ ~Dialer1                           10.1.12.254/32       up         up(s)     
+ [" X) F( b1 G! ZGigabitEthernet0/0/0              unassigned           up         down      3 W+ \. d& r/ f- Y5 s
GigabitEthernet0/0/1              192.168.1.254/24     up         up        
3 V+ u3 s" i( j" j& s3 vNULL0                             unassigned           up         up(s)     * P7 C, G+ r  {. F. u
[pppoe-client]
* T* F/ F6 S; y5 Q- Y1 W7 e6 X5 A9 T- C2 Z9 p4 j& |
[pppoe-client]int Dialer 1       
- C  `7 g/ Y! J; n# V; |[pppoe-client-Dialer1]nat outbound 2000
8 n7 T6 n2 \0 ]3 {, M: O- X  i. `[pppoe-client-Dialer1]dis th
: n  h+ P1 _. @: y[V200R003C00]8 u  u6 d! a0 {- V$ G# n
#
' H, s& Y6 f6 N+ Finterface Dialer1+ \! H# B3 F& Z3 B3 ?4 K3 j
link-protocol ppp2 s# A5 E' K" D0 @
ppp chap user pokes8 |) ~  t9 \, k7 ~  X- ^6 k7 y5 k
ppp chap password cipher %$%$I/!'WCyd<7p[~8;,>51L,$sl%$%$
' J5 T3 c' w$ N5 p  f5 ^, [ ip address ppp-negotiate
- x+ d8 m# i" }3 \5 {# f dialer user zhprny. C" T3 q: M: g6 {
dialer bundle 1
" W1 E% O" z. l( ~- ? dialer-group 1; p6 \& T3 O' t0 d4 ~
nat outbound 2000$ |8 I* Z' W, C" @
#! k) z* p. y) m- m
return' h0 W% O" B  p$ j# @
[pppoe-client-Dialer1]
  p1 {, }7 w+ o5 U6 p2 J6 ~7 W
; j# V, ]$ Q! v' t: a$ x接下来我们就可以ping通10.1.12.2 了。  S* |6 T3 Y' [3 ^" g

7 x' {" I9 w! v# Q" I1 lPC2>ping 10.1.12.2% g$ e% m# Z- j% Q/ n
9 V5 T1 T6 B8 k, Y
Ping 10.1.12.2: 32 data bytes, Press Ctrl_C to break
- Y3 T- m; i8 b* k" f8 j5 |From 10.1.12.2: bytes=32 seq=1 ttl=254 time=31 ms3 h( P1 G7 O2 ?/ Z
From 10.1.12.2: bytes=32 seq=2 ttl=254 time=32 ms$ p4 n& t5 K/ S
From 10.1.12.2: bytes=32 seq=3 ttl=254 time=46 ms# ^! H. j: e  \! I
From 10.1.12.2: bytes=32 seq=4 ttl=254 time=32 ms/ v3 |6 O* W5 v, y% l: R
From 10.1.12.2: bytes=32 seq=5 ttl=254 time=31 ms
) N, O  I0 ~9 N. L
8 s+ R' w$ a; k7 A0 ~4 C--- 10.1.12.2 ping statistics ---
, s  ~; {2 p. D% j( p! y1 J: P8 ?  5 packet(s) transmitted7 ~3 Q8 G& R' g+ Y' L
  5 packet(s) received, n0 _# B& E8 h2 G1 s" h5 Q2 C
  0.00% packet loss
( q$ ^2 C9 x9 c# y, v( X  round-trip min/avg/max = 31/34/46 ms
) z/ |4 ^3 |' \+ k* f2 F& A) Z6 W2 L. }8 `9 G  N
6 P5 p, }, x7 P3 m/ p, v2 f
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 20:21 , Processed in 0.058515 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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