[ovs-discuss] Forwarding between Multiple interfaces Openflow
blp at nicira.com
Mon Feb 28 21:26:34 PST 2011
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(18.104.22.168)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
"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
More information about the discuss