Hi KK,
I didn't quite understand how a NAT box is supposed to operate (never made
one before) but I managed to get it working using a logical IP just as you
described below. I might add code for the situation in which the box gets
its IP via DHCP but I think it's fine for now.
Thanks,
Basu

On Mon, Sep 12, 2011 at 4:09 PM, kk yap <yap...@stanford.edu> wrote:

> Hi Shrutarshi,
>
> I am not sure why you would need to get the IP address on the switch
> so as to write a NAT application.  The IP address assigned to the
> switch/NAT box can be logical (i.e., the controller knows about it and
> not the switch).  The rewriting of the IP addresses, transport ports,
> etc. are be done by the flow rules anyway.
>
> PS>> If your NAT box is getting its IP address via DHCP, then let me
> know because you can "cheat" a little to get the address in the
> controller.
>
> Hope this helps.
>
> Regards
> KK
>
> On 8 September 2011 07:37, Shrutarshi Basu <ba...@cs.cornell.edu> wrote:
> >
> >
> >
> > On Thu, Sep 8, 2011 at 10:31 AM, Nicholas Bastin <nbas...@stanford.edu>
> > wrote:
> >>
> >> On Thu, Sep 8, 2011 at 09:56, Aaron Rosen <aro...@clemson.edu> wrote:
> >>>
> >>> I'm not sure how you would go about obtaining the switches ip though
> >>> nox. Though it think it should be possible to get when the switches
> >>> join. Any reason you would need to do that?
> >>
> >
> > I'm trying to write a network translation application where a switch acts
> as
> > a NAT box. Looking through core.py I can see that the datapath_join
> handler
> > is called with an "attrs" dictionary (which I assume contains switch
> > information) but the code comments don't say what the contents of attrs
> are.
> >
> >> The dp_desc of the switch *may* contain the IP address (no guarantees in
> >> the spec).
> >
> > Is there some reliable way to get the IP of the switch? Even if it has to
> be
> > a separate query?
> > Thanks,
> > Basu
> >
> >
> > --
> > --
> > Shrutarshi Basu
> > Basus.me
> > The ByteBaker -- because Computer Science is not about computers
> >
> > _______________________________________________
> > nox-dev mailing list
> > nox-dev@noxrepo.org
> > http://noxrepo.org/mailman/listinfo/nox-dev
> >
> >
>



-- 
--
Shrutarshi Basu
Basus.me
The ByteBaker <http://bytebaker.com> -- because Computer Science is not
about computers
_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to