[jboss-jira] [JBoss JIRA] Commented: (JGRP-344) Ignore bind address for (receive) sockets

Bela Ban (JIRA) jira-events at lists.jboss.org
Wed Mar 7 05:38:22 EST 2007


    [ http://jira.jboss.com/jira/browse/JGRP-344?page=comments#action_12355276 ] 
            
Bela Ban commented on JGRP-344:
-------------------------------

I think that the original issue (ignoring bind addresses for TCP server sockets) will *not* fix your problem: if a ServerSocket listens on A:7500, B:7500 and C:7500 (A,B,C being NICs and the address being A:7500), then the failure of A will cause traffic to A:7500 to be discarded. Yes, we could send to either B:7500 or C:7500, but since the address is A:7500, traffic *to* this member will always go to A:7500, *not* B:7500 or C:7500 !
This will only get addressed with logical addresses (in 2.6), so I'm closing this issue

> Ignore bind address for (receive) sockets
> -----------------------------------------
>
>                 Key: JGRP-344
>                 URL: http://jira.jboss.com/jira/browse/JGRP-344
>             Project: JGroups
>          Issue Type: Task
>    Affects Versions: 2.4
>            Reporter: Bela Ban
>         Assigned To: Bela Ban
>             Fix For: 2.5
>
>
> 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 at 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 ?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list