
路由器上作NAT,如下(1)配置Static NAT成功,可以ping and telnet from inside to outside。但是仅仅把Static NAT的命令换成PAT,如下(2),则"sh ip nat translation"的输出内容为空,好像PAT根本没起来。请问需要添加什么配置吗?
# G) g! ~- W( n1 |" g3 D* W' w2 u; {
m6 W. q9 g7 r4 j& L3 ~1) 路由器配置,使用Static NAT,可以ping and telnet from inside to outside:
3 y( c+ v5 t2 O. J" U: h8 Ninterface Ethernet0/0
9 k) n: c8 {; E ip address 10.1.234.2 255.255.255.0! U9 W/ K% c! T$ K) {. S
ip nat inside) B$ Z# A( {& a) R) o; c
!
5 D: C8 K- _* `/ N! u0 y! X+ I0 kinterface Serial0/06 W; }3 h/ v6 w3 k% f2 R9 \
no ip address5 f' j6 U+ c4 o7 V4 r& U
encapsulation frame-relay, b! C7 d A( ?" v8 P9 X
no arp frame-relay& r1 l5 K9 u$ S; K1 ~
no frame-relay inverse-arp
% B- |. R$ s3 _9 F8 G- t$ c1 Z!5 T! Q, e a9 T8 i: a
interface Serial0/0.12 point-to-point) `7 R8 s9 W4 S7 m( z( Y
ip address 210.1.12.2 255.255.255.0
# Q2 y9 ?# _/ c ip nat outside
, O8 N, S/ a, L1 H5 Q8 }) T% ]2 m ip virtual-reassembly3 u5 q! C- Q' x, a( a: [
frame-relay interface-dlci 201 ! r5 ~7 S8 T, l1 H! c9 G" d7 i
!
2 c4 V( ?) g" Pip nat inside source static 10.1.234.3 210.1.12.5$ c4 U& c7 a$ }: }# g k/ X* o
" ] ~* m- Y& X, D: O+ A9 A. i
2)其它配置不变,只是把以上“ip nat inside source static 10.1.234.3 210.1.12.5”命令替换为以下二条命令,sh ip nat translation命令的输出结果变成空的了: |8 D4 u+ D* y1 `
ip nat inside source list 1 interface Serial0/0.12 overload( J$ Y4 z J2 ^1 v
!
/ [0 [9 A) |( s- Qaccess-list 1 permit 10.1.234.0 0.0.0.255 log# O- r1 A; P7 R
!/ f4 \# L7 ?4 s U. d# ]& o% u0 w
% `. g1 d# b& x+ Q$ j$ S"sh ip nat translations"输出结果为空:
- N: V; Y; b% {8 N) s9 R+ @r2#sh ip nat translations
8 _" N9 s0 o7 c, T. D" [+ n% v: k- G. y
r2#
: C* f; L( U& }7 |/ a- A
/ ^7 Y4 Q2 e" @$ B) N: M请教一下,PAT跟Static NAT相比,还有什么其它需要配置的命令吗?
# ]' J/ C. j! r: k6 a7 w1 F2 z
c& E0 @8 h, `0 F7 R. x @: _ |
|