Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move nmcli command to use ip commands for IP address origin #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlonLapidus
Copy link

eth0/eth1 interfaces are not managed in DPU's NetworkManager by default. We move to ip commands to determine the IP address origin. Current limitation is that it support a single IP address origin per IP type (IPv4/IPv6).

Tested:
Added IPv4 static address to enp3s0f0s0, oob_net0 has a DHCP IPv4 address. IPv6 in both is LinkLocal (oob_net0 has an extra one):

root@ldev-platform-11-121-bf:/run/emu_param# cat eth0
LAN Interface:
enp3s0f0s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.100  netmask 255.255.255.0  broadcast 0.0.0.0
        inet6 fe80::50:bff:fea7:ff72  prefixlen 64  scopeid 0x20<link>
        ether 02:50:0b:a7:ff:72  txqueuelen 1000  (Ethernet)
        RX packets 239  bytes 77676 (77.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 132  bytes 38332 (38.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp3s0f0s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:50:0b:a7:ff:72 brd ff:ff:ff:ff:ff:ff
enp3s0f0s0:unmanaged
LinkStatus: UP
        Speed: 200000Mb/s
IPv4 Address Origin: Static
IPv6 Address Origin: LinkLocal
root@ldev-platform-11-121-bf:/run/emu_param# cat oob0
LAN Interface:
oob_net0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.237.40.135  netmask 255.255.0.0  broadcast 10.237.255.255
        inet6 fe80::a288:c2ff:fe0e:8736  prefixlen 64  scopeid 0x20<link>
        inet6 fdfd:fdfd:10:237:a288:c2ff:fe0e:8736  prefixlen 64  scopeid 0x0<global>
        ether a0:88:c2:0e:87:36  txqueuelen 1000  (Ethernet)
        RX packets 2583544  bytes 275942037 (275.9 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6789  bytes 804685 (804.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

oob_net0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether a0:88:c2:0e:87:36 brd ff:ff:ff:ff:ff:ff
    altname enamlnxbf17i0
        Speed: 1000Mb/s
default via 10.237.0.1 dev oob_net0 proto dhcp metric 101
IPv4 Address Origin: DHCP
IPv6 Address Origin: LinkLocal

eth0/eth1 interfaces are not managed in DPU's NetworkManager by default.
We move to ip commands to determine the IP adress origin. Current
limitation is that it support a single IP adress origin per IP type  (IPv4/IPv6).

Signed-off-by: Alon Lapidus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant