In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Overview of separation and resolution:
The domain name server for separation and resolution is actually the main domain name server. The separation and resolution here mainly refers to providing different domain name resolution records according to different clients. When clients from different addresses request to resolve the same domain name, they provide them with different resolution results.
Experimental topology diagram and environment:
Environment: a Linux serves as a gateway
A win7 client in the WAN (12.0.0.12 Universe 24)
A win10 client in the LAN (192.168.100.1)
(1) Linux needs two network cards as a gateway service, so we need to add an additional network card.
1. Install the dns server in Linux in NAT mode first
[root@localhost ~] # yum install bind-y
2 add a new network card to win7 Linux and set both network cards to host-only mode, and also set the clients of Linux and Linux to host-only mode.
(2) set the network card as a gateway
1. Set the network card ens33 as the gateway of the LAN
[root@localhost ~] # vim / etc/sysconfig/network-scripts/ifcfg-ens33 Edit Nic configuration
2. Copy a copy of the configuration file of the ens33 network card as the configuration file of ens36, and configure it as the gateway information of the WAN
[root@localhost ~] # cd / etc/sysconfig/network-scripts/ switch to the network card configuration file directory [root@localhost network-scripts] # cp-p ifcfg-ens33 ifcfg-ens36 copy a configuration file as the configuration file for ens36 [root@localhost network-scripts] # vim ifcfg-ens36 edit configuration file [root@localhost network-scripts] # systemctl restart network restart the network card
(3) set the ip addresses of win7 and win10, and test whether they can connect with the gateway.
1. Configure the IP address and gateway and resolution address of win7, and test whether the gateway of Linux can be connected.
2. Configure the IP address and gateway and resolution address of win10, and test whether the gateway of Linux can be connected.
(4) set DNS parsing service profile
1. Enter the global profile settings / etc/named.conf
[root@localhost ~] # vim / etc/named.conf
2. Enter the zone profile settings / etc/named.rfc.zones
[root@localhost ~] # vim / etc/named.rfc1912.zonesview "lan" {match-clients {192.168.100.0 zone 24;}; zone "kgc.com" IN {type master; file "kgc.com.lan";}; zone "." IN {delete the root configuration under the / etc/named.conf global configuration file, copy and paste it into the local configuration type hint; file "named.ca";}; view "van" {WAN parsing match-clients {12.0.0.0amp 24;} Zone "kgc.com" IN {type master; file "kgc.com.van";};}
3. Enter the data configuration file to configure domain name resolution
[root@localhost ~] # cd / var/named switch to the named directory under var [root@localhost named] # cp-p named.localhost kgc.com.lan copy a template as the kgc.com.lan data configuration file [root@localhost named] # vim kgc.com.lan configuration data configuration file
[root@localhost named] # cp-p kgc.com.lan kgc.com.van copy a data configuration file of lan and configure it as [root@localhost named] # vim kgc.com.van of van
4. Turn off the firewall and enable the dns service
[root@localhost named] # systemctl stop firewalld.service disable firewall [root@localhost named] # setenforce 0 [root@localhost named] # systemctl start named enable dns service [root@localhost named] # systemctl status named to view the status of dns service
(5) use win7 and win10 machines to resolve the same domain name
1Jing Win7 opens cmd and uses nslookup to resolve domain names
2Jing Win10 opens cmd and uses nslookup to resolve domain names
Resolve different IP addresses according to the same domain name
The experiment was successful
Thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.