搭建一个小型教学办公网络
天坛校区教学和办公网络平台组建
1.1 问题
– 有5个教室
– 1个办公区
– 1个服务器机房(教学服务器、DNS服务器)
1.2 方案
组建教学及办公网络实现办公区域访问Internet,网络环境拓扑如图-1所示:
基于项目的需求,需要用到如下技术:
·VLAN:广播控制
·VLAN间通信:三层交换
·RIP路由协议:实现网络路径的自动学习
·ACL:定义允许访问Internet的vlan
·NAT:实现Internet的访问
现有网络连接说明如表-1所示:
1.3 步骤
实现此案例需要按照如下步骤进行。
步骤一:二层交换机创建vlan并把端口加入vlan
1)SW1创建vlan10将f0/1-f0/2接口加入vlan10
SW1(config)#vlan 10
SW1(config-vlan)#exit
SW1(config)#interface range f0/1 - 2
SW1(config-if-range)#switchport access vlan 10
SW1#show vlan
2)SW2创建vlan20将f0/1-f0/2接口加入vlan20
SW2(config)#vlan 20
SW2(config-vlan)#exit
SW2(config)#interface range f0/1 - 2
SW2(config-if-range)#switchport access vlan 20
SW2#show vlan
3)SW3创建vlan30将f0/1-f0/2接口加入vlan30
SW3(config)#vlan 30
SW3(config-vlan)#exit
SW3(config)#interface range f0/1 - 2
SW3(config-if-range)#switchport access vlan 30
SW3#show vlan
4)SW4创建vlan40将f0/1-f0/2接口加入vlan40
SW4(config)#vlan 40
SW4(config-vlan)#exit
SW4(config)#interface range f0/1 - 2
SW4(config-if-range)#switchport access vlan 40
SW4#show vlan
5)SW5创建vlan50将f0/1-f0/3接口加入vlan50
SW5(config)#vlan 50
SW5(config-vlan)#exit
SW5(config)#interface range f0/1 - 3
SW5(config-if-range)#switchport access vlan 50
SW5#show vlan
6)SW6端口默认vlan1
步骤二:配置三层交换机实现vlan间通讯
1)三层交换机创建vlan
Switch#configure terminal
MS1(config)#VLan 10
MS1(config-vlan)#VLan 20
MS1(config-vlan)#VLan 30
MS1(config-vlan)#VLan 40
MS1(config-vlan)#VLan 50
2)三层交换机开启路由功能
MS1(config)#ip routing //开启路由功能
3)三层交换配置vlan IP地址
MS1(config)#interface vlan 1
MS1(config-if)#ip address 192.168.1.254 255.255.255.0
MS1(config-if)#no shutdown
MS1(config)#interface vlan 10
MS1(config-if)#ip address 192.168.10.254 255.255.255.0
MS1(config-if)#no shutdown
MS1(config)#interface vlan 20
MS1(config-if)#ip address 192.168.20.254 255.255.255.0
MS1(config-if)#no shutdown
MS1(config)#interface vlan 30
MS1(config-if)#ip address 192.168.30.254 255.255.255.0
MS1(config-if)#no shutdown
MS1(config)#interface vlan 40
MS1(config-if)#ip address 192.168.40.254 255.255.255.0
MS1(config-if)#no shutdown
MS1(config)#interface vlan 50
MS1(config-if)#ip address 192.168.50.254 255.255.255.0
MS1(config-if)#no shutdown
4)配置三层交换机连接二层交换机的端口为trunk模式
MS1(config)#interface range f0/5 - 10
MS1(config-if-range)#switchport trunk encapsulation dot1q
MS1(config-if-range)#switchport mode trunk
步骤三:配置二层交换机连接三层交换的接口为trunk模式
1)配置二层交换机接口为trunk模式
SW1(config)#interface fastEthernet 0/5
SW1(config-if)#switchport mode trunk
SW2(config)#interface fastEthernet 0/5
SW2(config-if)#switchport mode trunk
SW3(config)#interface fastEthernet 0/5
SW3(config-if)#switchport mode trunk
SW4(config)#interface fastEthernet 0/5
SW4(config-if)#switchport mode trunk
SW5(config)#interface fastEthernet 0/5
SW5(config-if)#switchport mode trunk
SW6(config)#interface fastEthernet 0/5
SW6(config-if)#switchport mode trunk
步骤四:配置三层交换DHCP服务
MS1#configure terminal
MS1(config)#ip dhcp pool vlan10
MS1(dhcp-config)#network 192.168.10.0 255.255.255.0
MS1(dhcp-config)#default-router 192.168.10.254
MS1(dhcp-config)#dns-server 192.168.1.6
MS1(config)#ip dhcp pool vlan20
MS1(dhcp-config)#network 192.168.20.0 255.255.255.0
MS1(dhcp-config)#default-router 192.168.20.254
MS1(dhcp-config)#dns-server 192.168.1.6
MS1(config)#ip dhcp pool vlan30
MS1(dhcp-config)#network 192.168.30.0 255.255.255.0
MS1(dhcp-config)#default-router 192.168.30.254
MS1(dhcp-config)#dns-server 192.168.1.6
MS1(config)#ip dhcp pool vlan40
MS1(dhcp-config)#network 192.168.40.0 255.255.255.0
MS1(dhcp-config)#default-router 192.168.40.254
MS1(dhcp-config)#dns-server 192.168.1.6
MS1(config)#ip dhcp pool vlan50
MS1(dhcp-config)#network 192.168.50.0 255.255.255.0
MS1(dhcp-config)#default-router 192.168.50.254
MS1(dhcp-config)#dns-server 192.168.1.6
步骤五:测试vlan间的连通性
PC>ipconfig
FastEthernet0 Connection:(default port)
Link-local IPv6 Address…: FE80::260:2FFF:FEE3:C475
IP Address…: 192.168.10.1
Subnet Mask…: 255.255.255.0
Default Gateway…: 192.168.10.254
PC>ping 192.168.20.1
Pinging 192.168.20.1 with 32 bytes of data:
Reply from 192.168.20.1: bytes=32 time=0ms TTL=127
Reply from 192.168.20.1: bytes=32 time=0ms TTL=127
Reply from 192.168.20.1: bytes=32 time=0ms TTL=127
Reply from 192.168.20.1: bytes=32 time=0ms TTL=127
Ping statistics for 192.168.20.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
PC>ping 192.168.30.1
Pinging 192.168.30.1 with 32 bytes of data:
Reply from 192.168.30.1: bytes=32 time=0ms TTL=127
Reply from 192.168.30.1: bytes=32 time=0ms TTL=127
Reply from 192.168.30.1: bytes=32 time=0ms TTL=127
Reply from 192.168.30.1: bytes=32 time=0ms TTL=127
Ping statistics for 192.168.30.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
PC>ping 192.168.40.1
Pinging 192.168.40.1 with 32 bytes of data:
Reply from 192.168.40.1: bytes=32 time=0ms TTL=127
Reply from 192.168.40.1: bytes=32 time=0ms TTL=127
Reply from 192.168.40.1: bytes=32 time=1ms TTL=127
Reply from 192.168.40.1: bytes=32 time=0ms TTL=127
Ping statistics for 192.168.40.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
PC>ping 192.168.50.1
Pinging 192.168.50.1 with 32 bytes of data:
Reply from 192.168.50.1: bytes=32 time=0ms TTL=127
Reply from 192.168.50.1: bytes=32 time=0ms TTL=127
Reply from 192.168.50.1: bytes=32 time=0ms TTL=127
Reply from 192.168.50.1: bytes=32 time=0ms TTL=127
Ping statistics for 192.168.50.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
PC>ping 192.168.60.1
Pinging 192.168.60.1 with 32 bytes of data:
Reply from 192.168.60.1: bytes=32 time=0ms TTL=255
Reply from 192.168.60.1: bytes=32 time=1ms TTL=255
Reply from 192.168.60.1: bytes=32 time=0ms TTL=255
Reply from 192.168.60.1: bytes=32 time=0ms TTL=255
Ping statistics for 192.168.60.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
PC>
步骤六:配置三层交换机与路由接口IP
1)配置三层交换机连接路由的接口IP
MS1(config)#interface fastEthernet 0/11
MS1(config-if)#no switchport
MS1(config-if)#ip address 192.168.60.1 255.255.255.0
2)配置路由接口IP
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip address 192.168.60.2 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 61.159.62.129 255.255.255.248
R1(config-if)#no shutdown
步骤七:配置动态路由RIP
1)路由R1添加默认路由并配置RIPv2
R1(config)#ip route 0.0.0.0 0.0.0.0 f0/0
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 192.168.6.0
R1(config-router)#default-information originate
2)三层交换配置RIPv2
MS1(config)#router rip
MS1(config-router)#version 2
MS1(config-router)#no auto-summary
MS1(config-router)#network 192.168.10.0
MS1(config-router)#network 192.168.20.0
MS1(config-router)#network 192.168.30.0
MS1(config-router)#network 192.168.40.0
MS1(config-router)#network 192.168.50.0
MS1(config-router)#network 192.168.60.0
MS1(config-router)#network 192.168.1.0
3)查看路由表
R1#show ip route //查看路由器路由表
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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 0.0.0.0 to network 0.0.0.0
61.0.0.0/29 is subnetted, 1 subnets
C 61.159.62.128 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/1] via 192.168.60.1, 00:00:08, FastEthernet0/1
R 192.168.10.0/24 [120/1] via 192.168.60.1, 00:00:08, FastEthernet0/1
R 192.168.20.0/24 [120/1] via 192.168.60.1, 00:00:08, FastEthernet0/1
R 192.168.30.0/24 [120/1] via 192.168.60.1, 00:00:08, FastEthernet0/1
R 192.168.40.0/24 [120/1] via 192.168.60.1, 00:00:08, FastEthernet0/1
R 192.168.50.0/24 [120/1] via 192.168.60.1, 00:00:08, FastEthernet0/1
C 192.168.60.0/24 is directly connected, FastEthernet0/1
S* 0.0.0.0/0 is directly connected, FastEthernet0/0
MS1#show ip route //查看三层交换路由表
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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 192.168.60.2 to network 0.0.0.0
C 192.168.1.0/24 is directly connected, Vlan1
C 192.168.10.0/24 is directly connected, Vlan10
C 192.168.20.0/24 is directly connected, Vlan20
C 192.168.30.0/24 is directly connected, Vlan30
C 192.168.40.0/24 is directly connected, Vlan40
C 192.168.50.0/24 is directly connected, Vlan50
C 192.168.60.0/24 is directly connected, FastEthernet0/11
C 192.168.70.0/24 is directly connected, FastEthernet0/2
R* 0.0.0.0/0 [120/1] via 192.168.60.2, 00:00:15, FastEthernet0/11
步骤八:配置NAT实验Internet的访问
1)配置SW7 IP地址模拟Internet
SW7#configure terminal
SW7(config)#interface vlan 1
SW7(config-if)#ip address 61.159.62.130 255.255.255.248
SW7(config-if)#no shutdown
2)R1配置NAT
R1(config)#ip access-list extended nsd
R1(config-ext-nacl)#permit ip 192.168.50.0 0.0.0.255 any
R1(config)#ip nat inside source list nsd interface fastEthernet 0/0 overload
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip nat inside
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip nat outside
2)测试Internet访问
PC>ipconfig
FastEthernet0 Connection:(default port)
Link-local IPv6 Address…: FE80::203:E4FF:FEC5:6345
IP Address…: 192.168.50.1
Subnet Mask…: 255.255.255.0
Default Gateway…: 192.168.50.254
PC>ping 61.159.62.130
Pinging 61.159.62.130 with 32 bytes of data:
Reply from 61.159.62.130: bytes=32 time=0ms TTL=253
Reply from 61.159.62.130: bytes=32 time=0ms TTL=253
Reply from 61.159.62.130: bytes=32 time=0ms TTL=253
Reply from 61.159.62.130: bytes=32 time=0ms TTL=253
Ping statistics for 61.159.62.130:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
搭建一个小型教学办公网络相关推荐
- Java环境搭建一个小型网页
title: Java环境搭建一个小型网页 #文章標題 categories: "JavaWeb教程" #文章分類目錄 可以省略 tags: 腾讯云服务器Ubuntu6.5系统 前 ...
- pythonhelloworld项目,10分钟搭建一个小型网页(python django)(hello world!)
10分钟搭建一个小型网页(python django)(hello world!) 1.安装django pip install django 安装成功后,在Scripts目录下存在django-ad ...
- 搭建一个简单的SDN网络环境
第1小题:简单网络 说明:由于对于SDN架构的理解在学界和业界并没有统一,为了方便参赛队员选择,对于初学者,大赛推荐OpenFlow作为南向接口来实现SDN环境,以下给出分别针对采用OpenFlow和 ...
- 制作服务器需要哪些,怎么搭建一个小型企业服务器机房,做这些都需要什么
怎么搭建一个小型企业服务器机房,做这些都需要什么? 通过内部部署IT解决方案来减少在线数据存储的安全问题,甚至完全避免这些问题. 但问题又来了,大多数小型企业只能通过投资专用的内部IT设备来成功实现这 ...
- 从零学习pytorch 第1课 搭建一个超简单的网络
课程目录(在更新,喜欢加个关注点个赞呗): 从零学习pytorch 第1课 搭建一个超简单的网络 从零学习pytorch 第1.5课 训练集.验证集和测试集的作用 从零学习pytorch 第2课 Da ...
- 微型linux系统测试网卡,自制一个小型Linux(附带网络功能)
我们这次讲述一下Linux启动的启动流程以及制作一个附带网络功能的mini linux 一.叙述 在制作一个小型的Linux之前,首先你得明白Linux系统的启动过程,我们用一张图来进行说明 二.为什 ...
- 神探Sherlock如何用AI破案?教你在Excel中搭建一个人脸识别CNN网络
作者 | Dave Smith 译者 | 刘畅 编辑 | 阿司匹林.Jane 出品 | AI科技大本营 [导读]人脸识别技术已经有了非常广泛的应用,国内大规模监控系统背后运用的技术就是人脸识别. 与大 ...
- 【小白学PyTorch】1.搭建一个超简单的网络
文章目录: 1 任务 2 实现思路 3 实现过程 3.1 引入必要库 3.2 创建训练集 3.3 搭建网络 3.4 设置优化器 3.5 训练网络 3.6 测试 1 任务 首先说下我们要搭建的网络要完成 ...
- django搭建一个小型的服务器运维网站-查看和修改服务器配置与数据库的路由...
目录 项目介绍和源码: 拿来即用的bootstrap模板: 服务器SSH服务配置与python中paramiko的使用: 用户登陆与session; 最简单的实践之修改服务器时间: 查看和修改服务器配 ...
- 在手机上搭建一个小型服务器
安装配置 - nginx : 1.14.2 - node.js : 8.19.3 1. 先将自己在电脑上的 vue项目打包 npm run build 2. 打开 aidlux 的文件管理器 如果不知 ...
最新文章
- 轻松搭建基于 SpringBoot Vue 的 Web 商城应用
- 数据结构与算法(C++)– 二叉查找树(Binary Search Tree )
- [恢]hdu 2511
- linux视音频解码教程,音视频编解码:NVIDIA Jetson Linux Multimedia API(总结)
- [html] websocket握手阶段是通过什么协议传输的?
- HDU 折线分割平面
- 谁提供一个能用的ICHAT文字聊天室程序,急需
- Spring Boot 接入 Dubbo 指导文档
- 得力助手 消防员的 消防机器人_机器人化身消防员“得力助手”,进入危险火场执行工作|机器人日报...
- pandas 透视表bug InvalidIndexError: Reindexing only valid with uniquely valued Index objects
- 柏诚股份冲刺上交所:年营收27.4亿 拟募资4.7亿
- CentOS 6.5下安装Confluence 5.4
- Dynamics 365 你所期待的子网格编辑终于来了
- 遍历读取文件夹下的所有文件
- 教师资格证-教育知识与能力
- wxpython中表格顶角怎么设置_wxpython编程之 grid(数据表格) | 学步园
- pycuda的安装,wheel报错
- 机制检验、异质性检验、调节效应
- Matlab:表示 MATLAB 中的日期和时间
- 物联网设备的网络连接---上篇