Home › Forums › FABRIC General Questions and Discussion › network config lost on reboot
- This topic has 3 replies, 3 voices, and was last updated 4 months, 3 weeks ago by Komal Thareja.
-
AuthorPosts
-
June 27, 2024 at 10:54 am #7193
Small question,
Using ubuntu_default_22, network config is wiped out whenever a node is rebooted (applied network interfaces are down and ip addresses are lost after reboot). Is there any easy way to reapply that config, or do I have to do it manually each time?
Thanks.
June 27, 2024 at 10:57 am #7194Hi Vaiden,
Not sure how your slice was setup. If you interfaces were configured in
auto
mode. You should be able to do the following to reapply the config.
slice = fablib.get_slice(slice_name)
for n in slice.get_nodes():
n.config()
Thanks,
Komal
- This reply was modified 4 months, 3 weeks ago by Komal Thareja.
July 1, 2024 at 1:41 pm #7202Hello
I am following up on this question. Recently, we had to install a software in one of our VMs. it required rebooting the VM and all our addressing and configurations on the VM was lost. we configured our interfaces using specific addresses (not sure what the auto mode is). It was necessary to set up the IP addresses as we were using BGP. The interface names also changed from ethx to enps..
I have the same question. Can we get back our configuration?
thanks
Nirmala
July 1, 2024 at 3:26 pm #7203Hi Nirmala,
FABLIB API supports 3 modes of configuration for the VMs.
– Manual: Manual configuration does not require any additional steps before the slice request is submitted.– Auto: Automatic configuration requires specify a subnet for the network and setting the interface’s mode to auto using the iface1.set_mode(‘auto’) function before submitting the request. With automatic configuration, FABlib will allocate an IP from the network’s subnet and configure the device during the post boot configuration stage. Optionally, you can add routes to the node before submitting the request.
– User Defined (config): User defined configuration requires specifying a subnet for the network and specifying the IP to use for each interface before the request is submitted. You can signal FABlib to configure the user defined IPs by setting the interface’s mode to config using the iface1.set_mode(‘config’) function before submitting the request. With user defined configuration, FABlib will use the IP defined by the user and configure the device during the post boot configuration stage. Optionally, you can add routes to the node before submitting the request.
Examples for each mode of configuration are available via Start Here:
Assuming the manual configuration is done via
ip addr
commands, it is not reboot persistent and the onus lies on the user to save/apply the config again post reboot.For modes
auto
andconfig
, FABLIB maintains the IP address information in the meta data for each of VMs maintained in UserData JSON object saved in the Fabric Information Model for the VM. In both these modes, the configuration can be fetched and re-applied using the code block:slice = fablib.get_slice(slice_name) for n in slice.get_nodes() n.config()
Hope this helps! Please let me know if you have any feedback.
Thanks,
Komal- This reply was modified 4 months, 3 weeks ago by Komal Thareja.
- This reply was modified 4 months, 3 weeks ago by Komal Thareja.
-
AuthorPosts
- You must be logged in to reply to this topic.