网络实验
报告
软件系统测试报告下载sgs报告如何下载关于路面塌陷情况报告535n,sgs报告怎么下载竣工报告下载
局域网配置
《计算机网络》
系 别:计算机科学与技术
专 业:网 络 工 程 班 级:
学 号:
姓 名:
2011年6月7日
1、 局域网技术:
分布在相对有限的区域,例如一栋楼房或者一个校园,内的网络称为局域网或者LAN,Local Area Network,。分布在较大地理区域的网络称为广域网或者WAN,Wide Area Network,。本章我们所讨论的是局域网。局域网常见于大型或者中型的军事机构、公司、政府机构以及教育机构。全世界估计大约有3千万台计算机连接在局域网上。局域网可以实现文件管理、应用软件共享、打印机共享、扫描仪共享、工作组内的日程安排、电子邮件和传真通信服务等功能。局域网是封闭型的~可以由办公室内的两台计算机组成~也可以由一个公司内的上千台计算机组成
2、局域网
设计
领导形象设计圆作业设计ao工艺污水处理厂设计附属工程施工组织设计清扫机器人结构设计
:
2.1 局域网设计与配置所需硬件及要求:
产品名称及型号 个/台数 作用
CISCO路由器 通过相互连接的网络把信息从源地点移动到目标地3 2811 点的活动。进行路由器对VLAN的封装及RIP的配置。
按照通信两端传输信息的需要~用人工或设备自动完CISCO交换机 3 成的方法~把要传输的信息送到符合要求的相应路由2950-24 上的技术的统称。进行VLAN的划分。
PC机 5 用来模拟终端。
2.2 网络拓扑图
2.3 子网划分及端口配置
子网划分是通过借用IP地址的若干位主机位来充当子网地址从而将原网
络划分为若干子网而实现的。具体配置见
表
关于同志近三年现实表现材料材料类招标技术评分表图表与交易pdf视力表打印pdf用图表说话 pdf
2。
表1 各子网网段
主机 IP 地址/子网掩码 所属VLAN 默认网关 P0-P2 195.168.1.2/24-195.168.1.4/24 VLAN2 195.168.1.1 P1-P3 195.168.2.3/24-192.168.2.2/24 VLAN3 195.168.2.1 P4 192.168.3.2/24 VLAN4 195.168.3.1
表2路由串行接口IP地址及子网掩码
目的网络 IP 地址/子网掩码
R4-R3 17.23.2.23/24-17.23.2.2./ 24
R3-R5 17.23.3.2/24-17.23.3.324
R1 f0/0.1 195.168.1.1
R1 f0/0.2 195.168.2.1
R2 f0/0.1 195.168.3.1
表3 各设备IP地址及子网掩码
主机 IP 地址/子网掩码 所属VLAN 默认网关 PC0 195.168.1.2 255.255.255.0 VLAN2 195.168.1.1 PC1 195.168.2.3 255.255.255.0 VLAN2 195.168.1.1 PC2 195.168.1.4 255.255.255.0 VLAN2 195.168.1.1 PC3 195.168.2.2 255.255.255.0 VLAN3 195.168.2.1 PC4 195.168.3.2 255.255.255.0 VLAN4 195.168.3.1
3、局域网配置:
3.1 VLAN设计
VLAN(虚拟局域网)。一个合理的VLAN设计可以有效地保证网络的安全性~减少广播风暴~提高网络的运行效率。将每个机房划分为一个VLAN之中~办公室及网管中心各为一个VLAN。此外~一个VLAN一般对应一个IP子网。易于管理。
3.2 VLAN的具体实现
3.2.1在交换机上进行VLAN的划分
创建VLAN的基本配置命令如下:(以S1为例)
Switch>enable
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch#hostname S1
Switch (config)#vlan 2 //创建VLAN2
Switch (config-vlan)#interface vlan 2 Switch (config-vlan)#exit
Switch (config)#vlan 3 //创建VLAN3
Switch (config-vlan)# interface vlan 3 Switch (config-vlan)#exit
Switch (config)#
Switch (config)#int f 0/2
Switch (config-if)#switchport mode access //设置其模式为access Switch (config-if)#switchport access vlan 2 //并将其加入VLAN2 Switch (config-if)#exit
Switch (config)#interface f 0/3 Switch (config-if)#switchport mode access
Switch (config-if)#switchport access vlan 3//并将其加入VLAN3 Switch (config-if)#exit
其余交换机的VLAN如上设置。
3.2.2.Trunk的设置
设置F0/1为trunk进行转发vlan
S1(config)#interface f0/4
S1(config-if)#switchport mode trunk //设置为trunk 3.3路由器设置
3.3.1封装
将vlan2,3封装在路由器子接口中~接口为f0/0.1 及f0/0.2 Router (config)#interface f0/0 Router (config)#no shutdown
Router (config)#interface f0/0.1
Router (config-subif)#encapsulation dot1Q 2 //对VLAN 2进行封装
Router (config-subif)#ip address 195.168.1.1 255.255.255.0 //设置IP地址
Router (config-subif)#exit
Router (config)#interface f0/0.2
Router (config-subif)#encapsulation dot1Q 3 Router (config-subif)#ip address 195.168.2.1 255.255.255.0
Router (config-subif)#exit
3.3.2路由转发
配置如下:
R4:
Router (config)#router rip //进入路由
Router (config)#version 2
Router (config-router)#network 195.168.1.0 //需要转发的网络
Router (config-router)#network 195.168.2.0 Router (config-router)#network 17.23.2.0 Router (config-router)#
其余的路由设置类似R4的设置
设置时钟频率
Router(config)#interface s0/3/0
Router (config-if)#no shutdown
Router(config-if)#ip address 17.23.2.2 255.255.255.0
Router (config-if)#clock rate 64000 Router (config-if)#exit
Router (config)#interface s0/3/1
Router (config-if)#no shutdown
Router (config-if)#ip address 17.23.3.2 255.255.255.0
Router (config-if)#clock rate 64000 Router (config-if)#exit
路由器查看
R3:
Router#show run
Building configuration...
Current configuration : 671 bytes version 12.4
no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption
hostname Router
ip name-server 0.0.0.0 interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
interface Serial0/3/0
ip address 17.23.2.2 255.255.255.0
clock rate 64000
interface Serial0/3/1
ip address 17.23.3.2 255.255.255.0
clock rate 64000
interface Vlan1
no ip address
shutdown
router rip
version 2
network 17.0.0.0
ip classless
line con 0
line vty 0 4
login
end
R4:
Building configuration... Current configuration : 789 bytes
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption hostname Router
ip name-server 0.0.0.0 interface FastEthernet0/0
no ip address
duplex auto
speed auto
interface FastEthernet0/0.1
encapsulation dot1Q 2
ip address 195.168.1.1 255.255.255.0
interface FastEthernet0/0.2
encapsulation dot1Q 3
ip address 195.168.2.1 255.255.255.0
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
interface Serial0/3/0
ip address 17.23.2.3 255.255.255.0
interface Vlan1
no ip address
shutdown
router rip
version 2
network 17.0.0.0
network 195.168.1.0
network 195.168.2.0
ip classless
line con 0
line vty 0 4
login
end
R5:
Router>en
Router#show run
Building configuration... Current configuration : 677 bytes
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption hostname Router
ip name-server 0.0.0.0 interface FastEthernet0/0
no ip address
duplex auto
speed auto
interface FastEthernet0/0.1
encapsulation dot1Q 4
ip address 195.168.3.1 255.255.255.0
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
interface Serial0/3/0
ip address 17.23.3.3 255.255.255.0
interface Vlan1
no ip address
shutdown
router rip
version 2
network 17.0.0.0
network 195.168.3.0 ip classless
line con 0
line vty 0 4
login
end
交换机查看
S0:
hostname Switch
interface FastEthernet0/1
switchport mode trunk interface FastEthernet0/2
switchport access vlan 2 interface FastEthernet0/3
switchport access vlan 3 interface FastEthernet0/4
switchport mode trunk interface Vlan1
no ip address
shutdown
interface Vlan2
no ip address
interface Vlan3
no ip address
line con 0
line vty 0 4
login
line vty 5 15
login
end
S1:
hostname Switch
interface FastEthernet0/1
switchport mode trunk interface FastEthernet0/2
switchport access vlan 2 interface FastEthernet0/3
switchport access vlan 3 interface FastEthernet0/4
switchport mode trunk interface Vlan1
no ip address
shutdown
interface Vlan2
no ip address
interface Vlan3
no ip address
line con 0
line vty 0 4
login
line vty 5 15
login
end
S2:
hostname Switch
interface FastEthernet0/1
switchport mode trunk interface FastEthernet0/2
switchport access vlan 4 interface Vlan1
no ip address
shutdown
interface Vlan4
no ip address
line con 0
line vty 0 4
login
line vty 5 15
login
3.3.3设置IP
在PC上设置IP地址、DNS及默认网关。以PC0为例:
其他PC设置如表中IP配置。
3.4测试连接性
使用命令 ipconfig 查看本机网络地址
测试与默认网关的连接性
测试主机 P0 (vlan2)与主机 P3,vlan3,测试连通性:
测试主机 P3(vlan3)与主机 P4,vlan4,测试连通性:
4、总结
(1)实验过程中出现的问题及解决过程:
?在实验中,将VLAN封装在路由器子接口中时,经常会漏掉一个接口,也有一些语句不知道,如encapsulation dot1Q 2等等。由此可见,还是要多做实验,多敲代码,才会熟练。
?配交换机时,一开始没有设置trunk口,所以就传不了多个vlan包。
?在配置核心路由器时,一开始配的时候,并没有考虑时钟,后来经过
同学的检查,才改正过来。
(2)在这次实验的过程中,我学到了很多东西,把实验课上学的东西基本都到了,比如交换机路由之间的链接,子网的划分,vlan的配置。由此更加觉得,在平时的学习中,更应该自己动手,认真的敲代码,要把一些基本的知识掌握了,配置这样的局域网,一定要细心,不能粗心大意的。