NAT + bridged network, adapter resets every few hours

Discussions related to using VirtualBox on Windows hosts.
Post Reply
tgys
Posts: 1
Joined: 21. Apr 2021, 08:02

NAT + bridged network, adapter resets every few hours

Post by tgys »

I'm using a vm on a windows host to send network requests from another machine to the vm through the bridged network, and then from the vm to the internet through the NAT, every few hours the network adapter resets and I have to disconnect and then reconnect to get it working again.

ip a:

Code: Select all

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:87:0f:fd brd ff:ff:ff:ff:ff:ff                                                                                  
    inet 192.168.8.104/24 brd 192.168.8.255 scope global dynamic enp0s8                                                                 
       valid_lft 84236sec preferred_lft 84236sec                    
    inet6 fd18:3cb7:1daf:4300:d351:8c64:7d0:a153/64 scope global temporary dynamic                                                      
       valid_lft 6894sec preferred_lft 3294sec                                                                                          
    inet6 fd18:3cb7:1daf:4300:a00:27ff:fe87:ffd/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 6894sec preferred_lft 3294sec                                                                                          
    inet6 fe80::a00:27ff:fe87:ffd/64 scope link                     
       valid_lft forever preferred_lft forever                      
3: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:c5:49:3d brd ff:ff:ff:ff:ff:ff              
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3    
       valid_lft 84217sec preferred_lft 84217sec                    
    inet6 fe80::a00:27ff:fec5:493d/64 scope link                    
       valid_lft forever preferred_lft forever  


route:

Code: Select all

default         _gateway        0.0.0.0         UG    512    0        0 enp0s3
default         _gateway        0.0.0.0         UG    512    0        0 enp0s8
10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 enp0s3
_gateway        0.0.0.0         255.255.255.255 UH    512    0        0 enp0s3
192.168.8.0     0.0.0.0         255.255.255.0   U     0      0        0 enp0s8
_gateway        0.0.0.0         255.255.255.255 UH    512    0        0 enp0s8
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: NAT + bridged network, adapter resets every few hours

Post by BillG »

Why do you need to do that? A machine in bridged mode should behave just like any other PC on the LAN. You should not need NAT to access the Internet! I certainly don't.

What is the IP address and gateway of the host?
Bill
Post Reply