You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/09/02 07:56:34 UTC

[GitHub] [cloudstack] weizhouapache commented on pull request #5376: Use source IP from same subnet for snat

weizhouapache commented on pull request #5376:
URL: https://github.com/apache/cloudstack/pull/5376#issuecomment-911341484


   > @ravening @weizhouapache can you check/test the same fix for isolated networks too?
   
   @rhtyd 
   isolated networks do not have this issue, as there is only 1 guest nic in VR.
   
   I have confirmed this PR does not cause issue in isolated networks. (the iptables rules are same, see below).
   
   1. prior to this pr
   ```
   root@r-128-VM:~# iptables-save |grep to-source
   -A POSTROUTING -s 10.1.2.0/24 -d 10.1.2.234/32 -o eth0 -j SNAT --to-source 10.1.2.1
   -A POSTROUTING -s 10.1.2.234/32 -o eth2 -j SNAT --to-source 10.0.55.141
   -A POSTROUTING -o eth2 -j SNAT --to-source 10.0.55.156
   ```
   
   2. with this pr
   ```
   root@r-193-VM:~# iptables-save |grep to-source
   -A POSTROUTING -s 10.1.2.0/24 -d 10.1.2.234/32 -o eth0 -j SNAT --to-source 10.1.2.1
   -A POSTROUTING -s 10.1.2.234/32 -o eth2 -j SNAT --to-source 10.0.55.141
   -A POSTROUTING -o eth2 -j SNAT --to-source 10.0.55.156
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org