LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Virtual Network Bridge (https://www.linuxquestions.org/questions/linux-newbie-8/virtual-network-bridge-4175605784/)

adnanarab 05-12-2017 10:27 AM

Virtual Network Bridge
 
Hi,

I am trying to create a virtual network bridge.

I am running cent os via virtualbox. I have two virtual networks. I want to connect to the host operating system via a network bridge. Could you please let me know what I doing wrong. My set up is as follows:

Host computer NIC settings:

enp0s3:

TYPE=Ethernet
DEVICE=enp0s3
NAME=enp0s3
UUID=1737f7ds-a5a9-4253-93ef-fdeb4663100e
ONBOOT=no
BRIDGE=br0

br0:

DEVICE=br0
BOOTPROTO=static
ONBOOT=yes
IPADDR=xxx.xxx.xxx.xxx
NETMASK=255.255.255.0
GATEWAY=xxx.xxx.xxx.xxx
TYPE=Bridge
NM_CONTROLLED=no
DNS1=x.x.x.x
DNS2=x.x.x.x

ip addr br0:

3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN qlen 1000
link/ether 6e:3e:0c:24:53:bc brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::6c3e:cff:fe24:53bc/64 scope link
valid_lft forever preferred_lft forever

ip addr enp0s3:

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:ae:63:45 brd ff:ff:ff:ff:ff:ff

brctl show br0:

[root@localhost network-scripts]# brctl show br0
bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no

Please let me know if you need any more information.

Thanks

frankbell 05-12-2017 06:50 PM

The easiest way to bridge to the host network in VirtualBox is this:

Shut down the VM.

In the Virtualbox settings for that VM, go to "Network," then select a bridged network in the "Attach to" dialog (the default is "NAT").

Reboot. You should have a bridge network in you LAN.

If not, shut down again, go back to the "Network" dialog, click the little "Advanced" arrow. There may be several adapters listed. VB is usually pretty good at selecting the correct on by default, but, if it hasn't done so, try each one until you find the one that works.


All times are GMT -5. The time now is 01:10 AM.