This is a SDN application project that Source NAT and DHCP Server implementation in Ryu controller.
NOTE: DHCP server application is not working on Windows clients. Linux clients are all fine.
- Pica8 P-3290 with PicOS
admin@PicOS-OVS$version
Copyright (C) 2009-2014 Pica8, Inc.
===================================
Hardware Model : P3290
Linux System Version/Revision : 2.6.5/24714
Linux System Released Date : 02/22/2016
L2/L3 Version/Revision : 2.6.5/24714
L2/L3 Released Date : 02/22/2016
OVS/OF Version/Revision : 2.6.5/24714
OVS/OF Released Date : 02/22/2016
- OpenvSwitch version
admin@PicOS-OVS$ovs-ofctl --version
ovs-ofctl (Open vSwitch) 2.3.0
Compiled Feb 22 2016 16:47:11
OpenFlow versions 0x1:0x4
Source NAT use port 1
as WAN port by default.
$ ryu-manager base.py l2switch.py dhcp.py snat.py --verbose
Ryu web server is running on http://localhost:8080/
HTTP Request
POST /api/nat_config_init
Note: Please modify default settings in nat_config_init
method to fit your requirements
Request
POST /api/nat_config_init HTTP/1.1
{}
Response 200
HTTP Request
POST /api/nat_config_init
Request
PUT /api/nat_config_save
{
"wanPort": 1,
"publicIP": "140.114.xxx.xxx",
"defultGateway": "140.114.xxx.254",
"natPrivateNetwork": "192.168.2.0"
}
Response 200
MIT © Che-Wei Lin