Lab 2.1 Setting up second network
Hello everyone,
I'm trying to set up virtual machines for this course and I'm having some minor trouble. I'm using qemu (through virtual machine manager) so I converted the original file to .qemu and cloned it. By default, virtual network interface was installed so the two vms are in local network and connected to the internet (surprisingly I did nothing, it all happened automatically).
Now, if I understood well I am supposed to add a second network interface which will put two vms into local network without internet access. The only problem is that when I add another virtual network interface it is connected to the internet automatically and I don't know how to fix this. Can someone please help ?
Thanks in advance ! ![]()
Comments
-
Hello k0dard, Let me see if I can get you back on track.
In "Virtual Machine Manager" select the " edit" tab then the "Connection Details" tab
then "Virtual Networks" tab. From here you can add a new network. Please create a private network.
Once created you can attach one nic from each machine to the new private network.Keep us posted

Lee1 -
Thanks Lee,
It was easy with your help !
I have another question though, if you don't mind:While trying to find a solution by myself, and before knowing about Connection Details settings, I tried to change Network source under Virtual Network Interface settings (main -> Open -> Show virtual hardware details) to Host device wlo1: macvtap, Source mode: Bridge. Actually, at first I wrongly presumed I was supposed to do this to share my wlan1 adapter's internet with vm and that the other, virtual network 'defautl': NAT will not forward internet by default, and will be private.
What this did is it created new routes in my routing table and added 2 new interfaces, so when I typeroute -nI get:192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 virbr1Where virbr0 is for virtual network 'default' and virbr1 is for the bridge.
I realized this doesn't behave as I expected, so my first question is what is the bridge setting for ?Later, when I applied your solution, I was expecting that virbr1 will be removed, since the new virtual network is private. To my surprise, now I have another route:
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 virbr1
10.0.0.0 0.0.0.0 255.254.0.0 U 0 0 0 virbr1So, not only the first virbr1 rule hasn't been removed even though I removed the bridge to Host device in the settings (bug?), but I got a new route. I'd really appreciate if I you could explain what's going on here, more precisely what is being routed with virbr1 if virtual connection doesn't have internet access ? And why do I still have routing enabled to 169.254.0.0 ?
Thanks a lot in advance

Other than that, two networks are working as expected, one (192) has internet access and the other (10) is private.
0 -
Hi k0dard,
Each of the networks defined in Virt Manager will create a configuration for "libvirt" which in turn creates the virtual bridges. We then attach to the bridges. Each bridge will have configuration instructions like NAT,ROUTE, BRIDGE etc.. The default virbir0 is set to NAT from the client VM's to the outside world, the one we create keeps the traffic local.
As for the 169.254/16 network, it is part of the "ZEROCONF" protocol set up by "avahi" in Linux. We do not use it for class, it is safe to ignore or delete it if you like.Lee
0 -
Thanks a lot for your help !
0
Categories
- All Categories
- 175 LFX Mentorship
- 175 LFX Mentorship: Linux Kernel
- 745 Linux Foundation IT Professional Programs
- 372 Cloud Engineer IT Professional Program
- 168 Advanced Cloud Engineer IT Professional Program
- 73 DevOps IT Professional Program - Discontinued
- 3 DevOps & GitOps IT Professional Program
- 98 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- AI & ML Training
- Blockchain & Decentralized Identity Training
- Cloud & Containers Training
- Cybersecurity Training
- DevOps & Site-Reliability Training
- Linux Kernel Development Training
- Networking Training
- Open Source Best Practice Training
- System Administration Training
- System Engineering Training
- Web & Application Development Training
- 2 LFD103-JP クラス フォーラム
- 4 LFD210-CN Class Forum
- 764 LFD259 Class Forum
- 681 LFS101 Class Forum
- 2 LFS158-JP クラス フォーラム
- 162 LFS207 Class Forum
- 3 LFS207-DE-Klassenforum
- 4 LFS207-JP クラス フォーラム
- 61 LFS241 Class Forum
- 52 LFS242 Class Forum
- 42 LFS243 Class Forum
- 19 LFS244 Class Forum
- 4 LFS250-JP クラス フォーラム
- 166 LFS253 Class Forum
- 19 LFS256 Class Forum
- 1.4K LFS258 Class Forum
- 165 LFS261 Class Forum
- 26 LFS267 Class Forum
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 768 Linux Distributions
- 81 Debian
- 67 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 105 Mobile Computing
- 18 Android
- 72 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 940 Programming and Development
- 310 Kernel Development
- 612 Software Development
- 975 Software
- 367 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)
