电脑技术学习

思科5000初始配置的具体步骤

dn001

  下面就5505的配置步骤作简单描述:

1. Supervisor Engine Software 的配置:

首先Supervisor Engine Module 需要一个in-band(sc0)接口的IP地址,这是一个可治理的地址,可以通过telnet、SNMP来治理5505。此外还有一个SLIP(sl0)接口,这个接口不常用,这里不作介绍。

sc0缺省的IP地址是0.0.0.0,属于VLAN1。(VLAN1 是5505缺省的VLAN ,所有的端口都属于VLAN1。

配置如下,例:

Console> (enable)set interface sc0 ip_addr netmask

Console> (enable) set interface sc0 vlan_num

其次是缺省网关的设置:5505可以设置3个网关,其中两个是冗余网关

例:Console> (enable) set ip route default gateway [primary]

设置静态路由:例:Console> (enable) set ip route destination gateway

[metric]

2. 配置Fast EtherChannel:

Fast EtherChannel 提供高达800Mbps的带宽,Fast EtherChannel是由两个或四个具有Fast EtherChannel功能的快速以太网端口组成的,这些Channel 的mode有on、off、auto、desirable四种模式。组成channel的端口应是连续的端口。配置如下:

Console> (enable) set port channel mod_num/ports {on off auto

desirable}

Console> (enable) show port channel

3. STP配置:

在5505上,STP缺省的配置是激活的,并且你只能enable或disable所有的VLANs,而不能针对某一个VLAN。通过对每个端口优先级的设置,可以实现相同链路的负载分担。常用命令如下:

Console> (enable) set spantree enable [vlan]

Console> (enable) set spantree portpri mod_num/port_num priority [vlans]

Console> (enable) set spantree portvlanpri mod_num/port_num priority

[vlans]

Console> (enable)set spantree disable [vlan]

Console> (enable) show spantree [mod_num/port_num]

4. VTP(VLAN Trunk Protocol)配置:

一个VTP域是由一些具有同一域名的交换机组成的,在配置VLAN应先决定在网络中是否使用VTP。一个VTP域治理第二层信息(即VLAN信息)如VLAN的增加、删除和重命名等,这些信息通过trunk link在域内广播。VTP有三种模式:Server、Client、Transparent,每台交换机只能有一种VTP模式。

在Server模式中,你能在交换机上配置VALN的信息如增加、删除VLAN,VTP Server把这些信息通过trunk link 广播给域内其它交换机,以同步VLAN信息。交换机上VTP缺省的模式是Server。

在Client模式中,交换机只能从VTP Server接收VLAN信息,不修改任何VLAN信息,你只能加入由VTP Server已经创建好的VALN。

在Transparent模式中,交换机不参与VTP 域中的VLAN信息交换(即它不发送、也不接收VLAN信息),你可以在交换机上设置VALN的任何信息。在VTP VERSION2中交换机可以将它所收到的VTP广播从trunk link 上广播出去。VTP配置如下:

Console> (enable) set vtp domain name

Console> (enable) set vtp mode [serverClientTransparent]

Console> (enable) show vtp domain

VTP Pruning:

VTP Pruning 可以减少广播以达到增加带宽的目的。在网络中有许多广播包、多目广播包、还有非广播包,它们通过trunk link 连接广播到域内所有交换机上,占用大量的带宽。VTP Pruning可以有效的减少将这些包广播出去。VTP Pruning 在Supervisor Engine Software release 2.3和以后的版本中支持。

5.配置VLAN:

Console> (enable) set vlan vlan_num [name name]

Console> (enable) show vlan vlan_num

Console> (enable) set vlan vlan_num mod_num/port_num

Console> (enable) show vlan vlan_num

Console> (enable) show port [mod_num/port_num]

6. 配置 VLAN Trunks on Fast Ethernet and Gigabit Ethernet Ports:

VLAN Trunk 用于交换机间的互连,你可以在Fast Ethernet和Gigabit Ethernet Port或在 Fast or Gigabit EtherChannel bundle上设置Trunk,作为tr unk的端口用DTP(Dynamic Trunking Protocol)协议(也可以不用)来协商。

VLAN Trunk有五种模式和两种种封装:

五种模式为:on , off , desirable , auto , nonegotiate

两种封装为:ISL,802.1Q

另外,当Trunk 配置后,所有VLAN都被加入到此Trunk中,你可以增加或删除Trunk中的VALN,但是你不能删除缺省VLAN(即VLAN1)。

配置如下:

Console> (enable) set trunk mod_num/port_num {on

desirable auto} {isl dot1q negotiate }

Console> (enable) show trunk

7. 配置VMPS(VLAN Management Policy Server):

用VMPS,交换机端口可以根据连接此端口主机的MAC地址动态的加入VLAN。当激活VMPS时,VMPS Server从TFTP Server 上下载一个 MAC address-to-vlan mapping database 同时开始响应VMPS Client 的请求,假如主机的MAC 地址在数据库中有匹配,则VMPS Server响应Client的请求,分配给该端口VLAN NUMBER号,此端口就动态的加入了所属VALN。若不能找到匹配,则返回 “Access denied” 信息。若为了加强安全性,你也可以将VLAN 限制在指定端口组上,只有连到这些端口上的主机才能动态的加入VLAN,而其它端口上的主机的MAC 地址即使在数据库中有此MAC 的匹配也不能加入VLAN。

8. 配置InterVLAN 路由:

VLAN间的通讯需要一个路由器,在5505中是由RSM模块来完成的,

因此 ,要配置VLAN间的路由还需要配置RSM模块。配置如下 :

Console> (enable) session mod/num //RSM所在槽位

PassWord:*****

Router>configure terminal

Router(config)#ip routing

Router(config)#router ip_routing_protocol

Router(config)#interface vlan-id

Router(config-if)#ip address n.n.n.n mask

Router(config)# copy running-config startup-config

9. MLS(多层交换):

MLS功能是由插在交换机机柜上的RSM模块来完成的,也可由与交换机相连的路由器、如7000系列来完成。

MLS 提供高效的、基于硬件的第三层交换,MLS 使用advanced application-specific integrated circuit (ASIC)在子网间交换非广播包,使用标准的路由协议如OSPF、RIP、EIGRP、IS-IS等作出路由选择,它还提供流量统计以便于治理。

MLS由三部分组成:

Multilayer Switching-Switching Engine (MLS-SE):Catalyst 5000 series switch

with the NFFC or NFFC II。

Multilayer Switching-Route Processor (MLS-RP):The MLS-RP provides Cisco

IOS-based multiprotocol routing, network services, and central configuration

and control for the switches。

Multilayer Switching Protocol (MLSP)---The protocol running between the MLS-

SE and MLS-RP to enable MLS。

MLS 操作过程:

当一个MLS 流(假设是IP流)产生,它的第一个IP包到达MLS-SE,MLS-SE执行包重写,将目的MAC地址该成MLS-RP地址,将其发送给MLS-RP,MLS-RP检查Access List以检查是否答应此IP流的建立,若没有设置Access List,则根据路由协议为此包选择出口,同时通过MLSP协议将IP 流信息传给MLS-SE,MLS-SE在MLS-SE Cache 中为此IP流建立Entry,后续同一IP流的IP包将利用刚刚建立的Entry迅速找到出口,而无须再经过MLS-RP路由,当IP 流结束时,此Entry 自动消失。

1) 路由器配置。

