易陆发现互联网技术论坛

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

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

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

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

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

x
实验环境# h% k" P% b, T& K, x

6 y' G3 e* a8 E. T- y2 G2 Fpppoe-client上面的接口信息  r3 [0 ~& r- |% n$ b) I$ [# s

4 X( Q( h+ I$ X[AR1]dis ip interface brief 4 A; c. k! c- h2 o& P( W2 r4 o* F4 s
*down: administratively down
4 q4 P, J8 Q* m1 Y9 ?^down: standby4 m. W* I! K7 E8 O/ ]
(l): loopback/ d! C  G! d2 ?, E1 c) F
(s): spoofing9 b0 v& J* F4 d, E
The number of interface that is UP in Physical is 2
3 N+ V) q9 L: ^# `, V. L2 CThe number of interface that is DOWN in Physical is 14 ~9 h( e2 q: Z, A+ f
The number of interface that is UP in Protocol is 1, `: K: y3 B% C' E+ |, g' k0 n
The number of interface that is DOWN in Protocol is 2$ a* Y( ^, y: O8 x- ~/ b
2 A3 t& C1 {! A) o% x+ D0 T7 G
Interface                         IP Address/Mask      Physical   Protocol  ; X* {  \; ^. e  n$ ]# V" O
GigabitEthernet0/0/0              unassigned           up         down      5 K0 L( H3 Q2 O2 f; e+ G
GigabitEthernet0/0/1              192.168.1.254/24     down       down      0 u+ N& Z7 G5 W, o, w1 S
NULL0                             unassigned           up         up(s)     3 ~# O1 K4 u% w) J1 W1 N" z1 u

; Z3 t' e8 p$ o
9 |' Z2 B0 f$ c2 h$ J配置了基于接口的DHCP9 n6 _9 T6 J- ?; ]. j, p

; M6 b$ m7 u; b  y4 f4 rinterface GigabitEthernet0/0/1
7 B8 s4 c8 f) }# `2 i. l ip address 192.168.1.254 255.255.255.0
5 J$ ~# ^2 L  k  w5 l0 N/ i dhcp select interface# r' K0 Q5 h5 O: C8 Z! i. D( S
dhcp server dns-list 8.8.8.8
' z4 \, o* H! t/ G+ w dhcp server domain-name pokes.com$ d+ [' N9 R  w8 z' Z! {- t

