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

Re: 2 ether, problems routing



On Tue, Oct 06, 1998 at 09:37:11AM +0000, Pere Camps wrote:
> 	First question: can I make an eth behave as a point-to-point if
> there are only two eth cards in the network?
I don't know. Never tried. But it won't help you much. You'll need the proxy
arp anyway.

> > Example: Assume Adresses 147.83.61.192-207 are still free (the start IP must
> > be divisible by 16)
> > ifconfig eth1 147.83.61.193 netmask 255.255.255.240 broadcast 147.83.61.207
> > route add -net 147.83.61.192 dev eth1
> > arp -s 147.83.61.192 '00:A0:24:52:32:41' netmask 255.255.255.240 pub
> > # Note that this is the hardware address of your first network card,
> > # providing eth0
> 
> 	Not working. I can access eth0 (.17) from the w95 machine but
> I can not access any other part of the eth0 network.
Try to ping the win95 box from some host on your eth0 network and watch
with tcpdump on eth0 and eth1 what packets are sent. Sent me the output if
you can't interpret it.

> 	If I have understood correctly subnetting with the netmask of 240
> divides the network into 16 subnets... as my primary net has a netmask of
> 255.255.255.0 then the machine addresses are 0.0.0.* which is incompatible
> with puting a netmask of .240 on the eth1.
No, your 147.83.61.* still remains a net with netmask 255.255.255.0
A 4 bit subnet is then cut from this and routed elsewhere. TCP/IP will obey
the most specific rule, i.e. if an address fits two routing rules, it will
obey the one with the smallest subnet.

Every PC on eth0 except your linux box will think, the win95 box is directly
on it's wire. To send a packet there, it will make a broadcast, asking for
the hardware address. Your linux box answers with it's own hardware address
and gets the packet. This is the part the arp command is for.

No the linux box has a packet from e.g. 147.83.61.7 to 147.83.61.194, i.e.
not for itself. So it should route the packet. Where to? It fits the
255.255.255.0 netmask on eth0 and the 255.255.255.240 netmaks on eth1, so
the smallest subnet is chosen, i.e. eth1. The rule for eth1 says, it should
be accessible directly, so your linux box will broadcast on eth1 asking for
the hardware address of 147.83.61.194. The win95 box should answer and get
the packet.

Now backwards: win95 sends out a packet with target 147.83.61.7. This is not
on it's wire (netmask to small), so it is sent to the default gateway, the
linux box. The linux box forwards it on eth0 because it's the only interface
that fits.

So much for the theory. tcpdump should reveal why it is not working.

Nils

--
*-----------------------------------------------------------------------------*
| Quotes from the net:  L> Linus Torvalds, W> Winfried Truemper               |
| L>this is the special easter release of linux, more mundanely called 1.3.84 |
| W>Umh, oh. What do you mean by "special easter release"?. Will it quit      |
* W>working today and rise on easter?                                         *

Attachment: pgprOTOhdF52r.pgp
Description: PGP signature


Reply to: