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

Strange ARP problem with a PPP link


 Brief Summary:
  Strange problem in setting up ARP table for a small network connected
  via dial-up PPP to my linux server. It's necessary for me to
  issue the /sbin/arp command *twice*, isn't it strange?

 Long Description:

I've a Linux server running kernel 1.2.13, pppd 2.2.0 which regularly
receives incoming calls for single-host PPP connections. Its IP address
is and is permanently connected to the Net.

I need to connect a small network of a maximum of 6 PC through a modem
via dial-up line using PPP. The remote machine (which serves as
a gateway for the remote network) is a Debian Linux box, kernel 1.2.13
pppd 2.2.0. 

I've subnetted my own network, reserving the last 8
addresses for the remote network ( - 255 ). 
To the calling Linux machine I've assinged the address
and then I configure the arp and the route table with the
/etc/ppp/ip-up script, in this way:

---------------------< /etc/ppp/ip-up >-----------------------------

# Our Ethernet Adress 
# IP address of remote

# Log something

echo --------- ip-up started on `date` by `id` >> $OUT

echo interface-name: $1 >> $OUT
echo tty-device: $2 >> $OUT
echo speed: $3 >> $OUT
echo local-IP-address: $4 >> $OUT
echo remote-IP-address: $5 >> $OUT

if [ "$5" = "$PR_IP" ]

    echo PR detected... configuring arp table and routing >> $OUT

    # ARP of the remote network
    $ARP -s $ETH_ADDR netmask pub

    # Add routing
    $ROUTE add -net netmask dev $1

    # Log results:
    echo ifconfig: >> $OUT
    /sbin/ifconfig $1 >> $OUT
    echo "" >> $OUT
    echo ARP Table: >> $OUT
    cat /proc/net/arp >> $OUT
    echo "" >> $OUT
    echo Routing table: >> $OUT
    /sbin/route >> $OUT

# else nothing to do
exit 0

The Point-to-Point link between my server and the remote linux box works
fine, no problems at all. 

After the connection has been established and the ppp0 interface is
up, the log reports this configuration:

 - ifconfig ppp0
ppp0      Link encap:Point-Point Protocol
          inet addr:  P-t-P:  Mask:
          UP POINTOPOINT RUNNING  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0
          TX packets:0 errors:0 dropped:0 overruns:0

 - ARP Table:
IP address       HW type     Flags       HW address            Mask     0x1         0x2         00:00:0C:3B:AF:AB     *   0x1         0x2e        00:40:33:2D:FE:04   0x1         0xe         00:40:33:2D:FE:04     *

 - Kernel routing table
Destination     Gateway         Genmask         Flags MSS    Window Use Iface  *      UH    1436   0        1 ppp0  *      U     1436   0        0 ppp0
localnet        *        U     1436   0     1353 eth0
loopback        *            U     1936   0     5122 lo
default         PUBLInet-gw     *               UG    1436   0    13791 eth0


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 $ETH_ADDR netmask pub

Why this happens? Why I need to issue the arp command twice?

Thanks in advance for any answers (please respond via e-mail).

Best regards,


Reply to: