划分中小型企业网
一、实验目的1.熟悉和掌握小型局域网的配置方法
2.掌握子网划分中IP地址的分配方法
3.掌握DHCP的配置方法
4.掌握VLAN的配置方法
5.掌握路由的配置方法
6.掌握交换机、路由器的配置方法
二、设备与环境
微型计算机、Windows 系列操作系统 、ensp软件
三、实验内容
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172003468-2078187077.png
某公司的小型局域网拓扑如图所示,共有四个部门,分别被划分到vlan 10、vlan 20、vlan 30、vlan 40中,服务器被划分到vlan 50中,AR1为公司出口路由器,各vlan的网段在图中已经标注。
要求:
1.自己指定各网段的网关地址,PC的地址通过dhcp获取,Client和server的地址手动配置;
2.各VLAN的网关地址在所连接的交换机上(因此需要配置三层vlanif接口);
3.配置网络路由,要求各部门都能互通;
4.要求各部门都能访问到服务器的www服务器;
四、实验过程及结果分析
1.配置网络设备各端口的地址
(1) 配置LSW1的端口及地址
vlan batch 2 10 20
int e0/0/21
port link-type access
port default vlan 10
int e0/0/22
port link-type access
port default vlan 20
int e0/0/1
port link-type access
port default vlan 2
(2)在LSW1上配置各三层vlanif接口, 使得VLAN:10和vlan:20可以互通。
int vlan 10
ip address 192.168.1.33 27
int vlan 20
ip address 192.168.1.65 27
int vlan 2
ip address 192.168.1.193 255.255.255.252
(3) 配置AR1的端口地址
int g0/0/2
ip address 192.168.1.194 255.255.255.252
int g0/0/1
ip address 192.168.1.198 30
int g0/0/0
ip address 111.111.111.111 255.255.255.0
(4) 配置LSW3的端口及地址
//划分vlan,配置每个LSW3的端口,并为端口分配ip地址
vlan batch 3 30 40 50
配置vlan3
int vlan 3
ip address 192.168.1.197 30
配置vlan30
int vlan 30
ip address 192.168.1.97 27
配置vlan40
int vlan 40
ip address 192.168.1.129 27
配置vlan50
int vlan 50
ip address 192.168.1.161 27
//配置每个LSW3的端口,使每个端口都为access口,每个端口划分到自己的Vlan
int g0/0/1
port link-type access
port default vlan 3
int g0/0/22
port link-type access
port default vlan 30
int g0/0/23
port link-type access
port default vlan 40
int g0/0/24
port link-type access
port default vlan 50
2.配置PC及client的IP地址
PC地址通过dhcp获取
PC1:
dhcp enable
int vlan 40
dhcp select interface
PC2:
dhcp enable
int vlan 10
dhcp select interface
Client手动配置
Client1:
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172056442-59524362.png
Client2:
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172118831-1387151342.png
3.配置路由
(1) 配置LSW1的路由
//给LSW1配置rip协议
rip
version 2
network 192.168.1.0
(2) 配置AR1
//给AR1配置rip协议,并设置默认路由,下一跳为连接外网端口的ISP
rip
version 2
network 192.168.1.0
ip route-static 0.0.0.0 0.0.0.0 111.111.111.112
(3) 配置LSW3的路由
//Rip协议
rip
version 2
network 192.168.1.0
4.测试
Client2向Server1请求
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172133658-260088959.png
Client1向Server1请求:
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172321066-817905478.png
PC1(192.168.1.158) ping PC2(192.168.1.62):
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172329418-1281177058.png
PC1(192.168.1.158) ping Client1(192.168.1.98):
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172338465-1888126205.png
PC1(192.168.1.158) ping Client2(192.168.1.66):
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172344416-220251130.png
PC2(192.168.1.62) ping Client1(192.168.1.98):
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172351164-1359705450.png
PC2 (192.168.1.62)ping Client2(192.168.1.66):
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172359050-193816822.png
5.配置服务器
配置服务器基础配置:
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172438960-1520089104.png
配置服务器信息:
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172444847-482887273.png
6.配置默认路由
(1) 在LSW1上配置默认路由
ip route-static 0.0.0.0 0.0.0.0 192.168.1.194
(2) 在LSW3.上配置默认路由
ip route-static 0.0.0.0 0.0.0.0 192.168.1.198
7.访问外网测试
通过PC ping AR1的loopback 0接口
int g0/0/0
ip add
ip address 111.111.111.112 255.255.255.0
interface LoopBack0
ip address 8.8.8.8 255.255.255.255
PC2(192.168.1.62) ping外网端口 (111.111.111.111)
https://img2022.cnblogs.com/blog/2222324/202207/2222324-20220728172453357-1943740742.png
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
页:
[1]