Chinaunix首页 | 论坛 | 博客
  • 博客访问: 320911
  • 博文数量: 57
  • 博客积分: 2101
  • 博客等级: 大尉
  • 技术积分: 966
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-09 14:35
文章分类

全部博文(57)

文章存档

2010年(13)

2009年(44)

我的朋友

分类: 系统运维

2009-07-08 11:06:28

交换机的数据吞吐量 就是交换机的数据包转发能力。也就是能同时转发多少数据包。
交换机的数据吞吐率 就是交换机的秒转发数据能力。也就是一个单位时间内,满负载,可以转发多少的一个数值 数据流量/秒 或者数据流量/分钟
吞吐率=吞吐量/时间
吞吐率:
吞吐率是在某个时间间隔内测得的每秒钟传输的用户数据的字节数;
每个传输方向分别用各自的吞吐率来衡量。
背板带宽是指交换机接口处理器或接口卡和数据总线间所能吞吐的最大数据量。一台交换机的背板带宽越大,其性能也就越高,当然价格也就越昂贵。在以总线为背板交换通道的交换机上,任何端口接收到的数据,首先被放到总线上,再由总线传递给目标端口,这时总线带宽就是背板带宽。
  许多模块化的交换机背板都为交换矩阵设计,这种设计的交换能力更强,在这样的交换机上,矩阵吞吐量就背板带宽。我们如何选择合适的背板带宽呢?一台交换机如果可能实现全双工无阻塞交换,那么它的背板带宽值应该大于端口总数×最大端口带宽× 2。
背板带宽也不能完全反映出实际交换机的工作能力,还要看交换机的吞吐率这一重要指标。
  但是这一指标获取比较困难,它不像背板带宽,一般不能完全相信厂商的说明,因为厂商宣称的都是设计值,并不代表实际工作能力。可以从一些中立的权威测试公司获得一些测试值作为参考。
  而在测试环境中,不能完全模拟实际工作环境,而只能测试交换机对某种大小的包的吞吐率,如64K、128K、256K包大小等。包越小对交换机的压力越大,好的交换机在包变小的情况下,吞吐率下降不大。
  在选择交换机时一般要把背板带宽和吞吐率综合考虑。背板相对大,吞吐量相对小的交换机,除非留有扩展能力(如有扩展卡插槽等),否则就是软件的运行效率或专用芯片电路设计有问题;背板相对小,吞吐量相对大的交换机,整体性能比较好。

在基于IOS的交换机上设置登录口令:
switch(config)# enable password level 1 password
在基于IOS的交换机上配置secret 口令
Switch# Config ter
Switch(config)# enable secret xxxx
在基于IOS的交换机上配置telnet 口令
Switch# Config ter
Switch(config)# Line vty 0 4
Switch(config-line)# Pass xxxx
Switch(config-line)# Login
在Cisco设备上修改控制端口密码:
switch (config)# line console 0
switch (config-line)# login
switch (config-line)# password Lisbon
switch (config)# enable password Lilbao
switch (config)# login local
switch (config)# username student password cisco
Cisco设备上设置控制台及vty端口的会话超时:
switch (config)# line console 0
switch (config-line)# exec-timeout 5 10
switch (config)# line vty 0 4
switch (config-line)# exec-timeout 5 2
Login空闲计时器(Timer)的设置
switch(config)# set logout timeout
对连接到交换机的对话(Console、Telnet)进行空闲计时,当空闲一定时间后自动断开连接,此功能可以用于保证设备访问的安全性。set logout timeout 时间单位为分钟。当设置时间值为0时,代表永远不会断开。
对TELNET进行控制
line vty 0 4
使用acl 99来控制telnet的源地址
access-class 99 in          
login
配置telnet密码
password 0 asdfaksdlf 
配置虚终端超时参数,这里是2分钟!
exec-timeout 2 0  
    
对访问CONSOLE口进行控制
line con 0
login
配置console口的密码
password 0 adsfoii           
配置console口超时参数,这里是两分钟
exec-timeout 2 0 
 
 
cos: catalyst操作系统
ios:  cisco 操作系统
CLI:命令行界面
COS运行在CATALYST 4000,5000,6000交换机上,且只用于2层上
show command | begin或是include或是exclude 关键字
ROM监控系统一般在交换机加电或复位时执行,可以在启动时按CTRL+BREAK进入
网络架构一般是:接入层,汇聚层,核心层
1。配置交换机的IP
COS: set interface sc0 vlannumber address mask
IOS:  interface vlan vlannumber
      ip address address mask
