您好,欢迎来到爱站旅游。
搜索
您的当前位置:首页迈普交换机配置

迈普交换机配置

来源:爱站旅游


迈普交换机配置

迈普交换机配置

迈普交换机基本配置一. 基本配置

进入特权模式:Switch> en

Switch#

进入全局模式:Switch# config terminal

Switch(Config)#

退出命令 exit

举例:

Switch#exit

Switch>

帮助命令 help

举例:

Switch>help

enable -- Enable Privileged mode exit -- Exit telnet session

时钟配置:clock set

功能:设置系统日期和时钟。

参数:为当前时钟,HH 取值范围为0~23,MM 和SS 取值范围为0~59;< YYYY/MM/DD >为当前年、月和日,YYYY 取值范围为2000~2035, MM 取值范围为1~12,DD 取值范围为1~31。

举例:设置交换机当前日期为2002年 8月 1日 23时 0分 0秒。 Switch# clock set 23:0:0 2002.8.1 相关命令:show clock

超时设置:exec timeout 功能:设置退出特权用户配置模式超时时间。

参数:< minute >为时间值,单位为分钟,取值范围为0~300。

命令模式:全局配置模式。

缺省情况:系统缺省为5分钟。

使用指南:为确保交换机使用的安全性,防止非法用户的恶意操作,当特权用

户在做完最后一项配置后,开始计时,到达设置时间值时,系统就自动退出特 are

no special instructions below, in this report, the \"I\" mean green town

in yingde city middle school, \"we\" means young qingtang town middle school in the Township of yingde city middle school teachers ' professional development study group. ) The actual condition and the specific situation of young teachers ' professional development for young teachers ' College ... (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female 34 70.83% beside the effective fill in passengers 48 from survey of data view, I school young teachers in the, female teachers 34 people, male teachers 14 people,

high out 20 people; from by accounted for proportion view, female teachers accounted for than 70.83%, male teachers 29. 17%, ratio of female teachers account for 41.66 percent. Young teacher in our school can be seen in the serious imbalance in the sex ratio, obviously there with the current outlooks a greater relationship. This requires the attention of our Administrative Department of education high allocations in education issues. 2nd questions how old you are (a) [form] (A) (Young teachers of) basic information data analysis 1th problem you of gender ()

[single topics] option small meter proportion a,. male 14 29.17% b. female

权用户配置模式。数值为0表示没有超时。

举例:设置交换机退出特权用户配置模式的超时时间为6分钟。

Switch(Config)# exec timeout 6?

修改交换机的主机名 hostname XXX 举例:设置提示符为Test。

Switch(Config)#hostname Test Test(config)#

保存交换机配置的命令:write

重启交换机的命令:reload

恢复交换机出厂配置命令:set default 举例:

Switch#set default

Are you sure? [Y/N] = y

Switch#write

Switch#reload

更改语言命令:language {chinese|english}

功能:设置显示的帮助信息的语言类型。

参数:chinese为中文显示;english为英文显示。

命令模式:特权用户配置模式。

举例:

Switch# language Chinese

二(查看命令

显示ARP映射表命令:show arp 命令模式:特权用户配置模式。

使用指南:显示当前 ARP 映射表的内容,如:IP 地址,硬件地址,硬件类型,接口名等。

举例:

Switch# show arp

Total arp items is 2, the matched arp items is 2

Address Hardware Addr Interface Port Flag

1.1.1.2 00-01-7A-43-65-73 Vlan1 Ethernet0/0/23

Dynamic

are no special instructions below, in this report, the \"I\" mean

green town in yingde city middle school, \"we\" means young qingtang town middle school in the Township of yingde city middle school teachers ' professional development study group. ) The actual condition and the specific situation of young teachers ' professional development for young teachers ' College ... (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female 34 70.83% beside the effective fill in passengers 48 from survey of data view, I school young teachers in the, female teachers 34 people, male teachers 14 people,

high out 20 people; from by accounted for proportion view, female teachers accounted for than 70.83%, male teachers 29. 17%, ratio of female teachers account for 41.66 percent. Young teacher in our school can be seen in the serious imbalance in the sex ratio, obviously there with the current outlooks a greater relationship. This requires the attention of our Administrative Department of education high allocations in education issues. 2nd questions how old you are (a) [form] (A) (Young teachers of) basic information data analysis 1th problem you of gender ()

[single topics] option small meter proportion a,. male 14 29.17% b. female

192.168.1.145 00-01-7A-FE-38-8A Vlan1 Ethernet0/0/23

Dynamic

查看交换机当前配置命令:show running-config 缺省情况:对于正在生效的配置参数,

如果与缺省工作参数相同,则不显示。命令模式:特权用户配置模式。

使用指南: 当用户完成一组配置后,需要验证是否配置正确,则可以执行show running-config 命令来查看当前生效的参数。

举例:

Switch# show running-config

可简写为Switch# show run

查看端口命令:show switchport interface [ethernet ] 功能:显示交换机端口的VLAN端口模式和所属VLAN号及交换机的Trunk 端口信息。

参数:为端口号,可以是0/0/1-端口最大值。

命令模式:特权用户配置模式。

举例:显示端口0/0/1的VLAN信息。

Switch# show switchport interface ethernet 0/0/1 Ethernet0/0/1

Type:Universal

Mac addr num:-1

Mode :Access

Port VID :1

Trunk native Vlan :1

Trunk allowed Vlan :ALL

跟踪路由命令:traceroute { | host }[hops ] [timeout ]

功能:本命令用于测试数据包从发送设备到目的地设备所经过的网关,检测网络是否可达,定位网络故障所在。

参数:是目的主机的 IP 地址,点分十进制格式;是为远端主机的主机名;为Traceroute的最大经过的网关数目;为数据包超时时间,单位为毫秒,取值范围100~10000。

缺省情况:数据包最多经过的网关数目缺省为16,超时时间为2000毫秒。命

令模式:特权用户配置模式。

使用指南:Traceroute一般用于定位目的网络不可达时的故障所在。

举例:

Switch# traceroute 10.1.128.251

are no special instructions below, in this report, the \"I\" mean green town in yingde city middle school, \"we\" means young qingtang town middle school in the Township of yingde city middle school teachers ' professional development study group. ) The actual condition and the specific situation of young teachers ' professional development for young teachers ' College ... (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female 34 70.83% beside the effective fill in passengers 48 from survey of data view, I school young teachers in the, female teachers 34 people, male teachers 14 people, high out 20 people; from by accounted for proportion view, female teachers accounted for than 70.83%, male teachers 29. 17%, ratio of

female teachers account for 41.66 percent. Young teacher in our school can be seen in the serious imbalance in the sex ratio, obviously there with the current outlooks a greater relationship. This requires the attention of our Administrative Department of education high allocations in education issues. 2nd questions how old you are (a) [form] (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female

三. 网络管理交换机

设置管理VLAN

Switch>

Switch> en

Switch# config

Switch(Config)# interface vlan 1

Switch(Config-If-Vlan1)# ip address 10.1.128.251 255.255.255.0

Switch(Config-If-Vlan1)# no shutdown

telnet 管理交换机

打开交换机的telnet服务器功能:Switch(Config)# telnet-server enable

关闭交换机的telnet服务器功能:Switch(Config)# no telnet-server enable 配置远程登录验证方式

authentication login {local | radius | local radius | radius local} 缺省情况:缺省登陆验证方式为local。

命令模式:全局配置模式。

举例:

Switch(Config)# authentication login local

必须在 Console 口方式的全局配置模式下使用命令telnet-user password {0|7}

为交换机设置Telnet授权用户和口令;0|7 分别表示口令不加密显示和加密显示。如交换机的授权用户名为test,口令为明文的123456,设置

方式如下:

Switch> en

Switch# config

Switch(Config)# telnet-user test password 0 123456

在计算机上配置与管理IP相同网段的IP地址,在运行那里输入telnet

10.1.128.251 在 Telnet 配置界面上输入正确的登录名和口令,Telnet 用户就可成功的进入到交换机的 CLI 配置界面。Telnet 登录后与通过 Console 口进入后使用的命令完全一致。

通过 HTTP管理交换机

第一:配置交换机的IP地址,并且启动交换机的HTTP Server功能。

通过带外管理配置交换机IP 地址,参见相应章节。

同时 Console 方式下的全局配置模式下使用命令 ip http server 启动HTTPServer功

能,使能Web配置。配置如下:

Switch> en

Switch# config

Switch(Config)# ip http server

第二:在配置主机上运行HTTP协议。

are no special instructions below, in this report, the \"I\" mean green town in yingde city middle school, \"we\" means young qingtang town

middle school in the Township of yingde city middle school teachers ' professional development study group. ) The actual condition and the specific situation of young teachers ' professional development for young teachers ' College ... (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female 34 70.83% beside the effective fill in passengers 48 from survey of data view, I school young teachers in the, female teachers 34 people, male teachers 14 people,

high out 20 people; from by accounted for proportion view, female teachers accounted for than 70.83%, male teachers 29. 17%, ratio of female teachers account for 41.66 percent. Young teacher in our school can be seen in the serious imbalance in the sex ratio, obviously there with the current outlooks a greater

relationship. This requires the attention of our Administrative Department of education high allocations in education issues. 2nd questions how old you are (a) [form] (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female

在主机上打开 Web 浏览器,在地址处输入交换机的 IP 地址,或直接运行

Windows 的HTTP协议,比如交换机的IP地址为“10.1.128.251”;

在允许Web 方式配置管理交换机时,必须在Console方式下的全局配置模式下使用命令web-user password {0|7} 为交换机设置Web

授权用

户和口令。如交换机的授权用户名为admin,口令为明文的admin,设置方式如下: Switch>en

Switch#config

Switch(Config)#web-user admin password 0 admin 输入正确的用户名和密码,进入交换机的Web配置主界面。

四. 交换机端口配置

进入端口配置模式:Switch(Config)# int ethernet 0/0/1

Switch(Config-Ethernet1-0/0/1)# 举例:进入以太网端口0/0/1,0/0/4-5,0/0/8。

Switch(Config)#interface ethernet 0/0/1;/0/4-6;0/0/8

Switch(Config-Port-Range)#

关闭和打开端口:Switch(Config-Ethernet1-0/0/1)# shutdown

Switch(Config-Ethernet1-0/0/1)# no shutdown 带宽限制命令:bandwidth control [transmit]

no bandwidth control 功能:打开端口的带宽限制功能;本命令的no操作为关闭端口

的带宽限制功能。

参数:为限制带宽,单位为 kbps,取值范围为 62-

1000000;transmit 为在端口发送数据时进行带宽控制。

命令模式:端口配置模式。

缺省情况:端口缺省关闭带宽控制功能。

使用指南:当端口设置了带宽限制功能,并且指定了限制带宽的大小,那么端

口的

最大带宽就被确定,而不以10/100M为最大带宽。

举例:设置1-8号端口限制发送数据时带宽为40M。

Switch(Config)#interface ethernet 0/0/1-8 are no special

instructions below, in this report, the \"I\" mean green town in yingde city middle school, \"we\" means young qingtang town middle school in the Township of yingde city middle school teachers ' professional development study group. ) The actual condition and the specific situation of young teachers ' professional development for young teachers ' College ... (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion

a,. male 14 29.17% b. female 34 70.83% beside the effective fill in passengers 48 from survey of data view, I school young teachers in the, female teachers 34 people, male teachers 14 people, high out 20 people; from by accounted for proportion view, female teachers accounted

for than 70.83%, male teachers 29. 17%, ratio of female teachers account for 41.66 percent. Young teacher in our school can be seen in the serious imbalance in the sex ratio, obviously there with the current outlooks a greater relationship. This requires the attention of our Administrative Department of education high allocations in education issues. 2nd questions how old you are (a) [form] (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female Switch(Config-Port-Range)# bandwidth control 40000 Switch(Config-

Port-Range)# no bandwidth control

设置端口速率和双工:speed-duplex {auto | force10-half | force10-full | force100-half |

force100-full | force100-fx |{{force1g-half | force1g-full} [nonegotiate [master | slave]] } }

参数:auto 为自动协商速率;

force10-half 为强制 10Mbit/s 速率,半双工模式;

force10-full 为强制10Mbit/s 速率,全双工模式;

force100-half 为强制100Mbit/s 速率,半双工模式;

force100-full 为强制 100Mbit/s 速率,全双工模式;

force100-fx为强制 100Mbit/s 光口模式;

force1g-half 为强制 1000Mbit/s 速率,半双工模式;

force1g-full 为强制1000Mbit/s 速率,全双工模式;

nonegotiate 为强制关闭千兆端口自动协商;

master 为强制千兆端口为master模式;

slave 为强制千兆端口为slav模式。

命令模式:端口配置模式。

缺省情况:端口缺省为自动协商速率和双工模式(auto)。

使用指南:在配置端口的速率和双工模式时,端口的速率和双工模式必须和对端设

备速率和双工模式保持一致,即如果对端设备自动协商方式则本端也设置成自动协

商方式;如果对端是强制方式,则本端也应设置成相应的强制方式。

在强制100Mbit/s光口模式下,不支持自动协商方式,并且不能与combo 电口同时

使用。

对于千兆端口,配置nonegotiate 方式时,默认为master。如果一端配置为master 方式,另外一端必需配置为slave 方式。

举例:交换机 Switch1 端口 1同交换机 Switch2 端口 1 用线相连,将该两个端口设

置为强制100Mbit/s 速率,半双工模式。

Switch1(Config)#interface e0/0/1

Switch1(Config-Ethernet1-0/0/1)#speed-duplex force100-half

Switch2(Config)#interface e0/0/1

Switch2(Config-Ethernet0/0/1)#speed-duplex force100-half

环回测试口:loopback

缺省情况:以太网端口不进行环回测试。

命令模式:端口配置模式。

使用指南:使用环回测试可以检验以太网端口是否正常工作。

举例:设置以太网端口0/0/1-8进行环回测试。

Switch(Config)#interface ethernet 0/0/1-8 Switch(Config-Port-

Range)#loopback

设定端口名字: name

are no special instructions below, in this report, the \"I\" mean

green town in yingde city middle school, \"we\" means young qingtang town middle school in the Township of yingde city middle school teachers ' professional development study group. ) The actual condition and the specific situation of young teachers ' professional development for young teachers ' College ... (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female 34 70.83% beside the effective fill in passengers 48 from survey of data view, I school young teachers in the, female teachers 34 people, male teachers 14 people,

high out 20 people; from by accounted for proportion view, female teachers accounted for than 70.83%, male teachers 29. 17%, ratio of female teachers account for 41.66 percent. Young teacher in our school can be seen in the serious imbalance in the sex ratio, obviously there with the current outlooks a greater

relationship. This requires the attention of our Administrative Department of education high allocations in education issues. 2nd questions how old you are (a) [form] (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female

命令模式:端口配置模式。

缺省情况:端口缺省没有名字。

举例:指定0/0/1-8端口name 为client。

Switch(Config)#interface ethernet 0/0/1-8 Switch(Config-Port-Range)#name client

查看MAC地址表:

命令: show mac-address-table [static|aging-time|blackhole|count] [address ]

[vlan ] [interface ]

参数:static 静态表项;aging-time 地址老化时间;

blackhole 过滤表项;count 地址计数;

要显示的表项包含的 MAC 地址;

要显示的表项包含的VLAN 号;

要显示的表项包含的端口名称。

命令模式:特权用户配置模式

缺省情况:系统缺省不显示MAC地址表的内容。

使用指南:本命令可以分类显示各种 MAC 地址表项,也可以使用命令 show mac-address-table 显示当前交换机内所有的MAC地址表项。

举例:显示当前MAC地址表中的过滤表项。

Switch#show mac-address-table blackhole

五. 配置VLAN

创建vlan :vlan

命令模式:全局配置模式。

缺省情况:交换机缺省只有VLAN1。

使用指南:VLAN1 为交换机的缺省 VLAN,用户不能配置和删除 VLAN1。允许

配置VLAN的总共数量为4094个。

举例:创建VLAN100,并且进入VLAN100 的配置模式。

Switch(Config)#vlan 100

Switch(Config-Vlan100)#

命名vlan:name

命令模式:VLAN配置模式。

缺省情况:VLAN缺省VLAN名称为vlanXXX,其中XXX为 VID。使用指南:交换机提供为不同的VLAN指定名称的功能,有助于用户记忆VLAN,方便管理。

举例:为VLAN100指定名称为TestVlan。

Switch(Config-Vlan100)#name TestVlan

are no special instructions below, in this report, the \"I\" mean

green town in yingde city middle school, \"we\" means young qingtang town middle school in the Township of yingde city middle school teachers ' professional development study group. ) The actual condition and the specific situation of young teachers ' professional development for young teachers ' College ... (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female 34 70.83% beside the effective fill in passengers 48 from survey of data view, I school young

teachers in the, female teachers 34 people, male teachers 14 people, high out 20 people; from by accounted for proportion view, female teachers accounted for than 70.83%, male teachers 29. 17%, ratio of female teachers account for 41.66 percent. Young teacher in our school

can be seen in the serious imbalance in the sex ratio, obviously there with the current outlooks a greater relationship. This requires the attention of our Administrative Department of education high allocations in education issues. 2nd questions how old you are (a) [form] (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female

将端口加入指定vlan

命令:switchport access vlan no switchport access vlan

功能: 将当前Access端口加入到指定VLAN; 本命令no操作为将当前端口从VLAN 里删除。

参数:为当前端口要加入的vlan VID,取值范围为1~4094。

命令模式:接口配置模式

缺省情况:所有端口默认属于VLAN1。

使用指南: 只有属于Access mode 的端口才能加入到指定的VLAN中,并且Access

端口同时只能加入到一个VLAN里去。

举例:设置某Access端口加入VLAN100。

Switch(Config)#interface ethernet 0/0/8 Switch(Config-

ethernet0/0/8)#switchport mode access

Switch(Config-ethernet0/0/8)#switchport access vlan 100

Switch(Config-ethernet0/0/8)#exit

给vlan指派端口

命令:switchport interface no switchport interface

功能:给VLAN分配以太网端口的命令;本命令的no操作为删除

指定VLAN内的一个或一组端口。参数: 要添加或者删除的端口的列表,支持”;” ”-” ,如:ethernet 0/0/1;2;5 或ethernet 0/0/1-6;8。

命令模式:VLAN配置模式。

缺省情况:新建立的VLAN 缺省不包含任何端口。

使用指南:Access 端口为普通端口,可以加入 VLAN,但同时只允许加入一个VLAN。

举例:为VLAN100分配百兆以太网端口1,3,4-7,8。

Switch(Config-Vlan100)#switchport interface ethernet 0/0/1;3;4-7;8 设置端口的vlan模式

命令:switchport mode {trunk|access} 功能:设置交换机的端口为access模式或者trunk模式。

参数:trunk 表示端口允许通过多个 VLAN 的流量;

access 为端口只能属于一个VLAN。

命令模式:接口配置模式。

缺省情况:端口缺省为Access模式。

使用指南:工作在trunk mode下的端口称为Trunk端口,Trunk端口可以通过

多个 VLAN的流量,通过Trunk端口之间的互联,可以实现不同交换机上的相同VLAN 的互通;工作在access mode 下的端口称为Access端口,Access端口可以分配给一个VLAN,并且同时只能分配给一个VLAN。

注意在Trunk端口不允许802.1X认证。

举例:将端口5设置为trunk 模式,端口8 设置为access模式。

Switch(Config)#interface ethernet 0/0/5 Switch(Config-

ethernet0/0/5)#switchport mode trunk Switch(Config-ethernet0/0/5)#exit are no special instructions below, in this report, the \"I\" mean green town in yingde city middle school, \"we\" means young qingtang town middle

school in the Township of yingde city middle school teachers ' professional development study group. ) The actual condition and the specific situation of young teachers ' professional development for young teachers ' College ... (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female 34 70.83% beside the effective fill in passengers 48 from survey of data view, I school young teachers in the, female teachers 34 people, male teachers 14 people,

high out 20 people; from by accounted for proportion view, female teachers accounted for than 70.83%, male teachers 29. 17%, ratio of female teachers account for 41.66 percent. Young teacher in our school can be seen in the serious imbalance in the sex ratio, obviously there with the current outlooks a greater relationship. This requires the attention of our Administrative Department of education high allocations in education issues. 2nd questions how old you are (a) [form] (A) (Young teachers of) basic information data analysis 1th problem you of gender () [single topics] option small meter proportion a,. male 14 29.17% b. female

Switch(Config)#interface ethernet 0/0/8

Switch(Config-ethernet0/0/8)#switchport mode access

Switch(Config-ethernet0/0/8)#exit

are no special instructions below, in this report, the \"I\" mean

green town in yingde city middle school, \"we\" means young qingtang town middle school in the Township of yingde city middle school teachers '

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- azee.cn 版权所有

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务