diff --git a/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-interfaces b/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-interfaces index a4d2233a..e8821550 100644 --- a/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-interfaces +++ b/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-interfaces @@ -374,9 +374,6 @@ iface vlan${vlan} inet static vlan-raw-device ${dev} EOT - address 192.168.1.1 - netmask 255.255.255.0 - if [[ -n $ip4 ]]; then $address=${ip4%%/*} $netmask=${ip4##*/} diff --git a/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-netplan b/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-netplan index f6f7798d..d28f5dcb 100644 --- a/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-netplan +++ b/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-netplan @@ -273,6 +273,30 @@ nm_symlink_run_connections() done } +gen_qinq_ip4_conf() +{ + # Address must have the netmask in CIDR format. Example: + # QINQ_IP4_IFACES="eth1,120,10.120.1.5/24,10.120.1.1;eth1,130,10.130.1.5/24,10.130.1.1" + for qinq_ip4_info in $(echo $QINQ_IP4_IFACES | tr ";" "\n"); do + IFS=, read -r dev vlan ip4 gw4 <<< $qinq_ip4_info; + cat < is_networkd_iface_managed() ( diff --git a/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-scripts b/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-scripts index e6d2fc60..71cbbc56 100644 --- a/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-scripts +++ b/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-scripts @@ -306,6 +306,37 @@ gen_alias6_conf() fi } +gen_qinq_ip4_conf() +{ + # Address must have the netmask in CIDR format. Example: + # QINQ_IP4_IFACES="eth1,120,10.120.1.5/24,10.120.1.1;eth1,130,10.130.1.5/24,10.130.1.1" + for qinq_ip4_info in $(echo $QINQ_IP4_IFACES | tr ";" "\n"); do + IFS=, read -r dev vlan ip4 gw4 <<< $qinq_ip4_info; + + cat < "/etc/sysconfig/network/ifcfg-${dev}.${vlan}" +VLAN=yes +DEVICE=${dev}.${vlan} +EOT + + + if [[ -n $ip4 ]]; then + $address=${ip4%%/*} + $netmask=${ip4##*/} + cat <