Bridge Network not working

Discussions related to using VirtualBox on Linux hosts.
Post Reply
V N Murthy
Posts: 7
Joined: 17. May 2017, 08:44

Bridge Network not working

Post by V N Murthy »

Hi,

My Host OS is Centos 6.9 and virtual Box is 5.1. I created a VM in VirtualBox with OS Centos 6.9 and configured as bridge mode by providing the static IP to guest of the same LAN as Host.

I am able to ping from Guest to Host, but unable to ping outside the Host, but within the LAN. Internet is also not working in guestos.

When I change the bridge to NAT and selecting the dhcp in guest, internet is working OK in guest OS.

My requirement is to use VM as a Server in LAN in which Host is connected. I tried for help in the internet, but, no help.

The details of my host server is as below:

Code: Select all

[root@cpcb Desktop]# vboxmanage showvminfo vm --details
Name:            vm
Groups:          /
Guest OS:        Red Hat (32-bit)
UUID:            083de935-5df8-4508-a952-f6eaed3bb600
Config file:     /root/VirtualBox VMs/vm/vm.vbox
Snapshot folder: /root/VirtualBox VMs/vm/Snapshots
Log folder:      /root/VirtualBox VMs/vm/Logs
Hardware UUID:   083de935-5df8-4508-a952-f6eaed3bb600
Memory size:     2048MB
Page Fusion:     off
VRAM size:       16MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
PAE:             on
Long Mode:       off
Triple Fault Reset: off
APIC:            on
X2APIC:          on
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): DVD
Boot Device (2): HardDisk
Boot Device (3): Not Assigned
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
BIOS APIC mode:  APIC
Time offset:     0ms
RTC:             local time
Hardw. virt.ext: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
VT-x unr. exec.: on
Paravirt. Provider: Default
Effective Paravirt. Provider: KVM
State:           powered off (since 2017-05-16T04:38:42.687000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration: 
Autostart Enabled: off
Autostart Delay: 0
Default Frontend: 
Storage Controller Name (0):            IDE
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
IDE (1, 0): /root/VirtualBox VMs/vm/centos-disk1.vmdk (UUID: 51eac171-7390-4797-a989-4c923a927ae7)
NIC 1:           MAC: 080027915BBD, Attachment: Bridged Interface 'eth3', Cable connected: on, Trace: off (file: none), Type: 82545EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
UART 3:          disabled
UART 4:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           enabled (Driver: ALSA, Controller: AC97, Codec: STAC9700)
Clipboard Mode:  disabled
Drag and drop Mode: disabled
VRDE:            disabled
USB:             enabled
EHCI:            disabled
XHCI:            disabled

USB Device Filters:

<none>

Bandwidth groups:  <none>

Shared folders:  <none>

Video capturing:    not active
Capture screens:    0
Capture file:       /root/VirtualBox VMs/vm/vm.webm
Capture dimensions: 1024x768
Capture rate:       512 kbps
Capture FPS:        25


Configured memory balloon size:      0 MB


[root@cpcb Desktop]# 
ifconfig details of the host server:

Code: Select all

root@cpcb Desktop]# sudo ifconfig
eth0      Link encap:Ethernet  HWaddr 94:57:A5:6D:46:D0  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:16 

eth1      Link encap:Ethernet  HWaddr 94:57:A5:6D:46:D1  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:17 

eth2      Link encap:Ethernet  HWaddr 94:57:A5:6D:46:D2  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:16 

eth3      Link encap:Ethernet  HWaddr 94:57:A5:6D:46:D3  
          inet addr:10.24.84.226  Bcast:10.24.84.255  Mask:255.255.255.0
          inet6 addr: fe80::9657:a5ff:fe6d:46d3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1829145 errors:0 dropped:0 overruns:0 frame:0
          TX packets:718998 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:484724626 (462.2 MiB)  TX bytes:764561244 (729.1 MiB)
          Interrupt:17 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:657428 errors:0 dropped:0 overruns:0 frame:0
          TX packets:657428 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:5824585830 (5.4 GiB)  TX bytes:5824585830 (5.4 GiB)

