Skip to content

Conversation

@stannous
Copy link

This small python script may be useful to some people requiring configuration of multiple, consecutive IP and ARP settings.

Only the starting IP address/netmask is required (either IPv4 or IPv6). The "flush" option can be given and this will
remove all IP address (ip addr flush) before adding an IP address. The "verbose" option just shows
more detail of the steps taken. The "dryrun" option will show the steps taken but will not actually configure anything.
You can also specify which devices you wish to configure as comma separated strings ("-d eth1,eth2,eth3").

More details are provided in the README file.

@stannous stannous closed this Jul 18, 2022
@stannous stannous deleted the add-ip-and-arp-settings branch July 18, 2022 19:18
@stannous stannous restored the add-ip-and-arp-settings branch July 18, 2022 19:56
@stannous stannous changed the title Added nv-mlnxipcfg.py Added nv-mlnxipcfg.py Jul 18, 2022
@stannous stannous reopened this Jul 18, 2022
@stannous
Copy link
Author

I will adhere to your CLA!
--Sam Tannous

@stannous
Copy link
Author

stannous commented Aug 3, 2022

Any idea when this MR will get looked at?


nv-mlnxipcfg.py configures and sets persistency behavior for IP addresses, IP rules, IP route, and ARP settings

Requires: Python 3.x and python3-click
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my biggest concern - that there are non-inbox (I assume) dependencies for this code to run without a requirements.txt file or something similar to facilitate someone bootstrapping this correctly. Is it too much trouble to ask that you include a requirements.txt file, along with instructions on how to use it?

Comment on lines +114 to +127
BOOTPROTO=none
NAME={}
DEVICE={}
ONBOOT=yes
IPADDR={}
PREFIX={}
DEFROUTE=yes
GATEWAY={}
ROUTING_RULE="priority 32761 from {} table {}"
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RHEL/Rocky 9.X and onward have moved away from using ifcfg network-script files, in favor of NetworkManager connection profiles (see /etc/NetworkManager/system-connections/*.nmconnection for what those look like).

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.

3 participants