0

I want to change the IP addresses of source and destination using Pox controller. Is there any algorithm to fulfill my requirement and where to place it in Pox ?

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
    – Ron Maupin
    Dec 15, 2019 at 19:36

2 Answers 2

2

The function you are looking for is Network Address Translation (NAT), which you would most likely need to use the misc.nat tool.

The usage is documented in nat.py located here: https://github.com/noxrepo/pox/blob/eel/pox/misc/nat.py

2
  • Thanks benjamin for your beneficial opinion, i need your more help regarding the scenario i have proposed. In my scenario there is one controller and one open flow switch connected with three hosts .i want to ping h3 from h1 and below is the flow table i am adding to switch for changing the IP adresses or changing the flow table so that at return H3 can directly send data to H1. Oct 24, 2019 at 6:13
  • Here is the algorthim that i put in Ovs switch as text file using the command as "sh ovs-ofctl add-flows s1 text.txt " the file was saved as the name of text in mininet folder which are as " Oct 24, 2019 at 6:16
0

e 0 - Access Control table=0,ip,nw_src=10.0.0.0/24,nw_dst=10.0.0.0/24,actions=resubmit(,1) table=0,arp,nw_src=10.0.0.0/24,nw_dst=10.0.0.0/24,actions=resubmit(,1) table=0,icmp,nw_src=10.0.0.1,nw_dst=30.0.0.3,actions=resubmit(,1) table=0,tcp,nw_src=10.0.0.1,nw_dst=30.0.0.3,tp_dst=80,actions=resubmit(,1) table=0,ip,nw_src=30.0.0.3,actions=resubmit(,1) table=0,priority=0,actions=drop

table 1 - NAT

table=1,ip,nw_src=10.0.0.1,nw_dst=30.0.0.3,actions=mod_nw_src=5.5.5.5,resubmit(,2) table=1,ip,nw_src=30.0.0.3,nw_dst=5.5.5.5,actions=mod_nw_dst=10.0.0.1,resubmit(,2) table=1,priority=0,actions=resubmit(,2)

table 2 - forward/route

table=2,ip,nw_dst=10.0.0.1,actions=mod_dl_dst=00:00:00:00:00:01,output:1 table=2,ip,nw_dst=10.0.0.2,actions=mod_dl_dst=00:00:00:00:00:02,output:2 table=2,ip,nw_dst=30.0.0.3,actions=mod_dl_dst=00:00:00:00:00:03,output:3 priority=0,table=2,arp,nw_dst=10.0.0.1,actions=output:1 priority=0,table=2,arp,nw_dst=10.0.0.2,actions=output:2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.