Interface Hot Add (Vyatta)
{{#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!
- Login to Vyatta make sure the running config has been saved
configure
save
exit
- Go into root
- Check current NIC's
ls -l /sys/class/net/
- Add NIC via VMware
- Should be VMXNET3
- Find PCI Bus ID for an existing network card
dmesg | grep vmxnet
- Rescan for network devices
- EG
echo "1" > /sys/class/pci_bus/0000:03/device/rescan
- EG
- Check new device has been found
dmesg | grep vmxnet
ls -l /sys/class/net/
- Exit out of root
exit
- Get the MAC address of the new interface (replace
eth2
as required)- EG
show interfaces ethernet eth2
- EG
- Enter config mode
configure
- Add MAC address to config
- EG
set interfaces ethernet eth2 hw-id 00:50:56:80:7d:8a
- EG
- 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
- Configure other basic settings
- EG
set interfaces ethernet eth2 duplex 'auto'
- EG
set interfaces ethernet eth2 speed 'auto'
- EG
- 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