Search results
Results from the WOW.Com Content Network
Then, if hostname is given (not NULL), a call to gethostbyname() resolves it, or otherwise the address 0.0.0.0 is used, if hints->ai_flags is set to AI_PASSIVE, and 127.0.0.1 otherwise. It allocated a new addrinfo structure filled with the appropriate sockaddr_in in one of these conditions and also adds the port retrieved at the beginning to it.
The name localhost is a commonly defined hostname for the loopback interface in most TCP/IP systems, resolving to the IP addresses 127.0.0.1 in IPv4 and ::1 for IPv6.As a top-level domain, the name has traditionally been defined statically in host DNS implementations with address records (A and AAAA) pointing to the same loopback addresses.
That means any packet sent to any of those addresses is looped back. The address 127.0.0.1 is the standard address for IPv4 loopback traffic; the rest are not supported by all operating systems. However, they can be used to set up multiple server applications on the host, all listening on the same port number.
The hosts file is one of several system facilities that assists in addressing network nodes in a computer network. It is a common part of an operating system's Internet Protocol (IP) implementation, and serves the function of translating human-friendly hostnames into numeric protocol addresses, called IP addresses, that identify and locate a host in an IP network.
Special address blocks Address block (CIDR) First address Last address Number of addresses Usage Purpose ::/128 :: :: 1 Software Unspecified address
RFC 1122 refers to 0.0.0.0 using the notation {0,0}. It prohibits this as a destination address in IPv4 and only allows it as a source address under specific circumstances. A host may use 0.0.0.0 as its own source address in IP when it has not yet been assigned an address, such as when sending the initial DHCPDISCOVER packet when using DHCP .
Loopback (also written loop-back) is the routing of electronic signals or digital data streams back to their source without intentional processing or modification.It is primarily a means of testing the communications infrastructure.
The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on Internet Protocol (IP) networks for automatically assigning IP addresses and other communication parameters to devices connected to the network using a client–server architecture.