Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-344

Ignore bind address for (receive) sockets

    XMLWordPrintable

Details

    • Task
    • Resolution: Won't Do
    • Major
    • 2.5
    • 2.4
    • None
    • Medium

    Description

      For multicast sockets, bind address defines the NIC which will be used to receive and send IP multicast packets. For unicast sockets (e.g. ServerSocket), this is an unnecessary restriction and bind address should be ignored. For example, if we define bind_addr=1.2.3.4, then we will be able to only receive packets on 1.2.3.4, but not 5.6.7.8 etc.
      However, currently bind_addr is used to define the identity of a member, so we still need to use it (although not set it in a socket). This will be easier once we have logical addresses.

      Email by Satya:
      Hi,

      I have found an issue which is to be fixed in 2.5. I
      want to know if my issue is realted to this issue.

      The description is as follows:

      If -Dbind.address or bind_addr are not set, JGroups
      picks the NIC to bind sockets to itself. However,
      especially for ServerSockets, this may not be
      desirable because we may want to have ServerSockets be
      able to receive packets through all interfaces, e.g.

      • NICs are 192.168.5.2, 192.168.0.2 and 127.0.0.1
        (loopback)
      • When the bind address is set to 192.168.5.2, a given
        ServerSocket on port 7500 will *only accept packets
        from this NIC*
      • If someone connects to 192.168.0.2:7500 or
        127.0.0.1:7500, the client will not be able to
        establish a connection because nobody is listening on
        those ports on the given NICs
      • If bind address was not set, this would be possible
      • Affected: FD_SOCK, FD_PING, TCP, TCP_NIO etc
      • We need to think about semantics for
        MulticastSockets where a wildcard address (not setting
        the bind address) means that the operating system
        picks the NIC, and not that the MulticastSocket will
        listen on all interfaces for incoming packets

      Regards,
      Satya.

      — satya narayana <satya_461@yahoo.com> wrote:

      > > Hi Bela,
      > >
      > > It worked for me as long as I was stopping the NIC's
      > > which GMS address doesn't correspond.
      > >
      > > When I stopped the NIC which has the GMS Address
      > > specified by the member, I see them not
      > > communicating.
      > >
      > > If u have tried this and working for you , can you
      > > tell me the properties and options which u have
      > > specified to your demo ?

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: