当前位置:网站首页>VPP static mapping to realize DNAT
VPP static mapping to realize DNAT
2022-08-08 09:00:00 【redwingz】
Basic interface configuration:
DBGvpp# set interface state port7 upDBGvpp# set interface state port8 upDBGvpp# set interface ip address port7 50.1.1.1/24DBGvpp# set interface ip address port8 192.168.1.203/24Network topology:
|------------| |------------| |---------------|| 50.1.1.2 |---------| vpp |------|----| 192.168.1.103 ||------------| |------------| | |---------------|Host-A port7 port8 | Host-B|| |---------------||----| 192.168.1.114 ||---------------|Host-C(FTP-Server)Enable NAT44 configuration:
DBGvpp# nat44 enableThe following 192.168.1.203 is the real IP address of interface port8, and execute DNAT.The configuration is the same as the above SNAT, which uses VPP static address mapping.
# nat44 add address 192.168.1.203# set interface nat44 in port7 out port8# nat44 add static mapping local 50.1.1.2 external 192.168.1.203## show nat44 static mappingsNAT44 static mappings:local 50.1.1.2 external 192.168.1.203 vrf 0## show nat44 interfacesNAT44 interfaces:port8 out## show nat44 addressesNAT44 pool addresses:192.168.1.203tenant VRF independentExecute 192.168.1.103 -> ping -> 192.168.1.203:
- Capture the packet on the host 50.1.1.2, you can see the packet: 192.168.1.103->50.1.1.2, and the replacement of the destination address is performed.
2) Capture the packet on the host 192.168.1.103, and see the packet: 192.168.1.203->192.168.1.103, where the source address is replaced.
The following NAT session looks like:
# show nat44 sessionsNAT44 ED sessions:-------- thread 0 vpp_main: 2 sessions --------i2o 50.1.1.2 proto ICMP port 41039 fib 0o2i 192.168.1.203 proto ICMP port 41039 fib 0external host 192.168.1.103:0i2o flow: match: saddr 50.1.1.2 sport 41039 daddr 192.168.1.103 dport 41039 proto ICMP fib_idx 0 rewrite: saddr 192.168.1.203 icmp-id 41039o2i flow: match: saddr 192.168.1.103 sport 41039 daddr 192.168.1.203 dport 41039 proto ICMP fib_idx 0 rewrite: daddr 50.1.1.2 icmp-id 41039 txfib 0index 0last heard 254.15total pkts 5, total bytes 420static translation边栏推荐
- 什么是DFT?FT、FS、DTFT、DFS、DFT的关系
- Android Studio关于MainActivity中的“import kotlinx.android.synthetic.main.activity_main.*”出现错误提示
- 使用分类权重,轻松解决数据不平衡的问题
- 让百姓消费更安全更放心更满意 江苏出台放心消费创建示范认定管理办法
- DBeaver 22.1.4 released, a visual database management platform
- 【office】word
- Why is HTTS safer?
- mysql三种安装方式 你知道了哪种
- My MySQL installation that is how to solve
- 简单理解MVVM模型
猜你喜欢
随机推荐
ACWing 198. Antiprime Problem Solution
The industry's first "Causal Inference Whole Process" Challenge!WAIC 2022 · Hackathon invites global developer elites to challenge
【收藏】3. 壁纸收藏
My MySQL installation that is how to solve
Interviewer: Have you ever used a lock at work?Talk about the advantages, disadvantages and usage scenarios of optimistic locking and pessimistic locking
DOM操作--防抖和节流
SSRF漏洞
你真的了解IP地址吗?
Excel中text函数5中常用方法
Offensive and defensive world - lottery
你一定要看的安装及卸载测试用例的步骤及方法总结
中原银行实时风控体系建设实践
Multi-scalar multiplication: state of the art & new ideas
Nacos是如何实现心跳机制和服务续约以及超时剔除服务机制的?
Stanford Fall 21: Practical Machine Learning [Chapter 5]
攻防世界——ics-05
生成密码字典的方法
LabVIEW前面板和程序框图的最大尺寸
mysql-cdc 换2.2.x 版本 怎么读不到 数据 咋回事
什么是DFT?FT、FS、DTFT、DFS、DFT的关系









