I do some expirement:
the net interface eth0 has two ip 1.2.3.4 and 5.6.7.8
set a REQ zmq_socket : bind(tcp://1.2.3.4:1778) and then connet to
(tcp://2.3.4.5:1777)
then run the program, it sends message to the destination (tcp://2.3.4.5:1777)
successfully,
when I use tcpdump tool to trace the message, I find the traffic is still
5.6.7.8 -> 2.3.4.5
It seems that the bind operation does not work because the program also works
if I do not bind a specific address and the traffic does not change.
If I want to the traffic change to 1.2.3.4 -> 2.3.4.5, and I don't like to
modify the system route configuration, how to do it?
------------------ ???????? ------------------
??????: "Stephen Lord"<[email protected]>;
????????: 2012??11??8??(??????) ????8:55
??????: "<[email protected]>"<[email protected]>; "ZeroMQ development
list"<[email protected]>;
????: Re: [zeromq-dev]re?? puzzled with zmq_socket bind and connect
I don't think he means that type of bind, I think this is about controlling
the source IP address on a connection to force the traffic over a specific NIC.
A zeromq bind is not the same thing as binding a source socket to a particular
local IP address. I suspect this would take a socket option which could only be
used before connect to implement it. For a host where the NICs are on different
subnets this would could lead to cases where you cannot make a connection, but
for the case where you have multiple NICs on the same subnet and are not using
NIC bonding it could be useful for separating traffic.
Steve
On Nov 8, 2012, at 6:31 AM, Pieter Hintjens <[email protected]> wrote:
Yes. You can bind any socket to an interface.
On Nov 8, 2012 8:46 PM, "??" <[email protected]> wrote:
Can a REQ zmq_socket bind to a specific interface?
we know a Ping program, an useful command on Unix, can bind a specific src
adress and ping a remote host, using -I option. Can a zmq_socket do the same
thing? I don't find it in zmq guide.
( As the Guide says, a REQ zmq_socket connects to a REP zmq_socket )
------------------
------------------ ???????? ------------------
??????: "Pieter Hintjens"<[email protected]>;
????????: 2012??11??8??(??????) ????4:35
??????: "ZeroMQ development list"<[email protected]>;
????: Re: [zeromq-dev] puzzled with zmq_socket bind and connect
You can bind to a specific interface (e.g. "tcp://eth0:5550") and connect to
specific IP addresses.
On Wed, Nov 7, 2012 at 11:56 AM, ?? <[email protected]> wrote:
I am a fresh programer of 0mq. Could you tell me how to comprehend this
feature of 0mq:
It queues messages automatically when needed. It does this intelligently,
pushing messages as close as possible to the receiver before queuing them.
For example, I run a 0mq client on one linux machine with multi ip addresses
configured using REQ-REP pattern. Different ip address referes to different
route information. when zmq client connects to 0mq server on another machine,
which ip adrress is binded to the client zmq_socket? Can I program to determine
a specific ip so that I can trace the network package it sends.
------------------
The information contained in this transmission may be confidential. Any
disclosure, copying, or further distribution of confidential information is not
permitted unless such privilege is explicitly granted in writing by Quantum.
Quantum reserves the right to have electronic communications, including email
and attachments, sent across its networks filtered through anti virus and spam
software programs and retain such messages in order to comply with applicable
data security and retention requirements. Quantum is not responsible for the
proper and complete transmission of the substance of this communication or for
any delay in its receipt.
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev