思科交换机3550配置手册(修改后)

合集下载

3550交换机中文配置手册

3550交换机中文配置手册

3550交换机(EMI)简明配置维护手册目录说明 (3)产品特性 (3)配置端口 (4)配置一组端口 (4)配置二层端口 (6)配置端口速率及双工模式 (6)端口描述 (7)配置三层口 (8)监控及维护端口 (10)监控端口和控制器的状态 (10)刷新、重置端口及计数器 (12)关闭和打开端口 (13)配置VLAN (14)理解VLAN (14)可支持的VLAN (15)配置正常范围的VLAN (15)生成、修改以太网VLAN (15)删除VLAN (17)将端口分配给一个VLAN (18)配置VLAN Trunks (19)使用STP实现负载均衡 (22)说明本手册只包括日常使用的有关命令及特性,其它未涉及的命令及特性请参考英文的详细配置手册。

产品特性3550EMI是支持二层、三层功能(EMI)的交换机支持VLAN∙到1005 个VLAN∙支持VLAN ID从1到4094(IEEE 802.1Q 标准)∙支持ISL及IEEE 802.1Q封装安全∙支持IOS标准的密码保护∙静态MAC地址映射∙标准及扩展的访问列表支持,对于路由端口支持入出双向的访问列表,对于二层端口支持入的访问列表∙支持基于VLAN的访问列表3层支持(需要多层交换的IOS)∙HSRP∙IP路由协议o RIP versions 1 and 2o OSPFo IGRP及EIGRPo BGP Version 4监视∙交换机LED指示端口状态∙SPAN及远端SPAN (RSPAN) 可以监视任何端口或VLAN的流量∙内置支持四组的RMON监控功能(历史、统计、告警及事件)∙Syslog功能其它功能:支持以下的GBIC模块:∙1000BASE-T GBIC: 铜线最长100 m∙1000BASE-SX GBIC: 光纤最长1804 feet (550 m)∙1000BASE-LX/LH GBIC: 光纤最长32,808 feet (6 miles or 10 km)∙1000BASE-ZX GBIC: 光纤最长328,084 feet (62 miles or 100 km) 配置端口配置一组端口当使用interface range命令时有如下的规则:∙有效的组范围:o vlan从1 到4094o fastethernet槽位/{first port} - {last port}, 槽位为0o gigabitethernet槽位/{first port} - {last port},槽位为0o port-channel port-channel-number - port-channel-number, port-channel号从1到64∙端口号之间需要加入空格,如:interface range fastethernet 0/1 – 5是有效的,而interface range fastethernet 0/1-5是无效的.∙interface range命令只能配置已经存在的interface vlan∙所有在同一组的端口必须是相同类别的。

DES系列交换机配置实例(3550、CLI模式为例)

DES系列交换机配置实例(3550、CLI模式为例)

DES3550配置实例(楼道用)DES3026、DES3550与DES3626都为二层交换机,一般作小区楼道交换机用,它们都是CLI命令行配置模式,配置命令基本一致,只是端口数量不同。

以下以DES3550配置实例进行标注解释。

其中尖括号中的内容为要配置的参数(实际命令中不包含尖括号)config snmp system_name <YW-1603-FTSCH-ZL-H11100> /*交换机名称配置*/config vlan default delete <1-48>/*删除交换机端口的默认vlan端口*/ create vlan <vlan33> tag <33>/*创建管理vlan vlan33*/config vlan <vlan33> add tag <1>/*配置管理vlan, 上联口为1口*/ config ipif System ipaddress <172.18.37.98/27> vlan<vlan33> state enable/*配置管理vlan IP地址及子网掩码(System的S需大写)*/ create iprout default <172.18.37.97 1> /*配置默认网关地址跳数(一般为1)*/ config ports <1> description <uplink> /*描述端口1为uplink*/config traffic_segmentation 2-48 forward_list 1 /*配置端口隔离。

1号为上联口,2-28口之间相互隔离,仅与1号口连通*//*创建业务vlan*/create vlan <vlan101> tag <101>create vlan <vlan102> tag <102>create vlan <vlan103> tag <103>create vlan <vlan104> tag <104>create vlan <vlan105> tag <105>create vlan <vlan106> tag <106>create vlan <vlan107> tag <107>create vlan <vlan108> tag <108>create vlan <vlan109> tag <109>create vlan <vlan110> tag <110>create vlan <vlan111> tag <111>create vlan <vlan112> tag <112>create vlan <vlan113> tag <113>create vlan <vlan114> tag <114>create vlan <vlan115> tag <115>create vlan <vlan116> tag <116>create vlan <vlan117> tag <117>create vlan <vlan118> tag <118>create vlan <vlan119> tag <119>create vlan <vlan120> tag <120>create vlan <vlan121> tag <121>create vlan <vlan122> tag <122>create vlan <vlan123> tag <123>create vlan <vlan124> tag <124> create vlan <vlan125> tag <125> create vlan <vlan126> tag <126> create vlan <vlan127> tag <127> create vlan <vlan128> tag <128> create vlan <vlan129> tag <129> create vlan <vlan130> tag <130> create vlan <vlan131> tag <131> create vlan <vlan132> tag <132> create vlan <vlan133> tag <133> create vlan <vlan134> tag <134> create vlan <vlan135> tag <135> create vlan <vlan136> tag <136> create vlan <vlan137> tag <137> create vlan <vlan138> tag <138> create vlan <vlan139> tag <139> create vlan <vlan140> tag <140> create vlan <vlan141> tag <141> create vlan <vlan142> tag <142> create vlan <vlan143> tag <143> create vlan <vlan144> tag <144> create vlan <vlan145> tag <145> create vlan <vlan146> tag <146> create vlan <vlan147> tag <147> create vlan <vlan148> tag <148>/*为每个端口配置不同的端口*/ config vlan <vlan102>add untag <2> config vlan <vlan103> add untag <3> config vlan <vlan104> add untag <4> config vlan <vlan105> add untag <5> config vlan <vlan106> add untag <6> config vlan <vlan107> add untag <7> config vlan <vlan108> add untag <8> config vlan <vlan109> add untag <9> config vlan <vlan110> add untag <10> config vlan <vlan111> add untag <11> config vlan <vlan112> add untag <12> config vlan <vlan113> add untag <13> config vlan <vlan114> add untag <14> config vlan <vlan115> add untag <15> config vlan <vlan116> add untag <16> config vlan <vlan117> add untag <17> config vlan <vlan118> add untag <18>config vlan <vlan119> add untag <19> config vlan <vlan120> add untag <20> config vlan <vlan121> add untag <21> config vlan <vlan122> add untag <22> config vlan <vlan123> add untag <23> config vlan <vlan124> add untag <24> config vlan <vlan125> add untag <25> config vlan <vlan126> add untag <26> config vlan <vlan127> add untag <27> config vlan <vlan128> add untag <28> config vlan <vlan129> add untag <29> config vlan <vlan130> add untag <30> config vlan <vlan131> add untag <31> config vlan <vlan132> add untag <32> config vlan <vlan133> add untag <33> config vlan <vlan134> add untag <34> config vlan <vlan135> add untag <35> config vlan <vlan136> add untag <36> config vlan <vlan137> add untag <37> config vlan <vlan138> add untag <38> config vlan <vlan139> add untag <39> config vlan <vlan140> add untag <40> config vlan <vlan141> add untag <41> config vlan <vlan142> add untag <42> config vlan <vlan143> add untag <43> config vlan <vlan144> add untag <44> config vlan <vlan145> add untag <45> config vlan <vlan146> add untag <46> config vlan <vlan147> add untag <47> config vlan <vlan148> add untag <48>/*配置每个vlan的1口为上联口*/ config vlan <vlan102> add tag <1> config vlan <vlan103> add tag <1> config vlan <vlan104> add tag <1> config vlan <vlan105> add tag <1> config vlan <vlan106> add tag <1> config vlan <vlan107> add tag <1> config vlan <vlan108> add tag <1> config vlan <vlan109> add tag <1> config vlan <vlan110> add tag <1> config vlan <vlan111> add tag <1> config vlan <vlan112> add tag <1>config vlan <vlan113> add tag <1>config vlan <vlan114> add tag <1>config vlan <vlan115> add tag <1>config vlan <vlan116> add tag <1>config vlan <vlan117> add tag <1>config vlan <vlan118> add tag <1>config vlan <vlan119> add tag <1>config vlan <vlan120> add tag <1>config vlan <vlan121> add tag <1>config vlan <vlan122> add tag <1>config vlan <vlan123> add tag <1>config vlan <vlan124> add tag <1>config vlan <vlan125> add tag <1>config vlan <vlan126> add tag <1>config vlan <vlan127> add tag <1>config vlan <vlan128> add tag <1>config vlan <vlan129> add tag <1>config vlan <vlan130> add tag <1>config vlan <vlan131> add tag <1>config vlan <vlan132> add tag <1>config vlan <vlan133> add tag <1>config vlan <vlan134> add tag <1>config vlan <vlan135> add tag <1>config vlan <vlan136> add tag <1>config vlan <vlan137> add tag <1>config vlan <vlan138> add tag <1>config vlan <vlan139> add tag <1>config vlan <vlan140> add tag <1>config vlan <vlan141> add tag <1>config vlan <vlan142> add tag <1>config vlan <vlan143> add tag <1>config vlan <vlan144> add tag <1>config vlan <vlan145> add tag <1>config vlan <vlan146> add tag <1>config vlan <vlan147> add tag <1>config vlan <vlan148> add tag <1>/*配置snmp网管*/删除系统默认的public(ro)、private(rw)字符串,指定合法的字符串(rw)DHS-3618:4#delete snmp community publicDHS-3618:4#delete snmp community privateDHS-3618:4#create snmp community <合法字符串>view CommunityView <read_write |readonly >/*配置telnet和console*/设置超级用户aaa,并设置口令为bbbDHS-3618:4#create account admin <aaa>Command: create account admin <aaa>Enter a case-sensitive new password: <bbb>Enter the new password again for confirmation: <bbb>删除用户aaaDHS-3618:4#delete account <aaa>Command: delete account aaa在系统提示Are you sure to delete the last administrator account?(y/n) 时回答y。

核心交换机s3550_49_65配置(可修改配置)

核心交换机s3550_49_65配置(可修改配置)
permit ip any any
exit
interface rang GI 0/1-24
ip access-group 101 in
exit
生成树优化配置(可选):
spanning-tree
spanning-tree portfast bpdufilter default
no sh
exit
!
vlan 30
name 30
exit
interface vlan 30
ip address 192.168.30.254 255.255.255.0
no sh
exit
!
vlan 40
name 40
exit
interface vlan 40
ip address 192.168.40.254 255.255.255.0
name 10
exit
interface vlan 10
ip address 192.168.10.254 255.255.255.0
no sh
exit
!
vlan 20
name 20
exit
interface vlan 20
ip address 192.168.20.254 255.255.255.0
!
exit
!
end
wr
wr
设置管理IP:
interface vlan 1
ip address 10.0.0.1 255.255.255.0
no shutdowm
exi
创建VLAN及VLAN IP:

思科交换机3550配置手册(修改后)

思科交换机3550配置手册(修改后)

交换机简介⏹连接方式Telnet、WebBrower、网管软件、console(控制线)⏹性能参数基本配置⏹状态转换⏹用户属性及密码修改⏹查看MAC地址#show mac-address-table⏹端口基本配置(单/组)speed/duplexDescription⏹保存或更改设置#copy running-configure startup-configure#delete flash:vlan.dat#erase startup-configure#reload⏹MAC地址配置使用说明⏹命令缩写⏹?及Tab键的使用⏹为防止由于输入的命令错误引起的等待,禁止设备查找DNS服务器#no ip domain-lookup;⏹有效的范围:vlan从1 到4094fastethernet槽位/{first port} - {last port}, 槽位为0gigabitethernet槽位/{first port} - {last port},槽位为0⏹端口优先及通常为4096的倍数,而权植为16的倍数;VLAN配置⏹VLAN 简介⏹创建VLAN(基于静态端口)新建划分端口⏹查看VLAN配置⏹删除VLAN⏹问题:物理端口与可支持VLAN数目不相匹配;⏹命令行:switch>enswitch #vlan database //新建Vlan1switch (vlan)vlan 1name VLAN1switch #configure terminalswitch (config)int g0/1 //划分端口g0/1switch(config-if)switch mode accessswitch(config-if)switch access vlan 1TRUNK设置⏹TRUNK简介⏹数据封装类型dot1islnegotiate⏹配置trunk⏹定义trunk允许通过的vlan switch trunk allowed vlan …⏹Native vlan 意义及更改(如果trunk链路两端的native vlan不一致时,交换机将会报错)⏹DTP简介对于CISCO交换机之间的链路是否形成TRUNK,可以通过DTP(Dynamic Trunk Protocol)进行协商。

