From b9f845e2fae31922b41e6fa63170bdd05a685b4d Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 11 Jan 2022 09:57:53 +0000 Subject: Change default DHCP timeout to 60 seconds instead of 30 to avoid issues with STP (Spanning Tree Protocol). STP defaults to 15 + 15 seconds on a lot of popular devices for listening and learning states. Which if not disabled (which you should on access switches, sure..) most netboots will fail intermittently due to the port access on switches performing port learning while the machine is trying to get DHCP leases. Added comment referencing to why the 60 seconds. More information can be found here: https://www.ciscopress.com/articles/article.asp?p=2832407&seqNum=6 and https://techhub.hpe.com/eginfolib/networking/docs/switches/5980/5200-3921_l2-lan_cg/content/499036677.htm --- hooks/archiso_pxe_common | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hooks/archiso_pxe_common b/hooks/archiso_pxe_common index 6cadc34..3c4126b 100644 --- a/hooks/archiso_pxe_common +++ b/hooks/archiso_pxe_common @@ -32,7 +32,9 @@ run_hook() { fi # setup network and save some values - if ! ipconfig -t 20 "ip=${ip}"; then + # Timeout is set to 60 by default to avoid issues with STP default values + # (15 second listening, 15 seconds learning and 20 seconds for max age) + if ! ipconfig -t 60 "ip=${ip}"; then echo "ERROR; Failed to configure network" echo " Falling back to interactive prompt" echo " You can try to fix the problem manually, log out when you are finished" -- cgit v1.2.3-54-g00ecf