赛派号

最受欢迎的男士护肤品排名第一 localhost

Standard hostname for a networked device's loopback interface

For the domain name label, see .localhost. This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: "Localhost" – news · newspapers · books · scholar · JSTOR (June 2020) (Learn how and when to remove this message) Part of a series onNetwork science Theory Graph Complex network Contagion Small-world Scale-free Community structure Percolation Evolution Controllability Graph drawing Social capital Link analysis Optimization Reciprocity Closure Homophily Transitivity Preferential attachment Balance theory Network effect Social influence Network types Informational (computing) Telecommunication Transport Social Scientific collaboration Biological Artificial neural Interdependent Semantic Spatial Dependency Flow on-Chip Graphs Features Clique Component Cut Cycle Data structure Edge Loop Neighborhood Path Vertex Adjacency list / matrix Incidence list / matrix Types Bipartite Complete Directed Hyper Labeled Multi Random Weighted MetricsAlgorithms Centrality Degree Motif Clustering Degree distribution Assortativity Distance Modularity Efficiency Models Topology Random graph Erdős–Rényi Barabási–Albert Bianconi–Barabási Fitness model Watts–Strogatz Exponential random (ERGM) Random geometric (RGG) Hyperbolic (HGN) Hierarchical Stochastic block Blockmodeling Maximum entropy Soft configuration LFR Benchmark Dynamics Boolean network agent based Epidemic/SIR ListsCategories Topics Software Network scientists Category:Network theory Category:Graph theory vte Operating systems Common features Process management Interrupts Memory management File system Device drivers Networking Security Input/output vte

In computer networking, localhost is a hostname that refers to the current computer used to access it. The name localhost is reserved for loopback purposes.[1] It is used to access the network services that are running on the host via the loopback network interface. Using the loopback interface bypasses any local network interface hardware.

Loopback Main article: Loopback

The local loopback mechanism may be used to run a network service on a host without requiring a physical network interface, or without making the service accessible from the networks the computer may be connected to. For example, a locally installed website may be accessed from a Web browser by the URL http://localhost to display its home page.

IPv4 network standards reserve the entire address block 127.0.0.0/8 (more than 16 million addresses) for loopback purposes.[2] 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. In the IPv6 addressing architecture[3] there is only a single address assigned for loopback: ::1. The standard precludes the assignment of that address to any physical interface, as well as its use as the source or destination address in any packet sent to remote hosts.

Name resolution

The name localhost normally resolves to the IPv4 loopback address 127.0.0.1, and to the IPv6 loopback address ::1.

This resolution is normally configured by the following lines in the operating system's hosts file:

127.0.0.1 localhost ::1 localhost

The name may also be resolved by Domain Name System (DNS) servers, but there are special considerations[1] governing the use of this name:

An IPv4 or IPv6 address query for the name localhost must always resolve to the respective loopback address. Applications may resolve the name to a loopback address themselves, or pass it to the local name resolver mechanisms. When a name resolver receives an address (A or AAAA) query for localhost, it should return the appropriate loopback addresses, and negative responses for any other requested record types. Queries for localhost should not be sent to caching name servers. To oid burdening the Domain Name System root servers with traffic, caching name servers should never request name server records for localhost, or forward resolution to authoritative name servers. When authoritative name servers receive queries for 'localhost' in spite of the provisions mentioned above, they should resolve them appropriately.

In addition to the mapping of localhost to the loopback addresses (127.0.0.1 and ::1), localhost may also be mapped to other IPv4 (loopback) addresses and it is also possible to assign other, or additional, names to any loopback address. The mapping of localhost to addresses other than the designated loopback address range in the hosts file or in DNS is not guaranteed to he the desired effect, as applications may map the name internally.

In the Domain Name System, the name .localhost is reserved as a top-level domain name, originally set aside to oid confusion with the hostname localhost.[4] Domain name registrars are precluded from delegating domain names in the top-level .localhost domain.[1]

Historical notes

In 1981, the block 127.0.0.0/8 got a 'reserved' status,[5] as not to assign it as a general purpose class A IP network. This block was officially assigned for loopback purposes in 1986.[6] Its purpose as a Special Use IPv4 Address block was confirmed in 1994,[7], 2002[8], 2010,[9], and last in 2013.[2]

From the outset, in 1995, the single IPv6 loopback address ::1 was defined.[10] Its purpose and definition was unchanged in 1998,[11], 2003,[12], and up to the current definition, in 2006.[3]

