最終更新: 2015年12月6日 (日) 14:33

コマンド実行例 > show (operational) > show nat

このページの概要

当ページは、Operational (操作) モード時の show nat コマンドについて、実行例をご紹介します。

show nat 実行例

show nat rules

USER@EDGEOS:~$ show nat rules  <ENTER>
Type Codes:  SRC - source, DST - destination, MASQ - masquerade
              X at the front of rule implies rule is excluded

rule   type  intf     translation                                               
----   ----  ----     -----------                                               
5010   MASQ  eth0     saddr ANY to 999.999.999.999                                
    proto-all         sport ANY                       


show nat statistics

USER@EDGEOS:~$ show nat statistics  <ENTER>
rule  count       type  IN        OUT       description
----  ----------  ----  --------  --------  -----------
5010  996552      MASQ  -         eth0      


show nat translations

USER@EDGEOS:~$ show nat translations  <ENTER>
Pre-NAT              Post-NAT             Type  Prot  Timeout 
192.168.NN.203       999.999.999.999      snat  tcp   21      
192.168.NN.203       999.999.999.999      snat  tcp   9       
192.168.NN.7         999.999.999.999      snat  tcp   7407    
192.168.NN.203       999.999.999.999      snat  tcp   59      
192.168.NN.201       999.999.999.999      snat  tcp   7234    
...


show nat translations destination

USER@EDGEOS:~$ show nat translations destination  <ENTER>
Pre-NAT              Post-NAT             Type  Prot  Timeout 


show nat translations destination address {x.x.x.x}

USER@EDGEOS:~$ show nat translations destination address 8.8.8.8  <ENTER>
Pre-NAT src          Pre-NAT dst        Post-NAT src         Post-NAT dst    


show nat translations destination detail

USER@EDGEOS:~$ show nat translations destination detail  <ENTER>
Pre-NAT src          Pre-NAT dst        Post-NAT src         Post-NAT dst  


show nat translations destination monitor

USER@EDGEOS:~$ show nat translations destination monitor  <ENTER>
Type control-C to quit
Pre-NAT              Post-NAT             Type  Prot  Timeout  Type
^C

( Control + C で終了するまで監視します。Unix コマンドの tail -f と同様な動作です。 )


show nat translations destination monitor detail

USER@EDGEOS:~$ show nat translations destination monitor detail  <ENTER>
Type control-C to quit
Pre-NAT src          Pre-NAT dst        Post-NAT src         Post-NAT dst      
^C

( Control + C で終了するまで監視します。Unix コマンドの tail -f と同様な動作です。 )


show nat translations detail

USER@EDGEOS:~$ show nat translations detail  <ENTER>
Pre-NAT src          Pre-NAT dst        Post-NAT src           Post-NAT dst      
192.168.NN.203:55320 1.2.3.4:80         999.999.999.999:55320  1.2.3.4:80        
  tcp: snat: 192.168.NN.203 ==> 999.999.999.999  timeout: 35 use: 1 
192.168.NN.203:55226 1.2.3.5:443        999.999.999.999:55226  1.2.3.5:443
  tcp: snat: 192.168.NN.203 ==> 999.999.999.999  timeout: 7247 use: 1 
192.168.NN.7:60545   1.2.3.6:443        999.999.999.999:60545  1.2.3.6:443
  tcp: snat: 192.168.NN.7 ==> 999.999.999.999  timeout: 7433 use: 1 
192.168.NN.203:55277 1.2.3.7:443        999.999.999.999:55277  1.2.3.7:443
  tcp: snat: 192.168.NN.203 ==> 999.999.999.999  timeout: 7252 use: 1 
192.168.NN.203:55310 1.2.3.8:80         999.999.999.999:55310  1.2.3.8:80 
  tcp: snat: 192.168.NN.203 ==> 999.999.999.999  timeout: 21 use: 1 
...


show nat translations monitor

USER@EDGEOS:~$ show nat translations monitor  <ENTER>
Type control-C to quit
Pre-NAT              Post-NAT             Type  Prot  Timeout  Type
^C

( Control + C で終了するまで監視します。Unix コマンドの tail -f と同様な動作です。 )


※ しばらく待ってみても、何も表示されませんでした。show nat tranlations の結果と同様な内容がリアルタイムに表示されるかと期待しましたが...。不具合かも知れません。


show nat translations monitor detail

USER@EDGEOS:~$ show nat translations monitor detail  <ENTER>
Type control-C to quit
Pre-NAT src          Pre-NAT dst        Post-NAT src         Post-NAT dst      
^C

( Control + C で終了するまで監視します。Unix コマンドの tail -f と同様な動作です。 )


※ しばらく待ってみても、何も表示されませんでした。show nat tranlations detail の結果と同様な内容がリアルタイムに表示されるかと期待しましたが...。不具合かも知れません。


show nat translations source

