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 -n
I 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
- 10.1K All Categories
- 35 LFX Mentorship
- 88 LFX Mentorship: Linux Kernel
- 504 Linux Foundation Boot Camps
- 279 Cloud Engineer Boot Camp
- 103 Advanced Cloud Engineer Boot Camp
- 48 DevOps Engineer Boot Camp
- 41 Cloud Native Developer Boot Camp
- 2 Express Training Courses
- 2 Express Courses - Discussion Forum
- 1.8K Training Courses
- 17 LFC110 Class Forum
- 5 LFC131 Class Forum
- 19 LFD102 Class Forum
- 148 LFD103 Class Forum
- 13 LFD121 Class Forum
- 61 LFD201 Class Forum
- LFD210 Class Forum
- 1 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum
- 23 LFD254 Class Forum
- 569 LFD259 Class Forum
- 100 LFD272 Class Forum
- 1 LFD272-JP クラス フォーラム
- 1 LFS145 Class Forum
- 23 LFS200 Class Forum
- 739 LFS201 Class Forum
- 1 LFS201-JP クラス フォーラム
- 1 LFS203 Class Forum
- 45 LFS207 Class Forum
- 298 LFS211 Class Forum
- 53 LFS216 Class Forum
- 46 LFS241 Class Forum
- 41 LFS242 Class Forum
- 37 LFS243 Class Forum
- 10 LFS244 Class Forum
- 27 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- 131 LFS253 Class Forum
- 997 LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 87 LFS260 Class Forum
- 126 LFS261 Class Forum
- 31 LFS262 Class Forum
- 79 LFS263 Class Forum
- 15 LFS264 Class Forum
- 10 LFS266 Class Forum
- 17 LFS267 Class Forum
- 17 LFS268 Class Forum
- 21 LFS269 Class Forum
- 200 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- 212 LFW211 Class Forum
- 154 LFW212 Class Forum
- 899 Hardware
- 217 Drivers
- 74 I/O Devices
- 44 Monitors
- 115 Multimedia
- 208 Networking
- 101 Printers & Scanners
- 85 Storage
- 749 Linux Distributions
- 88 Debian
- 64 Fedora
- 14 Linux Mint
- 13 Mageia
- 24 openSUSE
- 133 Red Hat Enterprise
- 33 Slackware
- 13 SUSE Enterprise
- 355 Ubuntu
- 473 Linux System Administration
- 38 Cloud Computing
- 69 Command Line/Scripting
- Github systems admin projects
- 94 Linux Security
- 77 Network Management
- 108 System Management
- 49 Web Management
- 63 Mobile Computing
- 22 Android
- 27 Development
- 1.2K New to Linux
- 1.1K Getting Started with Linux
- 528 Off Topic
- 127 Introductions
- 213 Small Talk
- 20 Study Material
- 794 Programming and Development
- 262 Kernel Development
- 498 Software Development
- 923 Software
- 258 Applications
- 182 Command Line
- 2 Compiling/Installing
- 76 Games
- 316 Installation
- 53 All In Program
- 53 All In 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)