Stack Exchange
Internet is not working in Guest(Oracle Linux) on VMware workstation 17


Internet is not working in Guest(Oracle Linux) on VMware workstation 17
root@Node01 ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.10  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::9e0c:48d7:618f:ec5a  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:5a:a6:a9  txqueuelen 1000  (Ethernet)
        RX packets 197  bytes 12502 (12.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 35  bytes 4782 (4.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens36: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:0c:29:5a:a6:b3  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 4392  bytes 391264 (382.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4392  bytes 391264 (382.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:34:82:e4  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@Node01 ~]# 


Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

Welcome to SU. When adding textual output to the question you should enclose it in the code brackets { } to preserve the formatting. Your question is missing a few details; for example an actual question, host and guest OS versions, how exactly the connectivity is supposed to work... The Help has advice on formulating a question so that it's clear and answerable. Please see the Asking and Answering -sections in the Help in general, and take the Tour to learn how the site works.

First of all 192.168.1.10 somewhat indicates that you are probably configuring a wrong static address, potentially with a wrong default gateway (or no default route configured at all). You might want to provide the output of ip r.

[root@Node01 ~]# ip r
default via 192.168.1.1 dev ens33 proto static metric 100
192.168.1.0/24 dev ens33 proto kernel scope link src 192.168.1.10 metric 100
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
[root@Node01 ~]#

It'll probably work as long as you change the static IP configured on guest so that it is within the IP subnet used for the corresponding network/adapter.
As per the screenshot, for the NAT adapter it should be within 192.168.254.0/24 and does not conflict with any IP the host/hypervisor uses, such as but not necessarily and/or not necessarily limited to 192.168.254.1.
You may want to as well avoid the range VMWare uses for DHCP, if it uses only a specified range of addresses in the IP subnet for that, so that it won't conflict with other VMs that uses DHCP. (Consult the corresponding settings window for any potential details.)
(Note: what I mean is, obviously, if it does not use only a sub-range but the whole subnet as its DHCP pool, then you can only avoid DHCP on all VMs to avoid potential conflicts completely; but meh, you might not even run multiple VMs ever)
Make sure you correct the default gateway (i.e. nexthop of the default route) as well. It is likely but not necessarily 192.168.254.1. (Again try the setting window for any potential details.)
While VMware might or might not actually prevent you from using static IP for the  NAT adapter like Hyper-V does in some cases, it might be easier to just make the guest do DHCP instead, unless you have specific reason not to, and especially if what I've written above seem strange/unfamiliar to you.
As for the host-only adapter, it's unlikely that it would conflict with the NAT adapter because its DHCP server will probably not configure a default route on the adapter. ("Host-Only" really just means "VMware won't configure/assume more than a broadcast domain for you". You can totally set up IP forwarding, and optionally DNS forwarding and NAT on the host OS for traffics comes out of it. It's kind of a bad idea to equate it with anything like "isolation" or "security".) You can keep it if you have a reason to.
BUT, the real problem here is you need to distinguish the two adapter on the guest (well, unless you simply do DHCP for both), and I don't know if VMware provides a way for you to (e.g. by showing the MAC addresses on the setting pages).

@John No, the guest clearly shows that there are already two virtual NIC on the VM, and from (the similarity of) their MAC addresses, one can almost for sure tell that their are from VMware (instead of some virtual virtual one like virbr0 or USB whatsoever). Besides, everything is grayed on the setting window not because of the FUD you are spreading, but the the fact that the OP hasn't requested admin privilege yet. (The message is clearly shown on the window and there's the infamous UAC-shield-style button next to it.) No idea what downvote you are talking about.

@John Not only the guest CLI screenshot, even the first one shows that two NIC has been added (one NAT, one Host-Only).

@John Btw, what I was talking about was whether you can "distinguish" them in the guest (aka tell which is which), not whether you can have two (the screenshots already shows everyone you can; somehow you can't see it though), no idea why you are quoting that at all

@John No idea what you are talking about. Never said anything remotely related.
