Experimental topology
Experimental requirements
, According to the needs of the task as shown:
1) sw2 is a switcher, respectively vlan10, vlan20, vlan100 three vlan, f1 / 1-3 is an access link, f1 / 0 for the relay link.
2) sw1 of three switches, gateways are provided for the three vlan, vlan10: 192.168.10.1/24,vlan20: 192.168.20.1/24,vlan100: 192.168.100.1/24, external network interface f1 / 1: 12.0. 0.1 / 24
Internal 3) local area network Linux servers set up dhcp service functions vlan10, vlan20 and vlan100 provide an address, the address range
Vlan10: 192.168.10.100 ~ 192.168.10.200 Subnet Mask: 255.255.255.0 Gateway 192.168.10.1/24
Vlan20: 192.168.20.100 ~ 192.168.20.200 Subnet Mask: 255.255.255.0 Gateway 192.168.20.1/24
Vlan100: 192.168.100.100 ~ 192.168.100.200 Subnet Mask: 255.255.255.0 Gateway 192.168.100.1/24
dns server address is: 192.168.100.100/24
PC1 which hosts fixed address to get 192.168.10.18/24
4) internal LAN Linux servers set up DNS services resolve www.kgc.com and www.yun.com
Resolve address 14.0.0.14/24 WEB server outside the network, while providing pan-domain name resolution to resolve the address to 8.8.8.8
5) outside the network have a WEB server server2016 built, the establishment of a virtual machine host offers two websites, namely www.kgc.com and www.yun.com, custom-coded display content Home
6) to achieve the ultimate whole network interoperability, functionality and improve access
Experimental Procedure
1. Open GNS3, topology model according to FIG.
2.进入sw2,建立vlan,并将对应的接口划分vlan,将接口f1/0设为trunk链路,并关闭路由功能
3.进入sw1,创建vlan,给每个vlan设置网关及中继服务
4.继续在sw1中给接口f1/0设置trunk链路
5.给接口f1/1设置ip12.0.0.1/24 (注意这里f1/1接口是2层接口,我们要用no switchport命令将之转换为3层接口)
6.sw1设置默认路由,下一跳地址为12.0.0.2
7.进入R2,给接口f0/0设置ip12.0.0.2/24,给接口f0/1设置ip14.0.0.1/24
8.给R2设置静态路由,下一跳地址12.0.0.1
9.打开VMware,开启一台Centos7虚拟机,,使用yum install 安装DHCP BIND,安装完后连接VMnet8(仅主机模式,以下新开的虚拟机都使用仅主机模式)
10.复制dhcp服务配置文件模板
11.修改复制来的dhcp服务配置文件vim /etc/dhcp/dhcpd.conf
12.修改网卡,改为静态ip,192.168.100.100
13.重启网络服务,开启dhcp服务
14.修改dns主配置文件/etc/named.conf
15.修改dns区域配置文件/etc/named.rfc1912.conf
16.复制2份区域数据文件配置文件模板,分别改名为kgc.com.zone , yun.com.zone
17.修改 kgc.com.zone
18.修改yun.com.zone
19.关闭防火墙,修改dns地址配置文件
20.开启dns服务
21.打开一台server2016虚拟机,连接VMnet3,安装ftp服务
22.给server服务器设置ip,网关
23.关闭防火墙
24.建立2个网站,分别为www.kgc.com ,www.yun.com
25.打开2台客户机,分别连接VMnet1,VMnet2,并都设置为自动dhcp分配ip地址
26.验证客户机1
27.验证客户机2
验证成功,实现了全网互通