Ping does not work in case of VM or Wireshark log capture open - virtual-machine

Trying to ping from target to Test PC ( windows having Virtual Linux Machine)
Ping works smoothly when:
1. VM ubuntu is not turned off
or
2. Wireshark is not capturing LAN where actual connect is made
This is applicable for IP4 and IP6 ping.
Here VM is configured for Bridged network (same LAN configured in VM)
If I disable LAN ( bridged n/w), then ping works from target
Wireshark if capture lets say WLAN, then ping works from target
I had a suspect on the gateway, subnet but the same setup work in absence of VM + Wireshark
Above things shows if same NIC is used by additional utilities e.g. Wireshark or VM, there are certain communication problem causing ARP or NDP to fail.
I have heard of such congestion failure.
Now I wish to know is this specific behavior of PC, PC configuration (e.g. regedit) or something wrong from the target.
Target is a linux based system.
Error mesaage:
icmp_seq=1 Destination unreachable: Address unreachable

Try to play with 'promiscous mode' on network card at machine where wireshark is running.

Related

UDP Packets Lost (Ubuntu 18.04 into Windows 10)

I am trying to send UDP packets from Linux machine (Ubuntu 18.04 ) to a windows 10 machine. But the packets are not received at the Windows machine. I have already send UDP packets from Windows 10 to Linux machine and was successful. I have wireshark installed on both machines to debug. Pings are working from Linux to Windows as well.
The udp packets from Linux machine seems to be send as per Wireshark. However the wireshark on windows machine shows nothing regarding UDP packets from Linux machine. I have added inbound rules for the port on Windows machine, but still the issue persists. I have tried using different port numbers as well. Kindly let me know if there is anything missing from my end
The problem was due to active Symantec End Point Protection. So created an exception rule for the respective Sender IP address and everything works fine

Windows Server 2019 - VMs on Hyper-V cant get network

