Hello Iwase,
Thank you for your response. It was very helpful and would appreciate help on 
the next step of my project. 

Now that I can collect IP-addresses but cannot filter MAC addresses, I am 
curious if Ryu can filter connections from certain IP-addresses. In other 
words, Can I specify only certain machines to connect. For example, if the 
source IP-address is 333333, can I block it but allow IP address 777777? Would 
datapath.socket.close() work for this? My current code while trying to do this 
has not worked so well, so any examples would be really helpful. 

Thank you again for your help,Andy
 


     On Tuesday, September 15, 2015 11:36 PM, Yusuke Iwase 
<[email protected]> wrote:
   

 Hi Andy,

On 2015年09月15日 03:35, Andy Echenique wrote:
> Hello Everyone,
> I'm fairly new to Ryu and would appreciate any help in getting my program off 
> the ground.
> 
> I want to have my controller only connect devices from specified MAC 
> addresses. For example: if the dpid is 123456789, I want it to add the flow. 
> Yet if 222222222 wants to connect, it drops it (or the synonymous action for 
> Ryu). The whitelist can be either specified within the program itself or in a 
> separate, editable file.

As far as I know, Ryu does not have such fearure.

If your RyuApp get a MAC address which is not on the whitelist,
you can close the connection like:
  e.g.) datapath.socket.close()
But, the switch will reconnect to the controller, I think.

In order to block this reconnection, you need to implement your
RyuApp to do so in some way.
Set iptables rules, send some OVSDB messages or OF-Config message... or so.

> 
> Any code to help get this done would be really appreciated.
> 
> Thanks,
> Andy
> 
> PS Though I have been able to log and display MAC addresses on Ryu, can I do 
> the same with IP addresses? Doing the above action for IP addresses would 
> also be really nice.

To get the IP addresse of a Switch, please refer to 'datapath.address'
 e.g.) self.logger.info(datapath.address)  # --> ('127.0.0.1', 51260)


Thanks,
Iwase

> 
> 
> ------------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
> 

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel


  
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to