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: website/content/en/docs/config/network/_index.md
+75-75Lines changed: 75 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,8 +33,6 @@ The loopback addresses of the host is `192.168.5.2` and is accessible from the g
33
33
34
34
### DNS (192.168.5.3)
35
35
36
-
The DNS.
37
-
38
36
If `hostResolver.enabled` in `lima.yaml` is true, then the hostagent is going to run a DNS server over tcp and udp - each on a separate randomly selected free port. This server does a local lookup using the native host resolver, so it will deal correctly with VPN configurations and split-DNS setups, as well as mDNS, local `/etc/hosts` etc. For this the hostagent has to be compiled with `CGO_ENABLED=1` as default Go resolver is [broken](https://github.com/golang/go/issues/12524).
39
37
40
38
These tcp and udp ports are then forwarded via iptables rules to `192.168.5.3:53`, overriding the DNS provided by QEMU via slirp.
@@ -57,18 +55,86 @@ During initial cloud-init bootstrap, `iptables` may not yet be installed. In tha
57
55
58
56
If `hostResolver.enabled` is false, then DNS servers can be configured manually in `lima.yaml` via the `dns` setting. If that list is empty, then Lima will either use the slirp DNS (on Linux), or the nameservers from the first host interface in service order that has an assigned IPv4 address (on macOS).
59
57
58
+
## Lima user-v2 network
59
+
60
+
| ⚡ Requirement | Lima >= 0.16.0 |
61
+
|-------------------|----------------|
62
+
63
+
user-v2 network provides a user-mode networking similar to the [default user-mode network](#user-mode-network--1921685024-) and also provides support for `vm -> vm` communication.
64
+
65
+
To enable this network mode, define a network with `mode: user-v2` in networks.yaml
66
+
67
+
By default, the below network configuration is already applied (Since v0.18).
68
+
69
+
```yaml
70
+
...
71
+
networks:
72
+
user-v2:
73
+
mode: user-v2
74
+
gateway: 192.168.104.1
75
+
netmask: 255.255.255.0
76
+
...
77
+
```
78
+
79
+
Instances can then reference these networks from their `lima.yaml` file:
80
+
81
+
{{< tabpane text=true >}}
82
+
{{% tab header="CLI" %}}
83
+
```bash
84
+
limactl start --network=lima:user-v2
85
+
```
86
+
{{% /tab %}}
87
+
{{% tab header="YAML" %}}
88
+
```yaml
89
+
networks:
90
+
- lima: user-v2
91
+
```
92
+
{{% /tab %}}
93
+
{{< /tabpane >}}
94
+
95
+
An instance's IP address is resolvable from another instance as `lima-<NAME>.internal.` (e.g., `lima-default.internal.`).
96
+
97
+
_Note_
98
+
99
+
- Enabling this network will disable the [default user-mode network](#user-mode-network--1921685024-)
100
+
60
101
## VMNet networks
61
102
62
103
VMNet assigns a "real" IP address that is reachable from the host.
63
104
64
105
The configuration steps are different for each network type:
For [VZ](../vmtype/#vz) instances, the "vzNAT" network can be configured as follows:
215
-
{{< tabpane text=true >}}
216
-
{{% tab header="CLI" %}}
217
-
```bash
218
-
limactl start --vm-type=vz --network=vzNAT
219
-
```
220
-
{{% /tab %}}
221
-
{{% tab header="YAML" %}}
222
-
```yaml
223
-
networks:
224
-
- vzNAT: true
225
-
```
226
-
{{% /tab %}}
227
-
{{< /tabpane >}}
228
-
229
-
The range of the IP address is not specifiable.
230
-
231
-
The "vzNAT" network does not need the `socket_vmnet` binary and the `sudoers` file.
232
-
233
-
## Lima user-v2 network
234
-
235
-
| ⚡ Requirement | Lima >= 0.16.0 |
236
-
|-------------------|----------------|
266
+
Lima can also connect to "unmanaged" networks addressed by "socket". This
267
+
means that the daemons will not be controlled by Lima, but must be started
268
+
before the instance. The interface type (host, shared, or bridged) is
269
+
configured in `socket_vmnet` and not in lima.
237
270
238
-
user-v2 network provides a user-mode networking similar to the [default user-mode network](#user-mode-network--1921685024-) and also provides support for `vm -> vm` communication.
239
-
240
-
To enable this network mode, define a network with `mode: user-v2` in networks.yaml
241
-
242
-
By default, the below network configuration is already applied (Since v0.18).
243
-
244
-
```yaml
245
-
...
246
-
networks:
247
-
user-v2:
248
-
mode: user-v2
249
-
gateway: 192.168.104.1
250
-
netmask: 255.255.255.0
251
-
...
252
-
```
253
-
254
-
Instances can then reference these networks from their `lima.yaml` file:
255
-
256
-
{{< tabpane text=true >}}
257
-
{{% tab header="CLI" %}}
258
-
```bash
259
-
limactl start --network=lima:user-v2
260
-
```
261
-
{{% /tab %}}
262
-
{{% tab header="YAML" %}}
263
271
```yaml
264
272
networks:
265
-
- lima: user-v2
273
+
- socket: "/var/run/socket_vmnet"
266
274
```
267
-
{{% /tab %}}
268
-
{{< /tabpane >}}
269
-
270
-
An instance's IP address is resolvable from another instance as `lima-<NAME>.internal.` (e.g., `lima-default.internal.`).
271
-
272
-
_Note_
273
-
274
-
- Enabling this network will disable the [default user-mode network](#user-mode-network--1921685024-)
0 commit comments