A subset implementation of TCP based on RFC793.
Currently only 3-way handshake are implemented.
Inspired by
Ubuntu 22.04 LTS.
# setup network.
sudo apt install ethtool
./setup.sh
# launch packet capture tool.
sudo ip netns exec host1 wireshark
# or
sudo ip netns exec host1 tcpdump -l
Network topology:
+++++++++++++++ .1 .254 +++++++++++++++ .254 .1 +++++++++++++++
+ + + + + +
+ host1-veth1 ++++++++++++ router ++++++++++++ host2-veth1 +
+ + + + + +
+++++++++++++++ +++++++++++++++ +++++++++++++++
10.0.0.0/24 10.0.1.0/24
- echoserver listens on 10.0.1.1:40000 (passive open).
- echoclient connects to echoserver (active open).
sudo ip netns exec host2 ./target/debug/examples/echoserver 10.0.1.1 40000
sudo ip netns exec host1 ./target/debug/examples/echoclient 10.0.1.1 40000