---
# System prepended metadata

title: covert tests/manual/net* to auto

---

# covert tests/manual/net* to auto

## Should be added
- coreos-docs-net-testing.sh:
    - ext.config.networking.mtu-on-bond-kargs: configure MTU on a VLAN subinterface for the bond, which is combined with bond and vlan with static ip in our testing

    - maybe ipv6 in future?
- coreos-network-testing.sh:
    - Test ifcfg file, only for rhel8 now (https://github.com/coreos/fedora-coreos-config/pull/1994)



## Done
- Test multiple  "nameserver=<dns server 1> nameserver=<dns server 2>" with kernel arguments (refer to https://bugzilla.redhat.com/show_bug.cgi?id=1763341)
    - check `/etc/NetworkManager/system-connections/*` and `/etc/resolv.conf` both have the namesevers
    - https://github.com/coreos/fedora-coreos-config/pull/2031 - merged
- coreos.no_persist_ip and rd.net.timeout.carrier=
    - https://github.com/coreos/fedora-coreos-config/pull/2073 - merged
- networking/tests: add bridge and team tests
    - https://github.com/coreos/fedora-coreos-config/pull/2092 - merged


## Find existed networking test scenarios
- ext.config.networking.default-network-behavior-change 
    - Verify default networking configuration changes with `ip=auto` in NetworkManager

- ext.config.networking.force-persist-ip
    - Verify **coreos.force_persist_ip** makes kargs works, if same network device with two configurations
        - appendKernelArgs: "ip=10.10.10.10::10.10.10.1:255.255.255.0:myhostname:eth1:none:8.8.8.8 net.ifnames=0 coreos.force_persist_ip"
        - ignition: method=auto
```
    # Setup configuration for a single NIC with two ways at the same time:
    # - kargs provide static network config for eth1 and coreos.force_persist_ip
    # - ignition provides dhcp network config for eth1
    # Expected result:
    # - with coreos.force_persist_ip ip=kargs wins
```

- ext.config.networking.prefer-ignition-networking
    - similar with force-persist-ip, without coreos.force_persist_ip, Ignition networking configuration wins, verify that eth1 gets ip via dhcp
        - appendKernelArgs: "ip=10.10.10.10::10.10.10.1:255.255.255.0:myhostname:eth1:none:8.8.8.8 net.ifnames=0"
        - ignition: method=auto

- ext.config.networking.mtu-on-bond-kargs
    - Combined with vlan and bond, verify `configure MTU on a VLAN subinterface for the bond` using kernel arguments works
        - appendKernelArgs: "bond=bond0:eth1,eth2:mode=active-backup,miimon=100:9000 ip=10.10.10.10::10.10.10.1:255.255.255.0:staticvlanbond:bond0.100:none:9000 vlan=bond0.100:bond0 net.ifnames=0"

- ext.config.networking.mtu-on-bond-ignition
    - Combined with vlan and bond, verify `configure MTU on a VLAN subinterface for the bond` using ignition works
```
# kargs="bond=bond0:eth1,eth2:mode=active-backup,miimon=100:9000 \
#        ip=10.10.10.10::10.10.10.1:255.255.255.0:staticvlanbond:bond0.100:none:9000: \
#        vlan=bond0.100:bond0"
# $/usr/libexec/nm-initrd-generator -s -- $kargs
# Set MTU on a VLAN subinterface for the bond using ignition config and check
# - verify MTU on the bond matches config
# - verify MTU on the VLAN subinterface for the bond matches config
# - verify ip address on the VLAN subinterface for the bond matches config
```

- ext.config.networking.dnsmasq-service
    - Verify dnsmasq.service systemd unit is masked on FCOS
- ext.config.networking.kargs-rd-net
    - Veirfy **rd.net.timeout.dhcp** and **rd.net.dhcp.retry** are supported by NetworkManager.
        - "appendFirstbootKernelArgs": "rd.net.timeout.dhcp=30 rd.net.dhcp.retry=8"
- ext.config.networking.hostname.fallback-hostname
    - Verify that the fallback hostname is set to `localhost` by first disabling NetworkManager from setting the hostname via DHCP or DNS and then verifying that the hostname is set from the fallback hostname and is `localhost`.
- ext.config.networking.network-online-service
    - Verify unit network-online.target inactive
- ext.config.networking.nic-naming
    - Verify NIC naming not starts with eth[0-9] expect azure platform
- ext.config.networking.nm-dhcp-client
    - Verify NetworkManager's internal DHCP client is running
- ext.config.networking.nm-start
    - Verify by default on qemu NetworkManager not started in initramfs, but on aws NetworkManager should started in initramfs
- ext.config.networking.no-default-initramfs-net-propagation.bootif
    - Verify when BOOTIF= or rd.bootif= are provided on the kernel command line (typically from PXE servers) that we don't propagate networking configs
        - "appendFirstbootKernelArgs": "BOOTIF=52:54:00:12:34:56"
- ext.config.networking.no-default-initramfs-net-propagation.default
    - Verify defaults no networking should have been propagated from the initramfs.
- ext.config.networking.resolv.systemd-resolved
    - Verify `systemd-resolved` should be enabled on FCOS
- coreos.network.initramfs.second-boot
    - verify that networking is not started in the initramfs on the second boot.
- rhcos.network.multiple-nics
    - verify mulitple nics
- rhcos.network.bond-with-dhcp
    - following the same network configuration used on https://github.com/RHsyseng/rhcos-slb
- rhcos.network.bond-with-restart
    - same as above, reboot and check the connection

## manual testing 
- compared to https://docs.fedoraproject.org/en-US/fedora-coreos/sysconfig-network-configuration/#_host_network_configuration_options
    - coreos-docs-net-testing.sh:
        - via the dracut kernel networking arguments
        - via the NM keyfiles provided by Ignition ( using $ /usr/libexec/nm-initrd-generator -s -- $kargs )
            - static ip for nic
                ip=10.10.10.10::10.10.10.1:255.255.255.0:staticip:eth1:none:8.8.8.8
            - static ip for bond
                ip=10.10.10.10::10.10.10.1:255.255.255.0:staticbond:bond0:none:8.8.8.8  bond=bond0:eth1,eth2:mode=active-backup,miimon=100
            - static ip for vlan
                ip=10.10.10.10::10.10.10.1:255.255.255.0:staticvlan:eth1.100:none:8.8.8.8 vlan=eth1.100:eth1
            - dhcp for bridge
                ip=br0:dhcp bridge=br0:eth1,eth2
            - dhcp for team
                ip=team0:dhcp team=team0:eth1,eth2
            ~~- dhcp for vlan on bond~~
                ip=bond0.100:dhcp
                bond=bond0:eth1,eth2:mode=active-backup,miimon=100
                vlan=bond0.100:bond0
    - coreos-network-testing.sh:
        - Testing ifcfg file via Ignition disables initramfs propagation (should add)
        - Testing coreos.no_persist_ip disables initramfs propagation
        - ~~Testing coreos.force_persist_ip forces initramfs propagation (covered by force-persist-ip)~~
        - Testing initramfs nameserver= option
        - ~~Testing net.ifnames=0 gives us legacy NIC naming (covered by mtu-on-bond-kargs)~~
        - loop

