Coder Social home page Coder Social logo

nat's Introduction

Source NAT with DHCP

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.

Testing on Platform

  • 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

Usage

Source NAT use port 1 as WAN port by default.

$ ryu-manager base.py l2switch.py dhcp.py snat.py --verbose

Northbound API

Ryu web server is running on http://localhost:8080/

Initialize

HTTP Request

POST /api/nat_config_init

This will initialize NAT configuration

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

Update

HTTP Request

POST /api/nat_config_init

This will update NAT configuration

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

License

MIT © Che-Wei Lin

nat's People

Contributors

john-lin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.