abiosoft / abiosoft/colima

eth0 default route metric (200) overrides col0 (300) after DHCP lease

Offen
#1,551 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
30.8k
Forks
613
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Description

I am not able to pull images due to the routing conflict. I always have to restart the colima instance to pull the images.

**Details:**
I am seeing a routing conflict where the **eth0** interface is assigned a default route with a lower metric than **col0**. This causes the VM to lose internet connectivity (or route through the wrong interface).

**Reproduction Steps:**

1. `Start Colima with --network-address.`
2. Wait for a DHCP lease or network change.
3. Run ip route inside the VM.

**Actual Behavior:**
Two default routes exist, but **eth0** has a metric of 200, making it the preferred path over **col0** (metric 300).

**Routing Table (After Issue):**

```
default via 192.168.5.2 dev eth0 proto dhcp src 192.168.5.1 metric 200
default via 192.168.0.1 dev col0 proto dhcp src 192.168.0.78 metric 300
```

**Suggested Fix:**
Ensure that the **col0** interface is always assigned a lower metric (e.g., 50 or 100) or ensure **eth0** is configured with **ipv4.never-default** or a significantly higher metric.

### Version

colima version 0.10.1
git commit: ed905203afdbc6fd4eae6cc301918099ff31e86e

runtime: docker
arch: aarch64
client: v29.3.1
server: v29.2.1
limactl version 2.1.1
zsh: command not found: qemu-img

### Operating System

- [ ] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [x] Apple Silicon >= 14 (Sonoma)
- [ ] Linux

### Output of `colima status`

colima status
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] address: 192.168.0.78
INFO[0000] docker socket: unix:///Users//.colima/default/docker.sock
INFO[0000] containerd socket: unix:///Users//.colima/default/containerd.sock

### Reproduction Steps

1. `Start Colima with --network-address.`
2. Wait for a DHCP lease or network change.
3. Run ip route inside the VM.

### Expected behaviour

**col0** should be the preferred route always.

### Additional context

_No response_

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.