需要完整的有关该章的语法和应用信息,请参考Catalyst 3550 Multilayer Switch Command Reference和Cisco IOS Interface Command Reference for Release 12.1.
Switch(config)# interface gigabitethernet0/1
Switch(config-if)#
Switch# show interfaces
Vlan1 is up, line protocol is up
Hardware is EtherSVI, address is 0000.0000.0000 (bia 0000.0000.00
Internet address is 10.1.1.64/24
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:35, output 2d14h, output hang never
Last clearing of "show interface" counters never
Queueing strategy: fifo
Output queue 0/40, 1 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
264251 packets input, 163850228 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
380 packets output, 26796 bytes, 0 underruns
0 output errors, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
FastEthernet0/1 is up, line protocol is down
Hardware is Fast Ethernet, address is 0000.0000.0001 (bia 0000.00
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Auto-duplex, Auto-speed
input flow-control is off, output flow-control is off
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Queueing strategy: fifo
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
|
|
命令 |
目的 |
|
第一步 |
configure terminal |
启用全局配置模式 |
|
第二步 |
interface range {port-range | macro macro_name} |
输入接口的范围(Vlans或者物理端口)进入接口范围配模式进行配置。
l 你可以使用interface range命令配置可达5个端可范围或一个事先定义的宏。
l 在“配置和使用接口范围宏”中阐明宏是可变的。
l 每个逗号分隔的port-range必须包含相同的接口类型。你不必在逗号后面输入空格。
l 当你定义了一个范围,第一个端口和连字符之间需要一个空隔。 |
|
第三步 |
|
你现在可以用普通的配置命令提供配置参数给所有在范围内的接口。 |
|
第四步 |
end |
返回特权EXEC模式。 |
|
第五步 |
show interface [interface-id] |
确认在范围内的接口配置。 |
|
第六步 |
copy running-config startup-config |
(可选) 保存你的条目到配置文件中。 |
Switch# configure terminal
Switch(config)# interface range gigabitethernet0/1 -5
Switch(config-if-range)# no shutdown
Switch(config-if-range)#
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to up
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface GigabitEthernet0/3, changed state to up
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface GigabitEthernet0/4, changed state to up
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface GigabitEthernet0/5, changed state to up
*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/05,
changed state to up
*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3,
changed state to up
*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/4,
changed state to up
Switch# configure terminal
Switch(config)# interface range gigabitethernet0/1 -3, gigabitethernet0/7 -8
Switch(config-if-range)# no shutdown
Switch(config-if-range)#
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to up
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/3, changed state to up
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/7, changed state to up
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet0/8, changed state to up
*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/ 7,
changed state to up
*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/ 2,
changed state to up
*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/ 4,
changed state to up
|
|
命令 |
目的 |
|
第一步 |
configure terminal |
进入全局配置模式 |
|
第二步 |
define interface-range macro_name interface_range |
定义interface-range macro并保存在NVRAM。
l macro_name是一个最大32个字符的字符串。
l 一个macro可以包含5个以逗号隔开的接口范围。你不必在逗号前面或后面输入空格。
l 每个interface-range必须包含相同类型的端口 |
|
第三步 |
interface range macro macro_name |
选择需被配置的接口范围,并使用保存在interface-range中叫做macro_name的宏。
|
|
第四步 |
end |
返回特权模式 |
|
第五步 |
show running-config | include define |
显示被确认的接口范围宏配置 |
|
第六步 |
copy running-config startup-config |
(可选)保存你的条目到配置文件中。 |
Switch# configure terminal
Switch(config)# define interface-range enet_list gigabitethernet0/1 -4
Switch(config)# end
Switch# show running-config | include define
define interface-range enet_list GigabitEthernet0/1 -4
Switch#
Switch# configure terminal
Switch(config)# define interface-range macro1 gigabitethernet0/1 -2, fastethernet0/5 -7
Switch(config)# end
Switch#
Switch# configure terminal
Switch(config)# no define interface-range enet_list
Switch# show run | include define
Switch#
| 共2页: 1 [2] 下一页 | ||
|
|
|||
| · OSPF路由协议专栏 · 思科路由器产品 · 华为路由器产品 · 路由器模拟器 · AIX操作系统管理应用(.. · 思科路由器配置 · 路由器组网解决方案 · 路由器密码恢复 |
· 无线路由器故障处理 · 路由故障处理手册 · 路由器访问控制列表(AC.. · 路由器的安全配置与安.. · 无线路由器配置 · 路由器技巧 · 华为路由器配置 · 路由器配置基础 |
||
|
|||
| · Java基础教程 · VPN技术 · SQL Server 2005全解 · ARP攻击防范与解决方案 · SOA 面向服务架构 · SQL Server 2005全解 · Java编程开发手册 · 三层交换技术专题 |
· SQL Server入门到精通 · Windows Server 2003企.. · Windows远程桌面应用 · C#技术开发指南 · VPN技术 · Solaris 10 配置管理 · C#技术开发指南 · Windows操作系统安装 |
||
|
|||
| · VPN技术 · ARP攻击防范与解决方案 · SQL Server 2005全解 · Java基础教程 · SQL Server入门到精通 · SQL Server 2005全解 · SOA 面向服务架构 · Java编程开发手册 |
· C#技术开发指南 · 三层交换技术专题 · C#技术开发指南 · Windows远程桌面应用 · Windows Server 2003企.. · 邮件服务器专题 · wimax技术与趋势 · Windows操作系统安装 |
||
| ·DB2 Viper快速入门 ·DB2 9数据库的镜像分割与.. |
·将XML应用程序从DB2 8.x.. ·DB2 9中的pureXML:如何.. |
| ·服务器中的“傻瓜机”在.. ·盖茨也喜欢登录Youtube看.. |
· · |
| · 职场冲浪(之八):让感.. ·职场冲浪(之七):潜心.. |
·人生如鞋 ·职场冲浪(之六):从离梦最.. |
| ·将职业教育职业化 - 各IT.. ·思科交换机上实现MAC地址.. |
·关于51CTO合作出书中的职.. ·OSPF动态路由协议入门简介 |
| · NGN:下一代网络 · 网络访问中断大排查 · FTTx光纤接入 |
· 平凡黑客讲述精彩人生(.. · 平凡黑客讲述精彩人生(.. · 平凡黑客讲述精彩人生(.. |
| · C++是垃圾语言?! · 2007年IT界七大抄袭事件 · Java实用开发全集 |
· 解析Ajax开发框架 走进A.. · 基于Google Maps与Ajax.. · 基于Google Maps与Ajax.. |
| · Ubuntu 中文开源频道 · Solaris基础知识入门 · 微软正式发布英文版Wind.. |
· 服务器基础知识入门 · Rambus第二?看全缓冲内.. · 服务器节能对比测试:AM.. |
| · 甲骨文Oracle 11g正式发.. · Oracle数据库开发之PL/S.. · Oracle数据库开发基础教.. |
· 存储2006,一个并购的大.. · IDC宣布浪潮蝉联存储市.. · 双机热备技术 |