S3550-软件配置指南配置接口

S3550-软件配置指南配置接口

配置接口本章描述锐捷交换机的接口类型以及如何配置接口,本章主要包括以下几个部分:z概述z配置接口z显示接口状态概述本章主要对锐捷交换机的接口类型进行划分,并对每种接口类型进行详细定义。

锐捷交换机的接口类型可分为以下两大类:z2层接口(L2 interface)z3层接口(L3 interface) (三层交换机支持)2层接口(L2 interface)本节主要描述2层接口的类型及相关的定义,可分为以下几种类型z Switch Portz L2 Aggregate PortSwitch Port由交换机上的单个物理端口构成,只有2层交换功能。

分为Access Port和Trunk Port。

Access Port和Trunk Port的配置必须通过手动配置。

通过switchport 接口配置命令可对switch port进行配置,有关Access Port和Trunk Port的详细配置过程可参照“第八章配置VLAN”。

Access Port每个access port只能属于一个VLAN, Access port只传输属于这个VLAN的帧。

Access port只接收以下三种帧:untagged 帧;vid为0的tagged帧;vid为access port所属VLAN的帧。

只发送untagged 帧。

Trunk PortTrunk port传输属于多个VLAN的帧,缺省情况下Trunk port将传输所有VLAN的帧,可通过设置VLAN许可列表来限制trunk port传输哪些VLAN的帧。

每个接口都属于一个native VLAN,所谓native VLAN,就是指在这个接口上收发的UNTAG报文,都被认为是属于这个VLAN的。

Trunk port可接收tagged 和untagged帧,若Trunk port接收到的帧不带IEEE802.1Q tag,那么帧将在这个接口的native vlan中传输,每个trunk port的native vlan都可设置。

cisco 3560配置手册

cisco 3560配置手册

Cisco3550三层交换机配置与管理一、3550曰常管理命令二、密码恢复三、VLAN配置四、SPAN监听配置五、DHCP服务配置1. 在3550上配置DHCP服务2. C3550配置作为DHCP中继代理六、流量控制七、策略路由一、3550曰常管理命令l clear arp-cache清除ARP缓存l arp 192.168.100.22 000a.eb22.c1b5 arpa 绑定MAC和IPl sh ip accounting output-packets显示统计信息(当然需要配置统计功能如:ip accounting-transits 3200)l 通过IP追查交换机端口:CiscoWorks 2000 LMS网管软件的User tracking可以追查一个IP地址对应的端口。

sh mac-address-table address 00e0.9102.afd0 显示这个MAC地址在哪个接口出来的;sh mac-address-table interface Fa0/20显示20端口上的MAC地址,如果只有一个,则可能连接一个电脑,如果有很多个条目,则可以连接一个交换机。

