Date: Wed, 28 Aug 2024 10:21:12 +0200 From: "yann.masson@thehomecave.fr" <yann.masson@thehomecave.fr> To: freebsd-net@freebsd.org Subject: wait link up before route configuration Message-ID: <d6e0e453-4322-4d57-9fbe-4b23b80ebfe9@thehomecave.fr>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------CXebCWEHadZeMXLtr0MEWi1X
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi After configuring interfaces and routes, and triggering a 'service
netif restart && service routing restart' is there a way to wait for the
'carrier up' of the interface before route reconfiguration? My use case
is a server with 2 Mellanox and a Lagg. The 2 mce interfaces are UP in
milliseconds but the lagg interface takes a few seconds to be UP, and
the routing service says 'Network unreachable'. The subnet is a /32 and
the gateway need a static route like: # /etc/rc.conf.d/netif
cloned_interfaces="lagg0" ifconfig_mce0="up" ifconfig_mce1="up"
ifconfig_lagg0="laggproto lacp laggport mce0 laggport mce1 198.51.100.1
netmask 255.255.255.255 mtu 1500" # /etc/rc.conf.d/routing
route_defaultgw="-host 203.0.113.1 -link -interface lagg0"
defaultrouter="203.0.113.1" static_routes="defaultgw" If I run 'service
netif restart && sleep 5 && service routing restart', everything is ok.
I didn't find any options for that, and was thinking about a patch in
the routing script. Thanks
--------------CXebCWEHadZeMXLtr0MEWi1X
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><span
style="color: rgb(209, 210, 211); font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 12px; font-style: normal; font-variant-ligatures: none; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgba(232, 232, 232, 0.04); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Hi
After configuring interfaces and routes, and triggering a 'service netif restart && service routing restart'
is there a way to wait for the 'carrier up' of the interface before route reconfiguration?
My use case is a server with 2 Mellanox and a Lagg. The 2 mce interfaces are UP in milliseconds but
the lagg interface takes a few seconds to be UP, and the routing service says 'Network unreachable'.
The subnet is a /32 and the gateway need a static route like:
# /etc/rc.conf.d/netif
cloned_interfaces="lagg0"
ifconfig_mce0="up"
ifconfig_mce1="up"
ifconfig_lagg0="laggproto lacp laggport mce0 laggport mce1 198.51.100.1 netmask 255.255.255.255 mtu 1500"
# /etc/rc.conf.d/routing
route_defaultgw="-host 203.0.113.1 -link -interface lagg0"
defaultrouter="203.0.113.1"
static_routes="defaultgw"
If I run 'service netif restart && sleep 5 && service routing restart', everything is ok.
I didn't find any options for that, and was thinking about a patch in the routing script.
Thanks</span></p>
</body>
</html>
--------------CXebCWEHadZeMXLtr0MEWi1X--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d6e0e453-4322-4d57-9fbe-4b23b80ebfe9>
