CPE Automation Supplement
CPE Automation Supplement@
Use this guide to configure the uCPE after running the CPE Automation.
Currently, this guide only include how to configure additional interface.
1. Create additional interface using the script@
1.1 add_additional_bridge.bash@
Using shell script to automatically configure the interface is recommended. If you prefer manual steps, you can jump to next section.
The shell script takes one parameter: “interface_name”. Find out where your additional interface is connected to first. In my example, it is connected to enp2s0. If your physical interface is already connection, you will be able to find out which interface is connected by using this shell command on the uCPE.
ip a |grep “state UP”
You should see output like this:
Then issue the command on the uCPE:
sudo ./add_additional_bridge.bash enp2s0
The script will perform the following:
Once script finishes, you can go to section “Configure IPs“ to continue configuration
1.2 Manually configure VM interface@
Note
Skip over this section if you already run the script to setup the bridge and interface
Make sure you know the physical interface name you want to configure your interface on. If the interface is already physically connected, you can find the interface by issuing:
ip a |grep “state UP”
In our example, we use “enp2s0”
Find the bridge interface you want to create on the physical interface. Bridge interface will be used by the VM also. Since the br0 already used by CPE automation to create the first interface on the VM, so in this example we will use br1.
The two files look like this:
ifcfg-enp2s0
DEVICE=enp2s0
ONBOOT=yes
TYPE=Ethernet
NM_CONTROLLED=no
BRIDGE=br1
ifcfg-br1
DEVICE=br1
TYPE=Bridge
BOOTPROTO=none
ONBOOT=yes
STP=off
NM_CONTROLLED=no
DELAY=0
Restart the network:
sudo systemctl restart network
Attach the bridge to your vm:
sudo virsh attach-interface --domain nfgateway --type bridge --source br1 --model virtio --config --live
1.3 Configure IPs@
You should be able to login to the VM to configure the IP on the new interface. Please note, the first additional interface created is “eth1”, and the next one will be “eth2” and so on.
When you login to the VM, the interface should look like this:
The interface on the VM will default to be DHCP. If you want to setup a static IP, you can use “nmtui” tool or setup a static interface script file.