LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-12-2017, 01:40 PM   #1
worov
LQ Newbie
 
Registered: Jun 2017
Posts: 5

Rep: Reputation: Disabled
Bridging my network


Hi, everyone!

This is my first post here. Before reading this, beware that I'm not a native speaker. I apologize for any error that I may have written in the text below.

I'd like to create a bridging network for a virtual machine. I have never done this before.

My host is Debian 9.1 Stretch (amd64). I have a wired connection on my router. Internet works fine. My guest will be Debian Buster (amd64).

How should I set my network for this?

Here is the situation on my host :

My network hardware :

Code:
lspci | grep Ethernet
Code:
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
My /etc/network/interfaces file :

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback
The state of my network :

Code:
ip a
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 70:8b:cd:90:34:f8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.19/24 brd 192.168.1.255 scope global dynamic enp2s0
       valid_lft 85249sec preferred_lft 85249sec
    inet6 fe80::a08c:59dc:9fd3:ec18/64 scope link 
       valid_lft forever preferred_lft forever
3: wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 42:a3:8a:54:94:6f brd ff:ff:ff:ff:ff:ff

How can I create the bridge? Thank you for your help.
 
Old 08-12-2017, 05:45 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,521

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Bridged networking in a VM means that the VM is given its own IP. NAT networking shares the host IP. If your using virtualbox, you just configure a bridged network under networking.
 
Old 08-13-2017, 03:37 AM   #3
worov
LQ Newbie
 
Registered: Jun 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi, AwesomeMachine! Thank for your answer.

Quote:
If your using virtualbox
Virtualbox is unavailable in Stretch. Don't know why. I will use virt-manager. It serves as a graphical user interface for KVM.

Quote:
you just configure a bridged network under networking.
Can do this using Gnome's Network Manager ? Or is this something to be done in command line ?

Last edited by worov; 08-13-2017 at 03:39 AM.
 
Old 08-13-2017, 05:16 AM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,521

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Add this line to /etc/apt/sources.list:
Code:
deb http://download.virtualbox.org/virtualbox/debian stretch contrib
Then add the key:
Code:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | apt-key add -
Then
Code:
apt-get update && apt-get install virtualbox-5.1
If you want vb kernel modules updated when the kernel changes, install
Code:
apt install dkms
Debian dropped VB from its repos, because VB has no LTS releases. That means perpetual upgrades with no security patches for older versions. This is contrary to the Debian model. But many users will continue to use vb because it's so simple.

Last edited by AwesomeMachine; 08-13-2017 at 05:18 AM.
 
Old 08-13-2017, 06:01 AM   #5
worov
LQ Newbie
 
Registered: Jun 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thank you for the virtualbox repository. I wasn't aware that it existed. Virtualbox is now installed on my system.

Should I create the virtual machine now ? Or should I configure the network first ? Which commands shall I run to configure it ?
 
Old 08-13-2017, 07:29 AM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,521

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Each virtual machine has its own network settings. So, I would make the virtual machine, and configure networking before booting the install media. The type of networking--NAT vs Bridged--is independent of the guest OS settings.
 
Old 08-13-2017, 07:50 AM   #7
worov
LQ Newbie
 
Registered: Jun 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
OK, so I created the VM, but haven't installed the OS yet. Here are the network settings :

https://img4.hostingpics.net/pics/49769211VM.png

enp2s0 is my Ethernet interface.

Now, how can I setup the bridge on my host OS ?
 
Old 08-13-2017, 09:39 AM   #8
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,521

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
That appears correct. I'd go with it.
 
Old 08-13-2017, 12:08 PM   #9
worov
LQ Newbie
 
Registered: Jun 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Now, about creating the bridge on my host ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bridging a wired network to a (managed by network manager) wireless one jemenake Linux - Wireless Networking 2 09-09-2008 09:18 PM
Bridging a wired network to a wifi network bobmcobob Linux - Wireless Networking 2 07-18-2008 06:36 PM
VMWare's bridging vs Window's bridging - routing is messed up when Windows bridging brenan99 General 0 05-04-2008 10:24 PM
Bridging Network depam Linux - Software 5 02-22-2006 08:42 AM
network bridging iNET_boss Linux - Wireless Networking 6 11-07-2005 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration