How to rewrite source addr from diald to prevent martians

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

 



This message was also sent to netdev@oss.sgi.com

Hi,

Is there a simple way (i.e. through some kernel functionality) to
rewrite the source address of a tcp/ip packet? I (think I) need that to
improve my diald setup since buffered packets generated on the
router/gateway are either dropped or does not work. I have read all
sorts of documentation including the code without finding a proper
solution that does not involve patching the kernel. 

Background:
Diald sets up a slip interface to analyze and buffer the outbound
traffic. Whenever a packet that should bring the link up arrives, diald
starts pppd and changes the default route to the ppp interface. Then,
all buffered packets are bounced back to the kernel through the slip
interface where the packets are reforwarded and masqueraded accordingly.

For packets arriving from the internal LAN, this setup works just
perfect and connections come up really fast without waiting for
retransmission by the tcp/ip protocol.

For packets generated locally, however, the source address of the slip
interface leads to all sorts of problems like martians, non-working
masquerading, or local addresses being sent on the ppp interface. In
short, this means that the buffering is useless for local packets.

In my case this is problematic because I need to run a name server on
the router. Therefore, all connections are initiated through the name
server (unless the address is cached) which has to wait on
retransmissions (since the diald forwarding does not work we have to
wait until named sends a packet that gets the correct source address)
leading to slow connects and even failures.

All this could get fixed by changing the source address of locally
generated packets when bouncing them back to the kernel???

Please CC any answers to me since I am not a member of this list. Or,
you could send your answer directly to me, and I will post a write-up
and (hopefully) a success story to this list.

Cheers,

/Björn


The setup consists of:

  the internal computer (RH-6.2)
    ethernet interface  (eth0)  192.168.c.d2

  the router (RH-6.2 upgraded to 2.2.18)
    ethernet interface  (eth0)  192.168.c.d1
    diald snoop iface   (sl0)   192.168.s.t
    diald ppp interface (ppp0)  A.B.C.D

    named (8.2.2-P5)    forwarded to 10.0.0.1


                | ppp0
            .---+---,
            |   :   |
   router/  |   x...<----------------,
   gateway  |   :   | sl0  .------,  |           
            |   x...>------> FIFO >--'
            |   :   |      `------'
            `---+---'
                | eth0
                |
     +-------+--+--------+--------+
     |       |  |        | eth0   |
                      .--+--,
                      |     |
                      |     |
                      `-----'
                      Internal
                      Computer

----------------------------------------------------------------------
Bjorn Hammarberg, PhD student in Neurophysiological Signal Processing

Dep. of Neuroscience     <MEDICINE   ENGINEERING>  Signals and Systems
Clinical Neurophysiology  ¨¨¨¨¨¨¨|+|o|¨¨¨¨¨¨¨¨¨¨    Uppsala University
University Hospital Uppsala      |-+-|                      PO Box 528
SE-751 85 Uppsala, SWEDEN        |o|+|       SE-751 20 Uppsala, SWEDEN
http://www.neurofys.uu.se        `---'         http://www.signal.uu.se
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux