[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie/network problem



On Tue, Jan 12, 1999 at 12:19:03AM +0200, Shai S. Yahav wrote:

> i'm using both linux and win98, my 98 is connected to the internet so..i
> build a little network (peer to peer) and i gave linux-10.0.0.10 and
> win98-10.0.0.20 ip adress and on my linux machine i used the default
> gateway to be the ip adress for my 98 by pinging the stations i get a
> result but my linux machine can't "get out" the network why?
> my subnet is 255.255.0.0
> my default gateway device is eth0 wich is my network adapter.

Imagine your Linux sends a packet to 142.24.35.251. Let's call this 'dest',
for simplicity. The packet gets to 10.0.0.20, your Windows machine, and from
there gets sent to the world. After several hops, the packet ends in dest.
dest replies with a packet of its own, destinated at 10.0.0.10, your Linux
box. But... the routing tables of dest (or some hop after dest) really don't
know that in your local network, 10.0.0.10 is meaningful - and the packet
would end up going to the *true* 10.0.0.10 (if one exists), or would end up
in /dev/null otherwise (some interesting loops might get created along the
way too). In this specific case, there shouldn't be a 10.0.0.10, so
eventually the packet would end up in /dev/null.

The way to do things like these correctly is either to get real IPs for your
network from your ISP (static IPs), or use IP masquerading - hide the
internal network behind the Linux host, that would be able to send and
receive packets on behalf of machines in the network. This is all a fairly
well documented issue.

> i have two interface lo and eth0 both of them are in active, what does
> 'lo' means? why do i need it?

lo is the loopback device, which is generally used to connect from yourself
to yourself ('telnet localhost').

                                                   Nimrod