MetalBond packets are transferred via TCP ontop of IPv6. The default TCP port is 4711.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version | Msg. Length (Big Endian) | Msg. Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Variable-Length Protobuf Message |
| ... |
| (max 1188 bytes) |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Version
must be 1.Msg. Length
defines the length of the followingVariable-Length Protobuf Message
.Msg. Type
identifies the type of the following Protobuf Message.
The metalbond protocol relies on IPv6 transport. Therefore we assume a minimum MTU of 1280 bytes. To prevent fragmentation all metalbond messages must not be larger than 1220 bytes overall (40 bytes IPv6 header, 20 bytes TCP header) - i.e. the variable-length protobuf message must not be longer than 1188 bytes.
Type ID | Message Type |
---|---|
1 | HELLO |
2 | KEEPALIVE |
3 | SUBSCRIBE |
4 | UNSUBSCRIBE |
5 | UPDATE |
To install routes on a Linux system, you first need to create an IP-in-IPv6 tunnel endpoint:
ip link add overlay-tun type ip6tnl mode any external
ip link set up dev overlay-tun
and then start the metalbond client with the --install-routes
command line parameter. This parameter requires a mapping between VNI and Kernel route table IDs. E.g. if you want to write all routes associated with VNI 23 to the Kernel route table 100, set --install-routes 23#100
.
Set the tunnel device using the tun
parameter:
./metalbond client --install-routes 23#100 --tun overlay-tun
MetalBond is licensed under Apache v2.0 - Copyright by the MetalBond authors.