From: news_rt on
Hi,

I try to run an application which uses fixed TCP ports in different
zones. Each Zone has its own network
interface, hostname and IP address.
If I start this application first in zone 1 and later in zone 2 then
the application in zone 2 is not able to bind to
the TCP port.
Is there a way to use the same TCP port in different zones at the same
time?

--
BR
Roland
From: Richard B. Gilbert on
news_rt wrote:
> Hi,
>
> I try to run an application which uses fixed TCP ports in different
> zones. Each Zone has its own network
> interface, hostname and IP address.
> If I start this application first in zone 1 and later in zone 2 then
> the application in zone 2 is not able to bind to
> the TCP port.
> Is there a way to use the same TCP port in different zones at the same
> time?
>

I doubt it very much. How would the driver know which zone to deliver a
packet to?
From: Michael Schmarck on
Richard B. Gilbert <rgilbert88(a)comcast.net> wrote:

> I doubt it very much. How would the driver know which zone to deliver a
> packet to?

Hm - a packet is "delivered" to a certain IP adress, isn't it? And that
IP adress is assigned to a given (virtual) device. And this device is
assigned to a zone.

So the driver might be able to notice, that the packet arrived at
device $d which is assigned to zone $z. Thus, in theory, it should
be possible to distinguish.

And BTW: With Xen (on Linux), it's absolutely possible to have different
applications open the same port number on one host. That's how all
those cheapo virtual server offerings work - they all have their own
apache (or whatever) listening to port 80 of the numerous virtual
devices.

Michael
From: Ewald Ertl on
hi,

news_rt wrote:
> Hi,
>
> I try to run an application which uses fixed TCP ports in different
> zones. Each Zone has its own network
> interface, hostname and IP address.
> If I start this application first in zone 1 and later in zone 2 then
> the application in zone 2 is not able to bind to
> the TCP port.

Can you figure out who has bound the port?

> Is there a way to use the same TCP port in different zones at the same
> time?
As far as I've seen in the presentations of Zones/Containers in Solaris 10
this should be possible.

I have also done a short test here on a Sun Fire V240. A python-script binds the same
port in different zones on the same physical server sharing but sharing an interface
with two different IP addresses in the same network. This worked for me.


Ewald
From: Andrew Gabriel on
In article <c51430fb-ac08-41a2-9c3e-ded37cfe98ce(a)k1g2000prb.googlegroups.com>,
news_rt <news_rt(a)online.de> writes:
> Hi,
>
> I try to run an application which uses fixed TCP ports in different
> zones. Each Zone has its own network
> interface, hostname and IP address.
> If I start this application first in zone 1 and later in zone 2 then
> the application in zone 2 is not able to bind to
> the TCP port.

This seems most unlikely. There are lots of identical things between
zones which use the same port numbers, such as sendmail, ssh, etc.

> Is there a way to use the same TCP port in different zones at the same
> time?

Yes, it should just work. I think you have a different problem.

--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]