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
>