USER@EDGEOS:~$ show nat translations source  <ENTER>
Pre-NAT              Post-NAT             Type  Prot  Timeout 
192.168.NN.8         999.999.999.999      snat  udp   95      
192.168.NN.8         999.999.999.999      snat  tcp   7418    
192.168.NN.8         999.999.999.999      snat  tcp   7427    
192.168.NN.201       999.999.999.999      snat  tcp   48      
192.168.NN.8         999.999.999.999      snat  udp   164     
...


show nat translations source address {x.x.x.x}

USER@EDGEOS:~$ show nat translations source address 192.168.NN.8  <ENTER>
Pre-NAT src          Pre-NAT dst        Post-NAT src           Post-NAT dst      
192.168.NN.8:49845   1.2.3.4:443        999.999.999.999:49845  1.2.3.4:443
  udp: snat: 192.168.NN.8 ==> 999.999.999.999  timeout: 12 use: 1 
192.168.NN.8:58039   1.2.3.5:443        999.999.999.999:58039  1.2.3.5:443
  tcp: snat: 192.168.NN.8 ==> 999.999.999.999  timeout: 7429 use: 1 
192.168.NN.8:57516   1.2.3.6:443        999.999.999.999:57516  1.2.3.6:443  
  tcp: snat: 192.168.NN.8 ==> 999.999.999.999  timeout: 7424 use: 1 
...


show nat translations source detail

USER@EDGEOS:~$ show nat translations source detail  <ENTER>
Pre-NAT src          Pre-NAT dst        Post-NAT src           Post-NAT dst      
192.168.NN.8:57516   1.2.3.4:443        999.999.999.999:57516  1.2.3.4:443  
  tcp: snat: 192.168.NN.8 ==> 999.999.999.999  timeout: 7427 use: 1 
192.168.NN.231:51216 1.2.3.5:443        999.999.999.999:51216  1.2.3.5:443 
  tcp: snat: 192.168.NN.231 ==> 999.999.999.999  timeout: 54 use: 1 
192.168.NN.7:50263   1.2.3.6:443        999.999.999.999:50263  1.2.3.6:443 
  tcp: snat: 192.168.NN.7 ==> 999.999.999.999  timeout: 7427 use: 1 
...



show nat translations source monitor

USER@EDGEOS:~$ show nat translations source monitor  <ENTER>
Pre-NAT              Post-NAT             Type  Prot  Timeout  Type
192.168.NN.8         999.999.999.999      snat  tcp   120      update
192.168.NN.201       999.999.999.999      snat  tcp   120      new
192.168.NN.201       999.999.999.999      snat  tcp   60       update
192.168.NN.201       999.999.999.999      snat  tcp   7440     update
192.168.NN.203       999.999.999.999      snat  tcp            destroy
...
^C

( Control + C で終了するまで監視します。Unix コマンドの tail -f と同様な動作です。 )


show nat translations source monitor detail

USER@EDGEOS:~$ show nat translations source monitor detail  <ENTER>
Type control-C to quit
Pre-NAT src          Pre-NAT dst        Post-NAT src           Post-NAT dst      
192.168.NN.231:51246 1.2.3.4:443        999.999.999.999:51246  1.2.3.4:443   
  tcp: snat: 192.168.NN.231 ==> 999.999.999.999  timeout: 120 type: new
192.168.NN.231:51245 1.2.3.5:443        999.999.999.999:51245  1.2.3.5:443  
  tcp: snat: 192.168.NN.231 ==> 999.999.999.999  timeout: 300 type: update
192.168.NN.52:55398  1.2.3.6:5228        999.999.999.999:55398  1.2.3.6:5228
  tcp: snat: 192.168.NN.52 ==> 999.999.999.999  timeout: 120 type: update
...
^C

( Control + C で終了するまで監視します。Unix コマンドの tail -f と同様な動作です。 )


関連項目



凡例

  • 「999.999.999.999」
    EdgeOS の WAN側 グローバル IPv4 アドレス
  • 「1.2.3.4」「1.2.3.5」 etc...
    外部サイト等のグローバル IPv4 アドレス
  • 「192.168.NN.NN」
    LAN 内部のプライベート IPv4 アドレスを指します。
    「192.168.NN.1」 は、EdgeOS の LAN側 インターフェース を指します。
  • 「172.NN.NN.NN」
    LAN 内部のプライベート IPv4 アドレスを指します。
    「172.NN.NN.1」 は、EdgeOS の LAN側 インターフェース を指します。
  • 「10.NN.NN.NN」
    LAN 内部のプライベート IPv4 アドレスを指します。
    「10.NN.NN.1」 は、EdgeOS の LAN側 インターフェース を指します。
  • 「...」
    省略を表します。実際には出力がさらに続きます。

注意事項

  • EdgeRouter X : ER-X にて実行しています。機種が異なる場合は、結果が異なる可能性があります。
  • 実行例は、あくまでも一例です。他の設定状態には、異なる結果となる可能性があります。
  • 有効な返却結果となるための設定ができていない場合もありますが、ご了承下さい。出力されるフォーマットから推測できるものもあるかと思います。