Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Nov 1999 17:10:51 -0500 (EST)
From:      "Parthasarathy M. Aji" <partha@cs.duke.edu>
To:        freebsd-hackers@FreeBSD.ORG
Cc:        Kirill Komarov <kirill@cs.duke.edu>
Subject:   Redirection
Message-ID:  <Pine.GSO.4.20.9911241645400.23747-100000@mackerel.cs.duke.edu>
In-Reply-To: <Pine.BSF.4.20.9911231206440.3171-100000@home.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hey,
We are doing packet redirection. The client sends packets through our
node to a given  server. The server contents are replicated in 2 other
servers. We want to redirect new syn packets from the client to a specific
server in a round robin fashion. Here 's typical scenarion,
let the client's ip address be, C1 and let the three replicated servers
have ip addresses S1,S2 and S3. and let us say that the client and the
world knows only
about the existence of S1. Our program will reside on an intermediate node
between C1 and  S1 such that every packet sent by C1 to S1 will pass
through our program. Now what we want to do is, when ever a new connection
requested from the client (it sends syn  packet) to S1, we redirect the
destination address of the packet to S2 and S3 in a round robin fashion.

Similarly  when we receive data back from server S2 we change the
destination address of the S2 packet to our clien C1t..
 
Now here's the problem...
We seem to have recomputd the check sum and changed the destination
address correclty when the client sends the syn packet to the server, but
the problem is when the server sends an ack back (in the 3 way
handshake) the client is not able to accept it.     


here's the TCP dump output which was run on the server cricket..

cricket is the client
hugo is the server to which we redirected the client syn packet.
for some reason cricket is not able to accept the syn+ack from hugo..


16:19:30.524349 cricket.cs.duke.edu.1048 > hugo.cs.duke.edu.telnet: S
1156355247:1156355247(0) win 65535 <mss 1460,nop,wscale
2,nop,nop,opt-8:000900[|tcp][|tcp]> (DF) [tos 0x10]
16:19:30.524349 hugo.cs.duke.edu.telnet > cricket.cs.duke.edu.1048: S
872384000:872384000(0) ack 1156355248 win 33580 <mss 1460,nop,[|tcp]> (DF)
16:19:31.231553 hugo.cs.duke.edu.telnet > cricket.cs.duke.edu.1048: S
872384000:872384000(0) ack 1156355248 win 33580 <mss 1460,nop,[|tcp]> (DF)
16:19:33.261917 cricket.cs.duke.edu.1048 > hugo.cs.duke.edu.telnet: S
1156355247:1156355247(0) win 65535 <mss 1460,nop,wscale
2,nop,nop,opt-8:000900[|tcp][|tcp]> (DF) [tos 0x10]
16:19:33.261917 hugo.cs.duke.edu.telnet > cricket.cs.duke.edu.1048: S
872384000:872384000(0) ack 1156355248 win 33580 <mss 1460,nop,[|tcp]> (DF)
16:19:36.231575 hugo.cs.duke.edu.telnet > cricket.cs.duke.edu.1048: S
872384000:872384000(0) ack 1156355248 win 33580 <mss 1460,nop,[|tcp]> (DF)
16:19:42.231668 hugo.cs.duke.edu.telnet > cricket.cs.duke.edu.1048: S
872384000:872384000(0) ack 1156355248 win 33580 <mss 1460,nop,[|tcp]> (DF)
16:19:42.231668 cricket.cs.duke.edu.1048 > hugo.cs.duke.edu.telnet: R
1156355248:1156355248(0) win 0 

Partha



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.20.9911241645400.23747-100000>