本文论述 Catalyst 4908G-L3 交换机的配置示例,以支持 VLAN 间路由和若干第二层(L2)交换机间的 VLAN 桥接。
本文档的读者必须了解Catalyst 4908G-L3交换机:
从配置角度看, Catalyst 4908G-L3 是一个路由器。它使用Cisco IOS®配置接口,默认情况下,所有接口都是路由接口。
Catalyst 4908G-L3不支持多种面向第2层的协议,如VLAN中继协议(VTP)、动态中继协议(DTP)或其他Catalyst交换机上的端口聚合协议(PAgP)。
在版本12.0(7)WX5(15d)中,Catalyst 4908G-L3不支持以下功能:
数据平面(安全)访问控制列表(ACL):换句话说,不能通过路由器接口上的输入或输出访问列表限制用户数据流量。12.0(10)W5(18e)版本现在支持数据平面ACL。
在802.1q子接口上桥接,即同时应用encapsulation dot1q和bridge-group n命令的子接口:支持在交换机间链路(ISL)子接口上桥接。版本12.0(10)W5(18e)现在支持802.1q子接口上的桥接。
AppleTalk 路由
端口监听,也称为SPAN、端口镜像、混杂模式
本文档中的信息基于以下软件和硬件版本:
运行Cisco IOS 12.0(7)W5(15d)的Catalyst 4908G-L3交换机路由器
运行Cisco IOS 12.0(5.2)XU的三台Catalyst 3512XL交换机
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
有关文档约定的更多信息,请参考 Cisco 技术提示约定。
本部分提供有关如何配置本文档所述功能的信息。
注意:使用命令查找工具(仅限注册客户)可获取有关本节中使用的命令的详细信息。
在本示例配置中,部署 Catalyst 4908G-L3 交换机有两个目的:
将五个VLAN(VLAN 1、10、20、30和40)扩展到多台第2层交换机:在本例中,三个Catalyst 3512XL
为IP和网际分组交换(IPX)执行VLAN间路由,以便不同VLAN中的设备之间能够通信
为了在交换机上扩展VLAN,3512XL通过中继链路和流量连接到4908G-L3,这些流量从一台3512XL交换机(桥接在该VLAN上)到达给定VLAN,该交换机采用符合正常桥接规则的桥接配置连接到其它交换机。两台3512XL 交换机使用千兆 EtherChannel 连接到 4908G-L3 交换机。另一台 3512XL 交换机使用单条千兆以太网链路。
为了支持VLAN间路由、集成路由和桥接(IRB)和网桥虚拟接口(BVI),这些接口配置为在不同VLAN之间路由IP和IPX。
终端站和服务器挂接到 Catalyst 3512XL 交换机。如果一个VLAN中的设备需要连接到另一个VLAN中的设备,则流量将发送到Catalyst 4908G-L3,并且它在BVI接口上路由流量。
如果部署是大型网络的一部分,则通过与核心交换机或路由器的连接将发往核心的流量路由到另一个子网(此处不考虑此配置)。
交换机采用以下配置:
应用基本的初始配置.
为便于管理而为交换机分配 IP 地址和默认网关。
VTP模式设置为透明模式,并且VLAN在Catalyst 3512XL交换机上配置。
在Catalyst 4908G-L3和3512xl-01和3512xl-02交换机之间配置千兆EtherChannel链路。
桥接、BVI接口以及IP和IPX路由在Catalyst 4908G-L3上配置。
ISL中继在Catalyst 4908G-L3和三台Catalyst 3512XL交换机之间配置,桥接在中继子接口上配置。
以下是IP和IPX网络到VLAN的映射:
VLAN | IP 子网 | IPX 网络 |
---|---|---|
1 | 10.10.1.0/24 | 不适用 |
10 | 10.10.10.0/24 | 1000 |
20 | 10.10.20.0/24 | 2000 |
30 | 10.10.30.0/24 | 3000 |
40 | 10.10.40.0/24 | 4000 |
分配了接入VLAN,并且在Catalyst 3512XL交换机的所有快速以太网接口上启用了生成树portfast。
本文档使用以下网络设置:
本文档使用以下配置:
在基于Cisco IOS的交换机(如Catalyst 4908G-L3和Catalyst 3512XL交换机)上,必须将此基本配置应用于每台交换机:
!-- The calendar set command does not apply to the Catalyst 3500XL switches. Router#calendar set 18:00:00 Jan 8 2003 Router#clock set 18:00:00 Jan 8 2003 Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname 4908G-L3 4908G-L3(config)#clock timezone PST -8 4908G-L3(config)#clock calendar-valid 4908G-L3(config)#service timestamps log datetime localtime msec 4908G-L3(config)#service timestamps debug datetime localtime msec 4908G-L3(config)#enable password verysecret 4908G-L3(config)#line vty 0 4 4908G-L3(config-line)#password secret 4908G-L3(config-line)#exit 4908G-L3(config)#no logging console 4908G-L3(config)#^Z 4908G-L3#
注意:
calendar set命令在交换机的内部日历芯片上设置时间和日期。此命令不适用于Catalyst Catalyst 3512XL交换机。
clock set命令用于设置交换机时钟的时间和日期。
hostname 命令可设置交换机的主机名称。
clock calendar-valid 命令告诉交换机在下次重新加载时使用存储在日历芯片中的日期和时间设置时钟日期和时间。此命令不适用于Catalyst 3548XL交换机。
service timestamps log datetime localtime msec和service timestamps debug datetime localtime msec命令通过用当前日期和时间(精确到毫秒)的时间戳系统日志和调试输出,帮助进行管理和故障排除。
enable password命令定义进入交换机特权模式的口令。
line vty 0 4命令进入线路配置模式,因此我们可以在虚拟终端(vty)线路上为入站Telnet会话定义密码。在Catalyst 3512XL交换机上,使用line vty 0 15。
password命令定义了一个口令,通过vty线路上的Telnet会话在交换机上进入正常模式。
no logging console命令不允许系统日志消息出现在终端控制台上;这些示例中使用命令来简化屏幕截图。
在 Catalyst 3512XL 交换机上,在 VLAN 1中配置IP地址和默认网关以支持交换机管理。默认网关是Catalyst 4908G-L3上BVI 1接口的IP地址;BVI接口稍后配置。
注意:在为接口分配IP地址之前,您无法Telnet至Catalyst 4908G-L3。
Catalyst 3512XL-01:
3512XL-01#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 3512XL-01(config)#interface vlan 1 3512XL-01(config-if)#ip address 10.10.1.10 255.255.255.0 3512XL-01(config-if)#management 3512XL-01(config-if)#exit 3512XL-01(config)#ip default-gateway 10.10.1.1 3512XL-01(config)#^Z 3512XL-01#
注意:
ip default-gateway 命令定义下一跳路由器接口的默认网关IP地址。由于交换机不参与IP路由,并且不了解网络的第3层(L3)拓扑,因此需要执行此操作。
用于默认网关的IP地址是10.10.1.1,是Catalyst 4908G-L3交换机上BVI 1接口(本示例中后面配置)的IP地址。
Catalyst 3512XL-02:
3512XL-02#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 3512XL-02(config)#interface vlan 1 3512XL-02(config-if)#ip address 10.10.1.20 255.255.255.0 3512XL-02(config-if)#management 3512XL-02(config-if)#exit 3512XL-02(config)#ip default-gateway 10.10.1.1 3512XL-02(config)#^Z 3512XL-02#
Catalyst 3512XL-03:
3512XL-03#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 3512XL-03(config)#interface vlan 1 3512XL-03(config-if)#ip address 10.10.1.30 255.255.255.0 3512XL-03(config-if)#management 3512XL-03(config-if)#exit 3512XL-03(config)#ip default-gateway 10.10.1.1 3512XL-03(config)#^Z 3512XL-03#
Catalyst 4908G-L3 交换机不支持 VTP。在本示例中,Catalyst 3512XL交换机配置为VTP透明模式,因为VTP域不能跨Catalyst 4908G-L3扩展。
在 Catalyst 3512XL-01, 3512XL-02, 和 3512XL-03交换机上的配置完全相同:
3512XL-01#vlan database 3512XL-01(vlan)#vtp transparent Setting device to VTP TRANSPARENT mode. 3512XL-01(vlan)#vlan 10 name Vlan10 VLAN 10 added: Name: Vlan10 3512XL-01(vlan)#vlan 20 name Vlan20 VLAN 20 added: Name: Vlan20 3512XL-01(vlan)#vlan 30 name Vlan30 VLAN 30 added: Name: Vlan30 3512XL-01(vlan)#vlan 40 name Vlan40 VLAN 40 added: Name: Vlan40 3512XL-01(vlan)#exit APPLY completed. Exiting.... 3512XL-01#
您可以使用show vtp status和show vlan命令检验VLAN配置:
3512XL-01#show vtp status VTP Version : 2 Configuration Revision : 0 Maximum VLANs supported locally : 254 Number of existing VLANs : 9 VTP Operating Mode : Transparent VTP Domain Name : VTP Pruning Mode : Disabled VTP V2 Mode : Disabled VTP Traps Generation : Disabled MD5 digest : 0xF0 0xEA 0x28 0x34 0xA1 0xC6 0x2A 0xDE Configuration last modified by 10.10.1.10 at 9-18-00 18:04:06 3512XL-01#show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4, Fa0/5, Fa0/6, Fa0/7, Fa0/8, Fa0/9, Fa0/10, Fa0/11, Fa0/12, Gi0/1, Gi0/2 10 Vlan10 active 20 Vlan20 active 30 Vlan30 active 40 Vlan40 active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 1 enet 100001 1500 - - - - - 1002 1003 10 enet 100010 1500 - - - - - 0 0 20 enet 100020 1500 - - - - - 0 0 30 enet 100030 1500 - - - - - 0 0 40 enet 100040 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 1 1003 1003 tr 101003 1500 1005 0 - - srb 1 1002 1004 fdnet 101004 1500 - - 1 ibm - 0 0 1005 trnet 101005 1500 - - 1 IBM - 0 0 3512XL-01#
此输出显示如何配置Catalyst 4908G-L3与Catalyst 3512XL-01和3512XL-02交换机之间的EtherChannel链路。3512XL-01上的接口gig0/1和gig0/2连接到Catalyst 4908G-L3上的接口gig1和gig2。3512XL-02上的接口gig0/1和gig0/2连接到Catalyst 4908G — 上的接口gig3和gig4L3。
要在Catalyst 4908G-L3上配置EtherChannel,必须使用channel-group命令将物理接口分配给逻辑(端口通道)接口。在Catalyst 3512XL交换机上,物理接口被分配到端口组。Catalyst 3512XL上没有逻辑端口通道接口。
Catalyst 4908G-L3:
4908G-L3#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 4908G-L3(config)#interface port-channel 1 4908G-L3(config-if)#exit 4908G-L3(config)#interface gig1 4908G-L3(config-if)#no shutdown 4908G-L3(config-if)#channel-group 1 GigabitEthernet1 added as member-1 to port-channel1 4908G-L3(config-if)#exit 4908G-L3(config)#interface gig2 4908G-L3(config-if)#no shutdown 4908G-L3(config-if)#channel-group 1 GigabitEthernet2 added as member-2 to port-channel1 4908G-L3(config-if)#exit 4908G-L3(config)#interface port-channel 2 4908G-L3(config-if)#exit 4908G-L3(config)#interface gig3 4908G-L3(config-if)#no shutdown 4908G-L3(config-if)#channel-group 2 GigabitEthernet3 added as member-1 to port-channel2 4908G-L3(config-if)#exit 4908G-L3(config)#interface gig4 4908G-L3(config-if)#no shutdown 4908G-L3(config-if)#channel-group 2 GigabitEthernet4 added as member-2 to port-channel2 4908G-L3(config-if)#^Z 4908G-L3#
注意:
interface port-channel命令可创建逻辑接口;在本例中,创建了两个逻辑端口通道接口。
channel-group命令将物理接口添加到逻辑端口通道接口;channel-group编号与port-channel接口编号对应。
您可以使用show interface port-channel命令验证EtherChannel配置:
4908G-L3#show interface port-channel 1 Port-channel1 is up, line protocol is up Hardware is GEChannel, address is 0030.78fe.a007 (bia 0000.0000.0000) MTU 1500 bytes, BW 2000000 Kbit, DLY 10 usec, rely 255/255, load 1/255 Encapsulation ARPA, loopback not set, keepalive set (10 sec) Half-duplex, Unknown Speed, Media type unknown, Force link-up ARP type: ARPA, ARP Timeout 04:00:00 No. of active members in this channel: 2 Member 0 : GigabitEthernet1 Member 1 : GigabitEthernet2 Last input 00:00:25, output never, output hang never Last clearing of "show interface" counters never Queueing strategy: fifo Output queue 0/40, 0 drops; input queue 0/300, 0 drops 5 minute input rate 0 bits/sec, 1 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 489 packets input, 41461 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 abort 0 watchdog, 0 multicast 0 input packets with dribble condition detected 19 packets output, 8668 bytes, 0 underruns(0/0/0) 0 output errors, 0 collisions, 0 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out 4908G-L3#
注意:
请注意,show interface port-channel命令显示活动成员的数量和属于EtherChannel的特定接口。
Catalyst 3512XL-01:
3512XL-01#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 3512XL-01(config)#interface gig0/1 3512XL-01(config-if)#port group 1 3512XL-01(config-if)#exit 3512XL-01(config)#interface gig0/2 3512XL-01(config-if)#port group 1 3512XL-01(config-if)#^Z 3512XL-01#
注意:
port group 命令将物理端口添加到逻辑端口组(EtherChannel)。
您可以使用show port group命令验证EtherChannel配置:
3512XL-01#show port group Group Interface Transmit Distribution ----- --------------------- --------------------- 1 GigabitEthernet0/1 source address 1 GigabitEthernet0/2 source address 3512XL-01#
Catalyst 3512XL-02:
3512XL-02#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 3512XL-02(config)#interface gig0/1 3512XL-02(config-if)#port group 1 3512XL-02(config-if)#exit 3512XL-02(config)#interface gig0/2 3512XL-02(config-if)#port group 1 3512XL-02(config-if)#^Z 3512XL-02#
您可以使用show port group命令检验EtherChannel配置。
此输出显示如何配置Catalyst 4908G-L3以进行桥接和路由。对于每个VLAN,定义单独的网桥过程;接口在配置交换机之间的ISL中继一节中分配给网桥组,本示例稍后介绍。由于需要VLAN间路由,因此必须使用bridge irb命令启用集成路由和桥接(IRB)。
此外,为了在不同网桥组之间路由IP和IPX数据流,必须创建网桥虚拟接口(BVI)。
在配置交换机之间的ISL中继部分,ISL中继上的VLAN子接口将加入相应的网桥组,为每个VLAN创建单个第2层域,并且相应的BVI充当该VLAN中的路由器接口。
Catalyst 4908G-L3:
4908G-L3#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 4908G-L3(config)#ipx routing 4908G-L3(config)#bridge irb 4908G-L3(config)#bridge 1 protocol ieee 4908G-L3(config)#bridge 1 route ip 4908G-L3(config)#bridge 10 protocol IEEE 4908G-L3(config)#bridge 10 route ip 4908G-L3(config)#bridge 10 route ipx 4908G-L3(config)#bridge 20 protocol IEEE 4908G-L3(config)#bridge 20 route ip 4908G-L3(config)#bridge 20 route ipx 4908G-L3(config)#bridge 30 protocol IEEE 4908G-L3(config)#bridge 30 route ip 4908G-L3(config)#bridge 30 route ipx 4908G-L3(config)#bridge 40 protocol IEEE 4908G-L3(config)#bridge 40 route ip 4908G-L3(config)#bridge 40 route ipx 4908G-L3(config)#interface bvi 1 4908G-L3(config-if)#ip address 10.10.1.1 255.255.255.0 4908G-L3(config-if)#exit 4908G-L3(config)#interface bvi 10 4908G-L3(config-if)#ip address 10.10.10.1 255.255.255.0 4908G-L3(config-if)#ipx network 1000 4908G-L3(config-if)#exit 4908G-L3(config)#interface bvi 20 4908G-L3(config-if)#ip address 10.10.20.1 255.255.255.0 4908G-L3(config-if)#ipx network 2000 4908G-L3(config-if)#exit 4908G-L3(config)#interface bvi 30 4908G-L3(config-if)#ip address 10.10.30.1 255.255.255.0 4908G-L3(config-if)#ipx network 3000 4908G-L3(config-if)#exit 4908G-L3(config)#interface bvi 40 4908G-L3(config-if)#ip address 10.10.40.1 255.255.255.0 4908G-L3(config-if)#ipx network 4000 4908G-L3(config-if)#^Z 4908G-L3#
注意:
ipx routing命令在Catalyst 4908G-L3上启用IPX路由。
bridge irb 命令在路由器上启用集成路由和桥接,这允许您在网桥组内路由流量。
网桥编号协议IEEE命令创建运行IEEE生成树的网桥进程。
bridge number route ip 命令允许在BVI 编号 接口和路由器上其他IP接口之间路由IP业务.
网桥编号route ipx命令允许IPX流量在BVI编号接口和路由器上的其他IPX接口之间路由;请注意,网桥进程1 [管理VLAN]省略了此命令。
interface bvi number命令会创建网桥虚拟接口(BVI)接口,以用作编号网桥组中的L3接口。
ip address命令将IP地址分配给BVI接口。
ipx network命令将IPX网络号分配给BVI接口;请注意,管理VLAN [BVI 1]中的BVI没有分配IPX网络号。
在配置ISL中继链路并将中继子接口添加到适当的网桥组后,我们可以在本示例的后面部分验证桥接配置。
此输出显示如何配置Catalyst 4908G-L3和Catalyst 3512XL交换机之间的中继链路。
为了在Catalyst 4908G-L3上配置中继,它要求在主接口下添加子接口,即在中继上传输的每个VLAN有一个子接口。在本例中,在逻辑端口信道接口上配置了两条中继线,同时在物理接口上配置第3条中继线。
此外,在子接口下配置bridge-group命令,以将每个VLAN子接口加入相应的网桥组,从而完成在本示例前面的“配置桥接和路由”部分中启动的桥接和路由配置。
Catalyst 4908G-L3:
4908G-L3#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 4908G-L3(config)#interface port-channel 1.1 4908G-L3(config-subif)#encapsulation isl 1 4908G-L3(config-subif)#bridge-group 1 4908G-L3(config-subif)#exit 4908G-L3(config)#interface port-channel 1.10 4908G-L3(config-subif)#encapsulation isl 10 4908G-L3(config-subif)#bridge-group 10 4908G-L3(config-subif)#exit 4908G-L3(config)#interface port-channel 1.20 4908G-L3(config-subif)#encapsulation isl 20 4908G-L3(config-subif)#bridge-group 20 4908G-L3(config-subif)#exit 4908G-L3(config)#interface port-channel 1.30 4908G-L3(config-subif)#encapsulation isl 30 4908G-L3(config-subif)#bridge-group 30 4908G-L3(config-subif)#exit 4908G-L3(config)#interface port-channel 1.40 4908G-L3(config-subif)#encapsulation isl 40 4908G-L3(config-subif)#bridge-group 40 4908G-L3(config-subif)#exit 4908G-L3(config)#interface port-channel 2.1 4908G-L3(config-subif)#encapsulation isl 1 4908G-L3(config-subif)#bridge-group 1 4908G-L3(config-subif)#exit 4908G-L3(config)#interface port-channel 2.10 4908G-L3(config-subif)#encapsulation isl 10 4908G-L3(config-subif)#bridge-group 10 4908G-L3(config-subif)#exit 4908G-L3(config)#interface port-channel 2.20 4908G-L3(config-subif)#encapsulation isl 20 4908G-L3(config-subif)#bridge-group 20 4908G-L3(config-subif)#exit 4908G-L3(config)#interface port-channel 2.30 4908G-L3(config-subif)#encapsulation isl 30 4908G-L3(config-subif)#bridge-group 30 4908G-L3(config-subif)#exit 4908G-L3(config)#interface port-channel 2.40 4908G-L3(config-subif)#encapsulation isl 40 4908G-L3(config-subif)#bridge-group 40 4908G-L3(config-subif)#exit 4908G-L3(config)#interface gig 5 4908G-L3(config-if)#no shutdown 4908G-L3(config-if)#exit 4908G-L3(config)#interface gig 5.1 4908G-L3(config-subif)#encapsulation isl 1 4908G-L3(config-subif)#bridge-group 1 4908G-L3(config-subif)#exit 4908G-L3(config)#interface gig 5.10 4908G-L3(config-subif)#encapsulation isl 10 4908G-L3(config-subif)#bridge-group 10 4908G-L3(config-subif)#exit 4908G-L3(config)#interface gig 5.20 4908G-L3(config-subif)#encapsulation isl 20 4908G-L3(config-subif)#bridge-group 20 4908G-L3(config-subif)#exit 4908G-L3(config)#interface gig 5.30 4908G-L3(config-subif)#encapsulation isl 30 4908G-L3(config-subif)#bridge-group 30 4908G-L3(config-subif)#exit 4908G-L3(config)#interface gig 5.40 4908G-L3(config-subif)#encapsulation isl 40 4908G-L3(config-subif)#bridge-group 40 4908G-L3(config-subif)#^Z 4908G-L3#
注意:
要在主接口上创建逻辑子接口,请指定主接口,例如,interface port-channel 1,后跟句点(.)和子接口编号,例如,interface port-channel 1.10。子接口编号/VLAN编号/网桥组编号不必相同,但这使管理更简单。
encapsulation isl vlan命令可指定在子接口上接收的封装类型(ISL)和VLAN。
请注意,VLAN子接口未分配IP地址或IPX网络号,而是通过bridge-group number命令添加到网桥组,这允许每个VLAN跨越第2层的所有交换机。在“配置桥接和路由”部分配置的BVI具有IP地址和IPX网络号。
您可以使用show interface、show ip interface和show ipx interface命令验证配置。例如,使用以下命令验证EtherChannel链路上端口通道1.10(VLAN 10)子接口上的配置,该子接口通向Catalyst 3512XL-01和VLAN 10的对应BVI(BVI 10):
4908G-L3#show interface port-channel 1.10 Port-channel1.10 is up, line protocol is up Hardware is GEChannel, address is 0030.78fe.a007 (bia 0000.0000.0000) MTU 1500 bytes, BW 2000000 Kbit, DLY 10 usec, rely 255/255, load 1/255 Encapsulation ISL Virtual LAN, Color 10. ARP type: ARPA, ARP Timeout 04:00:00 4908G-L3#show ip interface bvi 10 BVI10 is up, line protocol is up Internet address is 10.10.10.1/24 Broadcast address is 255.255.255.255 Address determined by setup command MTU is 1500 bytes Helper address is not set Directed broadcast forwarding is disabled Outgoing access list is not set Inbound access list is not set Proxy ARP is enabled Security level is default Split horizon is enabled ICMP redirects are always sent ICMP unreachables are always sent ICMP mask replies are never sent IP fast switching is enabled IP fast switching on the same interface is disabled IP Null turbo vector IP multicast fast switching is enabled IP multicast distributed fast switching is disabled Router Discovery is disabled IP output packet accounting is disabled IP access violation accounting is disabled TCP/IP header compression is disabled RTP/IP header compression is disabled Probe proxy name replies are disabled Policy routing is disabled Network address translation is disabled Web Cache Redirect is disabled BGP Policy Mapping is disabled 4908G-L3#show ipx interface bvi 10 BVI10 is up, line protocol is up IPX address is 1000.0030.78fe.a00b, NOVELL-ETHER [up] Delay of this IPX network, in ticks is 2 throughput 0 link delay 0 IPXWAN processing not enabled on this interface. IPX SAP update interval is 60 seconds IPX type 20 propagation packet forwarding is disabled Incoming access list is not set Outgoing access list is not set IPX helper access list is not set SAP GNS processing enabled, delay 0 ms, output filter list is not set SAP Input filter list is not set SAP Output filter list is not set SAP Router filter list is not set Input filter list is not set Output filter list is not set Router filter list is not set Netbios Input host access list is not set Netbios Input bytes access list is not set Netbios Output host access list is not set Netbios Output bytes access list is not set Updates each 60 seconds aging multiples RIP: 3 SAP: 3 SAP interpacket delay is 55 ms, maximum size is 480 bytes RIP interpacket delay is 55 ms, maximum size is 432 bytes RIP response delay is not set IPX accounting is disabled IPX fast switching is configured (disabled) RIP packets received 0, RIP packets sent 19, 0 Throttled RIP specific requests received 0, RIP specific replies sent 0 RIP general requests received 0, 0 ignored, RIP general replies sent 0 SAP packets received 0, SAP packets sent 5, 0 Throttled SAP GNS packets received 0, SAP GNS replies sent 0 SAP GGS packets received 0, 0 ignored, SAP GGS replies sent 0 4908G-L3#
您可以使用show bridge group和show spanning-tree number命令验证桥接配置。此外,您还可以使用 show bridge 命令来查看网桥转发表。
在Catalyst 3512XL交换机上,Catalyst 3512XL-01、3512XL-02和3512XL-03上的配置相同。中继链路配置在适当的千兆以太网接口上。对于 EtherChannel 链路,中继配置只需应用于端口组中的一个接口。中继会自动应用到同一组中的其他接口,并显示在配置中:
3512XL-01#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 3512XL-01(config)#interface gig 0/1 3512XL-01(config-if)#switchport mode trunk 3512XL-01(config-if)#^Z 3512XL-01#
注意:
在3512XL-01和3512XL-02中,当配置应用于信道组中的单个接口时,相同的配置将自动应用于该组中的其他接口,并出现在每个接口的配置中。
switchport mode trunk 命令将接口配置为中继线端口.
在启用中继时,3500XL交换机默认使用ISL封装,因此在这种情况下无需指定封装。
您可以通过 show interface switchport 命令验证配置:
3512XL-01#show interface gig0/1 switchport Name: Gi0/1 Switchport: Enabled Administrative mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: isl Operational Trunking Encapsulation: isl Negotiation of Trunking: Disabled Access Mode VLAN: 0 ((Inactive)) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: ALL Trunking VLANs Active: 1,10,20,30,40 Pruning VLANs Enabled: 2-1001 Priority for untagged frames: 0 Override vlan tag priority: FALSE Voice VLAN: none Appliance trust: none 3512XL-01#
现在, Catalyst 3512XL 交换机的端口被分配给了 VLAN 而且spanning-tree portfast已被激活。任何 3512XL 交换机上的任何端口都可以分配到任何已配置的 VLAN 上。
特定VLAN中的终端站必须分配与该VLAN关联的范围内的IP地址,并且必须将该VLAN的Catalyst 4908G-L3上BVI的IP地址用作其默认网关。
此输出显示如何在VLAN 10中配置接口fast0/1和fast 0/2,并在接口上启用portfast:
3512XL-01#configure terminal Enter configuration commands, one per line. End with CNTL/Z. 3512XL-01(config)#interface fast0/1 3512XL-01(config-if)#switchport access vlan 10 3512XL-01(config-if)#spanning-tree portfast 3512XL-01(config-if)#exit 3512XL-01(config)#interface fast0/2 3512XL-01(config-if)#switchport access vlan 10 3512XL-01(config-if)#spanning-tree portfast 3512XL-01(config-if)#^Z 3512XL-01#
可以使用show interface switchport命令和show spanning-tree interface命令来验证配置:
3512XL-01#show interface fast0/1 switchport Name: Fa0/1 Switchport: Enabled Administrative mode: static access Operational Mode: static access Administrative Trunking Encapsulation: isl Operational Trunking Encapsulation: isl Negotiation of Trunking: Disabled Access Mode VLAN: 10 (Vlan10) Trunking Native Mode VLAN: 1 (default) Trunking VLANs Enabled: NONE Pruning VLANs Enabled: NONE Priority for untagged frames: 0 Override vlan tag priority: FALSE Voice VLAN: none Appliance trust: none 3512XL-01#show spanning-tree interface fast 0/1 Interface Fa0/1 (port 13) in Spanning tree 10 is FORWARDING Port path cost 19, Port priority 128 Designated root has priority 16384, address 0090.ab28.d000 Designated bridge has priority 16384, address 0090.ab28.d000 Designated port is 193, path cost 0 Timers: message age 2, forward delay 0, hold 0 BPDU: sent 1, received 73 The port is in the portfast mode 3512XL-01#
注意:
show interface switchport命令显示接口的Operational Mode(静态访问)和Access Mode VLAN(10)。
show spanning-tree interface命令显示端口的生成树状态,并指示“端口处于portfast模式”。
确保将运行配置保存到所有交换机上的 NVRAM (启动配置),以便在重新加载时保留该配置。
Catalyst 4908G-L3:
4908G-L3#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] 4908G-L3#
Catalyst 3512XL交换机:
3512XL-01#copy running-config startup-config Destination filename [startup-config]? Building configuration... 3512XL-01#
以下是本示例中使用的设备的完整配置:
Catalyst 4908G-L3 |
---|
4908G-L3#show running-config Building configuration... Current configuration: ! ! Last configuration change at 14:09:14 PST Tue Sep 19 2000 ! NVRAM config last updated at 14:09:15 PST Tue Sep 19 2000 ! version 12.0 no service pad service timestamps debug datetime msec localtime service timestamps log datetime msec localtime no service password-encryption ! hostname 4908G-L3 ! no logging console enable password verysecret ! clock timezone PST -8 clock calendar-valid ip subnet-zero ipx routing 0030.78fe.a000 !-- Enables IRB to route between bridge groups. bridge irb ! ! ! !-- Creates a logical interface (1) to group physical interfaces into a channel. interface Port-channel1 no ip address no ip directed-broadcast hold-queue 300 in ! !-- A subinterface is added to allow VLAN 1 traffic to be transmitted on the trunk. interface Port-channel1.1 !-- Specifies ISL encapsulation for VLAN 1. encapsulation isl 1 no ip redirects no ip directed-broadcast !-- Assign the subinterface to the appropriate bridge-group for bridging and routing. bridge-group 1 ! !-- A subinterface is added to allow VLAN 10 traffic to be transmitted on the trunk. interface Port-channel1.10 !-- Specifies ISL encapsulation for VLAN 10. encapsulation isl 10 no ip redirects no ip directed-broadcast !-- Assign the subinterface to the appropriate bridge-group for bridging and routing. bridge-group 10 ! !-- VLAN 20 configuration. interface Port-channel1.20 encapsulation isl 20 no ip redirects no ip directed-broadcast bridge-group 20 ! !-- VLAN 30 configuration. interface Port-channel1.30 encapsulation isl 30 no ip redirects no ip directed-broadcast bridge-group 30 ! !-- VLAN 40 configuration. interface Port-channel1.40 encapsulation isl 40 no ip redirects no ip directed-broadcast bridge-group 40 ! !-- Creates a logical interface (2) to group physical interfaces into a channel. interface Port-channel2 No ip address no ip directed-broadcast hold-queue 300 in ! !-- VLAN 1 configuration. interface Port-channel2.1 encapsulation isl 1 no ip redirects no ip directed-broadcast bridge-group 1 ! !-- VLAN 10 configuration. interface Port-channel2.10 encapsulation isl 10 no ip redirects no ip directed-broadcast bridge-group 10 ! !-- VLAN 20 configuration. interface Port-channel2.20 encapsulation isl 20 no ip redirects no ip directed-broadcast bridge-group 20 ! !-- VLAN 30 configuration. interface Port-channel2.30 encapsulation isl 30 no ip redirects no ip directed-broadcast bridge-group 30 ! !-- VLAN 40 configuration. interface Port-channel2.40 encapsulation isl 40 no ip redirects no ip directed-broadcast bridge-group 40 ! interface GigabitEthernet1 no ip address no ip directed-broadcast !-- Logically groups the physical interface to interface port-channel 1. channel-group 1 ! interface GigabitEthernet2 no ip address no ip directed-broadcast !-- Logically groups the physical interface to interface port-channel 1. channel-group 1 ! interface GigabitEthernet3 no ip address no ip directed-broadcast !-- Logically groups the physical interface to interface port-channel 2. channel-group 2 ! interface GigabitEthernet4 no ip address no ip directed-broadcast !-- Logically groups the physical interface to interface port-channel 2. channel-group 2 ! interface GigabitEthernet5 no ip address no ip directed-broadcast ! !-- A subinterface is added to allow VLAN 1 traffic to be transmitted on the trunk. interface GigabitEthernet5.1 !-- Specifies ISL encapsulation for VLAN 1. encapsulation isl 1 no ip redirects no ip directed-broadcast !-- Assign the subinterface to the appropriate bridge-group for bridging and routing. bridge-group 1 ! !-- VLAN 10 configuration. Interface GigabitEthernet5.10 encapsulation isl 10 no ip redirects no ip directed-broadcast bridge-group 10 ! !-- VLAN 20 configuration. interface GigabitEthernet5.20 encapsulation isl 20 no ip redirects no ip directed-broadcast bridge-group 20 ! !-- VLAN 30 configuration. interface GigabitEthernet5.30 encapsulation isl 30 no ip redirects no ip directed-broadcast bridge-group 30 ! !-- VLAN 30 configuration. interface GigabitEthernet5.40 encapsulation isl 40 no ip redirects no ip directed-broadcast bridge-group 40 ! interface GigabitEthernet6 no ip address no ip directed-broadcast shutdown ! interface GigabitEthernet7 no ip address no ip directed-broadcast shutdown ! interface GigabitEthernet8 no ip address no ip directed-broadcast shutdown ! !-- BVI 1 is an L3 interface for bridge-group 1 (VLAN 1). interface BVI1 !-- The IP address assigned to bridge-group 1. ip address 10.10.1.1 255.255.255.0 no ip directed-broadcast no ip route-cache cef ! !-- BVI 10 is an L3 interface for bridge-group 10 (VLAN 10). interface BVI10 !-- The IP address assigned to bridge-group 10. ip address 10.10.10.1 255.255.255.0 no ip directed-broadcast no ip route-cache cef !-- Assigns IPX network 1000 to BVI 10. ipx network 1000 ! !-- BVI 20 is a Layer 3 interface for bridge-group 20 (VLAN 20). Interface BVI20 !-- IP address assigned to bridge-group 20. ip address 10.10.20.1 255.255.255.0 no ip directed-broadcast no ip route-cache cef !-- Assigns IPX network 1000 to BVI 20. ipx network 2000! !-- BVI 30 configuration.interface BVI30 ip address 10.10.30.1 255.255.255.0 no ip directed-broadcast no ip route-cache cef ipx network 3000 ! !-- BVI 40 configuration. interface BVI40 ip address 10.10.40.1 255.255.255.0 no ip directed-broadcast no ip route-cache cef ipx network 4000 ! ip classless ! ! ! ! !-- Applies IEEE Ethernet Spanning-Tree Protocol (STP) to bridge-group 1. bridge 1 protocol ieee !-- Allows IP traffic to be routed between the BVI 1 and other IP interfaces. bridge 1 route ip bridge 10 protocol ieee bridge 10 route ip !-- Allows IPX traffic to be routed between the BVI 10 and other IP interfaces. bridge 10 route ipx bridge 20 protocol ieee bridge 20 route ip bridge 20 route ipx bridge 30 protocol ieee bridge 30 route ip bridge 30 route ipx bridge 40 protocol ieee bridge 40 route ip bridge 40 route ipx ! line con 0 transport input none line aux 0 line vty 0 4 password secret login ! end 4908G-L3# |
Catalyst 3512XL-01 |
---|
3512XL-01#show running-config Building configuration... Current configuration: ! ! Last configuration change at 08:24:03 PST Tue Sep 19 2000 ! NVRAM config last updated at 08:24:03 PST Tue Sep 19 2000 ! version 12.0 no service pad service timestamps debug datetime msec localtime service timestamps log datetime msec localtime no service password-encryption ! hostname 3512XL-01 ! no logging console enable password verysecret ! ! ! ! ! clock timezone PST -8 ! ip subnet-zero ! ! ! interface FastEthernet0/1 !-- The switchport access command configures the port to be an L2 2 port. !-- Assigns the port to be a member of VLAN 10. switchport access vlan 10 !-- Enables spanning-tree portfast. spanning-tree portfast ! interface FastEthernet0/2 switchport access vlan 10 spanning-tree portfast ! interface FastEthernet0/3 switchport access vlan 10 spanning-tree portfast ! interface FastEthernet0/4 !-- Assigns the port to be a member of VLAN 20. switchport access vlan 20 spanning-tree portfast ! interface FastEthernet0/5 switchport access vlan 20 spanning-tree portfast ! interface FastEthernet0/6 switchport access vlan 20 spanning-tree portfast ! interface FastEthernet0/7 !-- Assigns the port to be a member of VLAN 30. switchport access vlan 30 spanning-tree portfast ! interface FastEthernet0/8 switchport access vlan 30 spanning-tree portfast ! interface FastEthernet0/9 switchport access vlan 30 spanning-tree portfast ! interface FastEthernet0/10 !-- Assigns the port to be a member of VLAN 40. switchport access vlan 40 spanning-tree portfast ! interface FastEthernet0/11 switchport access vlan 40 spanning-tree portfast ! interface FastEthernet0/12 switchport access vlan 40 spanning-tree portfast ! interface GigabitEthernet0/1 !-- Assigns the port to logical port-group 1 to create the EtherChannel. port group 1 !-- Configures the port to be an ISL trunk. switchport mode trunk ! Interface GigabitEthernet0/2 !-- Assigns the port to logical port-group 1 to create the EtherChannel. port group 1 !-- Configures the port to be an ISL trunk. switchport mode trunk ! Interface VLAN1 !-- The IP address of the management interface. ip address 10.10.1.10 255.255.255.0 no ip directed-broadcast no ip route-cache ! !-- The default gateway is set to the BVI 1 interface on the 4908G-L3. ip default-gateway 10.10.1.1 ! line con 0 transport input none stopbits 1 line vty 0 4 password secret login line vty 5 15 password secret login ! end 3512XL-01# |
Catalyst 3512XL-02 |
---|
3512XL-02#show running-config Building configuration... Current configuration: ! ! Last configuration change at 08:25:22 PST Tue Sep 19 2000 ! NVRAM config last updated at 08:25:22 PST Tue Sep 19 2000 ! version 12.0 no service pad service timestamps debug datetime msec localtime service timestamps log datetime msec localtime no service password-encryption ! hostname 3512XL-02 ! no logging console enable password verysecret ! ! ! ! ! clock timezone PST -8 ! ip subnet-zero ! ! ! interface FastEthernet0/1 !-- The switchport access command configures the port to be an L2 port. !-- Assigns the port to be a member of VLAN 10. switchport access vlan 10 !-- Enables spanning-tree portfast. spanning-tree portfast ! Interface FastEthernet0/2 switchport access vlan 10 spanning-tree portfast ! interface FastEthernet0/3 !-- Assigns the port to be a member of VLAN 20. switchport access vlan 20 spanning-tree portfast ! interface FastEthernet0/4 switchport access vlan 20 spanning-tree portfast ! interface FastEthernet0/5 switchport access vlan 20 spanning-tree portfast ! interface FastEthernet0/6 switchport access vlan 20 spanning-tree portfast ! interface FastEthernet0/7 switchport access vlan 20 spanning-tree portfast ! interface FastEthernet0/8 switchport access vlan 20 spanning-tree portfast ! interface FastEthernet0/9 !-- Assigns the port to be a member of VLAN 30. switchport access vlan 30 spanning-tree portfast ! interface FastEthernet0/10 switchport access vlan 30 spanning-tree portfast ! interface FastEthernet0/11 !-- Assigns the port to be a member of VLAN 40. switchport access vlan 40 spanning-tree portfast ! interface FastEthernet0/12 switchport access vlan 40 spanning-tree portfast ! interface GigabitEthernet0/1 !-- Assigns the port to logical port-group 1 to create the EtherChannel. port group 1 !-- Configures the port to be an ISL trunk. switchport mode trunk ! Interface GigabitEthernet0/2 !-- Assigns the port to logical port-group 1 to create the EtherChannel. port group 1 !-- Configures the port to be an ISL trunk. switchport mode trunk ! Interface VLAN1 !-- The IP address of the management interface. ip address 10.10.1.20 255.255.255.0 No ip directed-broadcast no ip route-cache ! !-- The default gateway is set to the BVI 1 interface on the 4908G-L. ip default-gateway 10.10.1.1 ! line con 0 transport input none stopbits 1 line vty 0 4 password secret login line vty 5 15 password secret login ! end 3512XL-02# |
Catalyst 3512XL-03 |
---|
3512xl-03#show running-config Building configuration... Current configuration: ! ! Last configuration change at 12:13:33 PST Tue Sep 19 2000 ! NVRAM config last updated at 12:13:34 PST Tue Sep 19 2000 ! version 12.0 no service pad service timestamps debug datetime msec localtime service timestamps log datetime msec localtime no service password-encryption ! hostname 3512xl-03 ! no logging console enable password verysecret ! ! ! ! ! clock timezone PST -8 ! ip subnet-zero ! ! ! interface FastEthernet0/1 !-- The switchport access command configures the port to be an L2 port. !-- Assigns the port to be a member of VLAN 10. switchport access vlan 10 !-- Enables spanning-tree portfast. spanning-tree portfast ! interface FastEthernet0/2 switchport access vlan 10 spanning-tree portfast ! interface FastEthernet0/3 switchport access vlan 10 spanning-tree portfast ! interface FastEthernet0/4 switchport access vlan 10 spanning-tree portfast ! interface FastEthernet0/5 switchport access vlan 10 spanning-tree portfast ! interface FastEthernet0/6 switchport access vlan 10 spanning-tree portfast ! interface FastEthernet0/7 !-- Assigns the port to be a member of VLAN 20. switchport access vlan 20 spanning-tree portfast ! interface FastEthernet0/8 switchport access vlan 20 spanning-tree portfast ! interface FastEthernet0/9 !-- Assigns the port to be a member of VLAN 30. switchport access vlan 30 spanning-tree portfast ! interface FastEthernet0/10 switchport access vlan 30 spanning-tree portfast ! interface FastEthernet0/11 !-- Assigns the port to be a member of VLAN 40. switchport access vlan 40 spanning-tree portfast ! interface FastEthernet0/12 switchport access vlan 40 spanning-tree portfast ! interface GigabitEthernet0/1 !-- Configures the port to be an ISL trunk. switchport mode trunk ! Interface GigabitEthernet0/2 ! interface VLAN1 !-- The IP address of the management interface. ip address 10.10.1.30 255.255.255.0 no ip directed-broadcast no ip route-cache ! !-- The default gateway is set to the BVI 1 interface on the 4908G-L3. ip default-gateway 10.10.1.1 ! Line con 0 transport input none stopbits 1 line vty 0 4 password secret login line vty 5 15 password secret login ! end 3512xl-03# |
当前没有可用于此配置的验证过程。
目前没有针对此配置的故障排除信息。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
06-Oct-2005 |
初始版本 |