Serving a client from a different port (or from a differrent adress & port) - TCP-IP

This is a discussion on Serving a client from a different port (or from a differrent adress & port) - TCP-IP ; Hi, is it possible to serve a TCP client from a different port (or adress and port) than the adress and port the client has contacted for connecting? Suppose there is more than one network line to the server, ie. ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Serving a client from a different port (or from a differrent adress & port)

  1. Serving a client from a different port (or from a differrent adress & port)

    Hi,
    is it possible to serve a TCP client from a different port (or adress and port)
    than the adress and port the client has contacted for connecting?
    Suppose there is more than one network line to the server,
    ie. the server has multiple NICs to the internet.

    The rationale behind it is load balancing among the physical lines,
    ie. the subsequent packets from the client shall be adressed
    to the accepting adress.
    Would such redirecting function with standard services like SMTP and POP3 ?


  2. Re: Serving a client from a different port (or from a differrent adress & port)

    In article , "Adem"
    wrote:

    > Hi,
    > is it possible to serve a TCP client from a different port (or adress and
    > port)
    > than the adress and port the client has contacted for connecting?
    > Suppose there is more than one network line to the server,
    > ie. the server has multiple NICs to the internet.


    There's no built-in mechanism for this in TCP/IP, you'd need to design
    it into your application protocol.

    > The rationale behind it is load balancing among the physical lines,
    > ie. the subsequent packets from the client shall be adressed
    > to the accepting adress.
    > Would such redirecting function with standard services like SMTP and POP3 ?


    Since there's no standard mechanism, and these protocols don't have such
    a feature in them, no.

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE don't copy me on replies, I'll read them in the group ***

  3. Re: Serving a client from a different port (or from a differrentadress & port)

    On Oct 29, 3:48*pm, "Adem" wrote:
    > Hi,
    > is it possible to serve a TCP client from a different port (or adress andport)
    > than the adress and port the client has contacted for connecting?
    > Suppose there is more than one network line to the server,
    > ie. the server has multiple NICs to the internet.
    >
    > The rationale behind it is load balancing among the physical lines,
    > ie. the subsequent packets from the client shall be adressed
    > to the accepting adress.


    Are you trying to load balance inbound packets or outbound packets?

    > Would such redirecting function with standard services like SMTP and POP3?


    The best way is probably using DNS tricks.

    DS

  4. Re: Serving a client from a different port (or from a differrent adress & port)

    "David Schwartz" wrote:
    > On Oct 29, 3:48 pm, "Adem" wrote:
    >
    > > is it possible to serve a TCP client from a different port (or adress and port)
    > > than the adress and port the client has contacted for connecting?
    > > Suppose there is more than one network line to the server,
    > > ie. the server has multiple NICs to the internet.
    > >
    > > The rationale behind it is load balancing among the physical lines,
    > > ie. the subsequent packets from the client shall be adressed
    > > to the accepting adress.

    >
    > Are you trying to load balance inbound packets or outbound packets?


    Both.
    I think loadbalancing outbound packets seems relatively easy to manage.
    The problem is with the inbound packets coming via say 3 physical lines.
    As Barry Margolin wrote, one can solve this in the application protocol.
    The drawback is of course that it will work only with apps that use this application protocol.

    > > Would such redirecting function with standard services like SMTP and POP3 ?

    >
    > The best way is probably using DNS tricks.


    For example google.com solves this by using several DNS A entries.
    It is of course not the ideal load balancing method but that's the best
    one can get without adding another layer on top of the standard sockets interface.

    ; <<>> DiG 9.5.0-P2 <<>> google.com
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56016
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;google.com. IN A

    ;; ANSWER SECTION:
    google.com. 291 IN A 72.14.207.99
    google.com. 291 IN A 64.233.187.99
    google.com. 291 IN A 209.85.171.99

    ;; Query time: 60 msec
    ;; SERVER: 192.168.1.254#53(192.168.1.254)
    ;; WHEN: Thu Oct 30 19:52:37 2008
    ;; MSG SIZE rcvd: 76


+ Reply to Thread