ipv4 address vs localhost - tcp

if our system IP address acts as a local host, then what does this definition indicates for IP address of localhost - "127.0. 0.1 is the loopback Internet protocol (IP) address also referred to as the localhost"

Within a network every device has it's own ip address. The ip address of a device is for every device different and May change (DHCP).
The hostname loclalhost respectively the ip address 127.0.0.1 points always on the current device.
For example If you are using a laptop and ping from that laptop to 127.0.01 it will resolve to the device the ping is send from thus the laptop itself.
If you ping from a server, it will resolve to the device the ping is send from thus the server.

Related

Accessing connected devices to a local network wirelessly

Hello Everyone!
I want to know that is there any way to access a photocopier machine which is connected to a computer through Ethernet wire and that computer is connected to my WiFi network?
P.S: What if I don't know the IP assigned to that Photocopier machine?
If the wireless network is part of the wired network you should have any problem reaching the photocopier.
If you don't know the IP address, you can reach it by host name if the DHCP and DNS are working properly. If you are on an Active Directory infrastructure and DHCP and DNS are integrated it should be transparent.
If you are on your home with a "home" router they usually do the hostname to IP resolve (DNS).
You can nslookup hostname in your machine to see if your dns is resolving the ip address. you can also ping hostname or ping ip address to test that you can reach the desired host. Some hosts block ping (ICMP) requests, please note that ping is ping does not respond is not a definitive solution.
Please note that in your home router you should use your router or default gateway to be the DNS also, and then add the google public DNS or your ISP.
Also when connecting the access point to an existing network you may have 2 DHCP servers providing IP addresses to hosts, you should disable DHCP on the Access Point and connect the AP to the network using the switch port and not the WAN port (the WAN port will try to do NAT and assign a different set of IP addresses).

How to get all IP Address and device details which is connected with that IP Address from different subnet?

I want extract all IP Address and device details(Mac address,Device Name,DNS whatever possible) which is connected with that IP Address for different subnet not only for local subnet. So, is there any command, library for JAVA or Open source API?
Other solution than nmap
"Connected" as in with a socket to the local system?
IP addresses: system or application connection table (netstat et al)
DNS name: reverse DNS (PTR)
Device name: there's no standard for querying, device names are dependent on application protocol
MAC address:
for local segment IPs: local ARP table
for remote IPs: need to ask the router, there's no local way
If you mean "connected to the network" you'll need an ARP scan for the local segment (try to resolve each IP address and see if a MAC is returned) and for the remote segment, there's just a ping sweep (where you won't see device not answering to ICMP echo requests or where the response is filtered in between).

Wrong IP from DHCP server on wifi

I've determined that the DHCP range of my access point is 192.165.. but when I connect with my Ralink wireless card to the Access Point it receives an IP address of 169.254.178.92.
What is going wrong with the connection process?
169.254.*.* is a Local-Link Address. It is a pseudo-random IP address assigned by the OS when it is unable to obtain an IP address via DHCP on the network. This allows for an unconfigured network to still allow communication between devices because each devices picks a random address and then broadcasts to find out what other devices are also on the local network segment.
In short, something is wrong with the DHCP server on your network such that it is not serving addresses to your wireless clients.

Server or router assigns ip address

Im new to networking,If I have a window server and in that server I have a normal soho router, will that server assign the ip address to each device? or will that router do it. What I've learned is that the server is suppose to be the DHCP but sometimes if you plug a router directly in the server it kicks the server off and the router starts to assign the ip address. If that is so, how would you fix that?
Most routers will take on the role of a DHCP Server out-of-the-box. That is, they will distribute ip addresses to whatever DHCP Client requests an address.
By default, a Windows server will not have set up a fully configured DHCP Server.
By default a Windows machine (either client or server) and most other networked devices will have set their network interface to be a DHCP Client.
Therefore, by simply plugging in your Windows server to one of your router's LAN ports will make the router set the Windows server's network interface to the next available ip address using DHCP.
If you were to connect more devices to the router's LAN ports it will still be the router that assigns those extra devices an ip address.
Ideally you want only one DHCP server in your network.
Also, if you want your Windows server to always have the same ip address you can do two things:
Log in to the router and set a fixed ip address for your Windows server network card's unique MAC address.
Modify the router's DHCP range (e.g. from .10 to .200) so it leaves some addresses free (e.g. .1 to .9 and from .201 to .254). Then set your Windows server network card's fixed IPV4 address to a fixed address (e.g. .210). You may also need to set a DNS server then.
This is only briefly skimming the subject of IPV4 networks, DHCP and friends so when you have some time try to read the wikipedia pages for them.
http://en.wikipedia.org/wiki/IPv4
http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol
Server assigns your public IP address, in fact it assigns your router a public IP address.
While the router assigns each device connected a local IP address.
With respect to your router, the IP address server assigns it is its IPv4 address and the addresses router assigns to its clients are IPv6 address.
When you browse the internet through your router, the router reads your requests and responds according to that IPv6 address and when the router requests something to the server, server sees it as its IPv4 address. :)

ARP header data in a Two machine network

I connected two machines via a network cable. I need to get an ARP request data via Wireshark. When I pinged the IP of the other machine, I get the ARP request on Wireshark. But, it is not broadcasting a message. It targets pinged IP address directly. I think a LAN with only two machines does not need to do a broadcast. Am I right? Can any one explain this to me?
Always in ARP packet, MAC address will be broadcast not IP. As it is used to learn MAC address of other host whose IP address is known, ARP packet needs to have valid IP address rather than broadcast IP. You can check ARP packet example at below path:
http://wiki.wireshark.org/AddressResolutionProtocol
Hope this clears your doubt.

Resources