[ovs-discuss] Forwarding between Multiple interfaces Openflow

Aaron Rosen arosen at clemson.edu
Tue Mar 1 05:38:45 UTC 2011


Thanks Ben for all your explaining.

Is there anyway to prevent this from happening if I want to send the
packet to 192.168.1.2? I tried removing the ip address at dp0 (which
was 192.168.1.2) and then adding a route for this subnetwork out dev
dp0 but packets don't seem to follow this route. An ICMP message of
host 192.168.1.2 unreachable is just sent back.

Thanks again,

Aaron

---------- Forwarded message ----------
From: Ben Pfaff <blp at nicira.com>
Date: Tue, Mar 1, 2011 at 12:26 AM
Subject: Re: [ovs-discuss] Forwarding between Multiple interfaces Openflow
To: Aaron Rosen <arosen at clemson.edu>
Cc: discuss at openvswitch.org


On Mon, Feb 28, 2011 at 9:10 PM, Aaron Rosen <arosen at clemson.edu> wrote:
> Is there any chance you could explain to me why this works?
>
> dp1(130.127.39.235)gateway interface on computer
> dp0(192.168.1.2)wireless card       <---- attached is a wireless
> client (192.168.1.3)
>
> If I send an IPIP packet with ip destination address to 192.168.1.3
> that comes in on dp1 and then I leave the ip as 192.168.1.3 and send
> the packet out on port OFPP_LOCAL (on dp1). The packet is actually be
> seen on dp0 as a packet_in event (and i can remove the extra L3
> header). Though, if i modify the packet to have the destination
> address of 192.168.1.2 (dp0). The packet is never actually seen at the
> dp0 interface.

OK, a packet with destination to 192.168.1.3 arrives on a wired
Ethernet interface on the same bridge as dp1.  The OpenFlow flow table
directs that packet to be sent on dp1 (presumably the OFPP_LOCAL
port).  So then the kernel processes the packet through its IP stack.
It's not a local IP address, so if the kernel doesn't have forwarding
(routing) enabled, then the packet should get dropped.  You're not
seeing that, so I assume that forwarding is enabled.  The route chosen
to get to 192.168.1.3 would normally be dp0, since it's on the
192.168.1.0 network.  That means that the kernel sends that packet out
dp0 and you see a packet_in event there.

If you change the packet to have destination 192.168.1.2 then it makes
sense that it wouldn't show up on dp0.  The kernel's IP stack will
process it as soon as it shows up on dp1.  This is because the Linux
kernel doesn't assign IP addresses to interfaces, it assigns them to
the whole machine.  It will respond on any interface for any of its IP
addresses.

--
"I don't normally do acked-by's.  I think it's my way of avoiding
getting blamed when it all blows up."               Andrew Morton



-- 
Aaron O. Rosen
Masters Student - Network Communication
306B Fluor Daniel
843.425.9777




More information about the discuss mailing list