Daniel Nichter wrote:
> Say I set, for example, the default gateway on a Windows
> box to 192.168.1.1 where 192.168.1.1 is a Linux server,
> on the same LAN, masquerading data to and from the Internet
> on it's ppp interface for the internal LAN.
>
> When, from the Windows box, I ping some address on the
> Internet, does the Windows box put on and extra IP
> header w/ a dest address of 192.168.1.1 on top of
> ping packet (IP header + ICMP header) to build a pack
> like:
> [IP header: dest 192.168.1.1][IP header: dest 202.192.13.2][ICMP header]
No.
> so that way the Linux box will pick up the packet, strip
> the first IP header, see the second IP header and say
> "I should masquerade this packet through my ppp0."
>
> If the Windows box didn't add the second header addressed
> to the Linux server, the Linux server wouldn't pick it
> up since the dest address in the packet wouldn't be addressed
> to it, correct?
Incorrect.
> Or does a box that masquerades pick anything off the wire?
A box will accept any packet which has its MAC address in the ethernet
header. If IP forwarding is enabled, it will attempt to forward any
packets which aren't addressed to one of its local interfaces.
When a box sends a packet via a gateway, it uses the gateway's MAC
address in the ethernet header.
--
Glynn Clements <[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]