Packet processing

The processing of any packet sent to a loopback address, is implemented in the link layer of the TCP/IP stack. Such packets are never passed to any network interface controller (NIC) or hardware device driver and must not appear outside of a computing system, or be routed by any router. This permits software testing and local services, even in the absence of any hardware network interfaces.

Looped-back packets are distinguished from any other packets trersing the TCP/IP stack only by the special IP address they were addressed to. Thus, the services that ultimately receive them respond according to the specified destination. For example, an HTTP service could route packets addressed to 127.0.0.99:80 and 127.0.0.100:80 to different Web servers, or to a single server that returns different web pages. To simplify such testing, the hosts file may be configured to provide appropriate names for each address.

Packets received on a non-loopback interface with a loopback source or destination address must be dropped. Such packets are sometimes referred to as Martian packets.[13] As with any other bogus packets, they may be malicious and any problems they might cause can be oided by applying bogon filtering.

Special cases

The releases of the MySQL database differentiate between the use of the hostname localhost and the use of the addresses 127.0.0.1 and ::1.[14] When using localhost as the destination in a client connector interface of an application, the MySQL application programming interface connects to the database using a Unix domain socket, while a TCP connection via the loopback interface requires the direct use of the explicit address.

One notable exception to the use of the 127.0.0.0/8 addresses is their use in Multiprotocol Label Switching (MPLS) traceroute error detection, in which their property of not being routable provides a convenient means to oid delivery of faulty packets to end users.

