Hostname not resolving to local IP address - networking

I am running a Windows 8 VM inside of vmware Fusion. It runs inside a Mac running OSX 10.10 (Yosemite). The VM has a computer name of "Proud". When I ping the VM from within itself, i.e. ping -a 192.168.0.138 I get a response like:
Pinging Proud [192.168.0.138] with 32 bytes of data:
Reply from 192.168.0.138: bytes=32 time<1ms TTL=128
However whenever I ping Proud from Yosemite, i.e. ping Proud I get a response like:
PING proud (199.101.28.130): 56 data bytes
64 bytes from 199.101.28.130: icmp_seq=0 ttl=46 time=418.646 ms
The VM is using bridged networking.
Why does Proud resolve to that IP address? It is not correct and means I am unable to use the hostname (a necessity) so that I can connect to it from the Mac.

First, test and check with IP_address typed for ping from OSX 10.10 <host> terminal, so as to be independent of any DNS-service, that is responsible for a hostname translation of your <hostname> to a pre-configured IP_adress
Second, You say bridged -- thus check, that the VM has the very same network-part of the IP_address ( boundary is given by non-zero bits in subnet-mask
Check details with ifconfig resp. ipconfig
-------------------------|-----------------------------|||--------|||.|||.|||.|||
VM/w8 connected to VMnet? has IP_address := 192.168.0.??? subnet ???.???.???.???
RM/OSX connected to VMnet? has IP_address := 192.168.0.??? subnet ???.???.???.???
EDIT#12014-08-20 15:30 [UTC+0000]:
-------------------------?-----------------------------???--------255.255.255.0
-------------------------|-----------------------------|||
Best to post PrintScreens from {OSX|w8} terminals {ping|ipconfig|ifconfig} and the setup of VMnet

This seems to be a 'feature' of Mac OS. If I attempt to ping any hostname it will return the ping from this IP address - even if the hostname is fictional. I do not know why OS X does this.

This is called DNS hijacking and is done by a lot of ISPs out there to redirect you on incomplete or wrong browser address inputs and show you these custom pages with advertisment 'Hey, we couldn't find your webpage Aple.com but maybe you look for Apple.com?'
Maybe this is whats happening here. Btw, ISPs break RFCs here.

You need to check on your own /etc/host file. See if you might have done any changes to this file, to indicate the machine "Proud" comes as 192.168.0.138 or x.x.x.130? Next thing to ensure (user3666197 is actually right), you need to check on ifconfig to check if you have any connection have the IP address pointing to x.x.x.130 or x.x.x.138.
Last but not least, is there any virtual appliance or instance running of "proud" which might have caused confusion as it is possible for any virtual appliance or instance to get a IP address from the same segment as well, hence having "two" machines on the network?
Hope this helps. Check on your WINS config too...

Related

How to determine IPv4 settings on unknown network?

If I connect a device via ethernet onto a switch, and do not receive an IP address via DHCP, how do I determine what the correct settings for that network should be, i.e. how do I choose a static IP address, subnet mask and gateway?
The specifics in my case are that I have an NVR with an 8 port POE switch that has 3 cameras plugged into it. I plugged my Windows 10 PC into the switch, expecting to be issued an IP address from the NVR via DHCP, but my PC was not given an IP. Perhaps the NVR assigns IPs via BOOTP? I want to get onto the network, probably by assigning a static IP that's not already used, then determine the IPs of the cameras so I can stream video from them directly using VLC.
Can I use tcpdump? There should be plenty of traffic from the cameras to the NVR.
how do I choose a static IP address, subnet mask and gateway?
The short answer - this should be done by your network administrator. If you are the network administrator - you should. But seems that you are connecting to the network you know nothing about.. Anyway here are some points that perhaps can help you.
There is a special thing called ARP Duplicate Address Detection (DAD). In Linux you can check if the particular IP is occupied in your broadcast segment with help of arping utility. From MAN page:
-D
Duplicate address detection mode (DAD). See RFC2131, 4.4.1.
Returns 0, if DAD succeeded i.e. no replies are received.
So if IP address is occupied you will see something like:
-bash-4.4# arping -D 10.0.99.99 -I eth0
ARPING 10.0.99.99 from 0.0.0.0 eth0
Unicast reply from 10.0.99.99 [DE:AD:BE:EF:00:8D] 1.274ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)
If this IP address is vacant, you'll see no responses. Read about ARP ping in Windows.
Also you can inspect the network through the tcpdump (to see some IP addressing info at least in broadcast packets), nmap and some other scanning utilities, but this topic is too broad (and at the same time it's well disclosed on the Internet). Btw you have to consider network architecture difficulties: vlan and so on.

Can ping IP but cannot ping hostname - intermittent problem

I tried searching for my answer on google and then just stackoverflow but clearly I am not using the right keywords.
Problem: I have two windows 10 laptops on my LAN, both wireless connections (if that matters). And the "main" laptop seems to have forgotten the "spare" laptops name. I could two days ago "ping SPARE" and it would work. Today MAIN cannot ping (or tracert) SPARE. And yes I did power down MAIN between the two sessions.
Addition clue: MAIN could not ping the IP of SPARE - until I had SPARE Ping MAIN. and THEN main knew how to ping the IP of spare
Does anyone out there recognize this situation? and can you help a programmer who's in over his head with networking details?
Thanks
Harry
When the computer can ping with the IP it means there is no connections errors between them , the problem is in the DNS server used by the comupters , DNS ( Domain Name System ) is the protocol used to translate the SPARE name to the PC's actual ip address .
You can ping another PC using both
host name and
ipaddress.
If you can not ping using both then please see solution provided by me on this link of stackoverflow.
However if you can ping using IP address but not by host name then there are other options to try as well like
create entry in host file (most common location of this file is C:\Windows\System32\drivers\etc\hosts)
execute command ipconfig /flushdns and ipconfig /registerdns on HP8 pc

Configuring Solaris 10 SPARC for internet ready connection

I have a Oracle SPARC server with Solaris SPARC 10 OS installed
I have a domestic router/modem box from my ISP in my house. I have a wifi extender in my room which has a RJ45 female socket for ethernet connection. The Wifi extender is configured properly to act as a bridge for machines to connect with my router/modem.
I have setup my NIC card in Solaris 10 with the following commands
dladm show-link
ifconfig e1000g0 plumb up
ifconfig 192.168.0.22 netmask 255.255.255.0 broadcast + up
I have put the IP address of 192.168.0.22 into the /etc/defaultrouter file and again the same IP address in /etc/hostname.e1000g0 file
Next I typed in 'init 6' to reboot Solaris 10.
Once Solaris 10 is up again I can successfully ping the address of 192.168.0.22. But my router obviously needs a password as it is a WPA protected domestic router. This means programs like WGET which needs an URL address to download data doesnt work ATM. Does anyone know what to do to complete the tasks of making my server internet ready. Thanks in advance for any help given to me
Regards
You do not put your Solaris IP address in /etc/defaultrouter
You put the address of the router, which must be in the local network of your Solaris box. It may end with .1 or .250--you need to find out (try ping). For example, in your case it may be 192.168.0.1. After that you also need to configure /etc/resolv.conf with your DNS servers.

gre tunnel issues - one sided communication

I have two machines:
Ubuntu 16.04 server VM (172.18.6.10)
Proxmox VE5 station (192.168.6.30)
they are communicating through a third machine that forwards packets between the two. I want to create a gre tunnel between the two machines and to do that and make it persistent I have edited the /etc/network/interfaces and added a gre interface and tunnel to be made on boot up as the following:
After they were created I have tried to ping one machine from the other to check connectivity, pinging the gre interface IP address (10.10.10.1 and 10.10.10.2). The issue is that when I ping the Proxmox machine from Ubuntu I get no feedback, but when I run tcpdump on gre1 on Porxmox I see that the packets are received and there is a ICMP reply outgoing:
When I run the ping the other way around and check it with tcpdump on the Ubuntu machine I get nothing. I understand that the issue is when packets leave Proxmox to Ubuntu via gre1 and get lost or blocked because Ubuntu can clearly send Proxmox packets but the reply never comes back. How can I fix this?
Check if you have packet forwarding enabled for the kernel of the 3rd machine that you user for the communication of the other 2 machines
Check /etc/sysctl.conf and see if you have this:
net.ipv4.ip_forward = 1
if it's commented (#) uncomment it, save the file and issue a:
sysctl -p
Then try again the pings...

Find MAC address through direct ethernet connection

I want to find the MAC address of a device. Example: Plug a network cable from my linux mashine to the target device, send some command, receive MAC.
The best solution I have now is to connect a router to the device, wait for it to give out a dhcp lease, connect to the router via ssh and read out the lease table.
I understand that dhcp servers wait for a request from the device and then give out a lease but I would like to actively send some request to the device and get the MAC from the answer directly.
The biggest problem seems to be that without running a dhcp server I can't communicate with the device. Can this be done through a lower layer? Maybe an ARP request?
Thanks!
Ping the other device first and the run the command
arp -a
You can see the MAC address of the device you just pinged.
If you don't know the MAC address of a device the only way to communicate with it is via some sort of broadcast. This implies that there is some software active on the host listening for such a broadcast that will reply. This is how hosts (using ARP) resolve MAC addresses on the local network from an IP address. ARP won't work for you unless you know the IP address.
If you just have a device with no protocol support you're stuck.
If you're using linux, there is wireshark (or the CLI version tshark):
sudo apt-get install tshark
sudo tshark -i eth0
You will see every packet your laptop or the attached device is sending over that ethernet interface. Assuming the device is powered on, you will probably see the MAC address you are looking for somewhere in all of the low level network protocol spew. If you aren't getting much spew, try re-plugging the ethernet cable. (Sorry; I came here looking for a better answer myself)
We solved this by listening for packets from the target mashine and extracting the mac address from the first packet we get.
Thanks for all the answers though!

Resources