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
- All Categories
- 207 LFX Mentorship
- 207 LFX Mentorship: Linux Kernel
- 735 Linux Foundation IT Professional Programs
- 339 Cloud Engineer IT Professional Program
- 167 Advanced Cloud Engineer IT Professional Program
- 66 DevOps Engineer IT Professional Program
- 132 Cloud Native Developer IT Professional Program
- 122 Express Training Courses
- 122 Express Courses - Discussion Forum
- 5.9K Training Courses
- 40 LFC110 Class Forum - Discontinued
- 66 LFC131 Class Forum
- 39 LFD102 Class Forum
- 222 LFD103 Class Forum
- 17 LFD110 Class Forum
- 34 LFD121 Class Forum
- 17 LFD133 Class Forum
- 6 LFD134 Class Forum
- 17 LFD137 Class Forum
- 70 LFD201 Class Forum
- 3 LFD210 Class Forum
- 2 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 1 LFD233 Class Forum
- 3 LFD237 Class Forum
- 23 LFD254 Class Forum
- 689 LFD259 Class Forum
- 110 LFD272 Class Forum
- 3 LFD272-JP クラス フォーラム
- 10 LFD273 Class Forum
- 110 LFS101 Class Forum
- LFS111 Class Forum
- 2 LFS112 Class Forum
- 1 LFS116 Class Forum
- 3 LFS118 Class Forum
- 3 LFS142 Class Forum
- 3 LFS144 Class Forum
- 3 LFS145 Class Forum
- 1 LFS146 Class Forum
- 2 LFS147 Class Forum
- 8 LFS151 Class Forum
- 1 LFS157 Class Forum
- 17 LFS158 Class Forum
- 5 LFS162 Class Forum
- 1 LFS166 Class Forum
- 3 LFS167 Class Forum
- 1 LFS170 Class Forum
- 1 LFS171 Class Forum
- 2 LFS178 Class Forum
- 2 LFS180 Class Forum
- 1 LFS182 Class Forum
- 4 LFS183 Class Forum
- 30 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 2 LFS201-JP クラス フォーラム
- 17 LFS203 Class Forum
- 118 LFS207 Class Forum
- 1 LFS207-DE-Klassenforum
- LFS207-JP クラス フォーラム
- 301 LFS211 Class Forum
- 55 LFS216 Class Forum
- 50 LFS241 Class Forum
- 44 LFS242 Class Forum
- 37 LFS243 Class Forum
- 13 LFS244 Class Forum
- 1 LFS245 Class Forum
- 45 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 145 LFS253 Class Forum
- LFS254 Class Forum
- LFS255 Class Forum
- 6 LFS256 Class Forum
- LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 9 LFS258-JP クラス フォーラム
- 116 LFS260 Class Forum
- 156 LFS261 Class Forum
- 41 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 23 LFS267 Class Forum
- 18 LFS268 Class Forum
- 29 LFS269 Class Forum
- 200 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- 3 LFS281 Class Forum
- 7 LFW111 Class Forum
- 257 LFW211 Class Forum
- 179 LFW212 Class Forum
- 12 SKF100 Class Forum
- SKF200 Class Forum
- SKF201 Class Forum
- 791 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 98 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 754 Linux Distributions
- 82 Debian
- 67 Fedora
- 16 Linux Mint
- 13 Mageia
- 23 openSUSE
- 147 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 351 Ubuntu
- 465 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 91 Linux Security
- 78 Network Management
- 101 System Management
- 47 Web Management
- 56 Mobile Computing
- 17 Android
- 28 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 366 Off Topic
- 114 Introductions
- 171 Small Talk
- 20 Study Material
- 534 Programming and Development
- 293 Kernel Development
- 223 Software Development
- 1.2K Software
- 212 Applications
- 182 Command Line
- 3 Compiling/Installing
- 405 Games
- 312 Installation
- 79 All In Program
- 79 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)