sh cdp entry *显示邻居信息;二、密码恢复下面步骤也适用于Cisco 层 2 系列的交换机比如Catalyst 2900/3500XL,2940,2950/2955和层3 系列的比如Catalyst 3550 的密码恢复.通过终端或带有仿真终端程序(比如Hyper Terminal)的PC,连接到交换机的console 对于Catalyst 2900/3500XL 拔下交换机的电源线,然后按住交换机的Mode 按钮,再重新插上交换机的电源线.直到端口Port 1x 的LED 熄灭之后释放Mode 按钮.Catalyst 2940/2950L 拔下交换机的电源线,然后按住交换机的Mode 按钮,再重新插上交换机的电源线.直到STAT 的LED 熄灭之后释放Mode 按钮. Catalyst 2955 对于2955 交换机,它没有外部的Mode 按钮,因此就不能使用之前的那种方法来进行密码恢复.在交换机启动时,对于Windows 系列的PC,按下Ctrl+Break 键;对于UNIX 系列的工作站,按下Ctrl+C.如下:C2955 Boot Loader (C2955HBOOTM) Version 12.1(0.0.514), CISCO DEVELOPMENT TESTVERSIONCompiled Fri 13Dec02 17:38 by madisonWSC2955T12 starting...Base ethernet MAC Address: 00:0b:be:b6:ee:00Xmodem file system is available.Initializing Flash...flashfs[0]: 19 files, 2 directoriesflashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 7741440flashfs[0]: Bytes used: 4510720 flashfs[0]: Bytes available: 3230720 flashfs[0]: flashfsfsck took 7 seconds....done initializing flash.Boot Sector Filesystem (bs:) installed, fsid: 3Parameter Block Filesystem (pb:) installed, fsid: 4/---接下来交换机会在15 秒内自动启动,等出现该信息之后,按下Ctrl+Break 键或Ctrl+C 键----/The system has been interrupted prior to initializing the flash file system to finishloading the operating system software:flash_init load_helper bootswitch:接下来输入flash_init 命令: switch: flash_init Initializing Flash...flashfs[0]: 143 files, 4 directoriesflashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 3612672flashfs[0]: Bytes used: 2729472 flashfs[0]: Bytes available: 883200 flashfs[0]: flashfs fsck took 86 seconds....done Initializing Flash.Boot Sector Filesystem (bs:) installed, fsid: 3Parameter Block Filesystem (pb:) installed, fsid: 4switch:接着输入load_helper 命令: switch: load_helper switch:再输入dir flash:命令显示交换机的文件系统:switch: dir flash: Directory of flash:/2 rwx 1803357 <date> c3500xlc3h2smz.1205.WC7.bin4 rwx 1131 <date> config.text5 rwx 109 <date> info6 rwx 389 <date> env_vars7 drwx 640 <date> html18 rwx 109 <date> info.ver403968 bytes available (3208704 bytes used)switch:把配置文件重命名:switch: rename flash:config.text flash:config.old switch:输入boot 命令启动交换机:switch: bootLoading"flash:c3500xlc3h2smz.1205.WC7.bin"...#################### #################################File "flash:c3500xlc3h2smz.1205.WC7.bin" uncompressed and installed, entry point: 0x3000executing...(略)不进入setup 模式:System Configuration DialogAt any point you may enter a question mark '?' for help. Use ctrlc to abort configuration dialog at any prompt. Default settings are in square brackets '[]'.Continue with configuration dialog? [yes/no]: n进入特权模式,恢复原始的配置文件:Switch#rename flash:config.old flash:config.textDestination filename [config.text] Switch#把配置文件保存在内存里:Switch#copy flash:config.text system:runningconfigDestination filename [runningconfig]?1131 bytes copied in 0.760 secsSwitch# 进入全局配置模式,取消密码设置: Switch(config)#no enable secret 保存配置: Switch#write memoryBuilding configuration...[OK] Switch#三、VLAN配置我们现在是一个具备三层交换功能的核心交换机接几台分支交换机(不具备三层交换能力)。

Cisco3550的配置命令手册

Cisco3550的配置命令手册

Cisco3550的配置命令手册为了使两个或多个交换机在同一个MST区域,你必须有相同的VLAN到实例映射,相同的配置修正号,和相同的名字。

从特权模式开始,跟着这些步骤指派MST区域配置和启用MSTP。

这个过程是必需的。

命令目的Step 1 configure terminal 进入全局配置模式Step 2 spanning-tree mst configuration 进入MST配置模式Step 3 instance instance-id vlan vlan-range 映射VLAN到一个MST实例对于instance-id, 范围从1到15。

对于vlan vlan-range, 范围从1到4094。

当你映射一个VLAN到MST实例, 映射增大, 并且被指定的VLAN 范围被增加或被移动到现有的一个实例当中。

为了指定一个范围, 使用一个连字号;例如, instance 1 vlan 1-63 映射VLAN1至63到MST实例1。

为指定一个系列, 使用一个逗号;例如, instance 1 vlan 10, 20, 30 映射VLAN10,20,和30到MST 实例1.Step 4 name name 指定配置名。

该name 字符串有最大32个字符串并区分大小写。

Step 5 revision version 指定配置修订号数字. 范围是0到65535.Step 6 show pending 显示等待配置来确认你的配置Step 7 exit 应用所有改变, 并返回到全局配置模式.Step 8 spanning-tree mode mst 起用MSTP。

RSTP 也被启用。

注意改变生成树模式会中断流量,因为所有以前的生成树实例被停止,并启用一个新的生成树实例。

在同一时间,你不能同时运行MSTP和PVSTStep 9 end 返回特权模式Step 10 show running-config 确认你的条目Step 11 copy running-config startup-config (可选)在配置文件中保存你的条目为了返回缺省MST区域配置,使用命令:(global) no spanning-tree mst configuration为了返回缺省VLAN实例映射,使用命令:(config-mst) no instance instance-id [vlan vlan-range]为了返回缺省名,使用命令:(config-mst) no name为了返回缺省修正号,使用命令:(config-mst) no revision为了重新启用PVST,使用命令:(config) spanning-tree mode pvst这个例子显示怎样进入MST配置模式,映射VLAN10-20进入MST实例1,命名区域region1,设置配置修正号1,显示挂起的配置,应用变化,并且返回全局配置模式:Switch(config)# spanning-tree mst configurationSwitch(config-mst)# instance 1 vlan 10-20Switch(config-mst)# name region1Switch(config-mst)# revision 1Switch(config-mst)# show pendingPending MST configurationName [region1]Revision 1Instance Vlans Mapped-------- ---------------------0 1-9,21-40941 10-20-------------------------------Switch(config-mst)# exitSwitch(config)#配置根交换机交换机为映射到他的VLANs保持一个生成树实例。

思科 Cisco 3550 交换机配置手册 配置教程

思科 Cisco 3550 交换机配置手册 配置教程

配置接口特性这一章详细说明交换机上的接口和描述怎么配置他们。

这章有以下这些内容:●理解接口类型●使用接口命令●配置二层接口●监控和维护第二层接口●配置第三从接口注意:需要完整的有关该章的语法和应用信息,请参考Catalyst 3550 Multilayer Switch Command Reference和Cisco IOS Interface Command Reference for Release 12.1.理解接口类型这个部分描述了不同的接口类型,以及其它章节所包括的详细配置这些接口的一些参考内容。

其他章节描述了物理接口特性的配置过程。

这部分包括:∙基于端口的VLAN (Port-Based VLANs)∙交换端口(Switch Ports)∙以太网通道端口组(EtherChannel Port Groups)∙交换虚拟接口(Switch Virtual Interfaces)∙被路由端口(Routed Ports)∙连接接口(Connecting Interfaces)基于端口的VLAN (Port-based Vlans)一个Vlan是一个按功能、组、或者应用被逻辑分段的交换网络,并不考虑使用者的物理位置。

要更多关于Vlan的信息请看“Configuring VLANS”。

一个端口上接受到的包被发往属于同一个Vlan的接收端口。

没有一个第三层的设备路由Vlan间的流量,不同Vlan的网络设备无法通讯。

为了配置普通范围(Normal-range) Vlan(Vlan IDs 1-1005),使用命令:config-vlan模式(global) vlan vlan-id或vlan-configuration模式(exec) vlan database针对Vlan ID 1-1005的vlan-configration模式被保存在vlan数据库中。

为配置扩展范围(extended-range) Vlans (Vlan ID 1006-4094),你必须使用config-vlan模式,并把VTP的模式设为transparent透明模式。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

交换机简介⏹连接方式Telnet、WebBrower、网管软件、console(控制线)⏹性能参数基本配置⏹状态转换⏹用户属性及密码修改⏹查看MAC地址#show mac-address-table⏹端口基本配置(单/组)speed/duplexDescription⏹保存或更改设置#copy running-configure startup-configure#delete flash:vlan.dat#erase startup-configure#reload⏹MAC地址配置使用说明⏹命令缩写⏹?及Tab键的使用⏹为防止由于输入的命令错误引起的等待,禁止设备查找DNS服务器#no ip domain-lookup;⏹有效的范围:vlan从1 到4094fastethernet槽位/{first port} - {last port}, 槽位为0gigabitethernet槽位/{first port} - {last port},槽位为0⏹端口优先及通常为4096的倍数,而权植为16的倍数;VLAN配置⏹VLAN 简介⏹创建VLAN(基于静态端口)新建划分端口⏹查看VLAN配置⏹删除VLAN⏹问题:物理端口与可支持VLAN数目不相匹配;⏹命令行:switch>enswitch #vlan database //新建Vlan1switch (vlan)vlan 1name VLAN1switch #configure terminalswitch (config)int g0/1 //划分端口g0/1switch(config-if)switch mode accessswitch(config-if)switch access vlan 1TRUNK设置⏹TRUNK简介⏹数据封装类型dot1islnegotiate⏹配置trunk⏹定义trunk允许通过的vlan switch trunk allowed vlan …⏹Native vlan 意义及更改(如果trunk链路两端的native vlan不一致时,交换机将会报错)⏹DTP简介对于CISCO交换机之间的链路是否形成TRUNK,可以通过DTP(Dynamic Trunk Protocol)进行协商。