See also Private network Reserved IP addresses 0.0.0.0 References ^ a b c S. Cheshire; M. Krochmal (February 2013). Special-Use Domain Names. Internet Engineering Task Force. doi:10.17487/RFC6761. ISSN 2070-1721. RFC 6761. Proposed Standard. Updates RFC 1918 and 2606. ^ a b M. Cotton; L. Vegoda; B. Haberman (April 2013). R. Bonica (ed.). Special-Purpose IP Address Registries. Internet Engineering Task Force. doi:10.17487/RFC6890. ISSN 2070-1721. BCP 153. RFC 6890. Best Current Practice 153. Obsoletes RFC 4773, 5156, 5735 and 5736. Updated by RFC 8190. ^ a b R. Hinden; S. Deering (February 2006). IP Version 6 Addressing Architecture. Network Working Group. doi:10.17487/RFC4291. RFC 4291. Draft Standard. Obsoletes RFC 3513. Updated by RFC 5952, 6052, 7136, 7346, 7371 and 8064. ^ D. Eastlake; A. Panitz (June 1999). Reserved Top Level DNS Names. Network Working Group. doi:10.17487/RFC2606. BCP 32. RFC 2606. Best Current Practice 32. Updated by RFC 6761. ^ J. Postel (September 1981). ASSIGNED NUMBERS. Network Working Group. doi:10.17487/RFC0790. RFC 790. Obsolete. Obsoleted by RFC 820. Obsoletes RFC 776, 770, 762, 758, 755, 750, 739, 604, 503, 433 and 349.Obsoletes IENs: 127, 117, 93. ^ J. Reynolds; J. Postel (November 1986). ASSIGNED NUMBERS. Network Working Group. doi:10.17487/RFC0990. RFC 990. Obsolete. Obsoleted by RFC 1010. Obsoletes RFC 960. Obsoletes IENs 127, 117, and 93. ^ J. Reynolds; J. Postel (October 1994). ASSIGNED NUMBERS. Network Working Group. doi:10.17487/RFC1700. STD 2. RFC 1700. Obsolete. Obsoleted by RFC 3232. Obsoletes RFC 1340, 1060, 1010, 990, 960, 943, 923, 900, 870, 820, 790, 776, 770, 762, 758, 755, 750, 739 604, 503, 433 and 349. Obsoletes IENs: 127, 117, 93. ^ IANA (September 2002). Special-Use IPv4 Addresses. Network Working Group. doi:10.17487/RFC3330. RFC 3330. Obsolete. Obsoleted by RFC 5735. ^ M. Cotton; L. Vegoda (January 2010). Special Use IPv4 Addresses. Internet Engineering Task Force. doi:10.17487/RFC5735. ISSN 2070-1721. BCP 153. RFC 5735. Obsolete. Obsoleted by RFC 6890. ^ R. Hinden; S. Deering (December 1995). IP Version 6 Addressing Architecture. Network Working Group. doi:10.17487/RFC1884. RFC 1884. Obsolete. Obsoleted by RFC 2373. ^ R. Hinden; S. Deering (July 1998). IP Version 6 Addressing Architecture. Network Working Group. doi:10.17487/RFC2373. RFC 2373. Obsolete. Obsoleted by RFC 3513. Obsoletes RFC 1884. ^ R. Hinden; S. Deering (April 2003). IP Version 6 Addressing Architecture. Network Working Group. doi:10.17487/RFC3513. RFC 3513. Obsolete. Obsoletes RFC 2373. Obsoleted by RFC 4291. ^ Raymond, Eric S. "The Jargon File". ^ "MySQL :: MySQL 5.5 Reference Manual :: 4.1 Overview of MySQL Programs". vteOperating systemsGeneral Comparison Forensic engineering History List Timeline Usage share User features comparison Variants Disk operating system Distributed operating system Embedded operating system Hobbyist operating system Just enough operating system Mobile operating system Network operating system Object-oriented operating system Real-time operating system Supercomputer operating system KernelArchitectures Exokernel Hybrid Microkernel Monolithic Multikernel vkernel Rump kernel Unikernel Components Device driver Loadable kernel module User space and kernel space Process managementConcepts Computer multitasking (Cooperative, Preemptive) Context switch Interrupt IPC Process Process control block Real-time Thread Time-sharing Schedulingalgorithms Fixed-priority preemptive Multilevel feedback queue Round-robin Shortest job next Memory management,resource protection Bus error General protection fault Memory paging Memory protection Protection ring Segmentation fault Virtual memory Storage access,file systems Boot loader Defragmentation Device file File attribute Inode Journal Partition Virtual file system Virtual tape library Supporting concepts API Computer network HAL Live CD Live USB Shell CLI User interface PXE vteComputer scienceNote: This template roughly follows the 2012 ACM Computing Classification System.Hardware Printed circuit board Peripheral Integrated circuit Very-large-scale integration System on a chip (SoC) Energy consumption (green computing) Electronic design automation Hardware acceleration Processor Size / Form Computer systems organization Computer architecture Computational complexity Dependability Embedded system Real-time computing Cyber-physical system Fault tolerance Wireless sensor network Networks Network architecture Network protocol Network components Network scheduler Network performance evaluation Network service Software organization Interpreter Middleware Virtual machine Operating system Software quality Software notations and tools Programming paradigm Programming language Compiler Domain-specific language Modeling language Software framework Integrated development environment Software configuration management Software library Software repository Software development Control flow Software development process Requirements analysis Software design Software construction Software deployment Software engineering Software maintenance Programming team Open-source model Theory of computation Model of computation Stochastic Formal language Automata theory Computability theory Computational complexity theory Logic Semantics Algorithms Algorithm design Analysis of algorithms Algorithmic efficiency Randomized algorithm Computational geometry Mathematics of computing Discrete mathematics Probability Statistics Mathematical software Information theory Mathematical analysis Numerical analysis Theoretical computer science Computational problem Information systems Database management system Information storage systems Enterprise information system Social information systems Geographic information system Decision support system Process control system Multimedia information system Data mining Digital library Computing platform Digital marketing World Wide Web Information retrieval Security Cryptography Formal methods Security hacker Security services Intrusion detection system Hardware security Network security Information security Application security Human-centered computing Interaction design Augmented reality Virtual reality Social computing Ubiquitous computing Visualization Accessibility Human–computer interaction Mobile computing Concurrency Concurrent computing Parallel computing Distributed computing Multithreading Multiprocessing Artificial intelligence Natural language processing Knowledge representation and reasoning Computer vision Automated planning and scheduling Search methodology Control method Philosophy of artificial intelligence Distributed artificial intelligence Machine learning Supervised learning Unsupervised learning Reinforcement learning Multi-task learning Cross-validation Graphics Animation Rendering Photograph manipulation Graphics processing unit Image compression Solid modeling Applied computing Quantum computing E-commerce Enterprise software Computational mathematics Computational physics Computational chemistry Computational biology Computational social science Computational engineering Differentiable computing Computational healthcare Digital art Electronic publishing Cyberwarfare Electronic voting Video games Word processing Operations research Educational technology Document management Specialized Platform Development Thermodynamic computing Category Outline Glossaries

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至lsinopec@gmail.com举报,一经查实,本站将立刻删除。

上一篇 没有了

下一篇没有了