You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/network.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ RootlessKit provides several drivers for providing network connectivity:
7
7
*`--net=slirp4netns`: use [slirp4netns](https://github.com/rootless-containers/slirp4netns) (recommended)
8
8
*`--net=vpnkit`: use [VPNKit](https://github.com/moby/vpnkit)
9
9
*`--net=lxc-user-nic`: use `lxc-user-nic` (experimental)
10
+
*`--net=gvisor-tap-vsock`: use [gvisor-tap-vsock](https://github.com/containers/gvisor-tap-vsock) (experimental)
10
11
11
12
[Benchmark: iperf3 from the child to the parent (Mar 8, 2020)](https://github.com/rootless-containers/rootlesskit/runs/492498728):
12
13
@@ -207,6 +208,53 @@ You might need to reset `/var/lib/misc/dnsmasq.lxcbr0.leases` and restart the `l
207
208
208
209
Currently, the MAC address is always set to a random address.
209
210
211
+
### `--net=gvisor-tap-vsock` (experimental)
212
+
213
+
`--net=gvisor-tap-vsock` isolates the network namespace from the host and uses [gvisor-tap-vsock](https://github.com/containers/gvisor-tap-vsock) for providing usermode networking.
214
+
215
+
Pros:
216
+
* Possible to perform network-namespaced operations, e.g. creating iptables rules, running `tcpdump`
217
+
* Supports ICMP Echo (`ping`) when `/proc/sys/net/ipv4/ping_group_range` is configured
218
+
219
+
Cons:
220
+
* Supports only TCP, UDP, and ICMP Echo packets
221
+
* Does not support IPv6 routing (`--ipv6`)
222
+
223
+
The network is configured as follows by default:
224
+
* IP: 10.0.2.100/24
225
+
* Gateway: 10.0.2.1
226
+
* DNS: 10.0.2.1
227
+
228
+
The network configuration can be changed by specifying custom CIDR, e.g. `--cidr=10.0.3.0/24`.
229
+
230
+
As in `--net=slirp4netns`, specifying `--copy-up=/etc` is highly recommended unless `/etc/resolv.conf` on the host is statically configured. It is also highly recommended to specify `--disable-host-loopback`. Otherwise ports listening on 127.0.0.1 in the host are accessible as 10.0.2.1 in the RootlessKit's network namespace.
0 commit comments