Hi i'm look for why my ping command doesn't work when it had a dash in the name for example
Ping HIL-BO
Will get:
Ping request could not find host HIL-BO. Please check the name and try again.
But when i type
Net view
[backslash][backslash] HIL-BO is in the outputted text
why wont this work please help
/Screenshot/
You can not ping to a windows network name except it the same as the DNS entry for your computers IP-address. I'm not a windows user, but the following should work. Try
ipconfig /a
This should show you a list that contains your IP-address. I expect that, you have no DNS entry so you must use the xxx.xxx.xxx.xxx IP-address that will be shown by ipconfig.
ping xxx.xxx.xxx.xxx
(replace the xxx.xxx.xxx.xxx by the displayed address). If you ping the same machine try:
ping localhost
The ping command can only work if the ping service on the target machine is running and the firewall is opend for ICMPv4 protocol and ports.
Related
In MacOs I used the below command to get the machine local ip address
echo $(/usr/sbin/ipconfig getifaddr en0)
I can also set this IP address into a variable like this as well
export DISPLAY=$(/usr/sbin/ipconfig getifaddr en0)
Similarly like the above how can I get and set the ip address of Windows 10. If I execute ipconfig it prints many things but I need only the local ip address
To find your IP address on Windows 10, using the command prompt, you can use the following command, ipconfig/all and press Enter. Your IP Address will display along with other LAN details.
I made some research and can't find a solution, I'm starting to think this is not possible.
I'm running arp -a in my terminal and I'd like to get the hostnames of the LAN devices.
host x.x.x.x returns:
Host x.x.x.x.in-addr.arpa. not found: 3(NXDOMAIN)
nslookup x.x.x.x returns:
** server can't find x.x.x.x.in-addr.arpa: NXDOMAIN
Is there a way to do this?
arp -a does the reverse DNS by default on linux machines. On macOS I guess you will have to run nslookup on each entry returned by arp -a table.
I found a way thanks to #gordon-davisson who set me on the right path.
First I get the gateway IP with: route get default | grep gateway
Then for every LAN device I run: host LAN_IP Gateway_IP
This returns:
Using domain server:
Name: 192.168.x.x
Address: 192.168.x.x#x
Aliases:
x.x.168.192.in-addr.arpa domain name pointer LAN-host-name.
I parse the response to get the name displayed at the end.
Side note: it still doesn't display the LAN host-names with arp -a after that.
I want to add DNS remotely to a system and for that I am using PsExec tool and batch file as:
echo "Please enter new DNS Information"
set /p add_dns=Enter your DNS
netsh interface ipv4 add dnsservers "LAN" %add_dns%
pause
This works fine on the same system, but not for remote system: when I enter DNS 192.168.0.1 it is not taking the whole DNS. It shows this error:
**D:\test>set /p add_dns=Enter your DNS
Enter your DNS 192.0.0.1
D:\test>netsh interface ipv4 add dnsservers "LAN" 1
The parameter is incorrect.
'2.0.0.1' is not recognized as an internal or external command,
operable program or batch file.
D:\test>pause**
Any suggestion how to change DNS remotely by prompting for DNS address rather than entering manually in .bat file?
Working on a shell script that takes a machine name as an argument and then determines if the host is on the local network (same network as the machine that ran the script).
How can I get the IP address from the machine name? Once I get that I should be able to compare that IP with the local one to see if they're on the same subnet.
You can use nslookup (http://linux.die.net/man/1/nslookup), dig (http://linux.die.net/man/1/dig) or host (http://linux.die.net/man/1/host) command-line utilities.
For example, here is the result of running host for getting A-records for stackoverflow.com from DNS server:
$ host -tA stackoverflow.com
stackoverflow.com has address 69.59.197.21
What do you mean by local network? subnet or (windows) domain or within LAN?
You may also have a look at traceroute utility.
I have an app, on my iphone, which allows me to transfer songs too and from my linux desktop via ftp. The app indicates that the host address is 192.168.0.4 and the port to be used is 5021. I can connect fine to the device from filezilla but when I try to connect via the command line it fails with the error mentioned in the title.
The command i'm using is ftp 192.168.0.4:5021 but it fails. I'm totally stumped. When I search for help on the internet the answer is to simply do what I've done already.
Does anyone have an any idea on what to do?
The ftp command does not support the :5021 syntax for port numbers. Instead, there must be another way.
With some FTP clients, you can use a -P command line option:
ftp -P 5021 192.168.0.4
With others, you need to put the port number after the host address with a space:
ftp 192.168.0.4 5021
Use man ftp to see which yours supports.
add domain and ip to hosts file of you computer.