2.配置默认网关
COS:set ip route default gatewayaddress
IOS: ip default-gateway gatewayaddress
3.密码忘记修改
ctrl +break
confreg 0x2142
reset
n
enable
copy start run
conf t
enable secret 123456
line vty 0 4
password 123456
line con 0
password 123456
config-register 0x2102
end
copy run start
4.管理模块
COS: show modules
IOS:  show version
5.交换机维护着一张交换表,查看交换表内容
show mac-address-table
再结合show arp查PC
6.端口配置
interface f 0/1
description xxx
switchport mode access
no shutdown
interface range FastEthernet 0/2 -3
如果配置不连续端口,如下:
interface range f0/2,f0/4,f0/7
查看端口配置
show interfaces
show interfaces counters查看包错误统计
7。端口聚合
就是将几个交换机的端口聚合成一个逻辑端口,或叫EtherChannel
LACP链路聚合控制协议是通用标准的协议
PagP是CISCO专有协议
interface range gigabitEthernet 0/1 -2
channel-group 1 mode desirable non-silent
8。3层交换技术
一般在3层交换机上都有这几种模块或卡之一:RSM,RSFC,MSM,MSFC等
interface f 0/1
no switchport 禁止2层,启动3层端口
ip address 192.168.1.1 255.255.255.0
no shutdown
9. 3层聚合通道配置:
例如把f0/1加入通道1
int port-channel 1
ip address 192.168.10.1 255.255.255.0
int f 0/1
no switchport
no ip address
channel-grooup 1 mode on
no shutdown
10。配置VLAN接口,VLAN接口是3层接口
interface vlan 88
ip address 192.168.2.1 255.255.255.0
no shutdown
11.vlan管理
VTP:VLAN链路聚集协议,用来保证交换机间VLAN信息同步
VTP信息只通过TRUNK链路传送
VTP(VLAN Trunk Protocol,VLAN干道协议)的功能与GVRP相似,也是用来使VLAN配置信息在交换网内其它交换机上进行动态注册的一种二层协议。在一台VTP Server上配置一个新的VLAN信息,则该信息将自动传播到本域内的所有交换机,从而减少在多台设备上配置同一信息的工作量,且方便了管理。VTP信息只能在Trunk端口上传播。
* VTP Server维护该VTP域中所有VLAN信息列表,可以增加、删除或修改VLAN。
* VTP Client也维护该VTP域中所有VLAN信息列表,但不能增加、删除或修改VLAN,任何变化的信息必须从VTP Server发布的通告报文中接收。
* VTP Transparent不参与VTP工作,它虽然忽略所有接收到的VTP信息,但能够将接收到的VTP报文转发出去。它只拥有本设备上的VLAN信息
VTP配置
全局模式下
VTP domain domain-name
vtp password 123456
no vtp password 取消密码
vtp mode server
VTP默认是SERVER模式,可以设置为透明即禁用模式
VTP mode transparent
VTP还可以裁减VLAN
查看VTP状态
show vtp status
创建VLAN可以有两种方式
conf t
vlan 2 name vlan80
或是在特权模式下输入
vlan database
vlan 2 name vlan80
分配端口给VLAN
int f 0/2
switchport mode access
switchport access vlan vlan-id
具体交换机VLAN设置举例如下:
switch#vlan database ;进入VLAN设置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#no vlan 2 ;删vlan 2
switch(config)#int f0/1 ;进入端口1
switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2
switch(config-if)#switchport mode trunk ;设置为干线
switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan
switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继
switch(config)#vtp domain ;设置发vtp域名
switch(config)#vtp password ;设置发vtp密码
switch(config)#vtp mode server ;设置发vtp模式
switch(config)#vtp mode client ;设置发vtp模式
12 TRUNKING技术
有2种链路聚集机制:ISL,IEEE802.1Q
交换机上有2种接口,ACCESS口和TRUNK口
TRUNK默认承载所有VLAN流量,所以要识别VLAN,就要打标记TAG,而且TRUNK在两端都要配置
对于802。1Q机制来说,两端的native VLAN要匹配,默认是VLAN1,一般不需改动
配置TRUNK
int f 0/24
switchport mode trunk
switchport trunk encapsulation dot1q
switchport trunk allowed vlan all
如果想删除VLAN80,switchport trunk allowed vlan remove vlan80
查看TRUNK配置
show interfaces trunk
13.spanning-tree生成树协议,简称STP,有3种:STP,RSTP,MSTP
show spanning-tree
STP就是用来防止网络物理环路的
STP能够提供路径冗余,即使网络中有多条有效路径会引起不正常的环路,导致网络不正常时。使用STP可以使两个终端中只有一条有效路径。
STP在大的网络中定义了一个树,并且迫使一定的备份路径处于Standby状态。如果spanning tree中的网络一部分不可达,或者STP值变化了,spanning-tree算法会重新计算spanning-tree拓扑,并且通过启动备份路径来重新建立连接。STP操作对于终端来说是透明的。而终端不管它们连在LAN的一部分或者多个部分。
14。交换机管理
启用日志记录
全局模式下
logging on
发送日志到SYSLOG服务器
logging ip
查看日志
show logging
简单网络管理协议,SNMP。UDP:161/162
cisco2950(config)#snmp-server community test ro 1 配置本路由器的只读字串为test
cisco2950(config)#snmp-server contact 管理者的邮箱地址
cisco2950(config)#snmp-server host 管理机的IP地址 traps test
发送Trap时采用test作为字串
cisco2950(config)#snmp-server enable traps
查看配置
show snmp
 

常用查看命令
1.systat 用来查看所有连接到交换机的用户。show users也可以。
2.show clock显示交换机时间。
clock set 10:30:00 26 dec 2006
3.show ip arp 用来显示所有交换机检测到的IP及MAC。
interface range FastEthernet 0/1 - 48
switchport host 让交换机端口插上就能用
show ip interface
show vlan
copy run start
show flash
show run
show interface f0/1查看端口状态
show access-lists

show standby
show ip int b
 
3层vlan
conf t
vlan 92
interfaces vlan 92
ip address 192.168.92.1 255.255.255.0
 
配置访问控制列表
conf t
access-list 103 deny   ip any 10.99.7.0 0.0.0.255
access-list 103 permit ip any any
######access-list 103 permit ip any 160.252.80.0 0.0.0.255
interface vlan 92
ip access-group 103 in
 
阅读(1297) | 评论(0) | 转发(0) |
0

上一篇:网络理解

下一篇:CISCO SNMP配置

给主人留下些什么吧!~~