On Nov 21, 2013, at 12:48 AM, Silvia Fichera <fichera....@gmail.com> wrote:

> Hi all,
> I would like that my Pox controller check if an incoming packet is a TCP SYN 
> packet.
> I think i should firstly check if a packet is TCP and then read inside it if 
> it is a SYN packet.
> 
> Have you got any suggestion about it?

You've got it right.  If this is in a PacketIn handler, it's something like...

tcpp = event.parsed.find('tcp')
if tcpp and tcpp.SYN:
  # It's a SYN...

> I would like also know what is the meaning of "fakeways". I supposed it's 
> something like next hop. Is it true?

They're a feature of l3_learning, and are described in the code:
# These are "fake gateways" -- we'll answer ARPs for them with MAC
# of the switch they're connected to.

They exist because if the host thinks the destination is on a different subnet, 
it often wants to send the packet to a gateway (thus, the L2 address of a 
gateway).  l3_learning doesn't care about the L2 address (it can rewrite it 
itself), and doesn't have any concept of subnets -- it just needs the packet.  
So it just needs to respond to hosts' ARPs for a gateway in order to get the 
hosts to actually send the packet.  The L2 address doesn't really matter, and 
there isn't really any traditional "gateway" type functionality going on.

If hosts always had a default route without a gateway, that'd actually work 
fine.  Having fake gateways lets it work in cases when there isn't (notably, 
this meant it worked with Mininet's default configuration of host nodes which 
didn't have a default route, which I think may be different now).

With a refactor of the code, they could probably be replaced by using the 
arp_responder component.

-- Murphy

Reply via email to