Interface Hot Add (Vyatta)

From vwiki
Revision as of 15:19, 4 October 2016 by Sstrutt (talk | contribs) (Initial creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

{{#widget:Widget:GoogleAdSenseSkyscraper}} {{#seo: |title=Add NIC without downtime |titlemode=append |keywords=vyatta,vyos,nic,vmware,vm,add,downtime |description=This procedure allows you to add a new network interface to a virtual router without shutting the machine down }} This procedure allows you to add a new network interface to a Vyatta/VyOS router without downtime. This assumes you can physically add the interface (most commonly true in a virtualised environment). Have tried an tested this procedure on various versions of Vyatta router, all running on VMware environments. Only issue has been very occasionally the NIC can't be added without a reboot, though I'd recommend doing this outside of peak traffic hours, and to put a snapshot in place 1st!

  1. Login to Vyatta make sure the running config has been saved
    • configure
    • save
    • exit
  2. Go into root
  3. Check current NIC's
    • ls -l /sys/class/net/
  4. Add NIC via VMware
    • Should be VMXNET3
  5. Find PCI Bus ID for an existing network card
    • dmesg | grep vmxnet
  6. Rescan for network devices
    • EG echo "1" > /sys/class/pci_bus/0000:03/device/rescan
  7. Check new device has been found
    • dmesg | grep vmxnet
    • ls -l /sys/class/net/
  8. Exit out of root
    • exit
  9. Get the MAC address of the new interface (replace eth2 as required)
    • EG show interfaces ethernet eth2
  10. Enter config mode
    • configure
  11. Add MAC address to config
    • EG set interfaces ethernet eth2 hw-id 00:50:56:80:7d:8a
  12. Commit/apply MAC address config
    • commit
    • The NIC's MAC address needs to be applied in the config before any other interface config (otherwise it'll fail to commit).
    • An error of not setting autoneg is sometimes received and isn't a problem
  13. Configure other basic settings
    • EG set interfaces ethernet eth2 duplex 'auto'
    • EG set interfaces ethernet eth2 speed 'auto'
  14. Commit/apply changes
    • commit

The new interface can now be configured as normal (remove the snapshot if you put one in place), for example...

set interfaces ethernet eth2 description "NewNIC for stuff"
set interfaces ethernet eth2 address 192.168.10.0/24