問題 ccna-200-301-topic-1-question-537・第4版

問題

送信元10.10.0.0/24を、192.168.3.1・192.168.3.2・192.168.3.3のいずれかへ動的1対1 NATで変換する。プールは192.168.3.0/29内にあり、同時に割り当てられる内部ホストは最大3台でよい。G1/1が内側、G1/2が外側である。使う構成はどれか。

  1. A 
    enable
    configure terminal
    ip nat pool mypool 192.168.3.1 192.168.3.3 prefix-length 29
    access-list 1 permit 10.10.0.0 0.0.0.255
    ip nat outside destination list 1 pool mypool
    interface g1/1
     ip nat inside
    exit
    interface g1/2
     ip nat outside
    
  2. B 
    enable
    configure terminal
    ip nat pool mypool 192.168.3.1 192.168.3.3 prefix-length 29
    access-list 1 permit 10.10.0.0 0.0.0.254
    ip nat inside source list 1 pool mypool
    interface g1/1
     ip nat inside
    exit
    interface g1/2
     ip nat outside
    
  3. C 
    enable
    configure terminal
    ip nat pool mypool 192.168.3.1 192.168.3.3 prefix-length 29
    route map permit 10.10.0.0 255.255.255.0
    ip nat outside destination list 1 pool mypool
    interface g1/1
     ip nat inside
    exit
    interface g1/2
     ip nat outside
    
  4. D 
    enable
    configure terminal
    ip nat pool mypool 192.168.3.1 192.168.3.3 prefix-length 29
    access-list 1 permit 10.10.0.0 0.0.0.255
    ip nat inside source list 1 pool mypool
    interface g1/1
     ip nat inside
    exit
    interface g1/2
     ip nat outside
    

正解:D

理由

内側の送信元を動的に変換するIOSの方式は、ACLで元の範囲を選び、プールへ結び付け、inside/outsideのポートを対応させる。10.10.0.0/24へ一致するワイルドカードは0.0.0.255である。プールの範囲とマスクにも、有効なアドレスを割り当てる条件が必要になる。

選択肢ごとの説明

A.
enable
configure terminal
ip nat pool mypool 192.168.3.1 192.168.3.3 prefix-length 29
access-list 1 permit 10.10.0.0 0.0.0.255
ip nat outside destination list 1 pool mypool
interface g1/1
 ip nat inside
exit
interface g1/2
 ip nat outside

ACLは/24へ一致するが、outside destinationの指定になっている。内側の送信元を変換するinside sourceとは向きと対象が異なる。

B.
enable
configure terminal
ip nat pool mypool 192.168.3.1 192.168.3.3 prefix-length 29
access-list 1 permit 10.10.0.0 0.0.0.254
ip nat inside source list 1 pool mypool
interface g1/1
 ip nat inside
exit
interface g1/2
 ip nat outside

inside sourceだが、0.0.0.254は末尾の1ビットを照合する。10.10.0.0からすべての/24の値へ一致する0.0.0.255とは異なる。

C.
enable
configure terminal
ip nat pool mypool 192.168.3.1 192.168.3.3 prefix-length 29
route map permit 10.10.0.0 255.255.255.0
ip nat outside destination list 1 pool mypool
interface g1/1
 ip nat inside
exit
interface g1/2
 ip nat outside
route map permit

この指定の記述は通常のroute-mapとmatch等を組む構文へ一致せず、inside sourceではなくoutside destinationになっている。

D.
enable
configure terminal
ip nat pool mypool 192.168.3.1 192.168.3.3 prefix-length 29
access-list 1 permit 10.10.0.0 0.0.0.255
ip nat inside source list 1 pool mypool
interface g1/1
 ip nat inside
exit
interface g1/2
 ip nat outside

0.0.0.255で10.10.0.0/24全体を選び、inside sourceをプールへ結び付けている。/29では.1~.3が通常ホストアドレスであり、3つの動的対応を作れる。

お問い合わせ

演習する →