#!/bin/bash
nmcli general hostname man2-li-osmonitoring-207-002
nmcli -f UUID conn | awk '!/UUID/{print"nmcli con del "$1}' | sh

# vrf interfaces
nmcli connection add con-name mgmt ifname mgmt type vrf table 1001 ipv4.method disabled ipv6.method disabled

# ethernet interfaces
nmcli connection add con-name eno1 ifname eno1 type ethernet ipv4.method manual ipv4.addresses 10.30.65.16/31 ipv4.gateway 10.30.65.17 ipv4.dns "1.1.1.1 10.10.201.77 10.11.199.70"  ipv6.method link-local master mgmt mtu 1500
nmcli connection add con-name eno2 ifname eno2 type ethernet ipv4.method auto ipv6.method link-local master mgmt mtu 1500
nmcli connection add con-name uplink1 ifname uplink1 type ethernet ipv4.method disabled ipv6.method link-local  mtu 9216
nmcli connection add con-name uplink2 ifname uplink2 type ethernet ipv4.method disabled ipv6.method link-local  mtu 9216

# dummy interfaces
nmcli connection add ifname mgmt_lo con-name mgmt_lo type dummy ipv6.method disabled ipv4.method manual ipv4.addresses 10.30.74.4/32 mtu 9000



# vlan interfaces
nmcli connection add con-name uplink1.4093 ifname uplink1.4093 type vlan id 4093 dev uplink1  ipv4.method manual ipv4.addresses 10.30.64.8/31  ipv6.method disabled  mtu 9000
nmcli connection add con-name uplink2.4093 ifname uplink2.4093 type vlan id 4093 dev uplink2  ipv4.method manual ipv4.addresses 10.30.64.136/31  ipv6.method disabled  mtu 9000



