I am setting up a development server in my flat. I have set up an Ubuntu DNS server on it and have added the zone weddinglist (just weddinglist - no TLD. It's just an internal domain.)
This works fine on my Ubuntu laptop.
On all my Windows PCs (Vista and XP) I get the following from the command prompt:
C:\Users\Giles Roadnight>nslookup weddinglist
Server: UnKnown
Address: 192.168.0.40
Name: weddinglist
Address: 192.168.0.41
C:\Users\Giles Roadnight>ping 192.168.0.41
Pinging 192.168.0.41 with 32 bytes of data:
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.0.41:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Users\Giles Roadnight>ping weddinglist
Ping request could not find host weddinglist. Please check the name and try again.
My ipconfig:
C:\Users\Giles Roadnight>ipconfig -all
Windows IP Configuration
Host Name . . . . . . . . . . . . : Giles-Desktop
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Marvell Yukon 88E8001/8003/8010 PCI Gigabit Ethernet Controller
Physical Address. . . . . . . . . : **-**-**-**-**-**
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::f179:680f:f313:5448%8(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.0.5(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.40
NetBIOS over Tcpip. . . . . . . . : Enabled
I am pretty sure that I have the DNS set up OK as the nslookup is OK but I can't ping and I can't access webpages at weddinglist.
How can I make ping work for the Windows PCs?
It's possible that the Windows internal resolver is adding '.local' to the domain name because there's no dots in it. nslookup wouldn't do that.
To verify this possiblity, install 'Wireshark' (previously aka Ethereal) on your client machine and observe any DNS request packets leaving it when you run the ping command.
OK, further investigation on my own XP machine at home reveals that for single label names (i.e. "foo", or "foo.") the system doesn't use DNS at all, and instead uses NBNS (NetBios Name Service).
Using a hint found at http://www.chicagotech.net/netforums/viewtopic.php?t=1476, I found that I was able to force DNS lookups for single label domains by putting a single entry reading "." in the "Append these DNS
suffixes (in order)" in the "Advanced TCP/IP settings" dialog
I had this problem occasionally when using a multi-label name ie test.internal
The solution for me was to stop/start the dnscache on my windows 7 machine. Open a console as administrator and type
net stop dnscache
net start dnscache
then sigh and look for a way to get a Mac as your principal desktop.
I have the same issue with IIS running on my home server, on the client machine a command like ipconfig /flushdns usually solves the problem.
I had the same issue.
As pointed out by other answers ping and nslookup use different mechanisms to lookup an ip.
Chances are you are trying to ping a machine not on the same domain. When you ping the fully qualified name of the server this should then work.
nslookup works:
PS C:\Users\Administrator> nslookup nuget
Server: ad-01.docs.com
Address: 192.168.10.20
Name: nuget.docs.com
Address: 192.168.10.17
Ping fails:
PS C:\Users\Administrator> ping nuget
Ping request could not find host nuget. Please check the name and try again.
Ping works, using FQDN:
PS C:\Users\Administrator> ping nuget.docs.com
Pinging nuget.docs.com [192.168.70.17] with 32 bytes of data:
Reply from 192.168.10.17: bytes=32 time=1ms TTL=127
Reply from 192.168.10.17: bytes=32 time=2ms TTL=127
Reply from 192.168.10.17: bytes=32 time=2ms TTL=127
Reply from 192.168.10.17: bytes=32 time=2ms TTL=127
Ping statistics for 192.168.10.17:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms
To fix this you will need to alter the DNS setting for the machine and add the DNS suffix to lookup.
Control Panel\Network and Internet\Network Connections
Network adapter -> properties
IPV4 -> Properties
General tab -> Advanced
DNS Tab
Select "Append these DNS suffixes (in order)"
Add the required domain names
Disable, then enable your network adapter (don't do this on a VM, you'll loose your connection, instead try 'ipconfig /renew')
I think this behavior can be turned off, but Window's online help wasn't extremely clear:
If you disable NetBIOS over TCP/IP,
you cannot use broadcast-based NetBIOS
name resolution to resolve computer
names to IP addresses for computers on
the same network segment. If your
computers are on the same network
segment, and NetBIOS over TCP/IP is
disabled, you must install a DNS
server and either have the computers
register with DNS (or manually
configure DNS records) or configure
entries in the local Hosts file for
each computer.
In Windows XP, there is a checkbox:
Advanced TCP/IP Settings
[ ] Enable LMHOSTS lookup
There is also a book that covers this at length, "Networking Personal Computers with TCP/IP: Building TCP/IP Networks (old O'Reilly book)". Unfortunately, I cannot look it up because I disposed of my copy a while ago.
Do you have an entry for weddinglist in your hosts file? You can find this in:
C:\WINDOWS\system32\drivers\etc
nslookup always uses DNS whereas ping uses other methods for finding hostnames as well.
I found a little bug in windows Server 2003 R2 EE.
you know that when you specify your IP address in the NIC (network connections), windows tells you that if you dont specify the preferred DNS server, it will put his own ip because it is an DNS server? well it doesn't do that...
I fixed my problem writing the dns adress manually, instead of letting windows do it for me.
Try ipconfig /displaydns and look for weddinglist. If it's cached as "name does not exist" (possibly because of a previous intermittent failed lookup), you can flush the cache with ipconfig /flushdns.
nslookup doesn't use the cache, but rather queries the DNS server directly.
It worked for me..
from https://superuser.com/a/507892
If you can ping the FQDN, look at how DNS devolution is set up the PC.
Winsock API which MS ping will automatically use the FQDN of the client PC if append primary and connection specific DNS suffix is checked in TCP/IP advanced DNS settings. If the host is in another domain, the client must perform DNS devolution.
Under XP TCP/IP advanced properties DNS, make sure append parent suffixes is checked so that the ping request traverses the domain back to the parent.
I think the problem can be because of the NAT. Normally the DNS clients make requests via UDP. But when the DNS server is behind the NAT the UDP requests will not work.
I know it's not your specific problem, but I faced the same symptoms when I configured a static IP address in the network adapter settings and forgot to enter a "Default Gateway".
Leaving the field blank, the network icon shows an Internet connection, and I could ping internal servers but not external ones, so I assumed it was a DNS problem. NSLookup still worked, but of course, ping failed to find the server (again, seemed like a DNS issue.) Anyway, one more thing to check. =P
FYI - I have been struggling with this issue for the past 3 hours. tried everything, flushing DNS, using a proxy, resetting catalog using netsh and clearing the routes. nothing worked so i decided to give windows restore a try, I did it using a windows cd -> repair -> system restore and it worked ! couldnt find any solutions online so i figured id post it
I also encountered this issue. No Windows application (except Chrome) could access the internet. I found it was a duplicate IP on the LAN. I changed the local IP, and everything, including ping, started working again.
I found the problem doing an
IPCONFIG /ALL
and it listed
IPv4 Address. . . . . . . . . . . : 10.10.0.20(Duplicate)
I also had this problem on a Server 2012 R2 VM joined to my local AD domain. I eventually solved the problem by taking the VM off the domain and re-joining it.
Related
Using Vagrant, I am running a Ubuntu box with PHP-FPM and Xdebug 2 in Hyper-V. The network I am using is Hyper-V's default switch.
From my host, I can connect to the Ubuntu box using SSH and the web server is also accessible using the VM's IP address in my browser address bar. From inside the VM, I can access the internet and I can also ping the host by the IP address of the Hyper-V default switch. So the network seems to be set up correctly.
However, the Xdebug debugger running in the VM won't connect to my IDE (PhpStorm) running on my host.
The xdebug.log shows (172.17.96.1 is the IP address of the Hyper-V default switch)
[2641] Log opened at 2022-09-15 12:59:46
[2641] I: Checking remote connect back address.
[2641] I: Checking header 'HTTP_X_FORWARDED_FOR'.
[2641] I: Checking header 'REMOTE_ADDR'.
[2641] I: Remote address found, connecting to 172.17.96.1:9000.
[2645] E: Time-out connecting to client (Waited: 200 ms). :-(
[2645] Log closed at 2022-09-15 12:59:46
even though PhpStorm on my host seems to be listening on every IP address:
PS C:\Users\me> netstat -a
Active Connections
Proto Local Address Foreign Address State
...
TCP 0.0.0.0:9000 MyLaptop:0 LISTENING
TCP 0.0.0.0:9003 MyLaptop:0 LISTENING
...
If I use telnet in the VM to connect to my host, it doesn't timeout, but it also doesn't connect successfully:
vagrant#ubuntu-18:~$ telnet 172.17.96.1 9000
Trying 172.17.96.1...
It stays at "Trying" forever.
How can I make the Xdebug debugger connect from the VM to PhpStorm on my host?
Edit to include interfaces of my host and of my guest
ipconfig on my host
I shortened my IPv6 address on the WiFi adapter
PS C:\WINDOWS\system32> ipconfig
Windows IP Configuration
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::84b9:f362:fa7f:ae2d%13
IPv4 Address. . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Unknown adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 1:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 10:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter WiFi:
Connection-specific DNS Suffix . : speedport.ip
IPv6 Address. . . . . . . . . . . : 2003:**********
Temporary IPv6 Address. . . . . . : 2003:**********
Link-local IPv6 Address . . . . . : fe80::bc1a:df06:b465:974b%24
IPv4 Address. . . . . . . . . . . : 192.168.2.200
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::1%24
192.168.2.1
Ethernet adapter Bluetooth Network Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter vEthernet (Default Switch):
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::99ae:3e6e:68bc:a228%30
IPv4 Address. . . . . . . . . . . : 172.17.96.1
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
Ethernet adapter vEthernet (WSL):
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::41c8:f5fb:fbd4:3bef%60
IPv4 Address. . . . . . . . . . . : 172.19.32.1
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
Interface config in the VM
vagrant#ubuntu-18:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.111.24 netmask 255.255.240.0 broadcast 172.17.111.255
inet6 fe80::215:5dff:fe38:101 prefixlen 64 scopeid 0x20<link>
ether 00:15:5d:38:01:01 txqueuelen 1000 (Ethernet)
RX packets 651 bytes 102218 (102.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 757 bytes 118391 (118.3 KB)
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 90 bytes 7020 (7.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 90 bytes 7020 (7.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Pinging the default switch IP from inside the VM
vagrant#ubuntu-18:~$ ping 172.17.96.1
PING 172.17.96.1 (172.17.96.1) 56(84) bytes of data.
64 bytes from 172.17.96.1: icmp_seq=1 ttl=128 time=0.294 ms
64 bytes from 172.17.96.1: icmp_seq=2 ttl=128 time=0.527 ms
64 bytes from 172.17.96.1: icmp_seq=3 ttl=128 time=0.366 ms
64 bytes from 172.17.96.1: icmp_seq=4 ttl=128 time=0.526 ms
64 bytes from 172.17.96.1: icmp_seq=5 ttl=128 time=0.704 ms
64 bytes from 172.17.96.1: icmp_seq=6 ttl=128 time=0.375 ms
^C
--- 172.17.96.1 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5125ms
rtt min/avg/max/mdev = 0.294/0.465/0.704/0.137 ms
I am running a Ubuntu box with PHP-FPM and Xdebug 2
Xdebug 2 is no longer supported, please upgrade to Xdebug 3.
The xdebug.log shows (172.17.96.1 is the IP address of the Hyper-V default switch)
That is not true, it shows the IP address from where the HTTP request initiated from, because you have remote IP address discovery turned on. This does not work in all situations, especially with virtualisation. This HTTP address is not necessarily an IP address that the Linux guest can talk to on the host.
You will likely need to use the public IP address of your host, which is 192.168.2.200 for xdebug.remote_host:
Wireless LAN adapter WiFi:
Connection-specific DNS Suffix . : speedport.ip
…
IPv4 Address. . . . . . . . . . . : 192.168.2.200
And also disable the auto discovery.
Im trying to use my laptop as a monitor, keyboard and mouse for my Rasbperry pi 3. I have connected via Remote Desktop Connection several times. But now it is showing error. I've used Advanced IP Scanner for finding Rpi's IP address. But the address shown against raspberrypi.mshome.net is not working and this name has two to three ip addresses. Following is the output of the command ipconfig:
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::ac0c:bc0f:9eb1:d1b%4
IPv4 Address. . . . . . . . . . . : 192.168.1.127
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::a5d0:981a:2f49:ca41%3
Autoconfiguration IPv4 Address. . : 169.254.202.65
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
I've read somewhere that making the subnet mask and IP same for both my laptop and Rpi will work but I don't know how to do it. Please help.
You should use VNC if you want to manage it from your computer. You have to connect to Raspberry Pi with integrated RealVNC, but before you connect it you have to open the settings.
If you connect the cable with RaspBerry, you should assign a static ip:
Example:
cmdline.txt
ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
... rootwait ip=192.168.1.200::192.168.1.1:255.255.255.0:rpi:eth0:off ...
next step; You will connect Putty via ssh and enable VNC.
you type ssh raspi-config raspberry pi open settings window, then enter interfacing settings and enable VNC
then install realvnc or something software your pc and write your pi ip for connecting.
this page tells you how: Connect Raspbbery pi VNC VNC Connect
Example cmdline.txt:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
with these variables, the value of the ethernet port must be the same
ip=192.168.5.200::192.168.5.1:255.255.255.0:rpi:eth0:off
for example :
Ethernet Adapter:
Ip Address: 192.168.5.1
Network Address: 255.255.255.0
cmdline.txt updated version:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait ip=192.168.5.200::192.168.5.1:255.255.255.0:rpi:eth0:off
then create a file and ssh the name and then insert this file into your boot/ folder
then insert the memory card into the raspberry and start it up. After 4 to 5 seconds after raspberry is turned on, connect to raspberry with putty.
The address you will connect to is cmdline.txt The ip address you wrote to 192.168.5.200
connection diagram
When I configure my Windows Server Core with Sconfig it's working well and get an IP from my DHCP server.
But it's not working with PowerShell. I'm using this command:
Set-NetIPInterface -InterfaceAlias "Ethernet 2" -Dhcp Enabled
ipconfig result:
Ethernet adapter Ethernet 2:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::e432:65ae:f7a7:c350%4
Default Gateway . . . . . . . . . :
I apologize if this is a simplistic question, I am not familiar with this kind of thing.
I am trying to determine my proxy server ip and port number in order to use a google calendar syncing program. I downloaded the proxy.pac file using google chrome. The last line reads:
return "PROXY proxyhost:1081";
I believe that means the port number is 1081, but for the proxy server, I was expecting something with the format "proxy.example.com" Any advice?
Thank you
Are you using the Windows operating system?
You can press Win+R, input "cmd" in the run box, you will get the "command Prompt", then input the following command and press Enter.
command 1
ipconfig /all | find /i "Dns Suffix"
it will show something like this.
Primary Dns Suffix . . . . . . . : xxx.xxx.xxx
command 2
ping proxyhost
it will show something like this.
Pinging proxyhost.xxx.xxx.xxx [yyy.yyy.yyy.yyy] with 32 bytes of data:
Reply from yyy.yyy.yyy.yyy: bytes=32 time=1ms TTL=60
Then maybe "proxyhost.xxx.xxx.xxx" is what you want.
Enter the following into windows commandline
netsh winhttp show proxy
It will return
Current WinHTTP proxy settings:
Proxy Servers(s) : your.proxy.address.com:port
I have a url to a site and I vaguely remember there being a Windows console command that you can use to find the IP address of the server the site is deployed to. Can someone remind me? Also, can you tell me how to use it?
if you ping the server using the Windows command prompt, it will gives you the server IP.
ex.: ping www.google.com
C:\Users\Deleu>ping www.google.com
Pinging www.l.google.com [177.99.189.241] with 32 bytes of data:
Reply from 177.99.189.241: bytes=32 time=34ms TTL=58
Reply from 177.99.189.241: bytes=32 time=36ms TTL=58
Reply from 177.99.189.241: bytes=32 time=38ms TTL=58
Reply from 177.99.189.241: bytes=32 time=38ms TTL=58
Ping statistics for 177.99.189.241:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 34ms, Maximum = 38ms, Average = 36ms
C:\Users\Deleu>
You need nslookup.
Nslookup.exe is a command-line administrative tool for testing and
troubleshooting DNS servers. This tool is installed along with the
TCP/IP protocol through Control Panel. This article includes several
tips for using Nslookup.exe.
c:\Temp>nslookup google.com
Server: BoB.Orcon
Address: 10.1.1.1 <------ Name server
Non-authoritative answer:
Name: google.com
Addresses: 2404:6800:4006:804::1004 <----- Answer in ipv6
74.125.237.128 <----- Answer in ipv4
74.125.237.137 <----- Other answers....
74.125.237.134 .
74.125.237.132 .
74.125.237.135 .
74.125.237.133 etc
74.125.237.136 .
74.125.237.142 .
74.125.237.130 .
74.125.237.131 .
74.125.237.129