rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.45k stars 659 forks source link

Multiple NICs and dhcp default routes #1490

Open kirrmann opened 7 years ago

kirrmann commented 7 years ago

RancherOS Version: v0.7.1

Where are you running RancherOS? baremetal

I'm using hosts with two NICs and setup both for using dhcp in cloud-config.yml. Each NIC sets its default route, but I have to disable the gateway for the second NIC.

I tried to define

post_up:
- ip route del default eth1

but this doesn't work. Also tried putting the command in post_cmds

I'm currently disabling dhcp for the second NIC, and assign IPs over cloud-config.yml by MAC address. But I would prefer it, if there would be an option available to disable or prevent the default gateway for a given NIC.

SvenDowideit commented 7 years ago

I think we might need to add a rancher.network.interfaces.eth0.gateway: delete - this would be a follow on for #1666 - and likely post 0.9.0