How to implement a network infrastructure with DHCP + DNS + Web

Windows Server 2016

why? why? Why enter in a browser www.baidu.comto access Baidu search, and enter pan.baidu.comto access Baidu network disk, it is how to achieve?


Principle Introduction

In Internetpassing between the computer ipaccess address. When we PCconnect to the Internet, the upstream DHCPserver will give PCan ipaddress, it will also tell DNSthe server ipaddress when accessing www.baidu.comthe time, PCwill www.baidu.comsend the URL to the DNSserver, then DNSthe server will query it to the webserver ipreturns the address to PCthe last by accessing the ipaccess to the address webserver to obtain the site content.


Introduction experiment

By using VMware Workstationsimulated environment above, build three servers, respectively DHCP, DNS, Webserver, system Windows Server 2016, and then use a Win10client to verify results.


He began to experiment

Virtual Machine Information

It is set to all network host only mode and closed DHCP.

server configuration

Setting the host name and IP address

  • DHCP-SERVER:192.168.100.11
  • DNS-SERVER:192.168.100.12
  • WEB-SERVER:192.168.100.13
  • WIN-CLIENT: Automatically obtain ip address

Service Configuration

First add roles and features required within Server Manager, and then open the corresponding service manager perform service configuration.

Web server configuration

  • Server Manager → Management → Add Roles and Features → installation Webservice

WEB1

  • Create a site required documents

WEB2

C:\Users\Administrator>cd ..\..

C:\>mkdir web\baidu\search web\baidu\pan

C:\>echo "<h1>This is baidu search !</h1>" > web\baidu\search\index.html

C:\>echo "<h1>This is baidu pan !</h1>" > web\baidu\pan\index.html
  • Start → WindowsAdministrative Tools → IIS 管理器→ Add Website

WEB3

  • Add site information

WEB4

WEB5

WebService configuration

Configuring DNS server

  • Server Manager → Management → Add Roles and Features → installation DNSservice

DNS01

  • Start → WindowsAdministrative Tools → DNS 管理器→ New forward lookup zone

DNS02

  • New Zone Wizard

DNS New Zone

  • In the region New Host

DNS09

DNS10

DNS11

  • New host record completion

DNS12

DNSService configuration

DHCP server configuration

  • Server Manager → Management → Add Roles and Features → installation DHCPservice

DNCP01

  • Start → WindowsAdministrative Tools → DHCP→ New IPv4Scope

DHCP02

  • New Scope Wizard

DHCP New Scope

DHCPService configuration


Results show

Open WIN-CLIENTClient to automatically obtain ipthe address, and then visit the site.

  • Automatically get ipaddress

HOST1

  • View all ipinformation

HOST2

ipconfig /renew         #重新获取ip地址

ipcomfig /all           #查看所有ip信息
  • Access resultswww.baidu.com

HOST3

  • Access resultspan.baidu.com

HOST4

Implementation uses a different host name to access different websites.

some thoughts

This is based on Windows Server, and later perhaps even write a Linuxversion.

Guess you like

Origin www.cnblogs.com/llife/p/11247709.html