Router(config)#mls rp ip

Router(config-if)#mls rp vtp-domain [domain_name]

Router(config-if)#mls rp vlan-id [vlan_id_num]

Router(config-if)#mls rp ip

Router(config-if)#mls rp management-interface

2) 交换机配置。

Console> (enable) set mls enable

Console> (enable) set mls include ip_address

Console> (enable)set mls flow {destination destination-source full}

MLS软硬件要求:

多层交换技术要求下面的软件和硬件版本:

l Catalyst 5000 系列超级用户引擎软件4.1(1)或者更新的版本。

2 Cisco IOS路由器软件11.3(2)WA4(4),或者更新的版本。

3 超级用户引擎Ⅲ(Supervisor EngineⅢ),带NFFC

4 RSM或者Cisco7500、7200、4500或者4700系列路由器

10.NDE(NetFlow Data EXPort)说明:

NDE能够监视NFFC、NFFCII、RSM以及外接路由器的流量,NDE实现内置的RMON功能以答应你监视所有的端口流量。

集成的MLS包括治理,辅助的应用(流数据的收集、输出、处理,流收集如:Cisco SwitchProbe and NetFlow FlowCollector,gather and classify flows。处理如:TrafficDirector, NetSys,,or NetFlow Analyzer)。

Catalyst 5000 series Network Analysis Module (WS-X5380)和Cisco SwitchProbe device能够完成流信息收集功能,Network Analysis Module提供扩展RMON监控功能和能够分析NFFC、NFFCII上输出的VLAN流信息。

