All right, I've pushed the misc.nat component. It makes some assumptions about the environment under which it's run. For example, it assumes that on the "upstream" port, it should use DHCP to get a real IP and DNS server. The actual NAT class itself is fairly configurable, but not everything is configurable from the commandline.
If using it with Open vSwitch, you probably have to turn off OVS's in-band control. See the docstring at the top of the module. If using it in VirtualBox, you may run into problems because VirtualBox's DHCP code is really, truly terrible. This is true in general, but the POX DHCP client seems to bring out the worst in it, and I haven't looked into why (it might just be that it needs longer timeouts). I seem to recall that this is true even in situations where you wouldn't think VirtualBox would be doing anything with DHCP (e.g., when it's in bridged mode), but it's been many months and I don't really remember. -- Murphy On Aug 4, 2013, at 1:22 AM, Murphy McCauley wrote: > It's relatively new, so it's only in the active branch -- carp. > > I've also got some NAT code I could probably tweak up a little and push. > > -- Murphy > > On Aug 4, 2013, at 1:15 AM, Sadia Bashir wrote: > >> Hi Murphy, I am looking for ip_loadbalancer, you suggested me previously, It >> is not there in pox-betta/pox/misc and could not get it from here as well: >> https://github.com/noxrepo/pox/tree/betta/pox/misc >> >> any link to download from please? Many thanks. >> >> >> On Sat, Jul 20, 2013 at 2:13 AM, kk yap <[email protected]> wrote: >> Hi, >> >> I am curious on why NAT is not possible. The basic requirement of NAT is >> look at the IP addresses and TCP ports, rewrite those, then install the >> reverse flow similarly. This should be doable in the most basic of OpenFlow >> switches. Are you trying to do this in a proactive manner? >> >> Regards >> KK >> >> >> On 19 July 2013 14:08, Shabbir Ahmed <[email protected]> wrote: >> NAT is not yet possible, u can use iptables for NAT as one interface out of >> of-datapath. >> >> are you trying it on mininet or some other platform? >> >> >> On Thu, Jul 18, 2013 at 11:41 PM, Murphy McCauley >> <[email protected]> wrote: >> samples.mixed_switches demonstrates treating different switches differently >> (which you'll want so that you can treat some as L2 switches and one as your >> NAT node). >> >> I don't think we have a straight NAT component example, though >> misc.ip_loadbalancer is maybe not miles and miles from it. >> >> Hope that helps. Apologies for the brevity, but I'm busy today. :) >> >> -- Murphy >> >> On Jul 18, 2013, at 9:49 AM, Sadia Bashir wrote: >> >> > Hi everyone, I am new to pox and want to write a POX controller which will >> > convert one of the switch from the topology to a NAT Router. Topology >> > consists of 3 L2 switches, 1 L3 switch which POX-controller should convert >> > to NATting device and other L2 switches are connected to the L3 switch. >> > Each switch is connected to two hosts and it also includes two private and >> > one public subnet. Any sample code or help will be appreciated. Thanks! >> >> >> >> >> >> >> -- >> >> >
