From 8d12314a6e0fe58dfdbaf88a94552f8e68ac0ebb Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Mon, 2 Sep 2019 11:50:38 -0500 Subject: [PATCH 01/59] use profile/arping for static in dhcpcd.conf --- roles/network/defaults/main.yml | 1 + roles/network/templates/network/dhcpcd.conf.j2 | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index 7989d0a78..b7f173dcc 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -51,6 +51,7 @@ strict_networking: False iiab_demo_mode: False gui_static_wan: False wan_cidr: +wan_force_static: False # Set defaults for discovery process as strings wifi1: "not found-1" diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index 3000a4aad..eda2a9681 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -58,8 +58,16 @@ static domain_name_servers=127.0.0.1 # IIAB static IP configuration: {% if wan_ip != "dhcp" %} -interface {{ iiab_wan_iface }} +profile {{ wan_gateway }} static ip_address={{ wan_ip }}/24 static routers={{ wan_gateway }} static domain_name_servers={{ wan_nameserver }} + +interface {{ iiab_wan_iface }} +{% if wan_force_static == "true" %} +arping 192.0.2.1 +fallback {{ wan_gateway }} +{% else %} +arping {{ wan_gateway }} +{% endif %} {% endif %} From b28f7e12983735b794cb773d7febde38bd7047a7 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Mon, 2 Sep 2019 12:20:04 -0500 Subject: [PATCH 02/59] rename variable to wan_ignore_ipV4LL --- roles/network/defaults/main.yml | 2 +- roles/network/templates/network/dhcpcd.conf.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index b7f173dcc..e28f020d2 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -51,7 +51,7 @@ strict_networking: False iiab_demo_mode: False gui_static_wan: False wan_cidr: -wan_force_static: False +wan_ignore_ipV4LL: False # Set defaults for discovery process as strings wifi1: "not found-1" diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index eda2a9681..7cc7aa844 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -64,7 +64,7 @@ static routers={{ wan_gateway }} static domain_name_servers={{ wan_nameserver }} interface {{ iiab_wan_iface }} -{% if wan_force_static == "true" %} +{% if wan_ignore_ipV4LL == "true" %} arping 192.0.2.1 fallback {{ wan_gateway }} {% else %} From 94a750b031835951eac67a5168743aea7d94f179 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Mon, 2 Sep 2019 12:30:21 -0500 Subject: [PATCH 03/59] use timeout 10 in dhcpcd.conf --- roles/network/templates/network/dhcpcd.conf.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index 7cc7aa844..75eb9af2d 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -38,6 +38,7 @@ require dhcp_server_identifier slaac private # IIAB +timeout 10 # always support Ethernet-to-Internet on RPi (avoid "denyinterfaces eth0") {% if is_rpi and hostapd_enabled %} From b6b96afdb32ac0495ea7e43f5e433f72d5bd704a Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 15:06:35 -0400 Subject: [PATCH 04/59] Update dhcpcd.conf.j2 --- roles/network/templates/network/dhcpcd.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index 75eb9af2d..80d13c807 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -65,7 +65,7 @@ static routers={{ wan_gateway }} static domain_name_servers={{ wan_nameserver }} interface {{ iiab_wan_iface }} -{% if wan_ignore_ipV4LL == "true" %} +{% if wan_ipV4LL == "false" %} arping 192.0.2.1 fallback {{ wan_gateway }} {% else %} From 33338ec7debe35a1d2f6381480603fe59aa38dd9 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 15:41:01 -0400 Subject: [PATCH 05/59] Update main.yml --- roles/network/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index e28f020d2..27a78ab45 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -51,7 +51,7 @@ strict_networking: False iiab_demo_mode: False gui_static_wan: False wan_cidr: -wan_ignore_ipV4LL: False +wan_ipV4LL: False # Set defaults for discovery process as strings wifi1: "not found-1" From 4f7020f39fddda4a86b40ee586ed24610916dcae Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 16:06:07 -0400 Subject: [PATCH 06/59] Update main.yml --- roles/network/defaults/main.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index 27a78ab45..b7c12393d 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -6,6 +6,24 @@ # ports_externally_visible: 3 # https://github.com/iiab/iiab/wiki/IIAB-Networking#firewall-iptables +# Ethernet - IF NECESSARY, CUSTOMIZE THESE 1+4 VARS IN /etc/iiab/local_vars.yml +# +# See "How do I set a static IP Address?" in http://FAQ.IIAB.IO +# +# wan_ipV4LL: False # Keep this as 'False' to strongly mandate the Static IP +# for eth0 when no DHCP is detected on the wire. +# +# Change this to 'True' if you want the 3-steps below: +# 1. Try to set eth0 as Static IP (if 'arp ' responds). +# 2. Try to set eth0 using DHCP if that responds within 10 seconds. +# 3. Set eth0 to a link-local address 169.254.x.y if both above fail. +# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf +# +# wan_ip: 192.168.1.99 +# wan_netmask: 255.255.255.0 +# wan_gateway: 192.168.1.1 +# wan_nameserver: 192.168.1.1 + # Wi-Fi - IF NECESSARY, CUSTOMIZE THESE 6 VARIABLES IN /etc/iiab/local_vars.yml # host_country_code: US # host_ssid: "Internet in a Box" @@ -51,7 +69,6 @@ strict_networking: False iiab_demo_mode: False gui_static_wan: False wan_cidr: -wan_ipV4LL: False # Set defaults for discovery process as strings wifi1: "not found-1" From 0a445d179e21ae3f7ab466af507d64d538291b74 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 16:14:01 -0400 Subject: [PATCH 07/59] Update default_vars.yml --- vars/default_vars.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 8d3400a65..cd76d47af 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -160,10 +160,22 @@ wondershaper_enabled: False # The following 2 override the detection when not "auto" user_wan_iface: auto user_lan_iface: auto -wan_ip: dhcp -wan_netmask: -wan_gateway: -wan_nameserver: + +# Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+1 VARS IN /etc/iiab/local_vars.yml +# +# See "How do I set a static IP Address?" in http://FAQ.IIAB.IO +wan_ip: dhcp # wan_ip: 192.168.1.99 +wan_netmask: # wan_netmask: 255.255.255.0 +wan_gateway: # wan_gateway: 192.168.1.1 +wan_nameserver: # wan_nameserver: 192.168.1.1 +wan_ipV4LL: False # Keep this as 'False' to strongly mandate the Static IP +# for eth0 when no DHCP is detected on the wire. +# +# Change this to 'True' if you want the 3-steps below: +# 1. Try to set eth0 as Static IP (if 'arp ' responds). +# 2. Try to set eth0 using DHCP, if DHCP responds within 10 seconds. +# 3. Set eth0 to a link-local address 169.254.x.y if both above fail. +# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf # Parameters for Aggregate Roles From 8c6edc503b1142af2ce8e147486408c94ffac676 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 16:15:53 -0400 Subject: [PATCH 08/59] Update main.yml --- roles/network/defaults/main.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index b7c12393d..9c2334c39 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -6,23 +6,21 @@ # ports_externally_visible: 3 # https://github.com/iiab/iiab/wiki/IIAB-Networking#firewall-iptables -# Ethernet - IF NECESSARY, CUSTOMIZE THESE 1+4 VARS IN /etc/iiab/local_vars.yml +# Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+1 VARS IN /etc/iiab/local_vars.yml # # See "How do I set a static IP Address?" in http://FAQ.IIAB.IO -# +# wan_ip: dhcp # wan_ip: 192.168.1.99 +# wan_netmask: # wan_netmask: 255.255.255.0 +# wan_gateway: # wan_gateway: 192.168.1.1 +# wan_nameserver: # wan_nameserver: 192.168.1.1 # wan_ipV4LL: False # Keep this as 'False' to strongly mandate the Static IP # for eth0 when no DHCP is detected on the wire. # # Change this to 'True' if you want the 3-steps below: # 1. Try to set eth0 as Static IP (if 'arp ' responds). -# 2. Try to set eth0 using DHCP if that responds within 10 seconds. +# 2. Try to set eth0 using DHCP, if DHCP responds within 10 seconds. # 3. Set eth0 to a link-local address 169.254.x.y if both above fail. # Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf -# -# wan_ip: 192.168.1.99 -# wan_netmask: 255.255.255.0 -# wan_gateway: 192.168.1.1 -# wan_nameserver: 192.168.1.1 # Wi-Fi - IF NECESSARY, CUSTOMIZE THESE 6 VARIABLES IN /etc/iiab/local_vars.yml # host_country_code: US From 870e879044e3ad1f60096c8e1322c5b17f4a04c7 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 16:22:32 -0400 Subject: [PATCH 09/59] Update default_vars.yml --- vars/default_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index cd76d47af..a11dfa9f0 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -163,7 +163,7 @@ user_lan_iface: auto # Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+1 VARS IN /etc/iiab/local_vars.yml # -# See "How do I set a static IP Address?" in http://FAQ.IIAB.IO +# See "How do I set a static IP Address?" for eth0 in http://FAQ.IIAB.IO wan_ip: dhcp # wan_ip: 192.168.1.99 wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.1 From 9c5e4d3f407670f53f3f7ff0f4fcc9b68eab0523 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 16:22:52 -0400 Subject: [PATCH 10/59] Update main.yml --- roles/network/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index 9c2334c39..a589b2d47 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -8,7 +8,7 @@ # Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+1 VARS IN /etc/iiab/local_vars.yml # -# See "How do I set a static IP Address?" in http://FAQ.IIAB.IO +# See "How do I set a static IP Address?" for eth0 in http://FAQ.IIAB.IO # wan_ip: dhcp # wan_ip: 192.168.1.99 # wan_netmask: # wan_netmask: 255.255.255.0 # wan_gateway: # wan_gateway: 192.168.1.1 From b30b49cbed82e90063cf15b0783de4458c7b666e Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 16:23:28 -0400 Subject: [PATCH 11/59] Update local_vars_min.yml --- vars/local_vars_min.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index e93148cd6..a821f4e63 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -58,6 +58,20 @@ ports_externally_visible: 3 # ssh + http-or-https + common IIAB services # Make this True if client machines should have access to WAN/Internet: iiab_gateway_enabled: False +# See "How do I set a static IP Address?" for eth0 in http://FAQ.IIAB.IO +# wan_ip: 192.168.1.99 # wan_ip: dhcp +# wan_netmask: 255.255.255.0 +# wan_gateway: 192.168.1.1 +# wan_nameserver: 192.168.1.1 +# wan_ipV4LL: False # Keep this as 'False' to strongly mandate the Static IP +# for eth0 when no DHCP is detected on the wire. +# +# Change this to 'True' if you want the 3-steps below: +# 1. Try to set eth0 as Static IP (if 'arp ' responds). +# 2. Try to set eth0 using DHCP, if DHCP responds within 10 seconds. +# 3. Set eth0 to a link-local address 169.254.x.y if both above fail. +# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf + dhcpd_install: False dhcpd_enabled: False From be1211aba906f2da7c80a167670cb33908bee1d8 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 16:24:09 -0400 Subject: [PATCH 12/59] Update local_vars_medium.yml --- vars/local_vars_medium.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index d03e5ce42..f14681352 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -58,6 +58,20 @@ ports_externally_visible: 3 # ssh + http-or-https + common IIAB services # Make this True if client machines should have access to WAN/Internet: iiab_gateway_enabled: False +# See "How do I set a static IP Address?" for eth0 in http://FAQ.IIAB.IO +# wan_ip: 192.168.1.99 # wan_ip: dhcp +# wan_netmask: 255.255.255.0 +# wan_gateway: 192.168.1.1 +# wan_nameserver: 192.168.1.1 +# wan_ipV4LL: False # Keep this as 'False' to strongly mandate the Static IP +# for eth0 when no DHCP is detected on the wire. +# +# Change this to 'True' if you want the 3-steps below: +# 1. Try to set eth0 as Static IP (if 'arp ' responds). +# 2. Try to set eth0 using DHCP, if DHCP responds within 10 seconds. +# 3. Set eth0 to a link-local address 169.254.x.y if both above fail. +# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf + dhcpd_install: False dhcpd_enabled: False From b050dddef97798fa00da408f2c6b99c2209ad7e5 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 16:24:57 -0400 Subject: [PATCH 13/59] Update local_vars_big.yml --- vars/local_vars_big.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index 2b5ce6171..8ca1976f8 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -58,6 +58,20 @@ ports_externally_visible: 3 # ssh + http-or-https + common IIAB services # Make this True if client machines should have access to WAN/Internet: iiab_gateway_enabled: False +# See "How do I set a static IP Address?" for eth0 in http://FAQ.IIAB.IO +# wan_ip: 192.168.1.99 # wan_ip: dhcp +# wan_netmask: 255.255.255.0 +# wan_gateway: 192.168.1.1 +# wan_nameserver: 192.168.1.1 +# wan_ipV4LL: False # Keep this as 'False' to strongly mandate the Static IP +# for eth0 when no DHCP is detected on the wire. +# +# Change this to 'True' if you want the 3-steps below: +# 1. Try to set eth0 as Static IP (if 'arp ' responds). +# 2. Try to set eth0 using DHCP, if DHCP responds within 10 seconds. +# 3. Set eth0 to a link-local address 169.254.x.y if both above fail. +# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf + dhcpd_install: False dhcpd_enabled: False From 649f92c2c299b853397546f22069d1415c8d10b5 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 17:54:24 -0400 Subject: [PATCH 14/59] New vars wan_try_dhcp_then_static_ip & dhcp_timeout --- roles/network/templates/network/dhcpcd.conf.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index 80d13c807..9fbbe3058 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -38,7 +38,7 @@ require dhcp_server_identifier slaac private # IIAB -timeout 10 +timeout {{ dhcp_timeout }} # always support Ethernet-to-Internet on RPi (avoid "denyinterfaces eth0") {% if is_rpi and hostapd_enabled %} @@ -64,6 +64,7 @@ static ip_address={{ wan_ip }}/24 static routers={{ wan_gateway }} static domain_name_servers={{ wan_nameserver }} +{% if wan_try_dhcp_then_static_ip == "true" %} interface {{ iiab_wan_iface }} {% if wan_ipV4LL == "false" %} arping 192.0.2.1 @@ -72,3 +73,4 @@ fallback {{ wan_gateway }} arping {{ wan_gateway }} {% endif %} {% endif %} +{% endif %} From 88afca2ef937e9815af973ad477acf2e5c4e077c Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 17:54:29 -0400 Subject: [PATCH 15/59] Update local_vars_big.yml --- vars/local_vars_big.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index 8ca1976f8..d8660c6bc 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -63,8 +63,12 @@ iiab_gateway_enabled: False # wan_netmask: 255.255.255.0 # wan_gateway: 192.168.1.1 # wan_nameserver: 192.168.1.1 -# wan_ipV4LL: False # Keep this as 'False' to strongly mandate the Static IP -# for eth0 when no DHCP is detected on the wire. +# +# wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +# dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't +# detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). +# wan_ipV4LL: False # Keep this as 'False' to strongly mandate Static IP +# for eth0 (and avoid 169.254.x.y when DHCP isn't detected). # # Change this to 'True' if you want the 3-steps below: # 1. Try to set eth0 as Static IP (if 'arp ' responds). From e17622084bf0e8c119461d3ec1d2ebfd18c09889 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 17:54:34 -0400 Subject: [PATCH 16/59] Update local_vars_medium.yml --- vars/local_vars_medium.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index f14681352..4ba1f2621 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -63,8 +63,12 @@ iiab_gateway_enabled: False # wan_netmask: 255.255.255.0 # wan_gateway: 192.168.1.1 # wan_nameserver: 192.168.1.1 -# wan_ipV4LL: False # Keep this as 'False' to strongly mandate the Static IP -# for eth0 when no DHCP is detected on the wire. +# +# wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +# dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't +# detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). +# wan_ipV4LL: False # Keep this as 'False' to strongly mandate Static IP +# for eth0 (and avoid 169.254.x.y when DHCP isn't detected). # # Change this to 'True' if you want the 3-steps below: # 1. Try to set eth0 as Static IP (if 'arp ' responds). From b1db9059e017ad12fc3f1408a3609237dbcfef6b Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 17:54:39 -0400 Subject: [PATCH 17/59] Update local_vars_min.yml --- vars/local_vars_min.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index a821f4e63..b3bd5a7a2 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -63,8 +63,12 @@ iiab_gateway_enabled: False # wan_netmask: 255.255.255.0 # wan_gateway: 192.168.1.1 # wan_nameserver: 192.168.1.1 -# wan_ipV4LL: False # Keep this as 'False' to strongly mandate the Static IP -# for eth0 when no DHCP is detected on the wire. +# +# wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +# dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't +# detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). +# wan_ipV4LL: False # Keep this as 'False' to strongly mandate Static IP +# for eth0 (and avoid 169.254.x.y when DHCP isn't detected). # # Change this to 'True' if you want the 3-steps below: # 1. Try to set eth0 as Static IP (if 'arp ' responds). From 1a59cafbc22c82eb4ea67dbf735b006046baabe0 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 17:54:48 -0400 Subject: [PATCH 18/59] Update default_vars.yml --- vars/default_vars.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index a11dfa9f0..8b06cc3a6 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -161,15 +161,19 @@ wondershaper_enabled: False user_wan_iface: auto user_lan_iface: auto -# Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+1 VARS IN /etc/iiab/local_vars.yml +# Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+3 VARS IN /etc/iiab/local_vars.yml # # See "How do I set a static IP Address?" for eth0 in http://FAQ.IIAB.IO wan_ip: dhcp # wan_ip: 192.168.1.99 wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.1 wan_nameserver: # wan_nameserver: 192.168.1.1 -wan_ipV4LL: False # Keep this as 'False' to strongly mandate the Static IP -# for eth0 when no DHCP is detected on the wire. +# +wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't +# detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). +wan_ipV4LL: False # Keep this as 'False' to strongly mandate Static IP +# for eth0 (and avoid 169.254.x.y when DHCP isn't detected). # # Change this to 'True' if you want the 3-steps below: # 1. Try to set eth0 as Static IP (if 'arp ' responds). From 763624bff118d0f97e8a1f237215febf8144c173 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 17:54:54 -0400 Subject: [PATCH 19/59] Update main.yml --- roles/network/defaults/main.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index a589b2d47..1db75dcf3 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -6,15 +6,19 @@ # ports_externally_visible: 3 # https://github.com/iiab/iiab/wiki/IIAB-Networking#firewall-iptables -# Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+1 VARS IN /etc/iiab/local_vars.yml +# Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+3 VARS IN /etc/iiab/local_vars.yml # # See "How do I set a static IP Address?" for eth0 in http://FAQ.IIAB.IO # wan_ip: dhcp # wan_ip: 192.168.1.99 # wan_netmask: # wan_netmask: 255.255.255.0 # wan_gateway: # wan_gateway: 192.168.1.1 # wan_nameserver: # wan_nameserver: 192.168.1.1 -# wan_ipV4LL: False # Keep this as 'False' to strongly mandate the Static IP -# for eth0 when no DHCP is detected on the wire. +# +# wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +# dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't +# detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). +# wan_ipV4LL: False # Keep this as 'False' to strongly mandate Static IP +# for eth0 (and avoid 169.254.x.y when DHCP isn't detected). # # Change this to 'True' if you want the 3-steps below: # 1. Try to set eth0 as Static IP (if 'arp ' responds). From 41e9e6b03cff5f1cfc9fae791e405c826027c731 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 18:13:26 -0400 Subject: [PATCH 20/59] wan_ipV4LL -> wan_ipv4ll --- roles/network/templates/network/dhcpcd.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index 9fbbe3058..e1a1b57e5 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -66,7 +66,7 @@ static domain_name_servers={{ wan_nameserver }} {% if wan_try_dhcp_then_static_ip == "true" %} interface {{ iiab_wan_iface }} -{% if wan_ipV4LL == "false" %} +{% if wan_ipv4ll == "false" %} arping 192.0.2.1 fallback {{ wan_gateway }} {% else %} From 4a9eb79362b109c02c03832f38e15e5892cb5e31 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 18:13:40 -0400 Subject: [PATCH 21/59] wan_ipV4LL -> wan_ipv4ll --- vars/local_vars_big.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index d8660c6bc..12b5e3b39 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -67,8 +67,8 @@ iiab_gateway_enabled: False # wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. # dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't # detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). -# wan_ipV4LL: False # Keep this as 'False' to strongly mandate Static IP -# for eth0 (and avoid 169.254.x.y when DHCP isn't detected). +# wan_ipv4ll: False # Keep this as 'False' to strongly mandate Static IP +# for eth0 (and avoid link-local 169.254.x.y if DHCP isn't detected). # # Change this to 'True' if you want the 3-steps below: # 1. Try to set eth0 as Static IP (if 'arp ' responds). From 60e3701eb072d75598b4297e017c9bbfb847dbeb Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 18:13:46 -0400 Subject: [PATCH 22/59] wan_ipV4LL -> wan_ipv4ll --- vars/local_vars_medium.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 4ba1f2621..c2d3c1b8e 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -67,8 +67,8 @@ iiab_gateway_enabled: False # wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. # dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't # detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). -# wan_ipV4LL: False # Keep this as 'False' to strongly mandate Static IP -# for eth0 (and avoid 169.254.x.y when DHCP isn't detected). +# wan_ipv4ll: False # Keep this as 'False' to strongly mandate Static IP +# for eth0 (and avoid link-local 169.254.x.y if DHCP isn't detected). # # Change this to 'True' if you want the 3-steps below: # 1. Try to set eth0 as Static IP (if 'arp ' responds). From b38480a73977df477c4b56f0817895fd482bf5e9 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 18:13:53 -0400 Subject: [PATCH 23/59] wan_ipV4LL -> wan_ipv4ll --- vars/local_vars_min.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index b3bd5a7a2..cded899bc 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -67,8 +67,8 @@ iiab_gateway_enabled: False # wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. # dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't # detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). -# wan_ipV4LL: False # Keep this as 'False' to strongly mandate Static IP -# for eth0 (and avoid 169.254.x.y when DHCP isn't detected). +# wan_ipv4ll: False # Keep this as 'False' to strongly mandate Static IP +# for eth0 (and avoid link-local 169.254.x.y if DHCP isn't detected). # # Change this to 'True' if you want the 3-steps below: # 1. Try to set eth0 as Static IP (if 'arp ' responds). From 2a421c93e2a3d8f57763bd9f65c798806fd0a661 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 18:14:07 -0400 Subject: [PATCH 24/59] wan_ipV4LL -> wan_ipv4ll --- vars/default_vars.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 8b06cc3a6..a48a52196 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -172,8 +172,8 @@ wan_nameserver: # wan_nameserver: 192.168.1.1 wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't # detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). -wan_ipV4LL: False # Keep this as 'False' to strongly mandate Static IP -# for eth0 (and avoid 169.254.x.y when DHCP isn't detected). +wan_ipv4ll: False # Keep this as 'False' to strongly mandate Static IP +# for eth0 (and avoid link-local 169.254.x.y if DHCP isn't detected). # # Change this to 'True' if you want the 3-steps below: # 1. Try to set eth0 as Static IP (if 'arp ' responds). From 692607c91be37ea33642059c33e0410d396933fb Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 18:14:23 -0400 Subject: [PATCH 25/59] wan_ipV4LL -> wan_ipv4ll --- roles/network/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index 1db75dcf3..95062fdf0 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -17,8 +17,8 @@ # wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. # dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't # detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). -# wan_ipV4LL: False # Keep this as 'False' to strongly mandate Static IP -# for eth0 (and avoid 169.254.x.y when DHCP isn't detected). +# wan_ipv4ll: False # Keep this as 'False' to strongly mandate Static IP +# for eth0 (and avoid link-local 169.254.x.y if DHCP isn't detected). # # Change this to 'True' if you want the 3-steps below: # 1. Try to set eth0 as Static IP (if 'arp ' responds). From 41f52628f3816c9e72f6b51fdb5ab9f5a7324fe2 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 18:18:00 -0400 Subject: [PATCH 26/59] Update main.yml --- roles/network/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index 95062fdf0..ff120367e 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -8,7 +8,7 @@ # Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+3 VARS IN /etc/iiab/local_vars.yml # -# See "How do I set a static IP Address?" for eth0 in http://FAQ.IIAB.IO +# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO # wan_ip: dhcp # wan_ip: 192.168.1.99 # wan_netmask: # wan_netmask: 255.255.255.0 # wan_gateway: # wan_gateway: 192.168.1.1 From 54d88ba2e8f152b4193b51ddbeb7cbafd6957a66 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 18:18:05 -0400 Subject: [PATCH 27/59] Update default_vars.yml --- vars/default_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index a48a52196..e9831911f 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -163,7 +163,7 @@ user_lan_iface: auto # Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+3 VARS IN /etc/iiab/local_vars.yml # -# See "How do I set a static IP Address?" for eth0 in http://FAQ.IIAB.IO +# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO wan_ip: dhcp # wan_ip: 192.168.1.99 wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.1 From a21bcd646c5107dad1261a194c2ef70aff7d763f Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 18:18:10 -0400 Subject: [PATCH 28/59] Update local_vars_min.yml --- vars/local_vars_min.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index cded899bc..70cb9a6a7 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -58,7 +58,7 @@ ports_externally_visible: 3 # ssh + http-or-https + common IIAB services # Make this True if client machines should have access to WAN/Internet: iiab_gateway_enabled: False -# See "How do I set a static IP Address?" for eth0 in http://FAQ.IIAB.IO +# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO # wan_ip: 192.168.1.99 # wan_ip: dhcp # wan_netmask: 255.255.255.0 # wan_gateway: 192.168.1.1 From c77eb91db4a9b4c26a8c9cefe796170566b12f6f Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 18:18:15 -0400 Subject: [PATCH 29/59] Update local_vars_medium.yml --- vars/local_vars_medium.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index c2d3c1b8e..bbe719070 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -58,7 +58,7 @@ ports_externally_visible: 3 # ssh + http-or-https + common IIAB services # Make this True if client machines should have access to WAN/Internet: iiab_gateway_enabled: False -# See "How do I set a static IP Address?" for eth0 in http://FAQ.IIAB.IO +# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO # wan_ip: 192.168.1.99 # wan_ip: dhcp # wan_netmask: 255.255.255.0 # wan_gateway: 192.168.1.1 From 2b32a7de53ef005f56ae00a7feb7a8d769ae28c2 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 18:18:20 -0400 Subject: [PATCH 30/59] Update local_vars_big.yml --- vars/local_vars_big.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index 12b5e3b39..7005da301 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -58,7 +58,7 @@ ports_externally_visible: 3 # ssh + http-or-https + common IIAB services # Make this True if client machines should have access to WAN/Internet: iiab_gateway_enabled: False -# See "How do I set a static IP Address?" for eth0 in http://FAQ.IIAB.IO +# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO # wan_ip: 192.168.1.99 # wan_ip: dhcp # wan_netmask: 255.255.255.0 # wan_gateway: 192.168.1.1 From 3fabc9d95196ccb1cc301efff812929c777ff692 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 19:56:04 -0400 Subject: [PATCH 31/59] wan_ipv4ll -> wan_link_local --- roles/network/templates/network/dhcpcd.conf.j2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index e1a1b57e5..aaec0ad19 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -66,11 +66,11 @@ static domain_name_servers={{ wan_nameserver }} {% if wan_try_dhcp_then_static_ip == "true" %} interface {{ iiab_wan_iface }} -{% if wan_ipv4ll == "false" %} -arping 192.0.2.1 -fallback {{ wan_gateway }} +{% if wan_link_local == "false" %} +arping 192.0.2.1 # Set Ethernet IP per "cablemodem" DHCP, if DHCP's on wire (after arp request to non-existent IP 192.0.2.1 intentionally fails, per RFC5737) +fallback {{ wan_gateway }} # If DHCP not detected after seconds, set Ethernet Static IP per "profile " {% else %} -arping {{ wan_gateway }} +arping {{ wan_gateway }} # Perform up to 3 steps: 1. arp (if detected, set Ethernet Static IP per "profile ") 2. Set Ethernet IP per "cablemodem" DHCP, if DHCP's on wire 3. If nec, set Ethernet IP to a link-local address (169.254.x.y) {% endif %} {% endif %} {% endif %} From 54798a97a35631c7c566b9b37e5bbb87f347c290 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 19:56:31 -0400 Subject: [PATCH 32/59] wan_ipv4ll -> wan_link_local --- vars/local_vars_big.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index 7005da301..bc78211a7 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -40,6 +40,24 @@ host_channel: 6 hostapd_secure: False hostapd_password: changeme +# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO +wan_ip: dhcp # wan_ip: 192.168.1.99 +wan_netmask: # wan_netmask: 255.255.255.0 +wan_gateway: # wan_gateway: 192.168.1.1 +wan_nameserver: # wan_nameserver: 192.168.1.1 +# +wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't +# detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). +wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet +# Static IP (and avoid link-local 169.254.x.y if DHCP isn't detected). +# +# Change this to 'True' if you want the 3-steps below: (e.g. for eth0 or eno1) +# 1. Try to set Ethernet Static IP (if 'arp ' responds). +# 2. Try to set Ethernet IP using DHCP, if DHCP responds within ~10 seconds. +# 3. Set Ethernet IP to a link-local address 169.254.x.y if both above fail. +# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf + # Enable "campus access" to ~10 common IIAB services like Kiwix (3000), KA Lite # (8008) and Calibre (8010 or 8080) etc, on the WAN side of your IIAB server. # Only 1 of the 6 lines below should be uncommented: @@ -58,24 +76,6 @@ ports_externally_visible: 3 # ssh + http-or-https + common IIAB services # Make this True if client machines should have access to WAN/Internet: iiab_gateway_enabled: False -# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO -# wan_ip: 192.168.1.99 # wan_ip: dhcp -# wan_netmask: 255.255.255.0 -# wan_gateway: 192.168.1.1 -# wan_nameserver: 192.168.1.1 -# -# wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. -# dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't -# detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). -# wan_ipv4ll: False # Keep this as 'False' to strongly mandate Static IP -# for eth0 (and avoid link-local 169.254.x.y if DHCP isn't detected). -# -# Change this to 'True' if you want the 3-steps below: -# 1. Try to set eth0 as Static IP (if 'arp ' responds). -# 2. Try to set eth0 using DHCP, if DHCP responds within 10 seconds. -# 3. Set eth0 to a link-local address 169.254.x.y if both above fail. -# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf - dhcpd_install: False dhcpd_enabled: False From f5b6443989899048adb43f83f0b7821b4ad7d1c4 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 19:56:37 -0400 Subject: [PATCH 33/59] wan_ipv4ll -> wan_link_local --- vars/local_vars_medium.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index bbe719070..4e5b6e3e4 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -40,6 +40,24 @@ host_channel: 6 hostapd_secure: False hostapd_password: changeme +# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO +wan_ip: dhcp # wan_ip: 192.168.1.99 +wan_netmask: # wan_netmask: 255.255.255.0 +wan_gateway: # wan_gateway: 192.168.1.1 +wan_nameserver: # wan_nameserver: 192.168.1.1 +# +wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't +# detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). +wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet +# Static IP (and avoid link-local 169.254.x.y if DHCP isn't detected). +# +# Change this to 'True' if you want the 3-steps below: (e.g. for eth0 or eno1) +# 1. Try to set Ethernet Static IP (if 'arp ' responds). +# 2. Try to set Ethernet IP using DHCP, if DHCP responds within ~10 seconds. +# 3. Set Ethernet IP to a link-local address 169.254.x.y if both above fail. +# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf + # Enable "campus access" to ~10 common IIAB services like Kiwix (3000), KA Lite # (8008) and Calibre (8010 or 8080) etc, on the WAN side of your IIAB server. # Only 1 of the 6 lines below should be uncommented: @@ -58,24 +76,6 @@ ports_externally_visible: 3 # ssh + http-or-https + common IIAB services # Make this True if client machines should have access to WAN/Internet: iiab_gateway_enabled: False -# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO -# wan_ip: 192.168.1.99 # wan_ip: dhcp -# wan_netmask: 255.255.255.0 -# wan_gateway: 192.168.1.1 -# wan_nameserver: 192.168.1.1 -# -# wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. -# dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't -# detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). -# wan_ipv4ll: False # Keep this as 'False' to strongly mandate Static IP -# for eth0 (and avoid link-local 169.254.x.y if DHCP isn't detected). -# -# Change this to 'True' if you want the 3-steps below: -# 1. Try to set eth0 as Static IP (if 'arp ' responds). -# 2. Try to set eth0 using DHCP, if DHCP responds within 10 seconds. -# 3. Set eth0 to a link-local address 169.254.x.y if both above fail. -# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf - dhcpd_install: False dhcpd_enabled: False From 457f6af2b697010ab03163bd282737d2b507b0ea Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 19:56:46 -0400 Subject: [PATCH 34/59] wan_ipv4ll -> wan_link_local --- vars/local_vars_min.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index 70cb9a6a7..c0fa68769 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -40,6 +40,24 @@ host_channel: 6 hostapd_secure: False hostapd_password: changeme +# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO +wan_ip: dhcp # wan_ip: 192.168.1.99 +wan_netmask: # wan_netmask: 255.255.255.0 +wan_gateway: # wan_gateway: 192.168.1.1 +wan_nameserver: # wan_nameserver: 192.168.1.1 +# +wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't +# detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). +wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet +# Static IP (and avoid link-local 169.254.x.y if DHCP isn't detected). +# +# Change this to 'True' if you want the 3-steps below: (e.g. for eth0 or eno1) +# 1. Try to set Ethernet Static IP (if 'arp ' responds). +# 2. Try to set Ethernet IP using DHCP, if DHCP responds within ~10 seconds. +# 3. Set Ethernet IP to a link-local address 169.254.x.y if both above fail. +# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf + # Enable "campus access" to ~10 common IIAB services like Kiwix (3000), KA Lite # (8008) and Calibre (8010 or 8080) etc, on the WAN side of your IIAB server. # Only 1 of the 6 lines below should be uncommented: @@ -58,24 +76,6 @@ ports_externally_visible: 3 # ssh + http-or-https + common IIAB services # Make this True if client machines should have access to WAN/Internet: iiab_gateway_enabled: False -# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO -# wan_ip: 192.168.1.99 # wan_ip: dhcp -# wan_netmask: 255.255.255.0 -# wan_gateway: 192.168.1.1 -# wan_nameserver: 192.168.1.1 -# -# wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. -# dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't -# detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). -# wan_ipv4ll: False # Keep this as 'False' to strongly mandate Static IP -# for eth0 (and avoid link-local 169.254.x.y if DHCP isn't detected). -# -# Change this to 'True' if you want the 3-steps below: -# 1. Try to set eth0 as Static IP (if 'arp ' responds). -# 2. Try to set eth0 using DHCP, if DHCP responds within 10 seconds. -# 3. Set eth0 to a link-local address 169.254.x.y if both above fail. -# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf - dhcpd_install: False dhcpd_enabled: False From 86d1a9201a2475ab48cbb740189116645e232abb Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 19:57:34 -0400 Subject: [PATCH 35/59] wan_ipv4ll -> wan_link_local --- vars/default_vars.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index e9831911f..17529498e 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -164,21 +164,21 @@ user_lan_iface: auto # Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+3 VARS IN /etc/iiab/local_vars.yml # # See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO -wan_ip: dhcp # wan_ip: 192.168.1.99 -wan_netmask: # wan_netmask: 255.255.255.0 -wan_gateway: # wan_gateway: 192.168.1.1 -wan_nameserver: # wan_nameserver: 192.168.1.1 +wan_ip: dhcp # wan_ip: 192.168.1.99 +wan_netmask: # wan_netmask: 255.255.255.0 +wan_gateway: # wan_gateway: 192.168.1.1 +wan_nameserver: # wan_nameserver: 192.168.1.1 # wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. -dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't +dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't # detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). -wan_ipv4ll: False # Keep this as 'False' to strongly mandate Static IP -# for eth0 (and avoid link-local 169.254.x.y if DHCP isn't detected). +wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet +# Static IP (and avoid link-local 169.254.x.y if DHCP isn't detected). # -# Change this to 'True' if you want the 3-steps below: -# 1. Try to set eth0 as Static IP (if 'arp ' responds). -# 2. Try to set eth0 using DHCP, if DHCP responds within 10 seconds. -# 3. Set eth0 to a link-local address 169.254.x.y if both above fail. +# Change this to 'True' if you want the 3-steps below: (e.g. for eth0 or eno1) +# 1. Try to set Ethernet Static IP (if 'arp ' responds). +# 2. Try to set Ethernet IP using DHCP, if DHCP responds within ~10 seconds. +# 3. Set Ethernet IP to a link-local address 169.254.x.y if both above fail. # Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf From c6a82dbcfe1148a4985098626acb3b6dcba3d957 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 19:58:03 -0400 Subject: [PATCH 36/59] wan_ipv4ll -> wan_link_local --- roles/network/defaults/main.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index ff120367e..73f547964 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -9,21 +9,21 @@ # Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+3 VARS IN /etc/iiab/local_vars.yml # # See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO -# wan_ip: dhcp # wan_ip: 192.168.1.99 -# wan_netmask: # wan_netmask: 255.255.255.0 -# wan_gateway: # wan_gateway: 192.168.1.1 -# wan_nameserver: # wan_nameserver: 192.168.1.1 +# wan_ip: dhcp # wan_ip: 192.168.1.99 +# wan_netmask: # wan_netmask: 255.255.255.0 +# wan_gateway: # wan_gateway: 192.168.1.1 +# wan_nameserver: # wan_nameserver: 192.168.1.1 # # wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. -# dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't +# dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't # detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). -# wan_ipv4ll: False # Keep this as 'False' to strongly mandate Static IP -# for eth0 (and avoid link-local 169.254.x.y if DHCP isn't detected). +# wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet +# Static IP (and avoid link-local 169.254.x.y if DHCP isn't detected). # -# Change this to 'True' if you want the 3-steps below: -# 1. Try to set eth0 as Static IP (if 'arp ' responds). -# 2. Try to set eth0 using DHCP, if DHCP responds within 10 seconds. -# 3. Set eth0 to a link-local address 169.254.x.y if both above fail. +# Change this to 'True' if you want the 3-steps below: (e.g. for eth0 or eno1) +# 1. Try to set Ethernet Static IP (if 'arp ' responds). +# 2. Try to set Ethernet IP using DHCP, if DHCP responds within ~10 seconds. +# 3. Set Ethernet IP to a link-local address 169.254.x.y if both above fail. # Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf # Wi-Fi - IF NECESSARY, CUSTOMIZE THESE 6 VARIABLES IN /etc/iiab/local_vars.yml From 2a41699dafaa9458a83b172f972072906122be17 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:12:00 -0400 Subject: [PATCH 37/59] wan_try_dhcp_then_static_ip -> wan_can_use_dhcp_ip --- roles/network/templates/network/dhcpcd.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index aaec0ad19..5763df7ca 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -64,7 +64,7 @@ static ip_address={{ wan_ip }}/24 static routers={{ wan_gateway }} static domain_name_servers={{ wan_nameserver }} -{% if wan_try_dhcp_then_static_ip == "true" %} +{% if wan_can_use_dhcp_ip == "true" %} interface {{ iiab_wan_iface }} {% if wan_link_local == "false" %} arping 192.0.2.1 # Set Ethernet IP per "cablemodem" DHCP, if DHCP's on wire (after arp request to non-existent IP 192.0.2.1 intentionally fails, per RFC5737) From a88b1dbaa1eae05f312a3fd38994f3c82a8ca54b Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:12:04 -0400 Subject: [PATCH 38/59] wan_try_dhcp_then_static_ip -> wan_can_use_dhcp_ip --- vars/local_vars_big.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index bc78211a7..09e559baa 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -46,7 +46,7 @@ wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.1 wan_nameserver: # wan_nameserver: 192.168.1.1 # -wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +wan_can_use_dhcp_ip: True # Facilitate field updates w/ cablemodems. dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't # detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet From 35238b8b1a19538c0a6972eb128e6eb4dbd51e97 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:12:07 -0400 Subject: [PATCH 39/59] wan_try_dhcp_then_static_ip -> wan_can_use_dhcp_ip --- vars/local_vars_medium.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 4e5b6e3e4..f94d89a98 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -46,7 +46,7 @@ wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.1 wan_nameserver: # wan_nameserver: 192.168.1.1 # -wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +wan_can_use_dhcp_ip: True # Facilitate field updates w/ cablemodems. dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't # detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet From f26f02fea46f43ba0c9e7f2a09a2f2518c41bf89 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:12:09 -0400 Subject: [PATCH 40/59] wan_try_dhcp_then_static_ip -> wan_can_use_dhcp_ip --- vars/local_vars_min.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index c0fa68769..e70e0ac7c 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -46,7 +46,7 @@ wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.1 wan_nameserver: # wan_nameserver: 192.168.1.1 # -wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +wan_can_use_dhcp_ip: True # Facilitate field updates w/ cablemodems. dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't # detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet From 2d682b6c68fbf00697f9627f2d1d84d032855991 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:12:26 -0400 Subject: [PATCH 41/59] wan_try_dhcp_then_static_ip -> wan_can_use_dhcp_ip --- vars/default_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 17529498e..7710b9469 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -169,7 +169,7 @@ wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.1 wan_nameserver: # wan_nameserver: 192.168.1.1 # -wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +wan_can_use_dhcp_ip: True # Facilitate field updates w/ cablemodems. dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't # detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet From f5935654c88acca88b0a45dd2f164cc0bc7841ce Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:12:33 -0400 Subject: [PATCH 42/59] wan_try_dhcp_then_static_ip -> wan_can_use_dhcp_ip --- roles/network/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index 73f547964..edc66a7fe 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -14,7 +14,7 @@ # wan_gateway: # wan_gateway: 192.168.1.1 # wan_nameserver: # wan_nameserver: 192.168.1.1 # -# wan_try_dhcp_then_static_ip: True # Facilitate field updates w/ cablemodems. +# wan_can_use_dhcp_ip: True # Facilitate field updates w/ cablemodems. # dhcp_timeout: 10 # Revert to Static IP or 169.254.x.y if DHCP isn't # detected on the Ethernet network in 10 seconds (dhcpcd default is 30 sec). # wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet From ab2d0d31552c427f1709be6150896ae935f24e81 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:29:00 -0400 Subject: [PATCH 43/59] Update main.yml --- roles/network/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index edc66a7fe..7d9f69ce5 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -24,7 +24,7 @@ # 1. Try to set Ethernet Static IP (if 'arp ' responds). # 2. Try to set Ethernet IP using DHCP, if DHCP responds within ~10 seconds. # 3. Set Ethernet IP to a link-local address 169.254.x.y if both above fail. -# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf +# Details @ roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf # Wi-Fi - IF NECESSARY, CUSTOMIZE THESE 6 VARIABLES IN /etc/iiab/local_vars.yml # host_country_code: US From fe471a9738bbf052a2416c2c59b7379c65019a62 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:29:10 -0400 Subject: [PATCH 44/59] Update default_vars.yml --- vars/default_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 7710b9469..c42ca1981 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -179,7 +179,7 @@ wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet # 1. Try to set Ethernet Static IP (if 'arp ' responds). # 2. Try to set Ethernet IP using DHCP, if DHCP responds within ~10 seconds. # 3. Set Ethernet IP to a link-local address 169.254.x.y if both above fail. -# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf +# Details @ roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf # Parameters for Aggregate Roles From 1f22f641668ed74971367f611295040edb6483e5 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:29:19 -0400 Subject: [PATCH 45/59] Update local_vars_min.yml --- vars/local_vars_min.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index e70e0ac7c..cc5f8b806 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -56,7 +56,7 @@ wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet # 1. Try to set Ethernet Static IP (if 'arp ' responds). # 2. Try to set Ethernet IP using DHCP, if DHCP responds within ~10 seconds. # 3. Set Ethernet IP to a link-local address 169.254.x.y if both above fail. -# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf +# Details @ roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf # Enable "campus access" to ~10 common IIAB services like Kiwix (3000), KA Lite # (8008) and Calibre (8010 or 8080) etc, on the WAN side of your IIAB server. From ad24bf00c5f01f7a5e64b073f19354ca53595e42 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:29:27 -0400 Subject: [PATCH 46/59] Update local_vars_medium.yml --- vars/local_vars_medium.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index f94d89a98..83094888f 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -56,7 +56,7 @@ wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet # 1. Try to set Ethernet Static IP (if 'arp ' responds). # 2. Try to set Ethernet IP using DHCP, if DHCP responds within ~10 seconds. # 3. Set Ethernet IP to a link-local address 169.254.x.y if both above fail. -# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf +# Details @ roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf # Enable "campus access" to ~10 common IIAB services like Kiwix (3000), KA Lite # (8008) and Calibre (8010 or 8080) etc, on the WAN side of your IIAB server. From 3295af903691ddf37feb70310380b789c1bc7d62 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:29:36 -0400 Subject: [PATCH 47/59] Update local_vars_big.yml --- vars/local_vars_big.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index 09e559baa..e797f6877 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -56,7 +56,7 @@ wan_link_local: False # Keep this as 'False' to strongly mandate Ethernet # 1. Try to set Ethernet Static IP (if 'arp ' responds). # 2. Try to set Ethernet IP using DHCP, if DHCP responds within ~10 seconds. # 3. Set Ethernet IP to a link-local address 169.254.x.y if both above fail. -# Details in roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf +# Details @ roles/network/templates/network/dhcpcd.conf.j2 for /etc/dhcpcd.conf # Enable "campus access" to ~10 common IIAB services like Kiwix (3000), KA Lite # (8008) and Calibre (8010 or 8080) etc, on the WAN side of your IIAB server. From 7bf10c756bff4c77a36895cc095fcdc2bca2bb97 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:34:50 -0400 Subject: [PATCH 48/59] Update main.yml --- roles/network/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/defaults/main.yml b/roles/network/defaults/main.yml index 7d9f69ce5..b5eed5f53 100644 --- a/roles/network/defaults/main.yml +++ b/roles/network/defaults/main.yml @@ -8,7 +8,7 @@ # Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+3 VARS IN /etc/iiab/local_vars.yml # -# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO +# See "How do I set a static IP Address?" for Ethernet, in http://FAQ.IIAB.IO # wan_ip: dhcp # wan_ip: 192.168.1.99 # wan_netmask: # wan_netmask: 255.255.255.0 # wan_gateway: # wan_gateway: 192.168.1.1 From 62e2523af894ce00a89a21ffff366a4fcd35c0d8 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:34:55 -0400 Subject: [PATCH 49/59] Update default_vars.yml --- vars/default_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index c42ca1981..3789400f6 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -163,7 +163,7 @@ user_lan_iface: auto # Ethernet - IF NECESSARY, CUSTOMIZE THESE 4+3 VARS IN /etc/iiab/local_vars.yml # -# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO +# See "How do I set a static IP Address?" for Ethernet, in http://FAQ.IIAB.IO wan_ip: dhcp # wan_ip: 192.168.1.99 wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.1 From 5ef4475ed18eeedf839e614650f01a0c907c96f9 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:35:00 -0400 Subject: [PATCH 50/59] Update local_vars_min.yml --- vars/local_vars_min.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index cc5f8b806..fd9795880 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -40,7 +40,7 @@ host_channel: 6 hostapd_secure: False hostapd_password: changeme -# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO +# See "How do I set a static IP Address?" for Ethernet, in http://FAQ.IIAB.IO wan_ip: dhcp # wan_ip: 192.168.1.99 wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.1 From 27b43e1293ca9c913295cbd5d254825fd783e616 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:35:05 -0400 Subject: [PATCH 51/59] Update local_vars_medium.yml --- vars/local_vars_medium.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 83094888f..5d0c064d3 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -40,7 +40,7 @@ host_channel: 6 hostapd_secure: False hostapd_password: changeme -# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO +# See "How do I set a static IP Address?" for Ethernet, in http://FAQ.IIAB.IO wan_ip: dhcp # wan_ip: 192.168.1.99 wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.1 From 84ba06364082ea75a6e05c85139314a9d05d3212 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 20:35:09 -0400 Subject: [PATCH 52/59] Update local_vars_big.yml --- vars/local_vars_big.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index e797f6877..fa18c771d 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -40,7 +40,7 @@ host_channel: 6 hostapd_secure: False hostapd_password: changeme -# See "How do I set a static IP Address?" for Ethernet in http://FAQ.IIAB.IO +# See "How do I set a static IP Address?" for Ethernet, in http://FAQ.IIAB.IO wan_ip: dhcp # wan_ip: 192.168.1.99 wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.1 From fb3849e390a057c6bf4e76f1e9fe4778d9657e76 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 21:50:37 -0400 Subject: [PATCH 53/59] remove quotes from boolean logic in Ansible jinja2 template --- roles/network/templates/network/dhcpcd.conf.j2 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index 5763df7ca..383e34d4c 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -57,20 +57,20 @@ static ip_address={{ lan_ip }}/19 static domain_name_servers=127.0.0.1 {% endif %} -# IIAB static IP configuration: +# IIAB static IP configuration, alongside optional DHCP & link-local: {% if wan_ip != "dhcp" %} profile {{ wan_gateway }} static ip_address={{ wan_ip }}/24 static routers={{ wan_gateway }} static domain_name_servers={{ wan_nameserver }} +{% if wan_can_use_dhcp_ip %} -{% if wan_can_use_dhcp_ip == "true" %} interface {{ iiab_wan_iface }} -{% if wan_link_local == "false" %} -arping 192.0.2.1 # Set Ethernet IP per "cablemodem" DHCP, if DHCP's on wire (after arp request to non-existent IP 192.0.2.1 intentionally fails, per RFC5737) -fallback {{ wan_gateway }} # If DHCP not detected after seconds, set Ethernet Static IP per "profile " +{% if not wan_link_local %} +arping 192.0.2.1 # Set Ethernet IP per "cablemodem" DHCP, if DHCP's on wire (after arp request to non-existent IP 192.0.2.1 fails on purpose, per RFC5737) +fallback {{ wan_gateway }} # If DHCP not detected after {{ dhcp_timeout }} seconds, set Ethernet Static IP per above "profile {{ wan_gateway }}" {% else %} -arping {{ wan_gateway }} # Perform up to 3 steps: 1. arp (if detected, set Ethernet Static IP per "profile ") 2. Set Ethernet IP per "cablemodem" DHCP, if DHCP's on wire 3. If nec, set Ethernet IP to a link-local address (169.254.x.y) +arping {{ wan_gateway }} # Perform up to 3 steps: 1. arp (if detected, set Ethernet Static IP per "profile {{ wan_gateway }}") 2. Set Ethernet IP per "cablemodem" DHCP, if DHCP's on wire 3. If nec, set Ethernet IP to a link-local address (169.254.x.y) {% endif %} {% endif %} {% endif %} From 53bfa748567267141c167d0507af7cb6b738072f Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 23:37:04 -0400 Subject: [PATCH 54/59] Update dhcpcd.conf.j2 --- roles/network/templates/network/dhcpcd.conf.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index 383e34d4c..644609039 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -38,9 +38,9 @@ require dhcp_server_identifier slaac private # IIAB -timeout {{ dhcp_timeout }} +timeout {{ dhcp_timeout }} # How many seconds to wait for DHCP (e.g. from cablemodem) before IIAB's Ethernet falls back to Static IP below (e.g. for Mexican schools with Static IP-based Ethernet networks) -# always support Ethernet-to-Internet on RPi (avoid "denyinterfaces eth0") +# Always support Ethernet-to-Internet on RPi, to faciliate field updates (avoid "denyinterfaces eth0" below!) {% if is_rpi and hostapd_enabled %} denyinterfaces {% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }} {% endif %} {% elif is_rpi %} From 542bda46c1f2f32c27e2581414ec0ed719f6f89f Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 23:38:07 -0400 Subject: [PATCH 55/59] Update dhcpcd.conf.j2 --- roles/network/templates/network/dhcpcd.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index 644609039..52c7a82d1 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -57,7 +57,7 @@ static ip_address={{ lan_ip }}/19 static domain_name_servers=127.0.0.1 {% endif %} -# IIAB static IP configuration, alongside optional DHCP & link-local: +# IIAB static IP configuration, alongside optional DHCP & link-local {% if wan_ip != "dhcp" %} profile {{ wan_gateway }} static ip_address={{ wan_ip }}/24 From c7b56f11927a5d817d33eb7f6a7a0c8e6837b99c Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 23:52:52 -0400 Subject: [PATCH 56/59] "denyinterfaces eth0" spacing cleaned up --- roles/network/templates/network/dhcpcd.conf.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index 52c7a82d1..cbe868dbe 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -42,9 +42,9 @@ timeout {{ dhcp_timeout }} # How many seconds to wait for DHCP (e.g. from cab # Always support Ethernet-to-Internet on RPi, to faciliate field updates (avoid "denyinterfaces eth0" below!) {% if is_rpi and hostapd_enabled %} -denyinterfaces {% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }} {% endif %} +denyinterfaces {% if discovered_wireless_iface != "none" %}{{ discovered_wireless_iface }}{% endif %} {% elif is_rpi %} -#denyinterfaces {% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }} {% endif %} +#denyinterfaces {% if discovered_wireless_iface != "none" %}{{ discovered_wireless_iface }}{% endif %} {% else %} denyinterfaces {% if iiab_wireless_lan_iface is defined %} {{ iiab_wireless_lan_iface }} {% endif %} {% if iiab_wired_lan_iface is defined %} {{ iiab_wired_lan_iface }} {% endif %} {% endif %} From fc0ee6774a9c2b57be4cb84078851d72db7205a8 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 2 Sep 2019 23:57:16 -0400 Subject: [PATCH 57/59] Further clean spacing around denyinterfaces params --- roles/network/templates/network/dhcpcd.conf.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index cbe868dbe..3d8e3ee68 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -42,11 +42,11 @@ timeout {{ dhcp_timeout }} # How many seconds to wait for DHCP (e.g. from cab # Always support Ethernet-to-Internet on RPi, to faciliate field updates (avoid "denyinterfaces eth0" below!) {% if is_rpi and hostapd_enabled %} -denyinterfaces {% if discovered_wireless_iface != "none" %}{{ discovered_wireless_iface }}{% endif %} +denyinterfaces{% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }}{% endif %} {% elif is_rpi %} -#denyinterfaces {% if discovered_wireless_iface != "none" %}{{ discovered_wireless_iface }}{% endif %} +#denyinterfaces{% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }}{% endif %} {% else %} -denyinterfaces {% if iiab_wireless_lan_iface is defined %} {{ iiab_wireless_lan_iface }} {% endif %} {% if iiab_wired_lan_iface is defined %} {{ iiab_wired_lan_iface }} {% endif %} +denyinterfaces{% if iiab_wireless_lan_iface is defined %} {{ iiab_wireless_lan_iface }}{% endif %}{% if iiab_wired_lan_iface is defined %} {{ iiab_wired_lan_iface }}{% endif %} {% endif %} {# {% if iiab_lan_iface != "br0" %} {{ iiab_lan_iface }} {% endif %} #} From 7b3bf8e2f2a2f799a70c94f5bba2e2e45a5871bc Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 3 Sep 2019 00:09:17 -0400 Subject: [PATCH 58/59] Clarify {{ dhcp_timeout }} & denyinterfaces in /etc/dhcpcd.conf --- roles/network/templates/network/dhcpcd.conf.j2 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index 3d8e3ee68..dca075afd 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -38,9 +38,14 @@ require dhcp_server_identifier slaac private # IIAB -timeout {{ dhcp_timeout }} # How many seconds to wait for DHCP (e.g. from cablemodem) before IIAB's Ethernet falls back to Static IP below (e.g. for Mexican schools with Static IP-based Ethernet networks) -# Always support Ethernet-to-Internet on RPi, to faciliate field updates (avoid "denyinterfaces eth0" below!) +# How many seconds to wait for DHCP (e.g. from cablemodem) before IIAB's +# Ethernet falls back to Static IP below (e.g. for Mexican schools with +# Static IP-based Ethernet networks) +timeout {{ dhcp_timeout }} + +# Always support Ethernet-to-Internet on RPi, to faciliate field updates +# (avoid "denyinterfaces eth0" below!) {% if is_rpi and hostapd_enabled %} denyinterfaces{% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }}{% endif %} {% elif is_rpi %} From af2c3508d740d1462a67ae0b75bd9ad6a0a3b0fa Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 3 Sep 2019 00:13:33 -0400 Subject: [PATCH 59/59] Update dhcpcd.conf.j2 --- roles/network/templates/network/dhcpcd.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network/templates/network/dhcpcd.conf.j2 b/roles/network/templates/network/dhcpcd.conf.j2 index dca075afd..0d9654509 100644 --- a/roles/network/templates/network/dhcpcd.conf.j2 +++ b/roles/network/templates/network/dhcpcd.conf.j2 @@ -44,7 +44,7 @@ slaac private # Static IP-based Ethernet networks) timeout {{ dhcp_timeout }} -# Always support Ethernet-to-Internet on RPi, to faciliate field updates +# Always support Ethernet-to-Internet on RPi, to facilitate field updates # (avoid "denyinterfaces eth0" below!) {% if is_rpi and hostapd_enabled %} denyinterfaces{% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }}{% endif %}