使用NDE过滤:

可以指定一个过滤器来输出你所期望的数据流,过滤器的参数值存储在NVRAM中,只有NDE激活时才可以改变。

软硬件的要求:

Supervisor engine software---Software release 4.1(1) or later

Cisco IOS router software---IOS release 11.3(2)WA4(4) or later

Catalyst 2926G series switch or a Catalyst 5000 series switch with Supervisor Engine III, III FSX, or III FLX modulewith a NetFlow Feature Card (NFFC) or NFFC II

Route Switch Module (RSM) or Cisco 7500, 7200, 4500, or 4700 series router

RMON data collector (sUCh as the Catalyst 5000 series Network Analysis Module)

NDE 配置:

1. 指定NDE地址:

在收集MLS统计信息时,应先指定MLS-RP和MLS-SE使用的NDE IP地址。

Router(config)#mls rp nde-address [ip_addr]

指定地址后,还须在交换机上用set mls include [ip_addr]命令将MLS-RP的IP地址包含进去。

2. 指定NDE收集器:

在第一次激活NDE时,你需要指定一个NDE收集器和UDP端口号,它们被保留在NVRAM中。假如Network Analysis Module (WS-X5380)被安装则无需指定它们。

Console> (enable) set mls nde [collector_ip] [udp_port_number]

3. 激活NDE:

Console> (enable)set mls nde enable

4. 指定过滤器:

Console> (enable)set mls nde flow destination [ip_addr_spec]

Console> (enable) set mls nde flow destination [ip_addr_spec]

source [ip_addr_spec]

Console> (enable)set mls nde flow dst_prt [port_number]

Console> (enable)set mls nde flow source [ip_addr_spec] dst_prt [port_number]

Console> (enable)set mls nde flow protocol protocol

四5505配置速查:

1. 基本配置:

1)进入特权模式。

Console> enable

Enter password:******

Console> (enable)

2)给交换机分配IP地址。

Console> (enable)set interface sc0 ip_addr netmask

Console> (enable) set interface sc0 vlan_num

把交换机sc0接口分配给VLAN,默认给VALN1。

Console> (enable) set ip route default gateway

Console> (enable) show interface

Console> (enable) show ip route

查看配置。

3)以太网端口配置。

Console> (enable)set port speed mod_num/port_num {10 100

auto}

Console> (enable) set port duplex mod_num/port_num {full half

auto}

Console> (enable) set port enable mod_num/port_num

Console> (enable) set port name mod_num/port_num name_string

Console> (enable) show port mod_num/port_num

4)系统设置

Console> (enable) set system name name_string

Console> (enable) set time mm/dd/yy hh:mm:ss

Console> (enable) set prompt prompt_string

Console> (enable) set password

Console> (enable) set enablepass

2. VLAN配置

1)VTP配置。

Console> (enable) set vtp domain name

Console> (enable) set vtp mode [serverClientTransparent]

Console> (enable) show vtp domain

2)设置VLAN

Console> (enable) set vlan vlan_num [name name]

Console> (enable) show vlan vlan_num

Console> (enable) set vlan vlan_num mod_num/port_num

Console> (enable) show vlan vlan_num

Console> (enable) show port [mod_num/port_num]

3)设置VLAN TRUNK

Console> (enable) set trunk mod_num/port_num {on

desirable auto} {isl dot1q negotiate }

Console> (enable) show trunk

4)设置EtherChannel

Console> (enable) set port channel port_list {on desirable

auto}

Console> (enable)show port channel [mod_num[/port_num]]

Console> (enable)write memory

3.配置VLAN间路由。

1) 配置RSM。

Console> (enable) session mod/num //RSM所在槽位

Password:*****

Router>configure terminal

Router(config)#ip routing

Router(config)#router ip_routing_protocol

Router(config)#interface vlan-id

Router(config-if)#ip address n.n.n.n mask

Router(config)# copy running-config startup-config

4 .MLS配置。

3) 路由器配置。

Router(config)#mls rp ip

Router(config-if)#mls rp vtp-domain [domain_name]

Router(config-if)#mls rp vlan-id [vlan_id_num]

Router(config-if)#mls rp ip

Router(config-if)#mls rp management-interface

4) 交换机配置。

Console> (enable) set mls enable

Console> (enable) set mls include ip_address

Console> (enable)set mls flow {destination destination-source full}

标签: