Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Domain name resolution of web website through DNS server

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Domain name resolution of web website through DNS server

Domain name system (Domain Name System referred to as DNS) is used to resolve domain names.

The function of the DNS server: to resolve the domain name entered by the web browser into a network-recognizable IP address, and then return the IP address to allow the web browser to connect to the web server through the IP address parsed by the DNS server

Experimental environment: in the Vmware virtual machine, the DNS,WEB is built through a server2016 server system, and the website is accessed in a client win10 system.

First, ensure the interworking between the server and the client.

1. Turn on the virtual machine and set the network of the two machines to host-only mode. As shown in figure 1, right-click in the lower right corner of the virtual machine to open the settings, select the network adapter, select host-only mode, and OK. To avoid virtual machine interference, we shut down the virtual machine by assigning an ip address to the local dhcp in figure 3.

Figure 1

Figure 2

Figure 3

2. Set the IP addresses of the two machines respectively. The preferred DNS address on the client is the IP address where you created the DNS server. Figure 1 service2016, figure 2 win10

3, from the CMD command prompt, type "ping 192.168.100.100" to see if the server and client can communicate with each other. The picture shows that we have achieved interoperability.

Second, create a DNS server

1. Open the server manager, add roles and functions, select the target server, add DNS service tools, and install according to the diagram.

2. Open DNS, right-click in the forward lookup domain to create a new zone, and follow the figure to create a new zone

3, we open the created yun.com, right-click the new host in the space, enter your full domain name, and the ip address of the target website. When parsing through the nslookup command on the client, we found that the parsing was successful.

Third, create a web website

1. As in creating DNS above, we create the web service tool, select the web server in the server role, and then install it in the next step.

2, we implement different IP on one server to implement different websites. First add a network card to the service2016 in the virtual machine and set it to host-only mode, and then restart your system. Set your second network card to an IP address.

3, we use the command to quickly create the site of the two yun,bigdata websites and write the content of the site.

4, open our web tool at the beginning, bind 192.168.100.100 to the IP in the first website, set our yun network path in the basic settings, and then set 192.168.100.110 and bigdata network paths in the basic settings after adding the second website.

5, at this time, we use the client IE browser to enter the IP of these two websites, and we can successfully access the two websites

6. How about we use the same IP and different ports to access? Select the target website bigdata in the web tool, click bind, select the same IP address as yun, and change the port to port 8080. How to access a different port of IP, enter 192.168.100.100 8080 and add the port after the ip address.

7, the same IP/ port, different hostname to access? We still have to click bind on the target URL in the web tool to set the same IP/ port and a different hostname. After setting up, we also need to create a bigdata resolution lookup zone in DNS before we can access different hostnames (refer to the above operation). After the creation is completed, we can access it through different hostnames on the client!

Fourth, create a DHCP

In the above, we first set the ip address of the client, how to achieve the above experiment by automatically obtaining the IP address? At this point, we can do this through the DHCP service.

1. We open the server manager, add roles and functions, and choose to add DHCP services for installation.

2, after the installation is complete, we open DHCP in the management tool, right-click in IPV4 to create a new scope, and follow the steps to enter the name, IP address range, the important thing is that you need to configure your DNS address, according to the figure to complete the configuration.

3. In the network settings of the client, we set the IP address we set to obtain the IP address automatically, then press and hold win+r to enter cmd to enter the command prompt, and enter ipconfig / renew to refresh the configuration. We can see that we have been able to obtain the IP address automatically through DHCP (such as the client changed in the network change setter above), and then enter the hostname to visit the target website. We can still visit the target website, and the experiment is successful!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report