private-octopus / picoquic

Minimal implementation of the QUIC protocol
MIT License
551 stars 162 forks source link

Test Migration using Mininet #1498

Closed plumplumli closed 9 months ago

plumplumli commented 1 year ago

I use mininet to build a network topology:"h1 has two NICs h1-eth0 and h1-eth1 connected to r1 and r2 respectively, r1 and r2 connected to r3, r3 connected to h2". Before "ifconfig h1-eth1 down", two paths between h1 and h2 "h1-eth0-r1-r3-h2" and "h1-eth1-r2-r3-h2" are connected. I run "./picoquicdemo -n test -o ../received 192.168.2.10 4433 " in h1, and run "./picoquicdemo -w ../server_files -p 4433" in h2. After the CLI returned "Connection established", I run "ifconfig h1-eth1 down", but instead of Migrtaion, the connection is broken.

The following figure is the log records of h1. client

The following figure is the log records of h2. server

I guess it's possible that the client didn't detect new path because I overlooked some steps. I would be grateful if you could provide information or suggestions.

huitema commented 1 year ago

That scenario is tested and should work if you enable multipath. It is not tested, and probably does not work yet, if you have not enabled multipath.

The first step would be to add a test case for exactly your scenario.

huitema commented 1 year ago

I am looking at your command line options.

By default, the test client picks just one IP address for the server. To enable a multipath scenario, you should:

1) Enable multipath on the server:

    "./picoquicdemo -w ../server_files -p 4433 -M 1" 

2) On the client, enable multipath and provide an alternative address for the server:

     "./picoquicdemo -n test -o ../received -M 1 -A  192.168.2.10/eth1 192.168.2.10 4433 "

The parameter -A 192.168.2.10/eth1 asks the client to establish an extra path to the server address 192.168.2.10, using the network interface "eth1". I am not sure that "eth1" is the correct identifier, you may need to find the corresponding interface number.

I understand that this UI is a bit unwieldy. It would be nice to have an option to enumerate the available outgoing interfaces and IP addresses, and to automatically establish the corresponding paths. I do not have time to develop that right now, but i am certainly ready to review a PR...