3 Replies Latest reply on Jul 17, 2007 10:56 AM by Richard Teviotdale

    NIC address binding granularity

    Richard Teviotdale Newbie

      When starting the JBoss you may specify an address binding option like this:

      -b x.x.x.x (bind to network address x.x.x.x only)
      
      or
      
      -b 0.0.0.0 (bind to all available network addresses)


      How do you configure the server to connect to more than one individual network address, but not all?

      I've taken a look at the source code and it seems that network binding is limited in this fashion.

      Have I missed something or would a JIRA feature request be reasonable?

        • 1. Re: NIC address binding granularity
          Peter Johnson Master

          Sorry, not possible, but it is not the fault of JBoss, or even Java. The sockets API allows you to connect to a single address only. So you have to choose one.

          I guess the app server could perform multiple binds on each port, but I don't know of any software that does that. It would be fairly difficult to manage, I image (don't take my word for it though, a TCP guru patiently explained this all to me and I only comprehended half of it, so I could be wrong - wouldn't be the first time. But you would be amazed at how quickly people who would otherwise ignore a post will step up and correct a misconception - I learn more stuff that way).

          Here are some variations on a theme:

          * You could run multiple copies of the app server, each bound to a different IP address.

          * Another option is to have Apache HTTPD manage the multiple IP addresses (not sure if you need multiple copies) and funnel all request to a single IP address for JBoss AS.

          • 2. Re: NIC address binding granularity
            Dimitris Andreadis Master

            PeterJ is right. Every component that binds a socket would have to manually create many sockets and manage those. This is extremely hard to implement/impose on all components that make up the server, especially the 3rd party ones.

            • 3. Re: NIC address binding granularity
              Richard Teviotdale Newbie

              Peter and Dimitri - thank you both for your replies.

              Cheers !