admin管理员组文章数量:1531699
2023年12月24日发(作者:)
1 description设置以太网口描述
description ethernet-description
no description
【参数说明】ethernet-description为路由器以太网接口的描述字符串。
【缺省情况】缺省描述为Quidway RSeries Router, ethernet interface
【命令模式】以太网接口配置模式
【使用指南】description设置以太网口描述,no description恢复以太网口缺省描述。
【举例】设置以太网接口描述为QuidwayR2501 ethernet interface
Quidway(config-if-Ethernet0)#description QuidwayR2501 ethernet interface
【相关命令】 show interface
2 duplex 设置以太网口工作方式是半双工或全双工模式
[ no ] duplex
【缺省情况】缺省情况下为半双工模式
【命令模式】以太网接口配置模式
【使用指南】duplex 设置以太网口工作于全双工模式,no duplex 恢复以太网口缺省工作模式。当路由器以太网口与共享式Hub相连时,应工作于半双工方式,当路由器以太网口与交换式Lan Switch相连,而且Lan Switch设置了全双工方式时,应工作于全双工方式。
【举例】设置以太网接口描述为全双工模式 Quidway(config-if-Ethernet0)#duplex
【相关命令】show interface
3 loopback 允许或禁止以太网口对内自环和对外回波
[ no ] loopback
【缺省情况】禁止以太网口对内自环和对外回波。
【命令模式】以太网口接口配置模式
【使用指南】只有在进行某些特殊功能测试时,才将以太网口设为对内自环和对外回波。
【举例】允许以太网口对内自环和对外回波。
Quidway(config-if-Ethernet0)#loopback
4 mtu 设置以太网口最大传输单元
mtu ethernet-mtu no mtu
【参数说明】 ethernet-mtu为以太网口最大传输单元,范围0~1500
【缺省情况】以太网口缺省的最大传输单元为:
采用Ethernet_II帧格式为1500
采用Ethernet_SNAP帧格式为1492
【命令模式】以太网接口配置模式
【使用指南】以太网接口的最大传输单元只影响IP在以太网接口的组包和拆包,采用Ethernet_II帧格式时最大传输单元可达到1500,采用Ethernet_SNAP帧格式时最大传输单元可达到1492。
用no mtu命令恢复缺省的最大传输单元。
【举例】设置以太网口的最大传输单元为1492
Quidway(config-if-Ethernet0)#mtu 1492
【相关命令】send-frame-type,show interface
5 send-frame-type
设置以太网口IP报文发送帧格式。
send-frame-type { Ethernet_II | Ethernet_SNAP }
no send-frame-type
【缺省情况】以太网口缺省的IP报文发送帧格式为Ethernet_II。
【命令模式】以太网接口配置模式
【使用指南】Quidway(R) 系列路由器的以太网口支持四种帧格式:
Ethernet_II(ARPA)
Ethernet_SNAP
802.2
802.3
其中Ethernet_II和Ethernet_SNAP用于支持IP协议,802.2和802.3 用于支持IPX协议。以太网口对接收到的帧能够自动识别其格式,因此可以同时接收多种格式的帧,但在同一时间只能发送一种帧格式。
no send-frame-type 命令恢复缺省的IP报文发送帧格式。
【举例】设置以太网口发送帧格式为Ethernet_SNAP
Quidway(config-if-Ethernet0)#send-frame-type Ethernet_SNAP
表项
描述
Fast Ethernet... is up
...is administratively down
表明接口的硬件当前是否是被激活的还是被管理员手工的showdown掉了。
line protocol is
标识该接口的线协议也就是软件进程是否可用,还是被管理员手工的给shutdown了。
Hardware
硬件类型(例如MCI Ethernet, SCI, cBus Ethernet) 和硬件地址
Internet address
带有子网信息的该接口的IP地址。
MTU 接口上的最大传输单元。
BW 接口的带宽,通常单位是kb/s。
DLY 端口的延迟,单位是ms。
Rely 以255为参照数的接口的可靠性参数 (255/255 就是百分之百的可靠), 以5分钟的平均数来计算。
Load 以255为参照数的接口的负荷(255/255 就是百分之百的负荷量), 5分钟的平均数来计算。
Encapsulation 接口的封装类型。
ARP type 接口配置的地址解析协议(ARP)的类型。
Loopback 标识是否设置了接口回环。
Keepalive 标识接口是否设置了发送存活(keepalives)信息
Last input
自从接口接受到最近的一个数据包后的时间。当该数据包是被precess-switch的方式转发的时候计数器会更新,而当该包是被fast-switch的方式转发时则不更新计数器。
Output 自从接口发送最近的一个数据包后的时间。
output hang 接口因为数据包传输时间过长而重启后的时间,如果没有重启,则显示为never。
Last clearing
清除接口统计计数器后的时间。注意:可能会影响到路由的变量信息时不会被清除置0
的,例如load和reliablity
型号***表示清计算器后的时间太长显示不出来了。
Output queue, input queue, drops
在接口输入输出队列中的数据包的个数。每个数字都跟了个/队列的最大范围。以及超过了队列的最大
5 minute input rate,
5 minute output rate
在最近5分钟内每秒传输的数据包的平均值。
packets input 系统接受到的数据包的总的个数。
Bytes 系统接受到的所有数据包(包括数据和MAC封装)的字节数。
no buffer
因为在系统中没有足够的缓存从而丢弃的数据包的个数。可以和ignore的计数来比较。以太网上个广播风暴和串行接口上的传输质量不好通常可能会导致该计数器的增加。
Received ... broadcasts 接口所接受到的广播和多播的数据包的数量。
runts
因为小于介质的最小的包大小而丢弃的数据包的个数。例如,对以太网来说,小于64byte的数据包被认为是一个runt。
giants
因为大于介质的最大的包大小而丢弃的数据包的个数。例如,对以太网来说,大于1518byte的数据包被认为是一个runt。
Throttles 接口disable的次数,可能是因为缓存或者处理器过载等因素。
input errors
包括runts, giants, no buffer, CRC, frame, overrun, 和ignored的所有的计数器。其他和输入相关的error包也可以造成input errors计数器的增长。同时,一个数据包可能会包括多个的error。
CRC
接口接受到的循环冗余校验和的数量。在局域网中,通常是因为线路质量或者硬件的传输问题,一个比较高的CRC数目通常是有些工作站发送大量坏的数据包造成的。
frame
接受到的含有CRC错误和非整数的十进制数目的数据包的数量,在局域网中,通常是因为碰撞过多或者以太网设备的故障。
overrun
因为输入的速率超出了接受者硬件的处理能力没有硬件缓存来处理的次数。
ignored
和系统的缓存不同,这个是因为接口的内部缓存而造成的接受到数据包被忽略的数目。
Abort 接受时中断的数据包的个数。
input packets with dribble condition detected
Frame 超长的输入的数据包。
packets output 系统发出的数据包的个数。
bytes
系统接发出的所有数据包(包括数据和MAC封装)的字节数。
Underruns 发送者传输过快导致路由器无法处理的次数。
output errors
接口认为的所有传输数据包的错误的总和,同时,一个数据包可能会包括多个的error。
Collisions 因为以太网冲突导致重传的数据包的个数。
interface resets
接口重启的次数。在几秒钟时间内进入队列的数据包都没有传输的情况下可能发生。在串行接口上,可能是因为传输的modem故障没有发送时钟信号或者线缆的问题 。如果系统发现串行上因为有载波信号接口up但是协议是down的情况下,接口会努力周期性的重启自己。当接口回环或者被shut down是接口也可能会重启。
Babbles 传输的计时器到。
late collision
传输数据包序文报头后发生的碰撞叫late collisions。通常发生late collision都是因为以太网的线缆过长,超出了它所能传输的距离限制造成的。
Deferred 因为载波的问题,芯片延后传输帧。
lost carrier 传输过程中丢失载波的次数。
路由器应用实例 如何配置一个以太网接口
发布时间:2007.11.14 05:00 来源:赛迪网-技术社区 作者:苦苦
在配置以太网接口时,我们需要为以太网接口配置IP地址及子网掩码来进行IP数据包的处理。默认情况下,以太网接口是管理性关闭的,所以在配置完成IP地址后,我们还需要激活接口。
配置实例:
在这个实例中,我们需要为以太网接口配置192.168.0.1的IP地址并且激活接口。
1、在特权模式下进入全局配置模式。
router#configure terminal
2、进入第一个以太网接口。
router(config)#interface e 0
3、这时,命令提示符变为router(config-if)#,在提示符后输入以下命令为接口配置私有IP地址192.168.0.1,使用默认子网掩码255.255.255.0。
router(config-if)#ip address 192.168.0.1 255.255.255.0
4、在默认情况下,cisco路由器的接口是在关闭状态下的,我们需要键入“no shutdown”命令来激活接口。
router(config-if)#no shutdown
如何为cisco路由器分配多个地址
我们可以通过在一个接口上配置多个IP地址来解决地址分配不足和连接更多子网的问题,例如:在用户的网络中需要280个IP地址,我们就可以为路由器的一个接口上分配多个IP地址来增加可供分配的地址范围。
在以太网接口配置模式下输入“ip address 192.168.1.1 255.255.255.0”的命令就可以增加IP地址范围到506。这样我们就可以解决IP地址分配置不足的问题了!
设备运行环境维护
HUAWEI
设备运行环境维护
设备运行状态检查
由于产品版本升级或其它原因,本手册内容会不定期进行更新。除非另有约定,本手册仅作为使用指导,本手册中的所有陈述、信息和建议不构成任何明示或暗示的担保。
目 录
声明 i
设备运行环境维护 1
1 机房环境 1
2 机柜、机架内部环境 1
设备运行状态检查 3
1 设备基本运行信息检查 3
2 端口流量信息监控 5
3 网络互通性检查 5
设备运行环境维护
数据通信产品的稳定运行一方面依赖于完备的网络规划,另一方面,*常的维护和监测,发现设备运行隐患也是非常必要的。本章主要给出华为数据通信产品运行环境的*常维护建议,包括机房环境、机柜内部环境等。
1 机房环境
电信级数通设备对运行环境的要求比较高,一般是安装在专用机房,配备专用的空调、供电系统等,主要的*常维护项目有以下几点:
表1 机房环境检查表
序号 检查内容 结果 备注
1 机房温度
2 机房湿度
3 供电系统
„
说明:
检查项目可以根据具体设备运行环境进行补充;
2 机柜、机架内部环境
华为数据通信产品根据各款产品的不同形态,有的需要安装在专用机柜中,有的应用一体化机架。这部分的检查内容主要包括机柜内电缆布放、业务线缆标签等。
表2 机柜、机架内部环境检查表
序号 检查内容 结果 备注
1 电源线与业务线缆分开布放
2 电源线布放整齐、有序
3 业务线缆布放整齐、有序
4 线缆标签清晰、准确,符合规范
5 空闲槽位有假面板保护
6 机框进风口没有过多灰尘堵塞,不影响设备正常散热
7 NE80/NE40具备冗余电源输入
说明:
NE80交流机架不提供冗余电源输入;
设备运行状态检查
1 设备基本运行信息检查
设备运行信息主要是指*志、单板运行转态、路由条目等,表3列举了一些常用的检查项目,可以在进行设备*常维护时参考。
表3 设备基本信息
序号 检查内容 检查方法 备注
1 软件版本 [Quidway] display version 如果是双主控设备,要求主备用主控板版本一致
2 调试开关 [Quidway] display debugging 正常运行时应该全部关闭
3 *志信息 [Quidway] display logbuffer
[Quidway] display logfile buffer 正常情况下,*志中不应该有大量重复的信息,比如端口频繁up/down,大量用户认证失败信息等
4 系统时间 [Quidway] display clock 应该与实际时间相差小于10分钟
5 配置文件 [Quidway] display current-configuration
[Quidway] display saved-configuration 运行配置需要与保存过的配置相同
6 端口描述 [Quidway] display interface 业务端口都应该有明确的描述信息,建议该命令多次执行,每次间隔一定时间,正常情况下,端口错包统计不应该有变化
7 登录安全配置 查看运行配置文件 需要配置"登录用户认证"与"特权用户认证"
说明:
表3中应用"display logbuffer/display logfile buffer"命令收集的*志信息为"最近"发生的事件,"以往"发生的*志信息会自动写入硬盘。
表4 路由相关信息
序号 检查内容 检查方法 备注
1 OSPF邻居状态 [Quidway] display ospf peer 邻居状态应该正常
2 IS-IS邻居状态 [Quidway] display isis peer 邻居状态应该正常
3 BGP邻居状态 [Quidway] display bgp peer 邻居状态应该正常
4 路由条目统计 [Quidway] display ip routing-table verbose 主要关注路由条目统计值,对于处在同一个网络中,运行相同路由协议的设备来说,各设备上的路由条目应该相差不多(因为静态路由的配置差异,路由条目上可能存在一定差异)
说明:
表4中只列出了部分动态路由协议的邻居转态监控方法,如果实际应用中还有其他协议,请参考《命令手册》,原则就是要确保邻居状态正常。
表5 软硬件运行状态
序号 检查内容 检查方法 备注
1 CUP占用率 [Quidway] display cpu CPU占用率不应该长时间居高不下
2 内存占用率 [Quidway] display memory 内存占用率不应该长时间居高不下
3 接口状态 [Quidway] display inerface 正在使用的接口应为up,未用接口应为down
4 系统告警 [Quidway] display alarm record all 应该无异常告警
5 单板运行状态 [Quidway] display device 各单板工作状态正常
6 电源工作状态 [Quidway] display device 各电源模块工作状态正常
7 风扇工作状态 [Quidway] display device 各风扇模块工作状态正常
8 查看单板备份状态 [Quidway] display switch state 应该处于实时备份状态
说明:
表5中给出的系统状态监控命令是针对NE80/40产品的,其他产品请参考《命令手册》。
2 端口流量信息监控
网络业务是不断发展的,相应的设备符合也随着业务量的增大而增大,而且网络上存在大量的病毒报文,我们需要对网络上的流量进行监控。一方面可以发现异常、非法流量,采取相应的限速和病毒查杀等操作;另一方面,如果发现网络上的正常流量已经几乎达到设备性能极限,就需要考虑升级或者扩容了。
设备端口流量信息的统计方式主要通过两个手段:通过网管系统监控;按时对设备的端口数据包收发进行监控、统计。
如果通过网管系统监控,我们可以比较容易的得到设备的端口流量信息。大部分的网管系统都提供流量监测功能,可以输出端口流量曲线。结合流量分析软件,我们还可以知道数据流量的组成,如果发现过多的非法报文,我们可以根据报文的"源IP"、"目的IP"、"协议类型"等特征设置限速或者访问控制。
如果无法借助网管系统,只能通过在设备上应用"display interface"命令,记录5分钟平均流量统计(回显信息中包括这个信息)的方式来监控端口流量。我们建议在每天的不同时段记录该统计值的结果,主要是针对"业务忙时"进行统计,这样可以起到与网管系统类似的作用。
3 网络互通性检查
数通通信产品的基本功能就是将不同网段的设备互连在一起,保证各网段设备之间的网络层互通性。网络互通性检测的手段有ping、tracert等,表6是一些通用的检查项目,*常维护中可以参考:
表6 路由相关信息
序号 检查内容 检查方法 备注
1 网络设备的互通性 应用ping或者tracert命令 设备之间互通正常
2 终端与服务器之间的互通性 应用ping或者tracert命令 终端与服务器之间互通正常
3 终端与外网的互通性 应用ping或者tracert命令 如果不涉及Internet访问,该项不需检查
4 NAT功能是否正常 查看运行配置,应用ping或者tracert命令 包括为私网用户提供的NAT和私网服务器
说明:
由于ping和tracert命令都应用到了特定的ICMP报文,个别设备上的访问控制列表配置问题,可能造成设备之间互通性无法通过ping和tracert命令进行测试;
ping命令可以更改多个参数,互通性测试中比较有用的是通过"-a"来更改ICMP源地址信息。
polling interval,1分钟 ---------主要的延时器,一般设为3~5分钟
fast polling interval,2分钟 ---当一个Node发生丢包以后对该node采用比主推进器更短的延迟以确定该node 是不是真的有问题. 一般设为10~30秒.
stats collection,5分钟 ---------统计间隔
rediscovery interval,5分钟----- 重新发现设备的间隔,一般可以设的长一点,毕竟设备安装好了就不会不停地更改. 有一点例外是对windows cluster的监控,主控器会经常地切换,我发现orion对cluster中的仲裁磁盘的rediscovery 经常会无效.
2.2. 远程telnet连接
当完成交换机配置,并起给交换机配置了管理地址,就可以直接采用远程telnet登陆进入交换机了,但是必须先配置line vty的密码和enable密码才能允许远程登陆。
配置telnet登陆命令如下:
#conf t
#line vty 0 4
#login ;控制vty接口是否能够telnet
#password switch
3. 基本信息配置
3.1. 交换机软件版本
Cisco的65xx交换机支持两种版本的系统软件,分别称为Natvie IOS版本和Cat OS版本的系统软件,CatOS版本的软件是为了兼容之前的65xx系列交换机的命令而沿袭下来的。Native IOS版本软件是Cisco公司为了统一其交换机及路由器的软件风格而研发出来的新一代IOS系统软件,Cisco所有的交换机版本都在整体向Native IOS版本过渡,目前来说,Native IOS版本的软件功能和CatOS版本的软件功能相差不多,但是今后都会向Native IOS版本软件。
本项目中所使用的6509交换机采用的是Native IOS版本。
3.2. 查看交换机基本配置
show version ;查看系统版本,内存配置,寄存器等基本信息
show module all ;查看交换机配置模块
show catalyst6000 chassis-mac-address ;查看交换机MAC地址
#show version输出信息如下:
Cisco Internetwork Operating System Software IOS (tm) s72033_rp Software (s72033_rp-PK9S-M), Version 12.2(17a)SX1, EARLY
DEPLOYMENT RELEASE SOFTWARE (fc1) TAC Support: /tac Copyright (c) 1986-2003 by cisco Systems, Inc. Compiled Wed 29-Oct-03 08:16 by cmong
Image text-base: 0x40008FBC, data-base: 0x41E50000
ROM: System Bootstrap, Version 12.2(14r)S9, RELEASE SOFTWARE (fc1) BOOTLDR: s72033_rp Software (s72033_rp-PK9S-M), Version 12.2(17a)SX1, EARLY
DEPLOYMENT RELEASE SOFTWARE (fc1)
Router uptime is 29 minutes
Time since Router switched to active is 29 minutes
System returned to ROM by power-on (SP by power-on)
System restarted at 12:57:08 PST Sat Jan 31 2004
System image file is "sup-bootflash:s72033-"
This product contains cryptographic features and is subject to United States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption. Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found
at:
/wwl/export/crypto/tool/
If you require further assistance please contact us by sending email to export@.
cisco WS-C6509 (R7000) processor (revision 3.0) with 458752K/65536K bytes of
memory.
Processor board ID SAL0743NKW8
SR71000 CPU at 600Mhz, Implementation 0x504, Rev 1.2, 512KB L2 Cache Last reset from power-on
X.25 software, Version 3.0.0.
Bridging software.
1 Virtual Ethernet/IEEE 802.3 interface(s)
48 FastEthernet/IEEE 802.3 interface(s) 36 Gigabit Ethernet/IEEE 802.3 interface(s)
1917K bytes of non-volatile configuration memory.
8192K bytes of packet buffer memory.
65536K bytes of Flash internal SIMM (Sector size 512K).
Standby is up
Standby has 458752K/65536K bytes of memory.
Configuration register is 0x2102
Router#sho module all
Mod Ports Card Type Model Serial
No.
--- ----- -------------------------------------- ------------------ -----------
2 16 16 port 1000mb GBIC
ethernet WS-X6416-GBIC SAL0750QNJP
3 16 16 port 1000mb GBIC
ethernet WS-X6416-GBIC SAL0750QNFV
5 2 Supervisor Engine 720
(Active) WS-SUP720-BASE SAD075000YF
6 2 Supervisor Engine 720
(Warm) WS-SUP720-BASE SAD075109SZ
7 48 48 port 10/100 mb
RJ45 WS-X6348-RJ-45 SAL0752R3E6
Mod MAC
addresses Hw Fw Sw Status --- ---------------------------------- ------ ------------ ------------ -------
2 000e.8442.4850 to 000e.8442.485f 2.5 5.4(2) 8.2(0.56)TET Ok
3 000e.8442.48f0 to 000e.8442.48ff 2.5 5.4(2) 8.2(0.56)TET Ok
5 08 to 0b 3.0 7.7(1) 12.2(17a)SX1 Ok
6 000e.3838.1a8c to 000e.3838.1a8f 3.0 7.7(1) 12.2(17a)SX1 Ok
7 000e.84c8.54f0 to 000e.84c8.551f 6.8 5.4(2) 8.2(0.56)TET Ok
Mod
Sub-Module Model Serial Hw Statu
s
--- --------------------------- ------------------ ------------ ------- -------
5 Policy Feature Card 3 WS-F6K-PFC3A SAD0752009D 2.0 Ok
5 MSFC3 Daughterboard WS-SUP720 SAD075109HX 2.0 Ok
6 Policy Feature Card 3 WS-F6K-PFC3A SAD0751085J 2.0 Ok
6 MSFC3 Daughterboard WS-SUP720 SAD0751077C 2.0 Ok
7 Inline Power Module WS-F6K-PWR 0.0 Ok
Mod Online Diag Status
--- -------------------
2 Pass
3 Pass
5 Pass
6 Pass
7 Pass
3.3. 配置机器名、telnet、密码
在全局模式下,用conf t,进入配置模式,进行以下配置:
#conf t
#clock timezone GMT 8 ;配置时区
#clock set 13:30:21 31 JAN 2004 ;配置交换机时间
#clock calendar-valid ;使能硬件时钟同步
#service timestamps debug datetime localtime ;配置系统debug记录时间格式
#service timestamps log datetime localtime ;配置系统日志记录时间格式
#service password-encryption ;配置使用加密服务,主要针对口令加密
#hostname xxxx ;配置交换机名称
#enable secret 0 xxxxx ;配置enable口令
#copy run start ;将配置信息保存到NVRAM中,重启动不会丢失
#line vty 0 4 ;配置telnet
#exec-timeout 30 0
#password 0 xxxx
#login
3.4. 配置snmp
#conf t
#snmp-server community cisco ro(只读) ;配置只读通信字符串
#snmp-server community secret rw(读写) ;配置读写通信字符串
#snmp-server enable traps ;配置网关SNMP TRAP
#snmp-server host 10.254.190.1 rw ;配置网关工作站地址
3.5. 启动三层功能
#ip routing ;启动路由功能
3.6. 查看和配置系统环境变量
使用show bootvar命令查看系统启动环境变量,包括BOOT, BOOTLDR, and CONFIG_FILE参数:
Router# show bootvar BOOT variable = slot0:c6sup2,1;
CONFIG_FILE variable does not exist
BOOTLDR variable = bootflash:c6msfc2-boot-mz.121-3a.E4
Configuration register is 0x2
Router#
改变BOOT,、BOOTLDR、CONFIG_FILE 这三个环境变量使用命令:
BOOT #boot system
BOOTLDR #boot bootldr CONFIG_FILE #boot config 4. 端口设置
4.1. 端口基本设置
Cisco 65xx系列交换机的端口缺省都是路由模式,一般都会配置为交换端口使用,进入端口配置模式:
对于单一端口,在配置模式下输入:interface Ethernet,Fast Ethernet,Gigabit
Ethernet x/y, x为槽位号,y为端口号。
对于一组端口,可以使用以下的命令进入,例如:
Router(config)# interface range fastethernet 5/1 - 5 或:
Router(config-if)# interface range gigabitethernet 2/1 - 2, gigabitethernet 3/1 - 2
进行端口配置模式后,可以shutdown,或no shutdown端口,并可以对端口进行配置,快速以太端口有全双工、半双工和自动协商模式,如果知道对端连接的设备是采用何种方式,最好采用手工设置方式固定端口的模式和速率。缺省是自动协商模式。
快速以太端口的速率可以设置为100M,也可以设置为10M和自动协商。缺省是自动协商方式。如:
Router(config-if)#speed [10 | 100 | auto](速度)
Router(config-if)# duplex [auto | full | half](双工)
或添加注释,如:
Router(config-if)# description Channel-group to "Marketing"
4.2. 配置二层交换接口
(以fastethernet为例,gigabitethernet一样)
Router(config)# interface fastethernet x/y
Router(config-if)# shutdown
Router(config-if)# switchport ;6500上缺省端口为路由端口,需要写switchport
将端口设置为交换端口
Router(config-if)# switchport mode access Router(config-if)# switchport access vlan x
Router(config-if)# no shutdown
Router(config-if)# end
清除二层接口配置
(以fastethernet为例,gigabitethernet一样)
Router(config)# interface fastethernet x/y
Router(config-if)# no switchport Router(config-if)# end
注:使用default interface {ethernet | fastethernet | gigabitethernet} slot/port,使端口回到原来的缺省配置。
4.3. 配置三层路由端口
6500的端口缺省就是具有三层交换的端口,用来跟其他设备的连接,当将一个端口配
置成三层端口之后,就可以在此端口上分配IP地址了。
Router(config)# interface fastethernet x/y
Router(config)# ip
Router(config)# no shutdown
4.4. 配置端口Trunk
将一个二层端口配置为Trunk模式:
Router(config)# interface fastethernet x/y (以fastethernet为例,
gigabitethernet一样)
Router(config-if)# shutdown
Router(config-if)# switchport
Router(config-if)# switchport trunk encapsulation dot1q
Router(config-if)# switchport mode trunk
Router(config-if)# no shutdown
Router(config-if)# end
Router# exit
4.5. Ethernaet Channel
Router(config)# interface range gigabitethernet1/1 - 2 Router(config-if)#no ip address
Router(config-if)#switchport
Router(config-if)#switchport trunk encapsulation dot1q
Router(config-if)#switchport mode trunk
Router(config-if)#switchport trunk native vlan 1 Router(config-if)#channel-group 1 mode on
产生配置结果如下:
interface Port-channel1 ;自动产生,并且一定要如下所示,否则可能会有问题。
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet1/1 no ip address
switchport
switchport trunk encapsulation dot1q
switchport trunk native vlan 1 channel-group 1 mode on
!
interface GigabitEthernet1/2 no ip address
switchport
switchport trunk encapsulation dot1q
switchport trunk native vlan 1 channel-group 1 mode on
如果有问题,使用命令#no int port-channel 1 ,#int g2/1 -2 ,#no switchport 4.6. 查看端口配置
Router# show running-config interface fastethernet 5/8
Router# show interfaces fastethernet 5/8 switchport
Router# show running-config interface port-channel 1
Router# show spanning-tree interface fastethernet 4/4
5. 配置VLAN
5.1. 配置VTP
VTP是一个2层信息协议,包括版本1和2。一个网络设备只能属于一个VTP domain。缺省, Catalyst 6500交换机配置为VTP server mode,在没有管理域的状态。直到在一个trunk链路上收到其他域的宣告或手工配置管理域。VTP并不是一定要配置,但是配置可以简化配置复杂度和易于管理。
VTP pruning(VTP裁剪)增强了网络带宽利用率。结合VTP,使得没有必要接收某个vlan的广播信息的交换机被裁剪,免于接收包括broadcast, multicast, unknown, and flooded unicast的包。
Router(config)# vtp domain domain_name
Router(config)# vtp mode {client | server | transparent}
Router(config)# vtp version {1 | 2}
Router(config)# vtp password password_string
Router(config)# vtp pruning Router# show vtp status 5.2. 配置VLAN端口
5.3. 创建VLAN
缺省状态下,所有的二层端口均属于vlan1,vlan的配置方法如下:
命令 目的
Step 1 Router# vlan database 进入vlan配置方式.
Step 2 Router(vlan)# vlan vlan_ID 加入一个VLAN.
Step 3 Router(vlan)# vtp domain name 设置vtp域名
Step 3 Router(vlan)# exit 更新VLAN数据库,并在管理域内广播,退到全局模式
Step 4 Router# show vlan name vlan_name 验证VLAN配置
删除配置好的vlan
Router# vlan database
Router(vlan)# no vlan x
Deleting
Router(vlan)# exit
5.4. 给vlan分配端口
Router(config)# interface fastethernet x/y
Router(config-if)# shutdown
Router(config-if)# switchport Router(config-if)# switchport mode access Router(config-if)# switchport access vlan x
Router(config-if)# no shutdown
Router(config-if)# end
Router# exit
5.5. 配置vlan地址
Router(config)# interface vlan x
Router(config)# ip
6. 配置HSRP
不同网段之间的通信都是通过在终端工作站上设定缺省网关来实现的,为了实现冗余,每台交换机上必然要配置相同的网段,那么就会在一个网段中出现2个不同地址的路由接口(对于工作站就是缺省网关),当1条上联链路失效时,数据必然会从另外1条链路传输到另外一台交换机上进行处理,这时就存在缺省网关变更的问题。
为了消除当一条链路失效导致的工作站缺省网关重新定义的问题,我们使用Cisco公司专有HSRP(Hot Standby Redundant Protocol)技术来解决这个问题。
HSRP技术就是将分布在2台交换机上相同网段的不同路由接口IP地址映射为一个虚拟IP地址来消除工作站缺省网关重新定义的问题。配置如下:
在其中一台65xx上按下面模版进行配置
interface Vlan x
ip addres
no ip redirects
no ip directed-broadcast
standby 1
standby 1 priority 100
standby 1 preempt
standby 1 authentication secret
在另一台65xx上按下面模版进行配置
interface Vlan x
ip addres
no ip redirects
no ip directed-broadcast
standby 1
standby 1 priority 110 ;这个优先级高,成为Master
standby 1 preempt
standby 1 authentication secret
7. 配置NTP
NTP (Network Time Protocol) 为路由器、交换机和工作站之间提供了一种时间同步的机制。时间同步了,多台网络设备上的相关事件记录可以放在一起看,更为清晰,方便了分析较复杂的故障和安全事件等。
(1)本地时钟设置:
clock timezone Peking 8 ;定义时区
clock calendar-valid ;允许使用硬件calendar作为时钟源
clock set hh:mm:ss month year ;如clock set 14:02:30 10 December 2003 clock update-calendar ;更新硬件时钟
(2)ntp server ntp calendar-update ;允许NTP定期更新calendar
ntp master 3 ;允许本机作为NTP协议的主时钟,精度级别3,供其它对等体同步用。
ntp source int vlan 7 ;设置ntp时钟原的端口或IP地址
(3)常用的调试命令有:
show ntp status show ntp associations
8. 配置镜像端口
在交换机上配置镜像端口(Mirroring Port)用于建立内部网络的监控端口,以便收集相关被监测端口的数据流量,进行数据流监控及分析。我们这里配置镜像端口用于配置入侵检测设备(镜像端口)的检测口检测一级防火墙和二级防火墙的内网接口,以探测是否有入侵行为发生。
#monitor session 1 source interface Fa7/14 - 19 rx
#monitor session 1 destination interface Fa7/22
#monitor session 2 source interface Fa7/24
#monitor session 2 destination interface Fa7/25
9. 升级配置
9.1. 交换机IOS保存和升级
交换机的IOS保存和升级是采用TFTP协议完成,所以首先你必须要下载一个TFTP软件,然后按照下面的步骤来进行:
1.在你的机器上启动TFTP 。
2.登陆到交换机,然后在enable状态下输入如下命令来完成IOS的保存:
switch#copy flash tftp
Source IP address or hostname [171.68.206.171]?
Source filename []? cat6000-sup2k8.
Destination filename [cat6000-sup2k8.]?
Loading cat6000-sup2k8. to 171.68.206.171 (via VLAN1):
[OK - 1125001 bytes] 3.如果你要升级IOS文件,那么你首先要检查flash空间是否够,如果空间不够的话,则需要先删除原来的IOS然后再升级。按照如下命令来完成IOS的升级:
switch#copy tftp flash
Source IP address or hostname []? 171.68.206.171
Source filename []? cat6000-sup2k8.
Destination filename [cat6000-sup2k8.]? y
Loading cat6000-sup2k8. from 171.68.206.171 (via VLAN1):
[OK - 1125001 bytes] 9.2. 配置从另外一个版本的IOS启动
如果交换机FLASH容量允许的话,我们可以在不删除原有交换机内部IOS软件的情况下配置交换机从另外一个版本的IOS启动,这样可以避免一定程度上由于删除原有IOS软件带来的风险。
1.拷贝新的IOS到交换机的FLASH内。假设新的IOS软件名称为
cat6000-sup2k8.
# copy tftp flash
2.配置从新的IOS软件引导
# boot system flash [flash-fs:][partition-number:][filename]
#boot system flash sup-bootflash: cat6000-sup2k8.
能对大家有帮助,
一、 Catalyst 6509交换机配置方案
1.1、配置6509二层交换
Console> (enable) set system name bg-sw-01 /设备名称
Bg-sw-01> (enable) set password
Enter old password:
Enter new password:
Retype new password:
Bg-sw-01> (enable) set enablepass
Enter old password:
Enter new password:
Retype new password:
Bg-sw-01> (enable) set banner motd % Welcome to the c6509 in the office % /提示文本
Bg-sw-01> (enable) set interface sc0 10.234.180.21 255.255.255.0 /设置管理接口 #sh int
Bg-sw-01> (enable) set ip route default 10.234.180.234 /设置默认网关 #sh ip route
Bg-sw-01> (enable) set vtp mode server /设置VTP模式 #sh vtp domain
Bg-sw-01> (enable) set vtp domain Core_Net /设置VTP域名
Bg-sw-01> (enable) set vlan 31 name ZhongSanLu /创建VLAN #sh vlan
Bg-sw-01> (enable) set vlan 32 name YiYang
Bg-sw-01> (enable) set vlan 33 name JianXiu
Bg-sw-01> (enable) set vlan 34 name RaoDian
Bg-sw-01> (enable) set vlan 35 name JinSanLou
Bg-sw-01> (enable) set vlan 36 name WuZi
Bg-sw-01> (enable) set port channel 1/1-2 on /设置Channel #sh port channel
Bg-sw-01> (enable) set trunk 1/1 on dot1q 1-1005
Bg-sw-01> (enable) set trunk 2/2 on dot1q 1-1005 /设置trunk口 #sh trunk #
Bg-sw-01> (enable) set trunk 2/3 on dot1q 1-1005
Bg-sw-01> (enable) set trunk 2/4 on dot1q 1-1005
Bg-sw-01> (enable) set trunk 2/5 on dot1q 1-1005
Bg-sw-01> (enable) set trunk 2/6 on dot1q 1-1005
Bg-sw-01> (enable) set trunk 2/7 on dot1q 1-1005
Bg-sw-01> (enable) set spantree root 1-40 dia 4 /设为spantree的根 #sh spantree
Bg-sw-01> (enable) set spantree portfast 1/1-2 enable /设spantree端口快速启用
Bg-sw-01> (enable) set spantree portfast 2/1-8 enable
Bg-sw-01> (enable) set spantree uplinkfast enable /设spantree端口快速切换
Bg-sw-01> (enable) set spantree backbonefast enable /设spantree端口快速定位根
1.2、配置路由
Console> (enable) session 15 /进入路由子卡
Router(config)# hostname c6509-msfc /设备名
c6509-msfc (config)# enable password test /设口令
c6509-msfc (config)# enable secret test
C6509-msfc(config)# banner motd % Welcome to the c6509-msfc in the Office % /设提示文本
c6509-msfc (config)# line vty 0 4 / 进入VTY模式
c6509-msfc (config-line)#login / 登入提示
c6509-msfc (config-line)#password test / 设用户级口令
c6509-msfc (config-line)# end
C6509-msfc#configure terminal / 进入全局模式
Enter configuration commands, one per line. End with CNTL/Z.
C6509-msfc(config)# interface vlan 1 /进入虚子接口
C6509-msfc(config-if)# ip address 10.234.180.232 255.255.255.0 /加ip地址
C6509-msfc(config-if)# no shutdown /开启端口
C6509-msfc(config-if)# standby 1 ip 10.234.180.234 /建HSRP组并设虚IP地址
C6509-msfc(config-if)# standby 1 priority 110 /设优先级
C6509-msfc(config-if)# standby 1 preempt /设切换许可
C6509-msfc(config-if)# interface vlan 31
C6509-msfc(config-if)# ip address 10.234.181.60 255.255.255.192
C6509-msfc(config-if)# no shutdown
C6509-msfc(config-if)# standby 31 ip 10.234.181.62
C6509-msfc(config-if)# standby 31 priority 110
C6509-msfc(config-if)# standby 31 preempt
C6509-msfc(config-if)# interfacevlan 32
C6509-msfc(config-if)# ip address 10.234.181.124 255.255.255.192
C6509-msfc(config-if)# no shutdown
C6509-msfc(config-if)# standby 32 ip 10.234.181.126
C6509-msfc(config-if)# standby 32 priority 110
C6509-msfc(config-if)# standby 32 preempt
C6509-msfc(config-if)# interface vlan 33
C6509-msfc(config-if)# ip address 10.234.181.188 255.255.255.192
C6509-msfc(config-if)# no shutdown
C6509-msfc(config-if)# standby 33 ip 10.234.181.190
C6509-msfc(config-if)# standby 33 priority 110
C6509-msfc(config-if)# standby 33 preempt
C6509-msfc(config-if)# interface vlan 34
C6509-msfc(config-if)# ip address 10.234.181.220 255.255.255.224
C6509-msfc(config-if)# no shutdown
C6509-msfc(config-if)# standby 34 ip 10.234.181.222
C6509-msfc(config-if)# standby 34 priority 110
C6509-msfc(config-if)# standby 34 preempt
C6509-msfc(config-if)# interface vlan 35
C6509-msfc(config-if)# ip address 10.234.181.254 252.255.255.224
C6509-msfc(config-if)# no shutdown
C6509-msfc(config-if)# standby 35 ip 10.234.181.254
C6509-msfc(config-if)# standby 35 priority 110
C6509-msfc(config-if)# standby 35 preempt
C6509-msfc(config-if)# interface vlan 36
C6509-msfc(config-if)# ip address 10.234.182.28 255.255.255.224
C6509-msfc(config-if)# no shutdown
C6509-msfc(config-if)# standby 36 ip 10.234.182.30
C6509-msfc(config-if)# standby 36 priority 110
C6509-msfc(config-if)# standby 36 preempt
C6509-msfc(config-if)# exit
C6509-msfc #copy running config
二、Catalyst 4006交换机配置方案
2.1、配置4006二层交换(三层交换模块安置在第二个槽)
Console> (enable) set system name bg-sw-02 /设备名称
Bg-sw-02> (enable) set password
Enter old password:
Enter new password:
Retype new password:
Bg-sw-02> (enable) set enablepass
Enter old password:
Enter new password:
Retype new password:
Bg-sw-02> (enable) set banner motd % Welcome to the c4006 in the office % /提示文本
Bg-sw-02> (enable) set interface sc0 10.234.180.22 255.255.255.0 /设置管理接口 #sh int
Bg-sw-02> (enable) set ip route default 10.234.180.234 /设置默认网关
#sh ip route
Bg-sw-02> (enable) set vtp mode server /设置VTP模式 #sh vtp domain
Bg-sw-02> (enable) set vtp domain Core_Net /设置VTP域名
Bg-sw-02> (enable) set vlan 31 name ZhongSanLu /创建VLAN #sh vlan
Bg-sw-02> (enable) set vlan 32 name YiYang
Bg-sw-02> (enable) set vlan 33 name JianXiu
Bg-sw-02> (enable) set vlan 34 name RaoDian
Bg-sw-02> (enable) set vlan 35 name JinSanLou
Bg-sw-02> (enable) set vlan 36 name WuZi
Bg-sw-02> (enable) set port channel 1/1-2 on /设置Channel #sh port channel
Bg-sw-02> (enable) set trunk 1/1 on dot1q 1-1005
Bg-sw-02> (enable) set port channel 2/1-2 on /设置Channel #sh port channel
Bg-sw-02> (enable) set trunk 2/1 on dot1q 1-1005
Bg-sw-02> (enable) set trunk 4/1 on dot1q 1-1005 /设置trunk口 #sh trunk #
Bg-sw-02> (enable) set trunk 4/3 on dot1q 1-1005
Bg-sw-02> (enable) set trunk 4/4 on dot1q 1-1005
Bg-sw-02> (enable) set spantree root secondary 1-40 dia 4
Bg-sw-02> (enable) set spantree portfast 1/1-2 enable /设spantree端口快速启用
Bg-sw-02> (enable) set spantree portfast 2/1-34 enable
Bg-sw-02> (enable) set spantree portfast 3/1-32 enable
Bg-sw-02> (enable) set spantree portfast 4/1-6 enable
Bg-sw-02> (enable) set spantree uplinkfast enable /设spantree端口快速切换
Bg-sw-02> (enable) set spantree backbonefast enable /设spantree端口快速定位根
2.1、配置三层交换模块(三层交换模块安置在第二)
Console> (enable) session 2 /进入路由子卡
Router(config)# hostname c4006-L3 /设备名
c4006-L3 (config)# enable password test /设口令
c4006-L3 (config)# enable secret test
c4006-L3(config)# banner motd % Welcome to the c4006-l3 in the Office % /设提示文本
c4006-L3 (config)# line vty 0 4 / 进入VTY模式
c4006-L3 (config-line)#login / 登入提示
c4006-L3 (config-line)#password test / 设用户级口令
c4006-L3 (config-line)# end
C4006-L3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
C4006-L3(config)# interface port-channel 1 /建内部虚端口
C4006-L3(config)# interface g3 /进入接口模式
C4006-L3(config-if)# channel-group 1 / 加入到channel组中
C4006-L3(config-if)# exit
C4006-L3(config)# interface g4 /进入接口模式
C4006-L3(config-if)# channel-group 1 / 加入到channel组中
C4006-L3(config-if)# exit
C4006-L3(config)# interface port-channel 1.1 /进入子接口模式
C4006-L3(config-if)# encapsulation dot1q 1 native / 封装trunk
C4006-L3(config-if)# ip address 10.234.180.233 255.255.255.0 /加ip地址
C4006-L3(config-if)# no shutdown /开启端口
C4006-L3(config-if)# standby 1 ip 10.234.180.234 /建HSRP组并设虚IP地址
C4006-L3(config-if)# standby 1 priority 100 /设优先级
C4006-L3(config-if)# standby 1 preempt /设切换许可
C4006-L3(config-if)# interface port-channel 1.31
C4006-L3(config-if)# encapsulation dot1q 31
C4006-L3(config-if)# ip address 10.234.181.61 255.255.255.192
C4006-L3(config-if)# no shutdown
C4006-L3(config-if)# standby 31 ip 10.234.181.62
C4006-L3(config-if)# standby 31 priority 100
C4006-L3(config-if)# standby 31 preempt
C4006-L3(config-if)# interface port-channel 1.32
C4006-L3(config-if)# encapsulation dot1q 32
C4006-L3(config-if)# ip address 10.234.181.125 255.255.255.192
C4006-L3(config-if)# no shutdown
C4006-L3(config-if)# standby 32 ip 10.234.181.126
C4006-L3(config-if)# standby 32 priority 100
C4006-L3(config-if)# standby 32 preempt
C4006-L3(config-if)# interface port-channel 1.33
C4006-L3(config-if)# encapsulation dot1q 33
C4006-L3(config-if)# ip address 10.234.181.189 255.255.255.192
C4006-L3(config-if)# no shutdown
C4006-L3(config-if)# standby 33 ip 10.234.181.190
C4006-L3(config-if)# standby 33 priority 100
C4006-L3(config-if)# standby 33 preempt
C4006-L3(config-if)# interface port-channel 1.34
C4006-L3(config-if)# encapsulation dot1q 34
C4006-L3(config-if)# ip address 10.234.181.221 255.255.255.224
C4006-L3(config-if)# no shutdown
C4006-L3(config-if)# standby 34 ip 10.234.181.222
C4006-L3(config-if)# standby 34 priority 100
C4006-L3(config-if)# standby 34 preempt
C4006-L3(config-if)# interface port-channel 1.35
C4006-L3(config-if)# encapsulation dot1q 35
C4006-L3(config-if)# ip address 10.234.181.253 255.255.255.224
C4006-L3(config-if)# no shutdown
C4006-L3(config-if)# standby 35 ip 10.234.181.254
C4006-L3(config-if)# standby 35 priority 100
C4006-L3(config-if)# standby 35 preempt
C4006-L3(config-if)# interface port-channel 1.36
C4006-L3(config-if)# encapsulation dot1q 36
C4006-L3(config-if)# ip address 10.234.182.29 255.255.255.224
C4006-L3(config-if)# no shutdown
C4006-L3(config-if)# standby 36 ip 10.234.182.30
C4006-L3(config-if)# standby 36 priority 100
C4006-L3(config-if)# standby 36 preempt
C4006-L3(config-if)# exit
C4006-L3#copy running config
三、Catalyst 3500XL交换机配置方案
3.1、办公楼Catalyst 3500XL交换机配置方案
第一台Catalyst 3548
switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#hostname bg-sw-03 /设备名
bg-sw-03(config)#enable password test /设口令
bg-sw-03(config)#enable secret test
bg-sw-03(config)#banner motd % Welcome to the C3548 in the Office % /提示文本
bg-sw-03(config)#line vty 0 4 / 进入VTY模式
bg-sw-03(config.line)#login / 登入提示
bg-sw-03(config.line)#password test / 设用户级口令
bg-sw-03(config.line)#exit
bg-sw-03 (config)#int vlan 1 / 进入内部管理接口
bg-sw-03 (config-if)#ip address 10.234.180.23 255.255.255.0 /加入IP地址
bg-sw-03(config-if)#exit
bg-sw-03(config)#ip defauly 10.234.180.234 /设网关
bg-sw-03(config)#end
bg-sw-03#vlan database /
进入vtp数据库
bg-sw-03(vlan)#vtp domain Corp_Net /设vtp域
bg-sw-03(vlan)#vtp client /设定vtp模式
bg-sw-03(vlan)#exit
bg-sw-03(config)#spantree uplinkfast /设定端口快速上连
bg-sw-03(config)#int g0/1 /进入接口模式
bg-sw-03(config-if)#switchport mode trunk /设为trunk模式
bg-sw-03(config-if)#switchport trunk encapsulation dot1q /设定封装模式
bg-sw-03(config-if)#switchport trunk allowed vlan all /设定trunk许可vlan
bg-sw-03(config-if)#spanning-tree portfast /设定端口快速启用
bg-sw-03(config-if)#int g0/2 /进入接口模式
bg-sw-03(config-if)#switchport mode trunk /设为trunk模式
bg-sw-03(config-if)#switchport trunk encapsulation dot1q /设定封装模式
bg-sw-03(config-if)#switchport trunk allowed vlan all /设定trunk许可vlan
bg-sw-03(config-if)#spanning-tree portfast /设定端口快速启用
bg-sw-03(config-if)#exit
bg-sw-03#write memory
第二台Catalyst 3548
switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#hostname bg-sw-04 /设备名
bg-sw-04(config)#enable password test /设口令
bg-sw-04(config)#enable secret test
bg-sw-04(config)#banner motd % Welcome to the C3548 in the Office % /提示文本
bg-sw-04(config)#line vty 0 4 / 进入VTY模式
bg-sw-04(config.line)#login / 登入提示
bg-sw-04(config.line)#password test / 设用户级口令
bg-sw-04(config.line)#exit / 进入内部管理接口
bg-sw-04(config)#int vlan 1
bg-sw-04(config-if)#ip address 10.234.180.24 255.255.255.0
bg-sw-04(config-if)#exit
bg-sw-04(config)#ip defauly 10.234.180.234
bg-sw-04(config)#end
bg-sw-04#vlan database
bg-sw-04(vlan)#vtp domain Corp_Net
bg-sw-04(vlan)#vtp client
bg-sw-04(vlan)#exit
bg-sw-04(config)#spantree uplinkfast
bg-sw-04(config)#int g0/1
bg-sw-04(config-if)#switchport mode trunk
bg-sw-04(config-if)#switchport trunk encapsulation dot1q
bg-sw-04(config-if)#switchport trunk allowed vlan all
bd-sw-03 (config-if)# spanning-tree portfast
bg-sw-04(config-if)#exit
bg-sw-04(config)#int g0/2
bg-sw-04(config-if)#switchport mode trunk
bg-sw-04(config-if)#switchport trunk encapsulation dot1q
bg-sw-04(config-if)#switchport trunk allowed vlan all
bg-sw-04(config-if)#spanning-tree portfast
bg-sw-04(config-if)#exit
bg-sw-04#write memory
3.2 办公楼Catalyst 3548XL交换机配置方案
switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#hostname zsr-sw-01
zsr-sw-01(config)#enable password test
zsr-sw-01(config)#enable secret test
zsr-sw-01(config)#banner motd % Welcome to the C3548 in the Zhong San Lu
ban Gong Lou %
zsr-sw-01(config)#line vty 0 4
zsr-sw-01(config.line)#login
zsr-sw-01(config.line)#password test
zsr-sw-01(config.line)#exit
zsr-sw-01(config)#int vlan 1
zsr-sw-01(config-if)#ip address 10.234.180.25 255.255.255.0
zsr-sw-01(config-if)#exit
zsr-sw-01(config)#ip defauly 10.234.180.234
zsr-sw-01(config)#end
zsr-sw-01#vlan database
zsr-sw-01(vlan)#vtp domain Corp_Net
zsr-sw-01(vlan)#vtp client
zsr-sw-01(vlan)#exit
zsr-sw-1#configure terminal
zsr-sw-1(config)#int f0/1
zsr-sw-1(config-if)#switchport mode access
zsr-sw-1(config-if)#switchport access vlan 31
zsr-sw-1(config-if)#exit
zsr-sw-1(config)#int f0/2
。。。。。。
zsr-sw-1(config)#int f0/48
zsr-sw-1(config-if)#switchport mode access
zsr-sw-1(config-if)#switchport access vlan 31
zsr-sw-1(config-if)#exit
zsr-sw-01(config)#int g0/1
zsr-sw-01(config-if)#switchport mode trunk
zsr-sw-01(config-if)#switchport trunk encapsulation dot1q
zsr-sw-01(config-if)#switchport trunk allowed vlan all
zsr-sw-01 (config-if)#spantree cost 10
zsr-sw-01(config-if)#exit
zsr-sw-01(config)#int g0/2
zsr-sw-01(config-if)#switchport mode trunk
zsr-sw-01(config-if)#switchport trunk encapsulation dot1q
zsr-sw-01(config-if)#switchport trunk allowed vlan all
zsr-sw-01 (config-if)#spantree cost 20
zsr-sw-01(config-if)#exit
zsr-sw-01#write memory
版权声明:本文标题:交换机接口命令介绍 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1703424179a54461.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论