1.sw2为二层交换机,分别有vlan10,vlan20,vlan100 三个vlan,f1/1-3是接入链路,f1/0为中继链路。
2.sw1为三层交换机,分别为三个vlan提供网关,vlan10:192.168.10.1/24、vlan20:192.168.20.1/24、vlan100:192.168.100.1/24,外网接口为f1/1:12.0.0.1/24
3.局域网内部Linux服务器搭建dhcp服务功能为vlan10,vlan20及vlan100提供地址,地址范围:
Vlan10:192.168.10.100~192.168.10.200 子网掩码:255.255.255.0 网关192.168.10.1/24
Vlan20:192.168.20.100~192.168.20.200 子网掩码:255.255.255.0 网关192.168.20.1/24
Vlan100:192.168.100.100~192.168.100.200 子网掩码:255.255.255.0 网关192.168.100.1/24
dns服务器地址为:192.168.100.100/24,其中PC1主机固定获得192.168.10.18/24地址
4.局域网内部Linux服务器搭建DNS服务功能解析www.kgc.com和www.yun.com,解析地址为14.0.0.14/24 外网WEB服务器,同时提供泛域名解析功能,解析地址为8.8.8.8
5.在外网有一台server2016搭建的WEB服务器,建立了虚拟机主机提供两个网站,分别是www.kgc.com和www.yun.com,自定义首页内容区分显示
6.实现最终的全网互通,功能访问健全
[root@localhost ~]# yum install dhcp -y //安装DHCP软件包
[root@localhost ~]# yum install bind -y //安装BIND软件包
win10-1:nio_gen_eth:VMware Network Adapter VMnet1(仅主机)
win10-2:nio_gen_eth:VMware Network Adapter VMnet3(仅主机)
centos7:nio_gen_eth:VMware Network Adapter VMnet3(仅主机)
server2016:nio_gen_eth:VMware Network Adapter VMnet8(仅主机)
(1)创建VLAN
SW2#conf t //进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config)#vlan 10,20,100 //创建VLAN
SW2(config-vlan)#ex //退出
SW2(config)#do show vlan-sw b //查看VLAN
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/1, Fa1/2, Fa1/3
Fa1/4, Fa1/5, Fa1/6, Fa1/7
Fa1/8, Fa1/9, Fa1/10, Fa1/11
Fa1/12, Fa1/13, Fa1/14, Fa1/15
10 VLAN0010 active
20 VLAN0020 active
100 VLAN0100 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
(2)把对应端口分配到VLAN中
SW2(config)#int f1/1 //进入端口模式
SW2(config-if)#sw mo acc //添加二层定义端口
SW2(config-if)#sw acc vlan 10 //分配到VLAN中
SW2(config-if)#ex //退出
SW2(config)#int f1/2
SW2(config-if)#sw acc vlan 20
SW2(config-if)#ex
SW2(config)#int f1/3
SW2(config-if)#sw mo acc
SW2(config-if)#sw acc vlan 100
SW2(config-if)#ex
SW2(config)#do show vlan-sw b //查看VLAN
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/4, Fa1/5, Fa1/6
Fa1/7, Fa1/8, Fa1/9, Fa1/10
Fa1/11, Fa1/12, Fa1/13, Fa1/14
Fa1/15
10 VLAN0010 active Fa1/1
20 VLAN0020 active Fa1/2
100 VLAN0100 active Fa1/3
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
(3)创建中继链路trunk
SW2(config)#int f1/0 //进入端口
SW2(config-if)#sw mo trunk //将接口配置为trunk
SW2(config-if)#sw
*Mar 1 00:15:21.427: %DTP-5-TRUNKPORTON: Port Fa1/0 has become dot1q trunk
SW2(config-if)#sw trunk en dot1q //封装类型为dot1q
SW2(config-if)#ex //返回到上一层模式
SW2(config)#do show int f1/0 switchport //查看端口
Name: Fa1/0
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: Disabled
Access Mode VLAN: 0 ((Inactive))
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: ALL
Trunking VLANs Active: 1,10,20,100
Protected: false
Priority for untagged frames: 0
Override vlan tag priority: FALSE
Voice VLAN: none
Appliance trust: none
SW2(config)#no ip routing
(1)创建VLAN
SW1#conf t //进入全局模式
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#vlan 10,20,100 //创建VLAN
SW1(config-vlan)#
*Mar 1 00:13:07.259: %SYS-3-CPUHOG: Task is running for (2044)msecs, more than (2000)msecs (2/2),process = Exec.
-Traceback= 0x60024CDC 0x60024EF4 0x6001B72C 0x6001C90C 0x627F73B4 0x60A7FEA4 0x60A80150 0x60B9DC48 0x60B9E984
SW1(config-vlan)#ex //退回上一层模式
SW1(config)#do show vlan-sw b //查看VLAN
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa1/0, Fa1/1, Fa1/2, Fa1/3
Fa1/4, Fa1/5, Fa1/6, Fa1/7
Fa1/8, Fa1/9, Fa1/10, Fa1/11
Fa1/12, Fa1/13, Fa1/14, Fa1/15
10 VLAN0010 active
20 VLAN0020 active
100 VLAN0100 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
(2)创建中继链路trunk
SW1(config)#int f1/0 //进入端口
SW1(config-if)#sw mo trunk //将端口设置为trunk
SW1(config-if)#sw
*Mar 1 00:15:42.675: %DTP-5-TRUNKPORTON: Port Fa1/0 has become dot1q trunk
SW1(config-if)#sw trunk en dot1q //封装类型为dot1q
SW1(config-if)#ex //返回上一层模式
SW1(config)#do show int f1/0 switchport //查看端口
Name: Fa1/0
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: Disabled
Access Mode VLAN: 0 ((Inactive))
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: ALL
Trunking VLANs Active: 1,10,20,100
Protected: false
Priority for untagged frames: 0
Override vlan tag priority: FALSE
Voice VLAN: none
Appliance trust: none
(3)给相应VLAN配IP地址,以及指向服务器IP地址
SW1(config)# int vlan 10 //进入VLAN
SW1(config-if)#ip ad
*Mar 1 00:54:48.295: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
SW1(config-if)#ip add 192.168.10.1 255.255.255.0 //给VLAN配IP地址
SW1(config-if)#ip helper-address 192.168.100.100 //指向服务器IP
SW1(config-if)#no shut //开启
SW1(config-if)#ex //返回上一层模式
SW1(config)#int vlan 20
SW1(config-if)#int vlan 20
*Mar 1 00:59:41.599: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
SW1(config-if)#ip add 192.168.20.1 255.255.255.0
SW1(config-if)#ip helper-address 192.168.100.100
SW1(config-if)#no shut
SW1(config-if)#ex
SW1(config)#int vlan 100
SW1(config-if)#ex
*Mar 1 01:00:30.627: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan100, changed state to up
SW1(config-if)#ip add 192.168.100.1 255.255.255.0
SW1(config-if)#ip helper-address 192.168.100.100
SW1(config-if)#no shut
SW1(config-if)#do show ip int b //查看IP地址表
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
FastEthernet1/0 unassigned YES unset up up
FastEthernet1/1 unassigned YES unset up up
FastEthernet1/2 unassigned YES unset up down
FastEthernet1/3 unassigned YES unset up down
FastEthernet1/4 unassigned YES unset up down
FastEthernet1/5 unassigned YES unset up down
FastEthernet1/6 unassigned YES unset up down
FastEthernet1/7 unassigned YES unset up down
FastEthernet1/8 unassigned YES unset up down
FastEthernet1/9 unassigned YES unset up down
FastEthernet1/10 unassigned YES unset up down
FastEthernet1/11 unassigned YES unset up down
FastEthernet1/12 unassigned YES unset up down
FastEthernet1/13 unassigned YES unset up down
FastEthernet1/14 unassigned YES unset up down
FastEthernet1/15 unassigned YES unset up down
Vlan1 unassigned YES unset up up
Vlan10 192.168.10.1 YES manual up up
Vlan20 192.168.20.1 YES manual up up
Vlan100 192.168.100.1 YES manual up up
(4).配置外网接口:IP地址、双工、速率
SW1(config)#int f1/1 //进入端口模式
SW1(config-if)#no switchport //把二层接口改为三层接口
SW1(config-if)#ip add
*Mar 1 01:27:56.191: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/1, changed state to up
SW1(config-if)#ip add 12.0.0.1 255.255.255.0 //配置IP地址
SW1(config-if)#no shut //开启
SW1(config-if)#speed 100 //配置速率
SW1(config-if)#duplex full //配置双工
SW1(config-if)#
*Mar 1 01:30:29.699: %LINK-3-UPDOWN: Interface FastEthernet1/1, changed state to up
SW1(config-if)#ex
SW1(config)#do show ip route //查看路由表
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.10.0/24 is directly connected, Vlan10
C 192.168.20.0/24 is directly connected, Vlan20
12.0.0.0/24 is subnetted, 1 subnets
C 12.0.0.0 is directly connected, FastEthernet1/1
C 192.168.100.0/24 is directly connected, Vlan100
(1)给对应端口配IP地址
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int f0/0
R2(config-if)#ip add 12.0.0.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#ex
R2(config)#i
*Mar 1 00:58:26.763: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:58:27.763: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R2(config)#int f0/1
R2(config-if)#ip add 14.0.0.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#ex
R2(config)#
*Mar 1 00:59:03.003: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar 1 00:59:04.003: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
(2)配静态路由
R2(config)#ip route 192.168.0.0 255.255.0.0 12.0.0.1 //配静态路由
SW1(config)#ip route 0.0.0.0 0.0.0.0 12.0.0.2 //配默认路由
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-ens33 //进入网卡配置文件
改为静态IP
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static //改为static静态
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=3a6a3a2d-9930-4cd7-87af-6948d424ee0a
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.100.100 //添加IP
NETMASK=255.255.255.0 //添加子网掩码
GATEWAY=192.168.100.1 //添加网关
:wq //保存退出
[root@localhost ~]# service network restart //重启网卡
Restarting network (via systemctl): [ 确定 ]
(1)复制模板到配置文件
[root@localhost ~]# cat /etc/dhcp/dhcpd.conf //查看配置文件
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.example //模板
# see dhcpd.conf(5) man page
#
[root@localhost ~]# cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
cp:是否覆盖"/etc/dhcp/dhcpd.conf"? yes
//把模板复制到配置文件中,直接覆盖
(2)修改DHCP配置文件
[root@localhost ~]# vim /etc/dhcp/dhcpd.conf //进入配置文件
修改配置文件
1 # dhcpd.conf
2 #
3 # Sample configuration file for ISC dhcpd
4 #
5
6 # option definitions common to all supported networks...
7 option domain-name "example.org";
8 option domain-name-servers 192.168.100.100; //指向DNS地址
9
10 default-lease-time 600;
11 max-lease-time 7200;
12
13 # Use this to enble / disable dynamic dns updates globally.
14 #ddns-update-style none;
15
16 # If this DHCP server is the official DHCP server for the local
17 # network, the authoritative directive should be uncommented.
18 #authoritative;
19
20 # Use this to send dhcp log messages to a different log file (you also
21 # have to hack syslog.conf to complete the redirection).
22 log-facility local7;
23
24 # No service will be given on this subnet, but declaring it helps the
25 # DHCP server to understand the network topology.
26
27 subnet 192.168.10.0 netmask 255.255.255.0 { //子网掩码
28 range 192.168.10.100 192.168.10.200; //网段
29 option routers 192.168.10.1; //网关
30 } //vlan10
31
32 subnet 192.168.20.0 netmask 255.255.255.0 {
33 range 192.168.20.100 192.168.20.200;
34 option routers 192.168.20.1;
35 } //vlan20
36
37 subnet 192.168.100.0 netmask 255.255.255.0 {
38 range 192.168.100.100 192.168.100.200;
39 option routers 192.168.100.1;
40 } //vlan100
41
42 # This is a very basic subnet declaration.
43
44 subnet 10.254.239.0 netmask 255.255.255.224 {
45 range 10.254.239.10 10.254.239.20;
46 option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
47 }
48
49 # This declaration allows BOOTP clients to get dynamic addresses,
50 # which we don't really recommend.
51
52 subnet 10.254.239.32 netmask 255.255.255.224 {
53 range dynamic-bootp 10.254.239.40 10.254.239.60;
54 option broadcast-address 10.254.239.31;
55 option routers rtr-239-32-1.example.org;
56 }
57
58 # A slightly different configuration for an internal subnet.
59 subnet 10.5.5.0 netmask 255.255.255.224 {
60 range 10.5.5.26 10.5.5.30;
61 option domain-name-servers ns1.internal.example.org;
62 option domain-name "internal.example.org";
63 option routers 10.5.5.1;
64 option broadcast-address 10.5.5.31;
65 default-lease-time 600;
66 max-lease-time 7200;
67 }
68
69 # Hosts which require special configuration options can be listed in
70 # host statements. If no address is specified, the address will be
71 # allocated dynamically (if possible), but the host-specific information
72 # will still come from the host declaration.
73
74 host passacaglia {
75 hardware ethernet 0:0:c0:5d:bd:95;
76 filename "vmunix.passacaglia";
77 server-name "toccata.fugue.com";
78 }
79
80 # Fixed IP addresses can also be specified for hosts. These addresses
81 # should not also be listed as being available for dynamic assignment.
82 # Hosts for which fixed IP addresses have been specified can boot using
83 # BOOTP or DHCP. Hosts for which no fixed address is specified can only
84 # be booted with DHCP, unless there is an address range on the subnet
85 # to which a BOOTP client is connected which has the dynamic-bootp flag
85 # to which a BOOTP client is connected which has the dynamic-bootp flag
86 # set.
87 host fantasia {
88 hardware ethernet 00:0C:29:C1:94:47; //指定分配的客户端MAC地址
89 fixed-address 192.168.10.18; //要指定分配的IP号
90 }
91
92 # You can declare a class of clients and then do address allocation
93 # based on that. The example below shows a case where all clients
94 # in a certain class get addresses on the 10.17.224/24 subnet, and all
95 # other clients get addresses on the 10.0.29/24 subnet.
96
97 class "foo" {
98 match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
99 }
100
101 shared-network 224-29 {
102 subnet 10.17.224.0 netmask 255.255.255.0 {
103 option routers rtr-224.example.org;
104 }
105 subnet 10.0.29.0 netmask 255.255.255.0 {
106 option routers rtr-29.example.org;
107 }
108 pool {
109 allow members of "foo";
110 range 10.17.224.10 10.17.224.250;
111 }
112 pool {
113 deny members of "foo";
114 range 10.0.29.10 10.0.29.230;
115 }
116 }
:wq //保存退出
(3)启动DHCP服务
[root@localhost ~]# systemctl start dhcpd
(1)win10-1获取的是10段的IP
C:\Users\Administrator>ipconfig //查看IP地址
Windows IP 配置
以太网适配器 Ethernet0:
连接特定的 DNS 后缀 . . . . . . . : example.org
本地链接 IPv6 地址. . . . . . . . : fe80::e458:db82:a79a:c37a%2
IPv4 地址 . . . . . . . . . . . . : 192.168.10.18 //分配到10网段地址
子网掩码 . . . . . . . . . . . . : 255.255.255.0
默认网关. . . . . . . . . . . . . : 192.168.10.1
以太网适配器 蓝牙网络连接:
媒体状态 . . . . . . . . . . . . : 媒体已断开连接
连接特定的 DNS 后缀 . . . . . . . :
隧道适配器 isatap.example.org:
媒体状态 . . . . . . . . . . . . : 媒体已断开连接
连接特定的 DNS 后缀 . . . . . . . : example.org
隧道适配器 Teredo Tunneling Pseudo-Interface:
媒体状态 . . . . . . . . . . . . : 媒体已断开连接
连接特定的 DNS 后缀 . . . . . . . :
(2)win10-2获取的是20段的IP
C:\Users\shan>ipconfig
Windows IP 配置
以太网适配器 Ethernet0:
连接特定的 DNS 后缀 . . . . . . . : example.org
本地链接 IPv6 地址. . . . . . . . : fe80::a13b:5d21:9045:4272%6
IPv4 地址 . . . . . . . . . . . . : 192.168.20.100 //分配到20网段地址
子网掩码 . . . . . . . . . . . . : 255.255.255.0
默认网关. . . . . . . . . . . . . : 192.168.20.1
以太网适配器 蓝牙网络连接:
媒体状态 . . . . . . . . . . . . : 媒体已断开连接
连接特定的 DNS 后缀 . . . . . . . :
隧道适配器 isatap.example.org:
媒体状态 . . . . . . . . . . . . : 媒体已断开连接
连接特定的 DNS 后缀 . . . . . . . : example.org
隧道适配器 Teredo Tunneling Pseudo-Interface:
媒体状态 . . . . . . . . . . . . : 媒体已断开连接
连接特定的 DNS 后缀 . . . . . . . :
(1)修改主配置文件
[root@localhost ~]# vim /etc/named.conf //进入主配置文件
修改配置文件
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
options {
listen-on port 53 { any; }; //监听地址为任意地址
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
recursing-file "/var/named/data/named.recursing";
secroots-file "/var/named/data/named.secroots";
allow-query { any; }; //允许使用本DNS服务器的网段为任意网段
/*
- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you need to enable
recursion.
- If your recursive DNS server has a public IP address, you MUST enable access
control to limit queries to your legitimate users. Failing to do so will
cause your server to become part of large scale DNS amplification
attacks. Implementing BCP38 within your network would greatly
reduce such attack surface
*/
recursion yes;
:wq //保存退出
(2)修改区域配置文件
[root@localhost ~]# vim /etc/named.rfc1912.zones //进入区域配置文件
修改配置文件
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and http://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "localhost.localdomain" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "kgc.com" IN { //正向“kgc.com”区域
type master; //类型为主区域
file "kgc.com.zone"; //区域数据文件为kgc.com.zone
allow-update { none; }; //允许下载的从服务器地址
};
zone "yun.com" IN {
type master;
file "yun.com.zone";
allow-update { none; };
:wq
(3)修改区域数据配置文件
[root@localhost ~]# cd /var/named
[root@localhost named]# ls
data dynamic named.ca named.empty named.localhost named.loopback slaves
[root@localhost named]# cp -p named.localhost kgc.com.zone
//复制区域数据文件到kgc.com.zone目录中
[root@localhost named]# vim kgc.com.zone //进入区域数据配置文件
修改配置文件
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
www IN A 14.0.0.14 //表示域名www.kgc.com对应的IP地址是14.0.0.14
* IN A 8.8.8.8 //泛域名解析
:wq //保存退出
[root@localhost named]# cp -p kgc.com.zone yun.com.zone
//复制一份到yun.com.znoe目录中,记得加-p
(4)启动DNS服务
[root@localhost named]# systemctl stop firewalld.service //关闭防火墙
[root@localhost named]# setenforce 0 //关闭增强型安全功能
[root@localhost named]# systemctl start named //启动DNS服务
(1)客户机win10-1验证
C:\Users\Administrator>nslookup www.kgc.com
服务器: UnKnown
Address: 192.168.100.100
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
名称: www.kgc.com
Address: 14.0.0.14
C:\Users\Administrator>nslookup www.yun.com
服务器: UnKnown
Address: 192.168.100.100
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
名称: www.yun.com
Address: 14.0.0.14
C:\Users\Administrator>nslookup abc.yun.com
服务器: UnKnown
Address: 192.168.100.100
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
名称: abc.yun.com
Address: 8.8.8.8
(2)客户机win10-2验证
C:\Users\shan>nslookup www.kgc.com
服务器: UnKnown
Address: 192.168.100.100
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
名称: www.kgc.com
Address: 14.0.0.14
C:\Users\shan>nslookup www.yun.com
服务器: UnKnown
Address: 192.168.100.100
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
名称: www.yun.com
Address: 14.0.0.14
C:\Users\shan>nslookup abc.yun.com
服务器: UnKnown
Address: 192.168.100.100
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
名称: abc.yun.com
Address: 8.8.8.8
(1)打开网卡设置一个固定IP地址
(2)安装WEB服务,添加网站
网站www.kgc.com创建
网站www.yun.com创建
(3)编辑网站内容
(4)关掉防火墙
(1)验证是否互通
在win10-1验证
在win10-2验证
(2)网站验证
结果:实现了全网互通