Vyatta NOS documentation

Learn how to install, configure, and operate Vyatta Network Operating System (Vyatta NOS), which helps to drive our virtual networking and physical platforms portfolio.

Hot-plugging two persistent network interfaces to connect two routers

The following figure shows how to hot-plug two persistent network interfaces on two routers so that the two routers are connected to the same network.

Figure 1. Connecting two routers with hot-plugged interfaces
To configure hot-plugging for the scenario that is shown in this figure, perform the following steps on the host VM:
  1. Log in to the VM guest.
  2. Change the directory to /home/Vyatta/.
  3. Create the r1.xml file and set its contents to the following:
    
    <interface type='network'>
    	  <mac address='52:54:00:11:11:11'/>
    	  <source network='net100'/>
    	  <model type='virtio'/>
    </interface>
  4. Save the r1.xml file in the /home/Vyatta/ directory.
  5. Create the r2.xml file and set its contents to the following:
    
    <interface type='network'>
    	  <mac address='52:54:00:11:11:12'/>
    	  <source network='net100'/>
    	  <model type='virtio'/>
    </interface>

    The only difference between r1.xml and r2.xml is the MAC address. Because these two interfaces are on the same network, the MAC addresses must be unique.

  6. Save the r2.xml file in the /home/Vyatta/ directory.
  7. Hot-plug an interface into the R1 router by entering the following command:
    
    # virsh attach-device R1 --persistent./r1.xml
  8. Hot-plug an interface into the R2 router by entering the following command:
    
    # virsh attach-device R2 --persistent./r2.xml