Implementing multicast over TCP using ONOS

172 views
Skip to first unread message

Ouss

unread,
Jul 24, 2017, 10:07:12 AM7/24/17
to ONOS Developers
Hi everyone,

Topology & problem description:

I wanna implement a multicast streaming over TCP (not using UDP!) in ONOS. To do that, I created a simple topology consisting of a server and two clients connected to an open virtual switch (ovs1). The server is connected to the switch on port 1, and the clients are connected to the same switch on ports 2 and 3 respectively. I have also added a one-way point intent from client1 to the server and another one-way point intent from client2 to the server. This is to allow the two clients sending their requests to the server. Furthermore, I have added a single-to-multi-point intent for each packet coming from the server on port 1 to be duplicated on port 2 and 3, and rewrite the destination IP/MAC addresses to match the destination hosts.

The server runs a simple python chatting program with TCP socket that receives messages from the client1 and re-send the same message to client2 and vice-versa. The two clients opened a TCP connection with the server. The expected result is that each message sent by the server to client2 should also received by client1 (and vice-versa) as we have a singe-to-multi intent at the switch.

Let suppose that client1 sends "Hello!" to the server, the server will re-send "Hello!" to client2. But, since we have a single-to-multi intent at the ovs1, the message "Hello!" is duplicated and the destination IP and MAC addresses are re-written to reach both hosts client1 and client2. Using tcpdump, I have verified that the packets are duplicated and the destination IP/MAC addresses are re-written correctly by ovs1 (so I am sure that the message arrives till the interface of each host). However, client2 was able to display the message "Hello!" since it is the original destination of that message, whereas client1 wasn't ? My understanding is that there is other fields in the packets (that concerns the client's session) that should be re-written also to allow client1 accepting the message (please correct me if I am wrong). But, ONOS single-to-multi intent command does not allow rewrite other fields.

Question: Does any one know the solution to my problem and how to implement it ?

Thanks in advance.

Jonathan Hart

unread,
Jul 25, 2017, 12:51:06 PM7/25/17
to Ouss, ONOS Developers
Hi,

I'm skeptical that something like this could work, even if you are rewriting the IP/MAC addresses correctly and even if you could rewrite TCP header fields. The reason is that TCP is a connection-oriented protocol, so both endpoints have to be aware of each other. You can't have one endpoint connected to two other endpoints without the first one being aware of it. For example, the first host will send out a SYN packet, and assuming it gets duplicated to both receivers correctly, they will both send back a SYN/ACK in response. The first host won't be able to make sense of receiving two SYN/ACKs from different hosts if it thought it was trying to communicate with one other host.

Thanks,
Jono

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/5a717a4a-fb52-466d-9082-d62a299a2752%40onosproject.org.

Ouss

unread,
Jul 26, 2017, 3:35:54 AM7/26/17
to ONOS Developers, elmarai...@gmail.com
Hi Jono,

Thank you for your answer.

The 3-way handshake is done between the server and each client separately, so we are sure that there is an opened session between the server and each client. However, the server sends the content once and the content is duplicated at switches based on the intents installed.

My current problem is at client side not at the server side. I think that the clients reject these packet because the sequence number differ from the one at its side. So, if I could alter the sequence number of the packets, the clients will accept those packets since the other header's packet information (i.e. IP, MAC and PORT) matches the client's information. However, I don't know how can I modify the sequence number at the switch using ONOS, or may be do something at client host to allow it accepting any packet from the server X.

Thanks in advance.

Jonathan Hart

unread,
Jul 27, 2017, 1:00:54 PM7/27/17
to Ouss, ONOS Developers
Even if you can establish a connection, there are still other issues with this approach. There isn't a way to set the sequence numbers via OpenFlow, but even if you could this would be complex to manage. For one thing the sequence number changes for every packet - the switch would have to keep track of the current number to modify it to a different value for every packet.

Also even if you can get the clients to 'accept' the packet, then they will both send ACKs and the server will receive two ACKs for the same data - this will cause havoc with TCP's congestion control algorithms. Another problem is how would you deal with retransmissions if one client missed some data but the other didn't.

Thanks,
Jono

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

Ouss

unread,
Jul 28, 2017, 10:25:40 AM7/28/17
to ONOS Developers, elmarai...@gmail.com
Hi Jono,

Thanks for your comment.

Indeed, I don't care about the missed data. It will not be re-transmitted. As to the other acknowledgments that may arrive to the server, I think they will be ignored by the server and only one ack is accepted (of the initial destination host of the server's packet).

Now, I have a problem when adding a single-to-multi-intent: It allows only re-writing one destination IP/MAC addresses even if I have multiple egress ports.

This is the current intent command:

add-single-to-multi-intent -t IPV4 -p 200 --setIpDst 10.1.1.2 --setEthDst D6:B6:7F:0B:3A:4A of:00001e450efa644c/1 of:00001e450efa644c/2 of:00001e450efa644c/3

How can I re-write as many IP/MAC addresses as egress ports?

Thanks in advance.

Kind regards.

David Bainbridge

unread,
Jul 28, 2017, 1:06:53 PM7/28/17
to Ouss, ONOS Developers
Can I ask a basic question, unrelated to the mechanics of things? What are you attempting to accomplish? What I mean is what is the purpose of attempting to implement mcast over TCP?

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

Jonathan Hart

unread,
Aug 1, 2017, 1:17:58 PM8/1/17
to David Bainbridge, Ouss, ONOS Developers
Hi,

I don't think it is possible to do that right now. It is possible to pop/push VLAN/MPLS tags on a per-port basis, but I don't think this has been implemented for rewriting MAC or IP addresses.

Thanks,
Jono

Ouss

unread,
Aug 1, 2017, 1:30:15 PM8/1/17
to ONOS Developers, dbainbr...@gmail.com, elmarai...@gmail.com
Thank you Jono for your answer.

How can I pop/push VLAN/MPLS tags on a per-port basis ?

Kind regards,

Oussama.

Jonathan Hart

unread,
Aug 1, 2017, 1:40:11 PM8/1/17
to Ouss, ONOS Developers, dbainbr...@gmail.com
You can't do it via the CLI, it's only available via the programmatic Java API. You would use the FilteredConnectPoint when building the intent rather than the plain ConnectPoint.

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

Ouss

unread,
Aug 2, 2017, 3:32:41 AM8/2/17
to ONOS Developers, elmarai...@gmail.com, dbainbr...@gmail.com
Thank you Jono for your answer.

Could you please provide a link to an example similar showing how to do that in java API.

Kind regards,

Oussama.

Jonathan Hart

unread,
Aug 2, 2017, 12:10:30 PM8/2/17
to Ouss, ONOS Developers, dbainbr...@gmail.com
Hi,

Yes, the VPLS app makes use of this feature. See this class for example of how to do it.

Thanks,
Jono

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at https://groups.google.com/a/onosproject.org/group/onos-dev/.

Ouss

unread,
Aug 3, 2017, 3:38:40 AM8/3/17
to ONOS Developers, elmarai...@gmail.com, dbainbr...@gmail.com
Hi Jono,

Thank you for your help.

Kind regards,

Oussama.

Reply all
Reply to author
Forward
0 new messages