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

Reply via email to