⏹命令行:switch>enswitch #configure terminalswitch (config)int g0/1 //设置TRUNK链路switch(config-if)switch mode trunkswitch(config-if)switch trunk encapsulation dot1q //设置数据封装类型switch(config-if)switch trunk native vlan 2 //设置Native vlanVTP设置⏹VTP(vlan trunk protocal)简介提供了一种用于在交换机上管理VLAN的方法,使得我们在同一个或者几个中央点(server)上创建、修改和删除VLAN的现时,VLAN信息可以通过Trunk 链路自动扩散到其他交换机,在VTP 管理域中的交换机都保持相同的VLAN 信息⏹VTP模式server(默认模式):允许VLAN操作;client(客户端模式):无权进行VTP域内的VLAN操作;同时充当VTP中继;transparent(透明模式):有权进行独立的VLAN操作;主要充当VTP中继;⏹VTP配置vtp模式设定vtp域名设定vtp修剪功能#vtp pruning(防止不必要的流量从trunk链路上通过,通常需要启用)vtp密码设定⏹查看VTP#show vtp status⏹关于“configure revision”的说明VTP通告是以组播帧的方式发送的,VTP通告中有一个字段称为修订号——Revision,初始值为0。

只要在VTP server上创建、修改和删除VLAN,通告的Revision就能增加1,通告中还包含了VLAN的变化信息。

需要注意的是,高Revision的通告会覆盖了低Revision的通告,而不管发送者是server 还是client。

交换机只接受比本地保存的Revision号更高的通告;如果交换机收到比自己的Revision号更低的通告,会用自己的VLAN信息反向覆盖。

⏹命令行:switch>enswitch #configure terminalswitch(config) vtp mode {server|client|transparent} //设置VTP模式switch(config)vtp domain VTP-TEST //配置VTP域名switch(config)vtp password cisco //配置VTP密码,防止不明身份交换机加入到域中。

STP设置⏹目的:克服冗余环路(广播风暴、同一个帧的多个拷贝、CMA表的不稳定)⏹STP(spanning-tree protocol)简介利用BPDU(Bridge Protocol Data Unit)与其他交换机进行通信,通过BPDU中的关键字段:根桥口、路径代价、端口ID等阻断一些交换机端口,从而构建一棵没有环路的转发树。

