VPP中NAT44

1. NAT interface

  • 范式

nat44 add address nat44 add address [- ] [tenant-vrf ] [twice-nat] [del]

set interface nat44 in out [output-feature] [del]

#sNat设置G0为出口
nat44 add interface address G0
#设置源nat的接口
set interface nat44 in loop0 out G0

#查看
show nat44 interfaces

2. Static mapping

  • 范式

    nat44 add static mapping nat44 add static mapping tcp|udp|icmp local [] external <addr [] [vrf ] [twice-nat|self-twice-nat] [out2in-only] [del]

#设置dNat,将G0口的tcp 22端口号映射到本地192.168.1.1的22端口号
nat44 add static mapping tcp local 192.168.1.1 22 external G0 22

#查看
show nat44 static mapping

发表评论

邮箱地址不会被公开。 必填项已用*标注