I have some trouble with my windows server 2019 running Hyper-V, for the background my windows server run on an ESXI infra.
It is impossible for me to get any internet access nor domain access on my Hyper-V virtual machine, this is how my host configuration look like
Host network
For me all look good, but when I turn on my virtual machine this is what I get
VMs network
VMs ping
I can see the machine getting a IP from my DHCP server, but it is impossible for me to ping any of the gateway, DNS.
My DHCP
This is how my virtual switch look like
vSwitch Hyper-V
And if needed my Ipconfig of my Windows server Hyper-V host
Hyper-V host network
I think that i have now tried everything I could, I don't see why my machine can get a DHCP IP, but can't communicate with any of my server.
I already have a topic posted on SpiceWorks (https://community.spiceworks.com/topic/2326264-hyper-v-wont-provide-internet-access-on-my-virtual-machine?page=1#entry-9231547), the last answer suggested that the problem came from my vSwitch on Hyper-V, but even after recreating a new one I can't get anything.
If you have any idea that can help me to achieve my configuration even the slightest one I'll gladly take it.
First thing I would like to ask, you are doing a Double Nested Virtualization, meaning: [ESXi] is the BareMetal Hypervisor, then inside of this Host you have at least 2 VMs, one name "SRVPARDC001" & the Hyper-V VM named "TESTHYPERV" , and inside this last one you have another VM called "VDI-Master" , if this is correct, you are asking:
*Why is VDI-Master, not getting internet, when SRVPARDC001 has leased an IP address ( 192.168.1.118) ?
My question is, why does the ipconfig output for VDI-Master show IP 192.168.1.121 , which per your DHCP, should be leased to the Desktop
Would it be possible to use a different subnet for the Virtual Switch inside the Hyper-V , to eliminate routing/dhcp issues?
My impression is that there is an issue on how the virtual switch is configured on the TESTHYPERV vm, since that virtual switch should be allowing the traffic upstream to the ESXi host and then out via your gateway/router/firewall device.

Wireless network causes virtual machines to be inaccessible by outside world

I currently have two Ubuntu 14.04 virtual machines running on a windows 7 host. The virtual machines are configured to use a bridged network adapter.
When the host machine is hardlined to the internet, the virtual machines are able to ping the outside world as well as be ping by the outside world.
When the host machine is on a wireless network, the virtual machines cannot ping the outside world, and the outside world is not able to ping the virtual machines.
When connected to a wireless network, I receive the 'Destination host unreachable' error when pinging either from the virtual machines to outside, or from outside to the virtual machines.
It may be worth noting that these virtual machines are being run inside VirtualBox. Also something which may be applicable here, section 6.5 of the virtualbox manual states:
Bridging to a wireless interface is done differently from bridging to
a wired interface, because most wireless adapters do not support
promiscuous mode. All traffic has to use the MAC address of the host's
wireless adapter, and therefore VirtualBox needs to replace the source
MAC address in the Ethernet header of an outgoing packet to make sure
the reply will be sent to the host interface. When VirtualBox sees an
incoming packet with a destination IP address that belongs to one of
the virtual machine adapters it replaces the destination MAC address
in the Ethernet header with the VM adapter's MAC address and passes it
on. VirtualBox examines ARP and DHCP packets in order to learn the IP
addresses of virtual machines.
I'm not sure what may be causing this issue. Accessing these virtual machines from the outside world when switching between networks is necessary in my situation. Any ideas as to what may be going on?
Thanks in advance for any help!
Just to provide some value to those who may stumble upon this issue in the future:
The source of this problem stems from a setting within virtualbox. Open virtualbox, and under the Settings > Network > Adapter page, there is a name field.
If attempting to connect to the virtual machines over a wired connection, select your host machines Ethernet adapter.
If attempting to connect to the virtual machines over a wireless connection, select your host machine's wireless adapter.
Hope this helps someone out there!

Cannot do Vagrant ssh after Vagrant up on windows Machine

I am building a sample vagrant box to install Jenkins and push it to atlas cloud.Please find below the steps that I followed.
Vagrant init ubuntu/trusty64
and the normal command to initialize the vagrant machine.
vagrant up
After this if i type command to ssh into the machine
vagrant ssh
It gives me error saying please increase timeout and so.
The main question is how can I ssh into the newly created vagrant machine.
To understand this, I have to go through all the basics. Please find below my findings.
Not attached
In this mode, VirtualBox reports to the guest that a network card is present, but that there is no connection -- as if no
Ethernet cable was plugged into the card. This way it is possible to "pull" the virtual Ethernet cable and disrupt the connection, which can be useful to inform a guest operating system that no network connection is available and enforce a reconfiguration.
Network Address Translation (NAT)
If all you want is to browse the Web, download files and view e-mail inside the guest, then this
default mode should be sufficient for you, and you can safely skip the rest of this section. Please note that there are certain limitations when using Windows file sharing (see Section 6.3.3, “NAT limitations” for details).
NAT Network
The NAT network is a new NAT flavour introduced in VirtualBox latest versions.
Bridged networking
This is for more advanced networking needs such as network simulations and running servers
in a guest. When enabled, VirtualBox connects to one of your installed network cards and exchanges network packets directly, circumventing your host operating system's network stack.
Internal networking
This can be used to create a different kind of software-based network which is visible to selected virtual machines, but not to applications running on the host or to the outside world.
Host-only networking
This can be used to create a network containing the host and a set of virtual machines, without the need for the host's physical network interface. Instead, a virtual network interface (similar to a loopback interface) is created on the host, providing connectivity among virtual machines and the host.
Generic networking
Rarely used modes share the same generic network interface, by allowing the user to select a driver which can be included with VirtualBox or be distributed in an extension pack.
At the moment there are potentially two available sub-modes:
UDP Tunnel
This can be used to interconnect virtual machines running on different hosts directly, easily and transparently, over existing network infrastructure.
VDE (Virtual Distributed Ethernet) networking
This option can be used to connect to a Virtual Distributed Ethernet switch on a Linux or a FreeBSD host. At the moment this needs compiling VirtualBox from sources, as the Oracle packages do not include it.
Out of these, only NAT and Host-only network is important.So, to solve this issue, I modified the predefined Vagrant file with the following code.
jenkins.vm.provider "virtualbox" do |vb|
jenkins.vm.network "private_network",ip:'192.168.56.5',:adapter => 2
jenkins.vm.hostname = 'jenkins.ci'
vb.name = "Jenkins"
end
Here, I have created a private network with static Ip and also, I specified the adapters count to use 2. The Private adapter is Host-only adapter and 1st adapter which is default one is NAT.

How to scan network for devices, using C Obj C or Swift

I have a server running on a Raspberry Pi and a client running on my Mac and iPhone (soon Apple Watch). I would like to connect to my server automatically without finding the Raspberry pi's Ip-address.
Is there a way to lookup all the devices on the network, and select by Mac-address, name or something else? I know that the first 3 bytes of the mac-address is the same for all Pies. (B8:27:EB) Maby i can use that information.
I have been looking for a solution for this issue a while but i can't seem to find one.
Zeroconf (aka Bonjour)
IMO, the best way to do this is to have your Raspberry Pi advertise itself on the network using Zeroconf (aka. Bonjour).
On the Raspberry Pi, install avahi-daemon and configure it to advertise whichever service you'd like to connect to connect to, for example, if you're connecting via SSH, you'll need to do something like this.
In Cocoa, you can use NSNetServiceBrowser to find the advertised service.
Possible MAC Address solution
Alternatively, if Avahi-daemon is not an option, you may be able to use the MAC address. I will not go into the specifics in Objective-C, just a high-level overview using the command-line.
In terminal, type ping 255.255.255.255. You will get back ping packets from every device on the local network. For each IP address, send an individual ping e.g. ping -c 1 192.168.x.x. Then, type arp -a. You will see the MAC address for each IP on the local network. From here, you can perhaps use your MAC address filter to find Raspberry Pis.
Why does this work? Well, the first command ping 255.255.255.255 sends a ping in an IP packet to the 'broadcast' address, which means all machines on the local network respond. When you ping the individual IP addresses, the low-level networking stack uses ARP to find the MAC address of the IP to directly send a ping to it. In doing so, the ARP tables on the local machine are updated with the cached values.
Maybe you can use this method in your app to discover local Raspberry Pis.