virbr0    Link encap:Ethernet  HWaddr 52:54:00:E8:8F:D1  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:744 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:154494 (150.8 KiB)

[root@cpcb Desktop]# 
ifconfig details of Guestos:
File attached.

Please help in this.

Thank you,
Last edited by socratis on 17. May 2017, 09:51, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bridge Network not working

Post by socratis »

V N Murthy wrote:configured as bridge mode by providing the static IP to guest of the same LAN as Host.
Why static? Did you try to leave it as DHCP assigned?

Is the Bridged mode over a WiFi interface, or over a wired interface?

Why are you running as 'root'? It's the most dangerous thing that you can do to your system. VirtualBox is designed so that it can even run under a 'guest' account. Use your normal login, don't go 'root' on it.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
V N Murthy
Posts: 7
Joined: 17. May 2017, 08:44

Re: Bridge Network not working

Post by V N Murthy »

Dear Socratis,

Thanks for your suggestion for normal user login.

My Host is connected with wired interface, not a wifi.

I want my vm has to work as an independent system in the LAN so that it can be accessed by all other user of LAN. I want to implement an online complaint system for our office through LAN.

Our LAN system is static IP based, not on dhcp.
Last edited by V N Murthy on 17. May 2017, 13:23, edited 1 time in total.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bridge Network not working

Post by socratis »

socratis wrote:Did you try to leave it as DHCP assigned?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
V N Murthy
Posts: 7
Joined: 17. May 2017, 08:44

Re: Bridge Network not working

Post by V N Murthy »

While the VM settings are in bridge mode and guest system in DHCP is unable to assign the IP Address.

If I changed the VM settings to NAT and DHCP in guest system, it is working, but IP is auto assigned by VM which can not be access by other systems in the LAN.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bridge Network not working

Post by socratis »

V N Murthy wrote:While the VM settings are in bridge mode and guest system in DHCP is unable to assign the IP Address.
So you decided to bypass a problem and "fix" it by assigning a static IP? If you can't communicate with your router, enough to get a DHCP address, fixing the address will not solve your communication problems.

Try to see why you don't get an IP from your router. All of this is based of course in the assumption that you have a router that acts as a DHCP server as well...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
V N Murthy
Posts: 7
Joined: 17. May 2017, 08:44

Re: Bridge Network not working

Post by V N Murthy »

Our Router is not working as DHCP Server. It is clear. We have to put static IP in each and every system in our LAN.
Then there is no question of NAT in the network settings of VM in virtual box.

The only option is it has to be configured in bridge mode and assigning the static ip to the guest VM.

But, the problem is it is not working here. I have other server in which bridge mode is working perfectly. My aim is to solve this problem.
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Bridge Network not working

Post by Martin »

Did you verify that the firewall is disabled in your RedHat host?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Bridge Network not working

Post by socratis »

Configure your guest with a static IP as you did originally. Post the output of the following, both from your host AND your guest:
  • ifconfig -a
    route -n
And, yes, I know that NAT is working, you don't have to say it at every post. The question is why Bridged is not working.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
V N Murthy
Posts: 7
Joined: 17. May 2017, 08:44

Re: Bridge Network not working

Post by V N Murthy »

Martin wrote:Did you verify that the firewall is disabled in your RedHat host?
I checked it by disabling firewall, but not worked.
DdB
Posts: 114
Joined: 22. May 2010, 23:27
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: many
Location: Germany

Re: Bridge Network not working

Post by DdB »

interesting read. Since i am using bridged net myself (without any problem though), my suggestion would be to set up a dhcp server on the host, and configure MAC identification for the specified VM. In my case, the router does it, if properly configured, whereas vbox only does it out-of-the-box for other network types, that you did not select. It is not strictly necessary, to get the dhcp from the router as long as there is a server present and working.
just my 2 cents
Post Reply