Link to home
Start Free TrialLog in
Avatar of linuxperson
linuxpersonFlag for Canada

asked on

not able to ping gateway from VM

I am able to ping gateway 192.168.10.1 but when i tried to ping from my linux VM i am unable to ping?

Here is my vSwitch settings. I am using portgroup named "VM" for linux VM.



~ # esxcfg-vswitch -l
Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks
vSwitch0         1536        5           128               1500    vmnic1

  PortGroup Name        VLAN ID  Used Ports  Uplinks
  VM Network            0        1           vmnic1
  Management Network    0        1           vmnic1

Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks
vSwitch1         1536        5           128               1500    vmnic0

  PortGroup Name        VLAN ID  Used Ports  Uplinks
  VM                    10       2           vmnic0
Avatar of linuxperson
linuxperson
Flag of Canada image

ASKER

~ # ping 192.168.10.1
PING 192.168.10.1 (192.168.10.1): 56 data bytes
64 bytes from 192.168.10.1: icmp_seq=0 ttl=255 time=3.929 ms
64 bytes from 192.168.10.1: icmp_seq=1 ttl=255 time=5.655 ms
64 bytes from 192.168.10.1: icmp_seq=2 ttl=255 time=3.684 ms

--- 192.168.10.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 3.684/4.423/5.655 ms
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Firewall disabled ?

VMware Tools installed ?

VMXNET3 interface in use ?

Both VMs are using the same virtual machine network ?

can your VMs ping the host ?
can your VMs ping the host ?  No

My VM is using 192.168.10.0/24 network.
what is the host IP Address ?

Can you answer the other questions I asked, thanks.
Firewall disabled ? yes


VMware Tools installed ? No. I am installing now.

VMXNET3 interface in use ? yes

Both VMs are using the same virtual machine network ? I am building another VM now as you want me to check this part.

can your VMs ping the host ? No
Can your VMs ping anything ?

Do you have any other VMs ?
I have two VMs.

one is Linux and another one is Windows.

Both are connected to VLAN10.
I am able to ping between each other but I can't ping the gateway 192.168.10.1
windows - 192.168.10.20
linux - 192.168.10.15
Here is my switch configuration for VLAN 10

interface FastEthernet0/1
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1,10,1002-1005
 switchport mode trunk
 spanning-tree portfast
!

Here is router configuration

Router#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/0                192.168.1.2     YES manual up                    up
Ethernet0/0.10             192.168.10.1    YES manual up                    up
Serial0/0                  unassigned      YES unset  administratively down down
Ethernet0/1                192.168.2.254   YES manual up                    up
Serial0/1                  unassigned      YES unset  administratively down down
is the host on VLAN 10 ?

is the hosts IP Address - 192.168.10.x ?

is the default gateway IP Address 192.168.10.1 on VLAN 10

can your ESXi Host, ping the default gateway ?
Here is the Host configuration:

NIC0 is connected to Trunk port, (vSwitch1)

Port group associated to vSwitch1 with VLAN 10.

Please see attached configuration pictures.
Network1.PNG
ESXi-Configuration.png
is the host on VLAN 10 ? No

is the hosts IP Address - 192.168.10.x ? No

is the default gateway IP Address 192.168.10.1 on VLAN 10
YES

can your ESXi Host, ping the default gateway ?
YES
~ # esxcfg-route -l
VMkernel Routes:
Network          Netmask          Gateway          Interface
192.168.2.0      255.255.255.0    Local Subnet     vmk0
default          0.0.0.0          192.168.2.254    vmk0
so which is the default gateway

 192.168.2.254

or

192.168.10.1

So if the ESXi host can ping 192.168.10.1, it must be going through another router.

if VLAN 10 is native to 192.168.10.1,

Routing Config or VLAN10 network is incorrect.
Hi

I did reconfigure everything on the cisco switch.

VLAN 10 - carries ESXi Management Traffic

VLAN 20 - Windows

VLAN 40 - unix

works now.

keeping ESXi host on VLAN1 native VLAN created issue.
ASKER CERTIFIED SOLUTION
Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks.

i created separate VLAN and now its ok.