Stateful NAT64 dynamicのコンフィグ例

備忘録として。

  • IPv6-to-IPv4はちゃんと流れている
  • IPv4からの戻りがIPv6ホストに戻ってこない。どっか設定が悪いのかも。調査必須。

IOS-XEで確認

NATboxXE#sh run | s ipv6|GigabitEthernet1|GigabitEthernet2|nat64
ipv6 unicast-routing
interface GigabitEthernet1
 description v6Only
 no ip address
 negotiation auto
 nat64 enable
 ipv6 address 2001:DB8:1234:5678::1/96
 no mop enabled
 no mop sysid
interface GigabitEthernet2
 description v4Only
 ip address 192.0.2.2 255.255.255.0
 negotiation auto
 nat64 enable
 no mop enabled
 no mop sysid
ipv6 access-list NAT
 permit ipv6 any any
nat64 prefix stateful 2001:DB8:1234:5678:64::/96
nat64 v4 pool POOL 192.0.2.5 192.0.2.8
nat64 v6v4 list NAT pool POOL

確認したこと

  • v6ホスト(2001:db8:1234:5678::10)から2001:db8:1234:5678:64::0a0a:0a0aに向けてpingしたところ、変換テーブルには乗る
NATboxXE#sh nat64 tran

Proto  Original IPv4         Translated IPv4
       Translated IPv6       Original IPv6
----------------------------------------------------------------------------

illegal ---                   ---
       192.0.2.5             2001:db8:1234:5678::10
icmp   10.10.10.10:4557      [2001:db8:1234:5678:64:0:a0a:a0a]:4557
       192.0.2.5:4557        [2001:db8:1234:5678::10]:4557

Total number of translations: 2
  • v6ホストでは応答が帰ってきていない
v6only#ping 2001:db8:1234:5678:64::0a0a:0a0a

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:DB8:1234:5678:64:0:A0A:A0A, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
  • v4ホストにはICMP Echo-Requestが来ているので、Echo-Replyを返している
v4only#deb ip pack det
IP packet debugging is on (detailed)
v4only#
v4only#
IP: tableid=0, s=192.0.2.5 (FastEthernet0/0), d=192.0.2.100 (FastEthernet0/0), routed via RIB
IP: s=192.0.2.5 (FastEthernet0/0), d=192.0.2.100 (FastEthernet0/0), len 80, rcvd 3
    ICMP type=8, code=0
IP: tableid=0, s=192.0.2.100 (local), d=192.0.2.5 (FastEthernet0/0), routed via FIB
IP: s=192.0.2.100 (local), d=192.0.2.5 (FastEthernet0/0), len 80, sending
    ICMP type=0, code=0

なんとなく解決?

戻りのパケットのバインディングをスタティックに登録したら行けるっぽい。その上で、複数の宛先IPv4にpingした場合はちゃんと帰ってくるので、そこが肝なのかなぁ?

NATboxXE#sh run | i static
nat64 v6v4 static 2001:DB8:1:1::10 192.0.2.99
NATboxXE#sh nat64 tran
Proto   Original IPv4       Translated IPv4
    Translated IPv6     Original IPv6
--------------------------------------------------------
icmp    192.0.2.10:7653     [2001:DB8:1:1:64:0:C000:20A]:7653
    192.0.2.99:7653     [2001:DB8:1:1::10]:7653
icmp    192.0.2.20:9933     [2001:DB8:1:1:64:0:C000:214]:9933
    192.0.2.99:9933     [2001:DB8:1:1::10]:9933
icmp    192.0.2.100:9954        [2001:DB8:1:1:64:0:C000:264]:9954
    192.0.2.99:9954     [2001:DB8:1:1::10]:9954
--- ---         ---
    192.0.2.99      2001:DB8:1:1::10

コメント

タイトルとURLをコピーしました