Map Ip -
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --to-source 203.0.113.10
Here’s a concise, practical guide for — typically found in network automation (like Ansible), SDN, or certain CLI-based network devices (e.g., Cisco, Huawei, or Linux bridging contexts).
iptables -t nat -A PREROUTING -d 203.0.113.10 -j DNAT --to-destination 192.168.1.50 map ip
arp 192.168.1.100 aabb.ccdd.eeff ARPA Or DHCP static binding:
iptables -t nat -L -n -v Extract IPs from a list: iptables -t nat -A POSTROUTING -s 192
ovs-ofctl add-flow br0 "ip,nw_dst=192.168.1.100,actions=mod_nw_dst:10.0.0.200,normal" | Issue | Likely cause | Fix | |--------|---------------|------| | Map disappears after reboot | Not persistent | Use /etc/ethers + arp -f (Linux) or write config (Cisco write memory ) | | IP map not working | ARP cache timeout | Set static entry with nud permanent or increase ARP timeout | | Ansible map('ipaddr') fails | Missing ipaddr filter | Install ansible.utils collection | | NAT mapping no traffic | Reverse path filter | Check rp_filter or add return SNAT/DNAT rule | 7. Quick Reference CLI Examples | Use case | Command | |----------|---------| | Static ARP (Linux) | ip neigh add 192.168.1.10 dev eth0 lladdr 00:11:22:33:44:55 nud permanent | | Static ARP (Cisco) | arp 192.168.1.10 0011.2233.4455 ARPA | | DHCP reservation (Linux – dnsmasq) | dhcp-host=00:11:22:33:44:55,192.168.1.10 | | DNAT (port forward example) | iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.1.10:80 | Would you like a deeper example for any of these environments (e.g., Ansible playbook, iptables persistence, or Cisco router config)?
sudo ip neigh add 192.168.1.100 lladdr aa:bb:cc:dd:ee:ff dev eth0 nud permanent Check mapping: sudo ip neigh add 192
ip neigh show