⏹STP步骤选取根桥(桥ID=网桥优先级+MAC地址)选取根口(路径COST)选取指定端口(相对交换机)和指定交换机(相对特定网络)⏹查看spanning-tree#show spanning-tree⏹通过优先级设定更改根桥,通常会考虑用新设备充当根桥;#spanning-tree vlan 1 priority 4096⏹命令行:VLAN间路由⏹实现途径:1、借助路由器——单臂路由;2、借助交换机三层交换功能——三层交换;⏹实验拓扑图:⏹单臂路由实现:交换机命令:switch>enswitch #configure terminalswitch (config)int g0/1 //设置TRUNK链路switch(config-if)switch mode trunkswitch(config-if)switch trunk encapsulation dot1q //设置数据封装类型switch(config-if)switch trunk native vlan 2 //设置Native vlanswitch #vlan database //新建Vlan2switch (vlan)vlan 2 name VLAN2switch #configure terminalswitch (config)int g0/3 //划分端口g0/3switch(config-if)switch mode accessswitch(config-if)switch access vlan 2⏹路由器命令:Router>enableRouter#confgiure terminalRouter(config)#interface loopback 0Router(config-if)ip address 1.1.1.1 255.255.255.255Router(config-if)#interface fastEthernet 1/0Router(config-if)#no shutdownRouter(config-if)#no ip addressRouter(config-if)#interface fastEthernet 1/0.2 //设置逻辑路由端口Router(config-subif)#no shutdownRouter(config-subif)#encapsulation dot1Q 2 //设置数据封装类型Router(config-subif)#ip address 10.10.1.1 255.255.255.0 //设置逻辑端口IP = VLAN GatewayRouter(config-subif)#interface fastEthernet 1/0.3Router(config-subif)#no shutdownRouter(config-subif)#encapsulation dot1Q 3Router(config-subif)#ip address 192.168.1.1 255.255.255.0Router#copy running-config startup-config //保存配置文件Router#show ip route //查看路由信息如果如下:1.0.0.0/32 is subnetted, 1 subnetsC 1.1.1.1 is directly connected, Loopback010.0.0.0/24 is subnetted, 1 subnetsC 172.16.1.0 is directly connected, FastEthernet0/0.1C 172.16.2.0/24 is directly connected, FastEthernet0/0.2⏹交换机三层路由功能实现:交换机命令:switch>enableswitch # confgiure terminalswitch (config)ip routing // 打开(三层)交换机的路由功能switch (config-if)int vlan 1 // 配置vlan信息switch(config-if)no shutdownswitch(config-if)ip address 172.16.1.254 255.255.255.0 //配置VLAN IP = Gatewayswitch(config-if)exitswitch (config)int vlan 2switch (config-if)no shutdownswitch(config-if)ip address 172.16.2.254 255.255.255.0switch (config-if)exitswitch(config)exitswitch#copy running-config startup-configswitch #show ip route如果如下:Gateway of last resort is not set172.16.0.0/24 is subnetted, 2 subnetsC 172.16.1.0 is directly connected, Vlan1C 172.16.2.0 is directly connected, Vlan2省略PC机IP设置,具体参数参见拓扑图!注:PC机在操作时,必须关闭系统防火墙!负载均衡⏹使用ethernet channel⏹利用STP端口权植实现⏹利用STP路径代价实现静态路由配置⏹拓扑图:⏹命令行:(1)在各路由器上配置IP地址:ROUTER1:Router1>enableRouter1#confgiure terminalRouter1(config)#interface loopback 0Router1(config-if)ip address 1.1.1.1 255.255.255.255Router1(config)#interface s0Router1(config-if)#ip address 192.168.12.1 255.255.255.0Router1(config-if)#no shutdownROUTER2:Router2>enableRouter2#confgiure terminalRouter2(config)#interface loopback 0Router2(config-if)ip address 2.2.2.2 255.255.255.255Router2(config)#interface s0Router2(config-if)#ip address 192.168.12.2 255.255.255.0 Router2(config-if)clock rate 128000Router2(config-if)#no shutdownRouter2(config)#interface s1Router2(config-if)#ip address 192.168.23.2 255.255.255.0 Router2(config-if)clock rate 128000Router2(config-if)#no shutdownROUTER3:Router1>enableRouter3#confgiure terminalRouter3(config)#interface loopback 0Router3(config-if)ip address 3.3.3.3 255.255.255.255Router3(config)#interface s1Router3(config-if)#ip address 192.168.23.3 255.255.255.0 Router3(config-if)clock rate 128000Router3(config-if)#no shutdown(2)在各ROUTER上配置静态路由ROUTER1:Router1(config)#ip route 2.2.2.0 255..255.255.0 s0Router1(config)#ip route 3.3.3.0 255.255.255.0 192.168.12.2 ROUTER2:Router2(config)#ip route 1.1.1.0 255.255.255.0 s0Router2(config)#ip route 3.3.3.0 255.255.255.0 s1ROUTER3:Router3(config)#ip route 1.1.1.0 255.255.255.0 s1Router3(config)#ip route 2.2.2.0 255.255.255.0 s1(3)在R1,R2,R3上查看路由表:Router1#show ip route如果如下:1.0.0.0/32 is subnetted, 1 subnetsC 192.168.12.0/24 is directly connected, s0C 1.1.1.0 is directly connected, Loopback02.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 is directly connected, S0/0.1S 3.3.3.0[1/0] via 192.168.12.2(4)从R1上ping2.2.2.2:结果如下:Type escape sequence to abort.Sending 5,100-byte ICMP Echos to 2.2.2.2,timeout is 2 seconds:Success rate is 100 percent(5/5),round-trip min/avg/max=12/14/16 ms ⏹默认路由:⏹拓扑图如上⏹命令行:(1)在R1、R3上删除原有静态路由ROUTER1:Router1(config)#no ip route 2.2.2.0 255..255.255.0 s0Router1(config)# no ip route 3.3.3.0 255.255.255.0 192.168.12.2 ROUTER3:Router3(config)# no ip route 1.1.1.0 255.255.255.0 s1Router3(config)# no ip route 2.2.2.0 255.255.255.0 s1(2)在R1、R3上配置默认路由Router1(config)#ip route 0.0.0.0 0.0.0.0 s0Router3(config)#ip route 0.0.0.0 0.0.0.0 s0。

相关文档
最新文档