It seems like you should just pass the network into your component as a commandline parameter (and then parse it with pox.lib.addresses.parseCIDR().
Then you can just run the different controllers with different commandline parameters to tell them which network they're on. -- Murphy On Nov 13, 2012 8:48 PM, "yashwanth kp" <[email protected]> wrote: > Thanks Murphy.. > > I go that working.. > How do i find the network address of a complete openflow network? > > I am ready to have predefined network addresses for each openflow network > i have but how do i have it in the code? > Is there a way to find out when a request comes to a controller what > network that packet belongs without having to check it manually by entering > inNetwork() because i cannot have a single network address checked all the > time.. I need to find if the packet is from that network or some other > network? > > Is there a way that i can achieve this programatically? > > > > On Tue, Nov 13, 2012 at 4:59 PM, Murphy McCauley < > [email protected]> wrote: > >> You should make sure you really want to base it on l3_learning. Do you >> really need to learning, or can you set rules proactively? >> >> If you do it based on l3_learning, you'll want to modify the PacketIn >> handler and check the IP address of the packet. >> See pong.py for an example of getting the IP addresses out of packets >> (along the lines of event.parsed.find('ipv4').srcip or >> event.parsed.next.srcip) as an IPAddr object. >> Then use the IPAddr objects' .inNetwork() methods to check if they're in >> a particular network or not. >> >> Hope that helps. >> >> -- Murphy >> >> On Nov 13, 2012, at 12:21 AM, yashwanth kp wrote: >> >> Hi all, >> >> I have 2 networks with 2 different controllers.. >> I want the controllers to take care of their networks. >> >> c1 c2 >> | | >> s1----s2 >> | | >> h1 h2 >> >> 2 networks are: 192.168.1.0/26 and 192.168.1.64/26 >> >> I am having 2 different remote controllers on 2 different ports.. >> i want these contollers to respond to queries within their networks only. >> I am using l3_learning switches. >> >> But now these controllers respond to queries from the other network also. >> >> How do i restrict them to act only within thier networks? >> >> -- >> Regards, >> >> Yashwanth K P >> Final Year , B.Tech >> NITK, Surathkal >> Contact: +91-9538403606 >> >> >> > > > -- > Regards, > > Yashwanth K P > Final Year , B.Tech > NITK, Surathkal > Contact: +91-9538403606 > >
