Skip to main content

· 11 Minutes to read
Allen Ma

Article Introduction

A long vernacular article on URLs, URLs, IP addresses, domain names, DNS, and domain name resolution.

Form of preparation: QA

Background knowledge

All data on the Internet is stored on hosts (servers)

All hosts on the Internet have a unique IP address

Any two hosts on the Internet communicate by IP address

Having understood the above, let's take the simplest way for two hosts to communicate - surfing the Internet - as an example to illustrate what this query is all about.

Everyone in the 21st century should be familiar with the process of surfing the Internet (I don't know if anyone still uses this term). The essence of our Internet access is to obtain the data on the host corresponding to the URL and display it on the user's host (on the browser), so we should wonder one question.

How can any two hosts on the Internet communicate by IP address, and how can we find each other's hosts and fetch its data when we are surfing the Internet only by typing in the URL, not the IP address?

Therefore, there must be some mechanism that resolves the URL into an IP address and then communicates via IP address! This mechanism is also the thread that runs through all the technical knowledge in this article!

Translated with www.DeepL.com/Translator (free version)

Website

What is a web address?

A URL, also called a domain name, or URL, is a name used by Internet users to identify a host, which is unique, hierarchical, and literally can indicate the host's account number, function, nature, and the region or organization to which it belongs, making it easy for all Internet users to remember and use!

URL, or Uniform Resource Locator, is used to indicate the server of an Internet host and the location of a specific web page. The composition strategy and examples of URLs are as follows.

Translated with www.DeepL.com/Translator (free version)

在这里插入图片描述

在这里插入图片描述

What problem has the advent of URLs solved?

The emergence of the URL/domain name/URL solved two problems.

Problem 1: IP addresses are a uniform addressing method for all hosts in the Internet. Using IP addresses enables direct access to host data and resources on the Internet, but because IP addresses are just a string of data, they have no practical meaning, making them very difficult for all Internet users to remember.

Problem 2: In the Internet architecture, almost all application layer software does not access host resources in the Internet through IP addresses, but requires the user to enter a host name with some meaning to access the corresponding host.

The structural composition of a web address

The name of a host, i.e. a web address/domain name, follows certain rules, which are set by the Internet's "name authority", the Domain Name System (DNS), and are described here.

The domain name of a host in the Internet is composed of all levels of domain names and their own names (i.e. composed of sub-domains), with levels increasing from left to right, the rightmost being the top-level domain, the leftmost being the host's own name, and all levels of sub-domains separated by ".". The common format is as follows.

www.ustc.edu.cn Hostname. Organisation name. Network name. Top level domain name

Translated with www.DeepL.com/Translator (free version)

DNS Domain Name System

What is DNS?

DNS, fully written in English as Domain Name System, means Domain Name System in Chinese, is a distributed database that provides mapping of domain names and IP addresses to each other in the Internet.

History of DNS development

  1. In the ARPANE era, around 1969-1983, host.txt was used to record computer names and their IP addresses.
  2. 1983, the Domain Name System is born, from which DNS is derived. 3.1985 Symbolics registers the first .com domain name. 4.1993 NetworkSolution (NSI) exclusively represented the .COM, .ORG and .NET international top-level domain registrations. 5.1994NSI began charging a registration fee of US$100 per domain name. 6.1997 All 3-letter domain names were registered. 7.1998 Administration of Interner domain names was transferred from the US government to a private organisation. 8.2001 7 new TLDs are created at the ICANN conference.
  3. 2013 4 letter .com domains were written off.

What problem has DNS solved?

Before the DNS was created (during the ARPANET era), each host on the Internet used a file to record all host names and their IP addresses, this file was hosts.txt (nowadays it is a hosts file without a suffix), and all hosts had to update this file periodically from the appropriate site, which was used to synchronise the addition, change and disappearance of hosts in the Internet.

As you can imagine, as the number of hosts on the Internet increased, the hosts file was bound to get larger and larger, making it even more difficult to maintain and update, and host names conflicted more frequently.

DNS Domain Name Hierarchy

The DNS is a hierarchical tree structure, with each layer consisting of domains, which have the following meanings.

A domain represents a region, a range

Each domain can hold a large number of hosts

Each host must have its own domain, but not necessarily its own domain address

The DNS standard specifies that a single domain name is generally 63 characters or less in length, with a maximum of 255 characters

The DNS standard states that the characters in a domain name are limited to 26 letters (not case sensitive), numbers, and the hyphen "-" (which cannot be used as the first and last letters of a sub-domain)

The server where the domain name is located is called a domain name server and is mainly used to map domain names to IP addresses (see later)

The DNS domain name tree consists of a root domain, a top-level domain, a second-level domain and its subdomains, the structure of which is illustrated with examples as follows.

在这里插入图片描述 The following describes each level of domain in turn.

Root domain

Administered by the Internet Network Information Centre (InterNIC) and denoted by the dot "." It is the highest level domain in the Domain Name System and the standard domain name should contain the root "." at the end. The standard domain name should contain the root domain "." at the end of the domain name, but in practice the root domain is omitted, so the common web address does not have a "." at the end. This is the reason why you can find common web addresses without "." at the end.

Top-Level Domains (Top-Level Domains = TLD)

A subordinate domain to the root domain, it is the next level of domain after the root domain and is made up of country top-level domains (ccTLDs) and generic top-level domains (gTLDs). There are 243 ccTLDs (i.e. the total number of countries and territories in the world), while the number of gTLDs, also known as international domain names, is increasing as the Internet grows, theoretically reaching an infinite number. The following table lists the common gTLDs.

在这里插入图片描述

secondary domain

Unique names officially registered for use by organisations and individuals, such as Amazon, IBM, the words "amazon" "ibm" "microsoft" in Microsoft's official website (headers cannot carry URLs) " are the second level domains registered by these companies.

Sub-domains below the second level

Organisations in the second level domain can be further sub-domains as required, e.g. sale sub-domains for sales departments, business sub-domains for business departments, etc.

As mentioned earlier, domain names were created to solve the problem of memory difficulties for users. In practice, domain names are not used for communication between hosts in the Internet, but still require IP addresses for data interaction, so the DNS system is more useful in providing domain name functionality while efficiently mapping domain names to the IP addresses of corresponding hosts. This is the role of the Domain Name Servers that we are about to introduce to you.

Domain Name Servers

Domain name servers form a distributed network system in the DNS, whose function is to provide mutual resolution and mapping of domain names and IP addresses for internal and external hosts. Domain name servers are distributed throughout the subnets of the Internet. Each domain name server is responsible for managing all hosts connected to this subnet and providing services to them, with services such as

The client application sends the target host domain name to the domain name server of the subnet to which it belongs, and the domain name server returns the corresponding IP address of the target host to the client; if the domain name server in the subnet is unable to query the IP of the target host domain name, it provides further query services according to the standard IP address resolution process of DNS, which will be described in detail in " This process is described in detail in the "Domain Name Resolution Process" section below.

Domain Name Resolution Process

The most important unit involved in the domain name resolution process is the domain name server, which has the following architecture.

在这里插入图片描述

Root Domain Name Servers

It is the highest level and most important domain name server in the world. There are 13 (IPv4 root name servers, numbered A to M) in the world, 1 primary and 9 secondary root servers in the United States, 2 secondary root servers in Europe, located in the UK and Sweden, and 1 secondary root server in Asia, located in Japan. The root name servers only record the domain names and their IP addresses of their subordinate top-level name servers, and when a lower-level name server encounters a domain name that it cannot resolve, it first turns to the root name server for help.

Top Level Domain Name Servers

The same level as the top-level domain, used to record all second-level domain names registered on this top-level name server and to provide DNS lookup services.

Permissioned Name Servers

Provides DNS lookup service for hosts in a zone. If the lookup result is null, the requesting DNS user is notified which permissioned name server to go to for further queries.

Local Domain Name Servers

Not part of the DNS server system shown above, but plays an important role in domain name resolution. Every DNS domain name lookup request from a host is first sent to a local name server. Local name servers can be set up in a variety of locations such as individuals, universities, companies, etc. Also known as Preferred DNS (familiar, right?), this is the preferred DNS for our computer network connections: the 在这里插入图片描述 在这里插入图片描述 The above diagram takes the user's access to the headline website as an example and briefly describes the whole process from the user entering the URL to obtaining an IP address, and we will explain the process in detail below.

The user turns on the computer and enters the headline web address into the browser and the computer initiates a domain name resolution request to the local DNS server. Local DNS servers are usually provided by Internet Service Providers (ISPs), such as the three major carriers.

After receiving the DNS request, the local DNS server will first check whether the IP address corresponding to the headline domain name exists in its own cache record, and if so, it will directly transmit the IP address back to the user's computer; otherwise, it will further request help from the root DNS server.

Since the root name server will only record the 13 top-level domain name servers under it, and will not directly record the domain name to IP mapping relationship, upon receiving a resolution request from the local name server, the root name server will inform the local server: "The domain name you are requesting is managed by the .com top-level domain name server with the IP xxx ".

The local DNS server further initiates a domain name resolution request to the .com top-level name server. Since the .com name server also does not record the mapping of the domain name to the IP, it tells the requestor to look up the domain server to which the domain belongs and gives its IP address.

The local DNS server continues to initiate a headline domain name resolution request to the domain server and will then get the IP address corresponding to the headline domain name. At this point, the local DNS server will not only return the IP address to the user's computer, but also add a record of the headline domain name and its IP in its own cache, thus speeding up the resolution of the IP corresponding to the headline domain name for other computers.

· 5 Minutes to read
Allen Ma

Preface

I'm sure few of you are like me After buying a new computer or reinstalling a system The excitement is overwhelming You can't help but want to give your new baby a name that is unique in the world Unfortunately What we call elation is merely a mechanism by which the brain persuades us to work hard over a period of time to get something in return This reward makes us feel good (love comes hard) But it slips away Leaving us in front of the computer with the "indescribable" username QAQ

Translated with www.DeepL.com/Translator (free version) 在这里插入图片描述

Main article

In order to solve the mistakes I had made, I asked for help from various bigwigs on the Internet, but my disciples were foolish and made many mistakes, so I am recording them here to avoid the pitfalls for those who have the same needs.、

Methods

To change your username in ==win10 non-home edition== in ==cmd==.

When we register our original account the Win10 system will create a new account for us and we can see a familiar name under the path C:\Users (the one you've dreamed of changing). 在这里插入图片描述

OK, now we have found the source. I then tried right clicking on the original name folder and looking for the "Rename" option. If you have tried this as I did, unfortunately, it doesn't work. The system doesn't seem to want to give you the chance to correct your mistake, "rename" doesn't exist.

When in trouble, Ollie gives! Find out why! As we are logged in with this username, the system has triggered this protection mechanism to avoid confusion. At this point we need a new user to do this for us, for the following reasons.

I think it can be simplified to a classic basket problem. There are two baskets, basket A with ball 1 and basket B with ball 2. Now we want to swap the balls in these two baskets. Step 1: Take a new empty basket C. Step 2: Move ball 1 into basket C. Step 3: Move ball 2 into basket C. Step 3: Move ball 2 into the empty basket A. Finally, move ball 1 into basket B.

Translated with www.DeepL.com/Translator (free version)

So, we need a third party account first. This is why it's ==win10 non-home edition==, as far as I know this edition doesn't have local users and groups as a feature, sigh of relief.

The first step is to find a new account, the user-friendly Win gives us some built in, such as Administrator which I intend to use, but these accounts are disabled by default and we need to enable them manually. The Administrator account is enabled by Right click on This PC, then find Manage and click on it, find Local Users and Groups, click on Users and Administrator in turn, check its properties, a small box will appear, you can see that the account has been disabled that is ticked, remove this tick, click OK, you can choose to use Administrator login is now available.

Translated with www.DeepL.com/Translator (free version) 在这里插入图片描述

Log out of your current account, this can be done via Logout in Start.

在这里插入图片描述 After logging out, choose to log in using Administrator on the next boot, log in and go to the path: C:\Users Right click again on the username you want to change and you will be surprised to find Rename appear! Then change it to the name of your choice. (Since I changed it, I won't demonstrate) 在这里插入图片描述

Then go back to the desktop, press win+R to bring up the Run window, type regedit to search to open the Registry Editor, then in the search box, type

    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersio\ProfileList

Find the longest package in the ProfileList folder, then right-click on one of the ProfileImagePath and select Modify, as shown in the image

在这里插入图片描述

Then in the edit string change the name to the renamed one on the C drive to be sure.

在这里插入图片描述 Finally, switch back to our old account, log out of Administrator and then boot up and choose to log into our own account.

To view the results in cmd. 在这里插入图片描述

P.S.

After changing the username, the environment variables and system variables we set before need to be updated manually, otherwise the program will not respond or the file will not open. Please be sure to pay attention!!!