[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: networking.service fails



On 2022-04-11 07:56, Reco wrote:
> Good news - it explains "ifup: unknown interface eth0" messages.
> Bad news - this /e/n/i is not valid.
> 
> The reason being - both eth0 and eth1 lack interface definitions, i.e.
> have no "iface" stanzas.
> 
> If you absolutely need both eth0 and eth1 in the UP state by the time
> you create and bring up br0 you should either:
> 
> 1) Define both eth0 and eth1 in /e/n/i like this:
> 
> auto eth0
> iface eth0 inet manual
> 
> auto eth1
> iface eth1 inet manual
> 
> auto br0
> iface br0 inet static
>     address 10.0.1.100
>     gateway 10.0.1.1
>     netmask 255.0.0.0
>     bridge_ports eth0 eth1
>     bridge_maxwait 60
> 
> 2) Use pre-up and post-down hooks for br0, and remove both "auto eth0"
> and "auto eth1":
> 
> auto br0
> iface br0 inet static
>     address 10.0.1.100
>     gateway 10.0.1.1
>     netmask 255.0.0.0
>     bridge_ports eth0 eth1
>     bridge_maxwait 60
>     pre-up /sbin/ip link set eth0 up
>     pre-up /sbin/ip link set eth1 up
>     post-down /sbin/ip link set eth0 down
>     post-down /sbin/ip link set eth1 down
> 
> Reco

Hooray, it worked! Thanks for pointing out the configuration error.
After fixing it everything worked like a charm. Would be very tricky
for me to locate the issue...

If the configuration is invalid, networking.service could probably
complain about that? I would be able then to resolve the issue myself.

Just for my record the reference to documentation:

https://wiki.debian.org/BridgeNetworkConnections#Configuring_bridging_in_.2Fetc.2Fnetwork.2Finterfaces

-- 
With best regards,
Dmitry


Reply to: