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

Re: Strange ARP problem with a PPP link



>     # ARP of the remote network
>     $ARP -s 151.99.137.248 $ETH_ADDR netmask 255.255.255.248 pub
>     # Add routing
>     $ROUTE add -net 151.99.137.248 netmask 255.255.255.248 dev $1

>  - ARP Table:
> 151.99.137.248   0x1         0x2e        00:40:33:2D:FE:04     255.255.255.248
> 
>  - Kernel routing table
> 151.99.137.248  *               255.255.255.248 U     1436   0        0 ppp0
> localnet        *               255.255.255.0   U     1436   0     1353 eth0

> _________________
>  The PROBLEM
> -----------------
> 
> The problem is this: altough the arp and the routing table are set
> correctly, the PCs on the remote network aren't reachable, the only
> way to make them reachable is to set *AGAIN* and *BY HAND* the
> arp command, then the link works as it should, i.e.:
> 
>     /sbin/arp -s 151.99.137.248 $ETH_ADDR netmask 255.255.255.248 pub
> 
> Why this happens? Why I need to issue the arp command twice?

arp replies are connected with a special Interface. The Kernel (<1.3.42)
checks the routing table to see to which interface your ip traffic for the
ARPed host will go. This Interface Does NOT receive ARP answers. In your
example eth0 (localnet) will not get ARP replies, since eth0 was the device
151.99.137.248 is reachable. Therefore you should just change ARP to be
called AFTER route, and it should work fine. 

(On newer Kernels the device field in the arp structure stores which device
should get ARP replies. Therefore you have to use a new 'arp' command and
specifie the destination device with "-i eth0". The KErnel then will test if
the route to  the destination does NOT go thrue the specified device. In
this case you have also call arp after route.)

Greetings
Bernd
-- 
  (OO)      -- Bernd_Eckenfels@Wittumstrasse13.76646Bruchsal.de --
 ( .. )  ecki@lina.{inka.de,ka.sub.org}  http://home.pages.de/~eckes/
  o--o     *plush*  2048/93600EFD  eckes@irc  +4972573817  *plush*
(O____O)       If privacy is outlawed only Outlaws have privacy


Reply to: