1. network config lost on reboot

network config lost on reboot

Home Forums FABRIC General Questions and Discussion network config lost on reboot

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7193
    Vaiden Logan
    Participant

      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.

      #7194
      Komal Thareja
      Participant

        Hi 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 5 months, 4 weeks ago by Komal Thareja.
        #7202
        Nirmala Shenoy
        Participant

          Hello

          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

          #7203
          Komal Thareja
          Participant

            Hi 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:

            Screenshot-2024-07-01-at-3.12.46 PM
            Reboot Persistence:

            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 and config, 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

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.