原创整理:锐捷S3550系列交换机基本配置命令(二)

二、配置接口
S3550-12G交换机接口类型
1、2层接口
(1)Switch Port(交换端口)
   由交换机上的单个物理端口构成,只有2层交换功能,又分为Access Port和Trunk Port。
   Access Port(接入端口):每个Access Port只能属于一个VLAN,Access Port只传输属于这个VLAN的帧。
   Trunk Port(中继端口):Trunk Port传输属于多个VLAN的帧,缺省情况下将传输所有VLAN的帧,可通过设置VLAN许可列表来限制传输哪些VLAN的帧。是连接一个或多个以太网交换接口和其他的网络设备(如路由器或交换机)的点对点链路,一个Trunk 可以在一条链路上传输多个VLAN 的流量。锐捷交换机的Trunk 采用802.1Q 标准封装。
下图显示了一个采用Trunk 连接起来的网络
原创整理:锐捷S3550/3750系列交换机基本配置命令(二) - 漫步者 - 网林漫步
(2)L2 Aggregate Port(2层聚合端口)
   由交换机上的多个物理端口构成,对于2层交换机来说L2 Aggregate Port就好像一个高带宽的Switch Port,通过L2 Aggregate port 发送的帧将在L2 Aggregate port的成员端口上进行流量平衡,当一个成员端口链路失效后,L2 Aggregate port会自动将这个成员端口上的流量转移到别的端口上。同样L2Aggregate port可以为access port或trunk port,但L2 Aggregate port 成员端口必须为同一类型。
2、3层接口
(1)SVI(Switch virtual interface)(虚拟交换接口)
   是和某个VLAN关联的IP接口,每个SVI只能和一个VLAN 关联。
(2)Routed Port(路由端口)
   Routed port使用单个物理端口作为三层交换的网关接口,Routed port不具备2层交换的功能。
(3)L3 Aggregate Port(3层聚合端口)
   L3 Aggregate port使用一个Aggregate port作为三层交换的网关接口,L3 Aggregate port不具备2层交换的功能。
(一)进入接口模式
在全局配置模式下
1、interface gigabitethernet 0/1
* 进入接口配置模式对接口gigabitethernet 0/1进行配置。
2、interface range gigabitethernet 0/2-3,0/5-6
* 进入接口配置模式对接口gigabitethernet 0/2 0/3 0/5 0/6进行配置。
在接口配置模式下
3、shutdown
*、关闭接口。
4、no shutdown
* 启用接口。
在全局配置模式下
5、define niterface-range classroom gigabitethernet 0/2-3,0/5-6
* 定义接口范围的宏定义,宏名为classroom,范围为gigabitethernet 0/2-3,0/5-6。
6、interface rang classroom
* 进入接口配置模式对接口gigabitethernet 0/2 0/3 0/5 0/6进行配置。
7、no define niterface-range classroom gigabitethernet 0/2-3,0/5-6
* 删除宏定义classroom。
(二)选择接口介质类型
在接口配置模式下
1、medium-type fiber
* 配置接口介质类型为光纤接口。
2、medium-type copper
* 配置接口介质类型为铜缆接口。
(三)配置接口描述
1、description class1
* 将接口起名为class1便于记忆。
(四)配置接口的速度、双工、流控
1、speed 10
* 配置接口速率模式为1000M。有10 100 1000 auto四种类型。
2、duplex full
* 配置接口双工模式为全双工。有auto full half三种类型。
3、flowcontrol on
* 配置接口流控模式为开启。有auto on off三种类型。
4、no speed
5、no duplex
6、no flowcontrol
*恢复接口速率、双工、流控模式为缺省值。
(五)配置2层接口
2层接口的缺省配置
工作模式:2层交换模式(switchport 命令)
Switch port模式:access port
允许的VLAN 范围:VLAN 1~4094
缺省VLAN(对于access port而言):VLAN 1
Native VLAN(对于trunk port而言):VLAN 1
介质类型(对于S3550-12SFP/GT和S3512G而言):copper
接口管理状态:Up
接口描述:空
速度:自协商
双工模式:自协商
流控:关闭
Aggregate port:缺省没有任何接口被设为Aggregate port接口。
风暴控制:关闭
保护端口:关闭
端口安全:关闭
配置Switch Port
在接口配置模式下
1、switchport mode access
* 配置接口为Access Port。
2、switchport mode trunk
* 配置接口为Trunk Port。
3、switchport access vlan 1
* 配置接口为Access Port,并配置所属vlan为vlan 1。
4、switchport trunk native vlan 2
* 配置接口为Trunk Port,并配置所属native vlan为vlan 2。
5、switchport port-security
* 配置接口的端口安全。
配置L2 Aggregate Port
在接口配置模式下使用aggregateport来创建L2 Aggregate Port,具体的配置过程请参照“配置Aggregate Port”一章。
在特权模式下
6、clear counters gigabitethernet 0/1
* 清除接口gigabitethernet 0/1的统计值。
7、clear interfaces gigabitethernet 0/1
* 对接口gigabitethernet 0/1硬件复位。
8、clear counters
* 清除所有2层接口统计值。
(六)配置3层接口
配置SVI
在全局配置模式下
1、interface vlan 2
* 进入VLAN配置模式配置vlan 2。
2、ip address 10.0.241.254 255.255.255.0
* 给vlan 2配置IP地址10.0.241.254子网掩码255.255.255.0。
配置Routed Port
在接口配置模式下
3、no switchport
* 将接口关闭并重新转换成3层模式。(该命令只适用于Switch Port和L2 Aggregrate Port。)
   ip address 10.1.252.26 255.255.255.252
* 给接口配置IP地址10.1.252.26子网掩码255.255。255.252。
   no shutdown
* 重新打开此接口。
配置L3 Aggregrate Port
在接口配置模式下使用aggregateport来创建L3 Aggregate Port,具体的配置过程请参照“配置Aggregate Port”一章。
(七)显示接口状态
在特权模式下
1、show interface
* 显示所有接口的全部状态和配置信息。
2、show interface gigabitethernet 0/12 status
* 显示接口gigabitethernet 0/12的状态。
2、show interface gigabitethernet 0/12
* 显示接口gigabitethernet 0/12的全部状态和配置信息。
3、show interface switchport
* 显示所有可交换接口的administrative和operational状态信息。
4、show interface gigabitethernet 0/12 switchport
* 显示可交换接口gigabitethernet 0/12(非路由接口)的administrative和operational状态信息。
5、show interface description
* 显示所有接口的描述和接口状态。
6、show interface gigabitethernet 0/12 description
* 显示接口gigabitethernet 0/12的描述和接口状态。
7、show interface counters
* 显示所有接口的统计值信息。
8、show interface gigabitethernet 0/12 counters
* 显示接口gigabitethernet 0/12的统计值信息。
9、show running-config interface
* 显示当前运行的所有接口配置。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值