- [+ H8 z! j* m+ I/ P" D1 k注意事项:AR1、AR2的物理接口g0/0/0不配地址.* d" d) _, x; P/ V: }
, X# E% Y; d2 m+ w
一、pppoe-server的配置' b0 _$ N1 d& z* S6 w
1、pppoe-server 配置地址池  ?. w: m8 f+ j8 K
[pppoe-server]ip pool pokes            #创建名为pokes的地址池,名字可以随便起,后面要调用
- q# d2 h0 d" a- M: q# iInfo: It's successful to create an IP address pool.
- C- ]4 u6 ^8 I) d5 x0 H8 \" d6 J[pppoe-server-ip-pool-pokes]network 10.1.12.0 mask 24   #地址池为10.1.12.0/243 K( p/ W9 v3 ?: R7 O1 c0 T
[pppoe-server-ip-pool-pokes]dis th
" D5 e+ W: f: q/ W3 O+ e! a[V200R003C00]$ |+ D. `: T3 H8 z# [
#
0 T3 }& I2 C8 h$ J  u) V. [- Yip pool pokes0 T0 |! |) n+ a+ }) h0 K7 l( z( o" d. I
network 10.1.12.0 mask 255.255.255.0 3 ~6 `- a3 w8 m/ h( I
#
+ r% I. j# c6 N8 h6 \2 i( ?. E* \* Qreturn
& T: s2 o. v& E[pppoe-server-ip-pool-pokes]q: [# g$ P  T3 X
" P3 c( p5 |3 @# Y9 N$ J8 E. e
2、配置虚拟口关联地址池( M! x4 X$ \7 R
配置虚拟口关联地址池,即创建Virtual-Template 1模版。
% s( }2 n4 G' e, I! @/ d  V2 M; D8 X$ ]* S2 k
[pppoe-server]interface Virtual-Template 1    #创建虚拟接口1
1 N9 z' ?* ^. A: l[pppoe-server-Virtual-Template1]ip add 10.1.12.2 24                   #虚拟接口1的地址+ z6 s7 z  F. K2 C
[pppoe-server-Virtual-Template1]ppp authentication-mode chap   #认证类型! P* z  ]7 f7 ~( X+ Z
[pppoe-server-Virtual-Template1]remote address pool pokes      #客户端的地址池pokes7 t( k3 u' P+ \6 G' p
[pppoe-server-Virtual-Template1]dis th% h# v; U! i8 C8 N1 |
interface Virtual-Template1
$ f5 T) \8 i$ q- E( k ppp authentication-mode chap / q7 |# n9 \9 f8 D% d% e. z' l8 x; h
remote address pool pokes, O' ]8 R5 Z/ v$ k& j
ip address 10.1.12.2 255.255.255.03 l+ v8 p' r# S9 ?
* W$ d3 \0 Y: x# m" Z% [* O
[pppoe-server]int g0/0/0        & [3 e# Q* E: G: ~) U
[pppoe-server-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1   #将虚拟接口1关联到g0/0/0接口
' S) a, ?/ x$ _* j, d[pppoe-server-GigabitEthernet0/0/0]dis th7 j; @! R) h, U  d5 Y) [
[V200R003C00]
+ V% I: M9 f, p$ \9 i#
* J7 a! i/ q; g9 Uinterface GigabitEthernet0/0/0
1 y) Q! ?) E8 c) U pppoe-server bind Virtual-Template 1- Y& _# H# |3 n3 A% R
#, Y/ g: {; y  G. ~% N
return
3 g# J: F+ b3 q7 Z2 Q, w[pppoe-server-GigabitEthernet0/0/0]
5 v! |5 I. q+ I+ b+ g9 N1 e, d0 N: |2 F5 E. x
3、创建pppoe拨号的账号
0 v. W% ?) a. O# {# ?8 O按理我们应该创建pppoe拨号的账号。3 Y* r; q8 A6 B& H* I- l: F% d0 l
这里为了演示拨号失败,我们这里先不新建账号,后面再新建。
+ p2 @6 C% f$ F  N( @/ a  Z' V- k/ C7 U. {# ]! Q# H( {$ e# f) x9 z  E/ B
二、pppoe-client的配置
0 F! `# I3 l) h1 @[pppoe-client]dialer-rule   & o& u* w6 E: y" A- n& n, y
[pppoe-client-dialer-rule]dialer-rule 1 ?
& `/ b1 Y: Y0 P  acl   Permit or deny based on access-list   
. X# O. G. u" C2 q  ip    Ip
  s' _$ ]6 o3 s# I6 A# a' l  ipv6  Ipv6       
: _- r! i* g8 i* E2 q9 B[pppoe-client-dialer-rule]dialer-rule 1 ip permit   #创建拨号规则,允许ip流量触发拨号
* p5 b9 @2 A1 h! h# z- a- f/ N- c
[pppoe-client]interface Dialer 1% K  [6 R- ?& M6 R( |$ S4 ]9 c9 P
Jul 15 2021 18:55:22-08:00 pppoe-client %%01IFPDT/4/IF_STATE(l)[0]:Interface Dia
' X5 k. Q/ e9 |6 w1 P6 nler1 has turned into UP state.
+ M9 T: W/ L7 S: Z0 V( B& Q( A[pppoe-client-Dialer1]ip add       
$ {0 U' Z7 A2 {+ J2 G1 X3 J[pppoe-client-Dialer1]ip address ppp        $ c) e( L5 q( l
[pppoe-client-Dialer1]ip address ppp-negotiate  #地址采用ppp协商' Y6 K# M9 c8 \% L1 E
8 [  n# j# V/ X7 n3 B
[pppoe-client]interface Dialer 1                #创建接口拨号组1, m" `% {( W* A4 ~
[pppoe-client-Dialer1]ip address ppp-negotiate  #ip地址采用ppp协商6 j& y. a& w# j# ]. v/ ~
[pppoe-client-Dialer1]dialer user zhprny        #此用户不用于认证,是标识作用以及和dialer绑定' j: M% N; Y0 }) L
[pppoe-client-Dialer1]dialer bundle 1           #设备通过Dialer bundle将物理接口与拨号接口关联起来。$ `- K) Q2 Z$ X' _, e
[pppoe-client-Dialer1]dialer-group 1             #放到一个拨号访问组1中
, s# }9 X0 N* [1 [. [: _[pppoe-client-Dialer1]ppp chap user pokes        #指定dialer1接口的编号,拨号账号# w  G; {9 s: k) F0 d. K
[pppoe-client-Dialer1]ppp chap password 123456   #拨号的密码
& m1 q- Q0 o& |# m" b: v- u( x" `, o: W4 H7 P% x9 F

' n9 A( I6 d0 b[pppoe-client-Dialer1]dis th, T8 \5 i- n& U8 q
[V200R003C00]
8 I: V# G; E- e* u0 g- B: u2 x6 `  \#  A/ A+ W8 z, A% j1 n3 z
interface Dialer1
1 s8 C. ]( v- E2 Q link-protocol ppp5 Z+ l! c; g5 i+ U( z; v' U4 J
ppp chap user pokes1 y7 E. m% Q2 D$ B1 P2 W
ppp chap password cipher %$%$I/!'WCyd<7p[~8;,>51L,$sl%$%$8 `8 s: D, r6 e4 U' w
ip address ppp-negotiate
8 B& |. d) A' m' ` dialer user zhprny# t3 Z+ c3 p; w# w
dialer bundle 1
: @+ ^+ m" O& B, p1 W. g dialer-group 11 v% y+ a' d. T* }& \0 m! y

; p* T6 o9 F2 a( i3 ^6 P[pppoe-client-GigabitEthernet0/0/0]
# C, R3 ]: y4 I, hJul 15 2021 19:07:54-08:00 pppoe-client %%01IFNET/4/LINK_STATE(l)[0]:The line pr
' p" i  @# }( z3 D& B. r6 lotocol PPP on the interface Dialer1:0 has entered the UP state.  #PPP已进入启动状态8 r5 T3 p% J; E
[pppoe-client-GigabitEthernet0/0/0]
1 c$ i* a# v$ b, o1 _/ RJul 15 2021 19:07:54-08:00 pppoe-client %%01IFNET/4/LINK_STATE(l)[1]:The line pr
7 c- Y, \. f; ]8 {6 _$ i+ Y' motocol PPP on the interface Dialer1:0 has entered the DOWN state. #PPP已进入关闭状态, Z! l& R: Y" A+ }3 v# ~
$ G$ v- K9 R8 \2 C, Y6 ?
#不停的循环。。。。& k' J1 q3 _! V7 S; B2 J  T7 ~8 c4 y
& C; R% m( l/ E) u) ~

- |0 e! F1 q! l& ~8 [8 l#原因是没有认证成功,因为我们在PPPOE-server上面还没有创建认证用户和密码
. `- h1 t# [9 P3 K. E' |
6 f7 V0 U" _  K, Y三、pppoe服务器上新建认证用户: i8 ^( s* _  j: K, v) ^9 G/ I
我们到服务器上直接新建认证用户:
  g1 n. B0 d1 E+ |8 f8 V
( h) u6 v% Z8 |( c8 X$ k% W[pppoe-server]aaa
! i6 k- n, C8 g6 O[pppoe-server-aaa]local-user pokes password cipher 123456) P6 H0 P; B" C/ W) G( f6 }, E" |0 J
Info: Add a new user.
; F7 D  T6 B( b& w[pppoe-server-aaa]local-user pokes service-type ppp    #类型为ppp
3 T8 {9 L5 {( N, x
- H' n  W0 z$ [
- ?4 W! @8 Q; W! N# w& _7 M四、客户端验证结果
& w. L  X) G- l8 N1、认证成功信息
) H( }( Z' Q7 M8 C) {& B然后客户端就会出现认证成功的提示:% D, [7 \" ]9 U# L
% k3 ?, ?- h4 K: i1 {  P0 h% ?
[pppoe-client-GigabitEthernet0/0/0]1 i/ m" ]& u0 z# |
Jul 15 2021 19:09:23-08:00 pppoe-client %%01IFNET/4/LINK_STATE(l)[10]:The line p
( a& r* d  `. k' Rrotocol PPP on the interface Dialer1:0 has entered the UP state.
1 Q# S" H% d4 t! r* F9 _[pppoe-client-GigabitEthernet0/0/0]
4 G+ c+ g& z; s  f( U, QJul 15 2021 19:09:23-08:00 pppoe-client %%01IFNET/4/LINK_STATE(l)[11]:The line p
7 \* y% W& p/ v& L9 p* }) arotocol PPP IPCP on the interface Dialer1:0 has entered the UP state.
0 l1 x) s( e5 s% }, J  K[pppoe-client-GigabitEthernet0/0/0]q
. d& [. {( L2 T; z[pppoe-client]dis ip in b
: r4 V* L2 p7 C/ j3 U*down: administratively down
5 ~- g& l4 y3 M, O$ Y^down: standby5 p& h7 [  n3 O) @
(l): loopback  e  M7 N0 f: P% w- L+ R
(s): spoofing7 K' B$ O* Q! K1 V& _1 B
The number of interface that is UP in Physical is 4
" \8 R  A1 q6 V8 x" DThe number of interface that is DOWN in Physical is 0
( Y* g2 C( O7 |2 `: w$ y  OThe number of interface that is UP in Protocol is 3
$ L- S% w9 j+ J4 nThe number of interface that is DOWN in Protocol is 1; t. s' V' e- @3 R

0 |1 K$ s: @$ mInterface                         IP Address/Mask      Physical   Protocol  
5 ^: r9 s) v- Z( vDialer1                           10.1.12.254/32       up         up(s)     #拿到了PPPOE服务器上的地址* ?" i1 q+ `7 S' |- u
GigabitEthernet0/0/0              unassigned           up         down      , A! U, y6 \2 }# x* i0 @, m, Y+ h
GigabitEthernet0/0/1              192.168.1.254/24     up         up        & y+ X# p0 H. V/ H
NULL0                             unassigned           up         up(s) 1 @. P) Z8 o9 ^1 g* c7 b

0 T7 o4 @7 s1 t  E% M# ~% k+ B/ |* G% H; Z2 @! u
2、pppoe-server 信息; x( @# l0 z2 f- ]2 B, S3 Q
<pppoe-server>dis interface Virtual-Template 1
$ V9 K( {3 b+ t( m1 l- ^9 ~Virtual-Template1 current state : UP
/ G& S+ ?0 ]: LLine protocol current state : UP! R; N" d5 Q$ v
Last line protocol up time : 2021-07-15 19:09:22 UTC-08:003 J  F) z" Z: b7 n, S. O! |
Description:HUAWEI, AR Series, Virtual-Template1 Interface- F( K1 G; \6 u! O. L7 W
Route Port,The Maximum Transmit Unit is 1492, Hold timer is 10(sec)
1 ?# q7 k( y: G: _/ w6 I8 m- VInternet Address is 10.1.12.2/24
- G* f2 ~% @& E; K, X3 t' G+ KLink layer protocol is PPP
6 {) x3 N$ P0 B& A+ ^LCP initial
- b3 W! }8 s. \" ~4 m; ?Physical is None
5 x/ _: L) T* U( d9 K/ Z3 \Current system time: 2021-07-15 20:27:28-08:00
$ X4 c8 F( B, E    Last 300 seconds input rate 0 bits/sec, 0 packets/sec
- H, i; I9 z+ D5 C    Last 300 seconds output rate 0 bits/sec, 0 packets/sec
4 P' y9 @/ M" b& Z0 w; i( C- d    Realtime 0 seconds input rate 0 bits/sec, 0 packets/sec
! ]' h; x$ O* W% G2 @, Y' k    Realtime 0 seconds output rate 0 bits/sec, 0 packets/sec
; z+ B4 V2 h9 ~: D  b9 z( x7 _    Input: 0 bytes
- [+ ]6 x7 @) m9 u0 h    Output:0 bytes1 ]' n& r0 L! J& A
    Input bandwidth utilization  :    0%- s( ^/ u  X" y7 @4 [4 {1 |. }' j% f
    Output bandwidth utilization :    0%
4 A6 r7 ?% @2 f6 g' z6 ~
, W5 ^! _+ y$ A5 `. B<pppoe-server>
/ |' j7 m- Z7 u* O: w% o' R2 p, z5 o2 e# }# x) z0 J0 [6 a

! M/ R2 z+ F9 d0 I. Q: E9 _3、pppoe-client信息
7 b- ]. P* g% y) G<pppoe-client>dis interface Dialer 1$ c$ [& ~- L/ I- n
Dialer1 current state : UP0 ^6 ~8 d2 C& I4 c
Line protocol current state : UP (spoofing)" E! f% S4 Z4 B/ M( |1 A
Description:HUAWEI, AR Series, Dialer1 Interface  q* g$ l6 Z2 ^* y/ m) E
Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
7 H7 }; F$ w% j( P$ aInternet Address is negotiated, 10.1.12.254/32
* {$ P$ j% c5 s8 k% Z) L0 M2 x* `Link layer protocol is PPP
: p! v. U* B+ Y; r1 w# lLCP initial8 ^. b$ K& L/ ^. h# w2 L3 g
Physical is Dialer
% x, Q! a" }3 ^0 n! ^; \3 Q* eCurrent system time: 2021-07-15 20:23:56-08:00
0 e/ |" C; Z# G1 e7 Z: U    Last 300 seconds input rate 0 bits/sec, 0 packets/sec8 O4 G4 p5 K. C, Q4 K
    Last 300 seconds output rate 0 bits/sec, 0 packets/sec
% W) s' c) Q& p9 w" G  ^$ R# {    Realtime 0 seconds input rate 0 bits/sec, 0 packets/sec
4 ^7 U/ L2 f+ v+ q    Realtime 0 seconds output rate 0 bits/sec, 0 packets/sec
- S' M  R$ L* Z7 @- c    Input: 0 bytes
7 _( f. \+ X) @, H, \    Output:0 bytes' g8 }' T% v  [. H/ y0 ^* x8 \
    Input bandwidth utilization  :    0%# p* I& S% [2 G& G' n) F3 }
    Output bandwidth utilization :    0%! B1 U, y, a  }0 H; u
Bound to Dialer1:0:
- \' u' f' L2 ^0 [Dialer1:0 current state : UP ,
! g! ^% v9 B3 [5 {. _: ^& e3 q7 j! lLine protocol current state : UP
3 [* `' |/ K: r5 u' L
6 a: }- M; O4 i( e- O, j2 KLink layer protocol is PPP! S2 j/ B8 k: w# C
LCP opened, IPCP opened
; A% G- C) E- p% W4 Z9 m$ b, m' {( gPackets statistics:
9 q1 Q3 V1 D' }2 E# I" O: o3 C8 Q  Input packets:0,  0 bytes
- `3 ]7 q* M- t. i  Output packets:4, 336 bytes
5 T& d6 y7 M  w! n, E: q# h: `  FCS error packets:0: O/ W0 w  u( J  L$ o9 b8 \( o) `
  Address error packets:0! u& F& Y3 D) S4 Q6 j
  Control field control error packets:0# `: p; g/ p$ U* W" t; L/ ^

% Y0 \  I, V" Q. B& S( u+ a" S  c1 u, C# ?5 y2 S6 A: e8 e
<pppoe-client>/ T- Y: X) F$ B; S# M

3 Z) j# x% a5 v( \五、NAT的配置
  y! Y$ I( k* b7 h用PC2直接ping 10.1.12.254是可以通的。10.1.12.254是AR1的g0/0/0口获取到的地址,其实就是我们常说的WAN口地址。
6 y6 ]' z8 d  t% N: b1 ?! K% G
2 J& f; O8 [! `$ WPC2>ping 10.1.12.254  \7 J# S# j- ^8 G: X! w3 J7 V
' j8 R4 q/ K% e. f+ {9 y" g
Ping 10.1.12.254: 32 data bytes, Press Ctrl_C to break0 C1 g/ k, D1 y; ~0 |; ^) _( ^
From 10.1.12.254: bytes=32 seq=1 ttl=255 time=63 ms2 y9 x6 i  s: |2 Y7 o
From 10.1.12.254: bytes=32 seq=2 ttl=255 time=31 ms8 x6 P% R& r  \: t
From 10.1.12.254: bytes=32 seq=3 ttl=255 time=47 ms7 f* z+ F& _. d. r" F/ M
From 10.1.12.254: bytes=32 seq=4 ttl=255 time=31 ms
+ z7 [- X7 g; p. h) Z* V4 fFrom 10.1.12.254: bytes=32 seq=5 ttl=255 time=47 ms- W2 Z: \3 |* \  t! k% e

6 G+ S  u* D' `* v& c--- 10.1.12.254 ping statistics ---
: F# `- b4 l% ?, K; L/ X  5 packet(s) transmitted, T2 q5 |7 b7 P6 x# z& ]
  5 packet(s) received* u) a( F3 s1 [7 B6 x  A
  0.00% packet loss4 S; X% l3 q, B9 U6 Z
  round-trip min/avg/max = 31/43/63 ms
) N' q1 x2 l" j
7 }2 l  F( Q+ d) ~- G& K6 ], aPC2>ping 10.1.12.2
$ h9 D% a2 V) D# c0 V
3 m2 v6 _2 @6 ]& v1 X( x0 H  iPing 10.1.12.2: 32 data bytes, Press Ctrl_C to break
$ H0 g2 C/ m3 B9 ^0 V: Z& ~Request timeout!
2 I! l. A6 v. z4 r/ TRequest timeout!1 r) V7 a1 H, U$ W
Request timeout!
# ^% }. k  Y1 qRequest timeout!, f) d3 f. o2 K' \8 [
Request timeout!
+ Z3 [! V* M4 ~2 U1 [0 B6 s6 x; B; m- {1 s* P
--- 10.1.12.2 ping statistics ---* V$ B& g5 `* _% ]. _4 Y
  5 packet(s) transmitted
8 G( E! j9 ]# J/ \' J% O  0 packet(s) received! `0 ~- x6 F5 Q! I! J5 g5 z
  100.00% packet loss, x# v3 Z2 G6 Z$ h
#但是无法ping通10.1.12.2
3 v1 n  f" G: m0 E) v2 J* N) V" p6 A7 e
' s& h' d0 ]+ t; x: b3 _1 j; P' ~, M
无法ping通10.1.12.2的原因是:我们没有做NAT .接下来我们在pppoe-client上面做NAT
& V& Y5 b4 B6 a, V, M; m" z9 s% v7 O4 n9 T
1、这里配置规则2000' D3 x$ d% z" g0 b' U) L
[pppoe-client]acl number 2000       
8 F+ c0 d2 o% K8 }8 q[pppoe-client-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255. H1 s3 D# S2 b# T/ Y- v

# `5 ~/ _- l- i3 l. ^& l2 |2、将规则2000绑定到接口
4 ]' `6 @$ l& U, _) `如下接口信息,需要注意的是pppoe的接口是Dialer1,并不是GigabitEthernet0/0/0口。我们必须将规则绑定在Dialer1口,最容易犯错的就是直接绑定在g0/0/0口。
& l8 V5 l1 t/ k% H3 m: U5 h- Z; Z
1 E! F- f! u/ K9 s; T/ ?4 ]6 \[pppoe-client]dis ip int b; X( S& f3 @7 u# g% @
*down: administratively down' @; J9 w, u, F# _7 b4 P
^down: standby2 Z$ j9 v0 n4 [2 o6 Q5 `. M2 ^) W1 l
(l): loopback
! s& m1 I3 j( c7 j( p" a(s): spoofing6 A9 j8 {0 m, }+ J
The number of interface that is UP in Physical is 4
: O. \' G# W. y3 i% uThe number of interface that is DOWN in Physical is 0& {' Z! l0 C1 \! V
The number of interface that is UP in Protocol is 3
, D) t# E) V5 E8 c/ V# yThe number of interface that is DOWN in Protocol is 1
' X/ L# q/ H7 y" g' A' I, r
  o" l* ^( z/ @8 b$ S7 v5 nInterface                         IP Address/Mask      Physical   Protocol  5 T  U( F6 w3 S) U8 L* q/ u: h
Dialer1                           10.1.12.254/32       up         up(s)     
- R( ]  c2 b* }% o9 U2 C' d: p# jGigabitEthernet0/0/0              unassigned           up         down      
/ q4 y; V, ^' E$ j6 [! m6 eGigabitEthernet0/0/1              192.168.1.254/24     up         up        
% H. Q4 ?) B4 P3 c0 RNULL0                             unassigned           up         up(s)     : S7 w" m' i7 z0 C# r( W4 K- b
[pppoe-client]
' s5 f: _! n$ `. {# c2 t8 q& n, B( S, e% }& W7 W8 l* ^
[pppoe-client]int Dialer 1        9 w7 c$ Y% x0 s
[pppoe-client-Dialer1]nat outbound 2000
0 p% L( j8 f) _* ?[pppoe-client-Dialer1]dis th
1 \4 s! M1 s3 k' Q[V200R003C00]4 _6 _1 Y  v  \+ h
#
( i% h  ?2 x0 [interface Dialer13 Y% l7 ~6 b% C+ m
link-protocol ppp; K# v+ G2 m) Y2 _) b0 B. G7 ~
ppp chap user pokes9 L6 a+ M; |- Z# Y: Y
ppp chap password cipher %$%$I/!'WCyd<7p[~8;,>51L,$sl%$%$
4 w6 `/ s/ i( c& m# O4 ~9 D ip address ppp-negotiate- ?( E, Y6 ^8 D, W( V; Y1 j
dialer user zhprny
& q) v4 y; F7 `0 {! J0 j dialer bundle 1
& E9 j/ q4 ]" E# L1 Z dialer-group 1+ ], b" e1 ~' M) g
nat outbound 2000
3 _9 \  \9 {% m#
  k2 y3 M% o% C. c; ereturn
2 c, n' Y  {/ y% ?[pppoe-client-Dialer1]; V! U. U8 l4 W$ l3 X! U( e& w

% L. }# T  I6 z接下来我们就可以ping通10.1.12.2 了。
1 M, u  X& d/ n( r0 ~0 w9 G+ K0 a, R; _
PC2>ping 10.1.12.2) R% \0 w8 H  E* F

1 F$ A( S: g7 MPing 10.1.12.2: 32 data bytes, Press Ctrl_C to break% i5 D1 ~: t, }! G' M
From 10.1.12.2: bytes=32 seq=1 ttl=254 time=31 ms$ A1 ?% y0 s# I  j/ [# Y4 b( A% ]
From 10.1.12.2: bytes=32 seq=2 ttl=254 time=32 ms
% o- P( T# o- N8 HFrom 10.1.12.2: bytes=32 seq=3 ttl=254 time=46 ms
0 }3 t- {& ?' M" Z! eFrom 10.1.12.2: bytes=32 seq=4 ttl=254 time=32 ms
) Q4 @4 x2 f4 F* ~! B1 j; jFrom 10.1.12.2: bytes=32 seq=5 ttl=254 time=31 ms: s2 o- r3 R- f4 s
$ \( [+ `$ Z1 b  i/ c- o
--- 10.1.12.2 ping statistics ---
8 h/ N0 i4 O7 H' ~" g' \9 l# H  5 packet(s) transmitted
) v8 p' G5 L, Y4 p7 T2 k  5 packet(s) received
/ Y! W) H3 g! ]. M, f) l  V' l  0.00% packet loss
( H& y; h0 w* y9 V5 w/ l7 O  round-trip min/avg/max = 31/34/46 ms
- g- P% O: F- V3 D' F+ ~3 Z
5 T: R; @6 ^( _9 p% L% y7 r1 K/ i) P1 ^& J) g: f
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-4-9 09:17 , Processed in 0.044042 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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