搜档网
当前位置:搜档网 › Exreme交换机配置命令

Exreme交换机配置命令

Exreme交换机配置命令
Exreme交换机配置命令

Extrem XOS交换机基本命令

1.1 系统操作管理

1.1.1查看交换机信息

show switch //可以看主备引擎工作情况,软件版本等

1.1.2选择软件/升级软件

电脑以太网连接交换机运行TFTP软件

download image 192.168.1.30 bd8800-12.0.1.11-ssh.xmod vr "VR-Default”

//extreme放os有两个位置,一个primary,一个secondary。本命令有参数可以选择。当tftp电脑在交换机管理口时不需要加vr参数,如果在数据口一定要加vr "VR-Default"

run update

use image primary //选择下一次启动从primary启动,也可根据需要从secondary 启动

1.1.3时钟

configure time 9 / 10 / 2007 15 : 31 : 30

1.1.4修改密码

configure account admin //修改admin用户的密码

系统会出来如下提示,输入新密码就可以

password:

Reenter password:

1.1.5保存/使用配置

(1) 当有配置修改过,在提示符前会多一个*号,如下所示:

* X450a-48t.8 #

(2) 保存配置:

* X450a-48t.8 #Save

输入此命令后,系统会提示是不是要保存,选YES就完成保存。

(3) save configuration Oct11_backup //可以保存成特定文件名的配置

use configuration Oct11_backup

upload configuration 1.1.1.1 450config.cfg vr "VR-Default" //文本格式

tftp put/get 1.1.1.1 vr “VR-Default”primary.cfg primary.cfg //直接使用1.1.6SNMP

(1) 更改交换机的hostname:

configure snmp sysName +

例如:configure snmp sysName hp

enable snmp access

(2) 为了安全性,建议用如下命令删除缺省的community “public”和”private”

config snmp delete community readonly public

config snmp delete community readonly public

(3) 再添加你自己的community

config snmp add community readonly/readwrite

1.1.7看交换机管理信息

sho management //可以看到CLI、telnet、ssh、web access、snmp等的设置情况

1.1.8看历史命令

history

1.1.9Ping/telnet

ping vr “VR-Default“ /Ping + 参数//因为XOS交换机管理口数据和用户数据分别在两个Virtual router中传送,所以ping/telnet时要注意制定目的地址在那个VR中。

如果在管理端口:telnet vr "VR-Mgmt"

例:ping 192.168.0.1 telnet vr “VR-Default“10.0.1.1

1.1.10小技巧—TAB键

TAB键的使用:如果不知道后面命令时,按TAB键,系统自动可以把后面的参数显示出来;从参数中选择你需要的参数,只需要打前面字母,用TAB可以自动补全

1.1.11清空整个交换机配置

unconfig switch all

1.2 协议配置管理

1.2.1启用/禁用端口

(1) 启用端口,相当于其他厂商的no shutdown:

enable port <端口号>

(2) 关闭端口,相当于其他厂商的shutdown:

disable port <端口号>

(3) 查看端口的状态:

show port 2 information

(1) 创建vlan的命令如下:

Create vlan +

例如:Create vlan vlan10

(2) 给vlan打标签,设置vlan号:

Configure vlan “vlan名字” tag

例如:Configure vlan “vlan10” tag 10//如果不配,系统会自动分配一个,不过自动分配不易管理。

(3)将端口加到缺省vlan中

Configure vlan “default” add port 9

将端口加到其他vlan中,先要将这个端口从缺省vlan里拿出,因为一个端口不能同时属于两个vlan(trunk口除外):

Configure v lan “default” delete port 9

Configure vlan “vlan10” add port 9

(4)配置这个vlan的3层IP地址:

Configure vlan “vlan10” ipaddress 192.168.1.254/24

(5)配置交换机默认网关:

configure iproute add default {} {multicast | multicast-only

|unicast | unicast-only} {vr }

For example:

configure iproute add default 123.45.67.1

(5) 启用三层转发功能:

enable ipforwarding //注意需要三层互通,必须要输入这个命令

(6) 看vlan相关参数:

show vlan

Extreme交换机对于802.1Q trunk的设置是以Tag的方式配置的,而且协议是标准的802.1Q。所以以太网口缺省都在untag的vlan default里(vlan1)。此时如果需要把这个端口做成trunk口,很简单的只需要将这个端口再增加带Tag的vlan就可以,这个trunk口需要透传几个vlan,就允许几个tag vlan。命令如下:Configure vlan “vlan10” add port 9 tag

1.2.4配置端口冗余

对于一个交换机有两条上连线路分别到两个中心/汇集交换机的情况,可以采用端口冗余的配置

config ports 25 redundant 26 //26口作为25口的冗余口,当25口断了26口就会激活工作(上连光口或者堆叠中不同的交换机口都可以做成相互冗余)unconfigure ports 25 redundant //删除冗余端口配置

1.2.5link aggregation端口捆绑

动态协议捆绑,使用中可以增加/删除新端口:

enable share 1 grouping 1,2,3,4 algorithm address-based //使用标准LACP 协议

sho lacp lag 1

静态配置:

enable share 1 grouping 1-2

sho ports sharing

禁用:

disable sharing 1

1.2.6EAPS(以太网自动保护技术)

创建vlan,并将Control vlan和protect vlan都加上相应物理端口。Config vlan add port

Create/delete eaps name

config eaps mode master/transit

conifg eaps primary/sec port 在transit的设备上也是需要随意指定这两个的。

config eaps add control/protect vlan

(extremeware control vlan必须要在qp8

configure vlan ec2 qosprofile qp8 show vlan ec2可以检查)

config eaps fast-convergence on/off 50ms收敛

enable eaps 全局下面和子进程都要enable

enable eaps < domain name>

sho eaps

sho eaps ed1

ESP防止share link(两个EAPS重叠的链路部分)的super loop高级功能

eaps 的share port( ESP协议)避免superloop

master尽量不要做这两个上

如果是生产网,先配partner,避免影响网络。

create eaps shared-port 5

config eaps shared-port 5 link id 42

config eaps shared-port mode controller/partner

如果断common-link时,需要检查share-port生效

sho eaps shared-port detail

1.2.7STP(生成树配置)

基本配置:

先创建vlan,并将Carrier vlan和protect vlan都加上相应物理端口。Config vlan add port:

create vlan c1

create vlan v1

config vlan c1 tag 10

config vlan v1 tag 20

config vlan "c1" add port 1 tagged //需要将相应的物理端口加入vlan config vlan "v1" add port 1 tagged //需要将相应的物理端口加入vlan

create stpd //创建一个新的STP domain。系统缺省已经建好了一个S0的stp domain,但是没有enable起来

config stpd d1 mode dot1d/dot1w //修改stp的工作模式。用如下emistp封装,可以不用修改mode,如果改成了dot1w,那么一定要修改link-type。

config stpd d1 add vlan c1 ports <> emistp//添加控制vlan和端口

config stpd d1 add vlan v1 ports <> emistp //添加用户vlan和端口,并采用emistp的封装模式。emistp 端口缺省封装模式bpdu封装模式(有c vlan)。还有802.1d(不能携带vlan信息),pvst(和其他厂商互联一定要改成pvst了;工作模式osperation mode也有3种802.1d,802.1wRSTP,802.1sMSTP。概念不同)

以下为确定carrier vlan是C1

create vlan c1

config vlan c1 tag 10

config stpd d1 tag 10

config stpd priority <> //越小优先级越高

enable stp //extreme交换机缺省没有启用stp,另外缺省封

装用emistp

enable stpd auto-bind vlan <> //当有端口被加入该vlan,系统自动把它和设好的STPD绑定

高级功能:

SW2.5 # config stpd d1 ports link-type 如果对端不是point-to-point 那么会回滚到802.1d封装模式

auto auto-sensing mode

broadcast broadcast mode

edge edge mode

point-to-point point-to-point mode

point to point 是rstp/mstp 1个vlan只有两个bridge

en stpd s0 rapid-root-failover 快速收敛

对于常用的环境既有tag口和其他交换机互联,又有untag的用户口,建议1个vlan一个stpd 的配置,如下:

configure vlan Default delete ports all

create vlan management

configure vlan management tag 101

create vlan provider

configure vlan provider tag 102

create vlan provisioning

configure vlan provisioning tag 103

configure vlan management add ports 47 tagged

configure vlan management add ports 3 untagged

configure vlan provider add ports 47 tagged

configure vlan provider add ports 1 untagged

configure vlan provisioning add ports 47 tagged

configure vlan provisioning add ports 2 untagged

configure stpd d1

configure stpd d1 mode dot1w

configure stpd d1 add management ports 47 emistp

configure stpd d1 tag 101

configure stpd d1 add management ports 3 dot1d

enable stpd d1

configure stpd d2

configure stpd d2 mode dot1w

configure stpd d2 add provider ports 47 emistp

configure stpd d2 tag 101

configure stpd d2 add provider ports 1 dot1d

enable stpd d2

configure stpd d3

configure stpd d3 mode dot1w

configure stpd d3 add provisioning ports 47 emistp //emistp/pvst+ encapsulation is for tag port;can add more ports

configure stpd d3 tag 101 //set tag vlan for bpdu configure stpd d3 add provisioning ports 2 dot1d //dot1d encapsulation is for untag port;can add more ports

enable stpd d3

show stpd d1 ports // can see 2 ports in d1

show stpd d2 ports // can see 2 ports in d1

show stpd d3 ports // can see 2 ports in d1

1.2.8VRRP(虚拟网关技术)

VRRP是一种网关冗余技术。如果主网关故障,备交换机会接管主交换机成为主网关,当主网关恢复后又重新接管业务。

主网关上的配置如下:

configure vlan vlan1 ipaddress 192.168.1.254/24

create vrrp vlan vlan1 vrid 1 //创建vrid为1的vrrp组

configure vrrp vlan vlan1 vrid 1 prioirty 255 //优先级设成255,作为主网关。数字越大优先级越高。不配这个优先级的话缺省100,所以在备网关上一般就不用做这个配置了。

configure vrrp vlan vlan1 vrid 1 add 192.168.1.254 //配置网关的IP,在主网关上配的IP实际上和这个vlan的IP是相同的。备网关选择一个不同的IP。

enable vrrp //启用这个VRRP

备网关上的配置如下:

configure vlan vlan1 ipaddress 192.168.1.253/24

create vrrp vlan vlan1 vrid 1

configure vrrp vlan vlan1 vrid 1 add 192.168.1.254

enable vrrp

注意:每个交换机可以起64个虚拟网关;vrid只能使用七个不同的,不同的vlan 可以使用一样的vrid号。

1.2.9DHCP请求转发

两种实现方式:一种bootprelay,一种udp forwarding

用这两种方式都要先把做DHCP的vlan/port 定义出来

enable bootp vlan [ | all] //连DHCP server vlan

enable dhcp ports <> vlan <> //连dhcp client

简单的实现方式可以用bootprelay:

configure bootprelay add 172.17.0.20 vr VR-Default

configure bootprelay add 172.17.0.21 vr VR-Default

enable bootprelay vr VR-Default //// 启用DHCP relay

如果需要为特定vlan的DHCP client指定server要使用udp forwarding:

configure vlan udp-profile [ | none]

udp-profile的举例如下:下面部分需要policy file tftp到switch上。和ACL policy的用法相同。

tftp 10.120.80.135 -v "VR-Default" -g -l dhcptest.pol -r dhcptest.pol

dhcptest.pol文件的内容如下:

entry one {

if match all {

destination-port 67 ;

} then {

destination-ipaddress 20.0.0.5 ;

}

}

entry two {

if match all {

destination-port 67 ;

} then {

vlan "to7" ;

}

}

1.2.10查询/创建静态路由

创建普通的静态路由如下:

configure iproute add 10.255.2.0 255.255.255.0 192.168.254.253

创建缺省静态路由如下:

configure iproute add default 192.168.252.253

查询路由的命令如下:

Show iproute

1.2.11R IP 路由

configure rip add vlan

configure rip add vlan all

enable rip

show rip interface //检查有没有

show iproute //检查有没有带r标记的路由,就是rip路由

发布缺省路由

Enable rip originate-default

1.2.12O SPF 路由

基本配置:

create ospf area 0.0.0.5

configure ospf add vlan all area 0.0.0.0

configure ospf add "loop0" area 0

configure ospf add v1 area 0.0.0.0 link-type point-to-point //注意设定link-type必须要第1次配就配上.中间修改要先unconfig

configure ospf add v1 area 0.0.0.0 passive //对于advanced edge license的交换机大部分vlan都需要用passive的方式加入ospf,这个可以不占用ospf neighbor的数量(XOS12.0和以上的advanced edge license可以支持4个邻居,12.0以下支持2个)

BD-8810.85 # config ospf area 0.0.0.172 add range

ip address

IP address / Netmask

Enable loopback-mode vlan <>

configure ospf routerid //先配好routerid后再enable ospf

enable ospf

路由汇总

config ospf area add range ip/mask advertise/noadvert [type3 type 7] /域间路由range

config ospf ase-summary add ip/mask cost tag /外部路由summary

Stub 区

configure ospf area 0.0.0.6 stub summary /nosummary stub-default-cost 10 //nosummary连type3 lsa也不发送进入这个area。

show ospf area 《》//检查是不是stub area

验证:

config ospf vlan auth md5 32 pass /none 删除或配置验证

virtual-link

configure ospf add/delete virtual-link router-id(远端routerid) area-id(transit area)//添加/删除

sho ospf virtual-link //看virtual-link的state有没有full

修改缺省参数

config ospf vlan priority 修改端口优先级,设成0就不能做DR/BDR configure ospf area 0.0.0.0 priority 10修改整个area的所有端口的优先级

configure ospf area 0.0.0.0 timer 5 1 10 40 缺省值

configure ospf metric-table 10M 10 100M 5 1G 4 10G 2 //修改缺省cost

发布缺省路由

Enable ospf originate-default cost 10 type ase-type-1

或者enable ospf export static cost 10 type ase-type-1 //把缺省路由作为1条静态路由发布到ospf

路由分发:

enable ospf export rip 将rip发入ospf:

enable ospf export rip cost 10 type ase-type-1 从rip发到ospf

enable ospf export rip rip_to_ospf 将rip通过策略文件有选择的发入ospf

以下是policy文件的内容,需要通过TFTP进入switch:

tftp 10.120.80.135 -v "VR-Default" -g -l ripospf.pol -r ripospf.pol

ripospf.pol文件的内容如下:

entry rip_to_ospf {

if match any {

nlri 172.16.1.0/24;

nlri 1.1.1.0/24;

} then {

cost 1;

cost-type ase-type-1;

}

}

Router-policy 如果条件都不匹配,最后是deny。

等价路由

enable iproute sharing

config iproute sharing max-gateways

show ipconfig 检查有没有enable起ECMP多等价路由

缺省的各种链路cost值

configure ospf metric-table 10M 10 100M 5 1G 4 10G 2

检查结果

sho ospf interfaces

sho ospf interfaces "vlan1"

show ospf nei

sho ospf lsdb all

1.2.13组播配置(需要Advanced/Core license)

ip unicast-routing都要做好,要enable ipforwarding。组播是在unicast的基础上的。

两种模式Dense mode主要用户密集使用multicast;sparse mode主要用在

unicast网络中,部分机器有时候会使用multicast的环境。

Dense mode配置步骤:

ena igmp

ena igmp snooping(纯layer 2的。让二层交换机snooping 组播包。)en ipforwarding

enable ipmcforwarding

config pim add vlan all dense

enable pim

sparse mode配置步骤:

ena igmp

ena igmp snooping

en ipforwarding

enable ipmcforwarding

config pim add vlan all sparse

config pim cbsr vlan v1 40 设CBSR的vlan,和priority

configure pim crp vlan "v1" "mgroup_v1" 4设Crp的vlan,和priority

enable pim

检查结果:

sho igmp

show igmp group

show igmp snooping cache

show pim

show pim detail

show pim rp-set 239.1.1.1

show pim cache detail

clear pim cache

1.2.14ACL

1、动态ACL,动态ACL重起就丢失:

create access-list tel "protocol icmp;icmp-type echo-request" "deny;count test" configure access-list add "tel" first ports 23 ingress

configure access-list delete "tel" ports 23

2、静态ACL,保存在配置里的,重起一直在:

(1)现在TFTP服务器中,编辑好一个扩展名为pol的文件。

例:文件名为MyAccessProfile.pol的文件

文件内容如下:

entry AllowTheseSubnets {

if {

source-address 10.203.133.0 /24;

} then {

permit;

}

}

(2)将MyAccessProfile.pol上传到交换机中去

tftp 10.120.80.135 -v "VR-Default" -g -l MyAccessProfile.pol -r MyAccessProfile.pol

(3)ls //本命令检查acl有没有成功上传到交换机上

(4)

check policy acltest //传入交换机后可以用本命令检查语法错误

refresh policy acltest //如果修改过acl,需要用此命令刷新一下后才能使修改部分生效

(5)将ACL应用于端口、VLAN、或者telnet\ping等操作

configure telnet access-profile [ | none] //在telnet上

例:configure telnet access-profile MyAccessProfile

config access-list acltest ports 3/vlan 2 ingress //在物理端口或vlan上

(6)清除ACL

unconfigure access-list ports +具体端口号//清除端口上的ACL

unconfigure access-list vlan +vlan名字//清除vlan上的ACL

(7)几个脚本文件实例

acltest.pol文件的内容如下:

Entry permit-established {

If { //写if就是if match all

Source-address 10.0.0.0/24;

Protocol TCP;

Tcp-flags syn;

} then {

Permit;

Count syn; //可以设置一个计数器来看有多少条记录匹配

}

}

Entry default {

If {

source-address 0.0.0.0/0

} then {

Deny;

Count default;

}

}

如果条件都不匹配,缺省最后是permit。(和cisco 不同),所以最后要配置deny所有IP协议层的东西。注:一定要在最后的if语句中加入source-address 0.0.0.0/0,如果什么都没有加,会把二层的arp也被禁止。

其他例子如下:

只允许10.120.80.0的这个网段去http,telnet和ping。

Entry permithttp {

if {

protocol tcp;

source-address 10.120.80.0/24;

destination-port 80;

}

then

{

permit;

count httpcnt;

}

}

Entry permittelnet {

if {

protocol tcp;

source-address 10.120.80.0/24;

destination-port telnet;

}

then

{

permit;

count telnetcnt;

}

}

entry icmp {

if {

source-address 10.120.80.0/24;

protocol icmp;

}

then {

permit;

count icmpcnt;

}

}

entry denyall {

if {

source-address 0.0.0.0/0

} then {

deny;

count denycnt;

}

}

1.2.15策略路由PBR

策略路由PBR是优先于路由选择一种特殊ACL,这种ACL应用到了端口/vlan上后,可以在转发数据前,先把符合条件的数据直接重定向redirect到指定的端口而不管路由表路由是走哪个端口的。具体使用方法和ACL一模一样。

PBR的pol文件举例如下:

Entry pbr {

if {

source-address 10.120.80.0/24;

destination-address 1.1.1.1/24

}

then

{

redirect 2.1.1.24;

}

}

交换机的配置命令

网络互连设备 1、交换机基本配置命令 (1)用户模式Switch> (2)特权模式Switch>enable Switch# (3)特权模式退回到用户模式:disable (4)下一级模式退回到上一级:exit (5)某个模式直接退回到特权模式:end (6)配置交换机名称命令hostname <交换机> (7)进入交换机端口模式命令 模式:switch(config)# 命令:interface <端口类型> <端口号> 交换机常见的端口类型:ethernet、fastethernet、gigabitethernet以及VLAN 接口等。端口号一般采用插槽号/端口号,如0/1。 (8)进入交换机的某个端口模式switch(config-if)# 显示交换机端口状态命令switch# show interface <端口类型> <端口号> (9)进入控制台线路模式模式:switch(config)# 命令:line console <编号> 参数:编号是配置口的编号,从0开始编号。结果:进入控制台模式 switch(config-line)#。 (10)配置控制台口令模式:switch(config-line)# 命令:password <密码> 参数:密码支持字母和数字。 启用密码认证模式:switch(config-line)# 命令:login (11)配置进入特权模式口令模式:switch(config)# 命令:enable password|secret <密码> 参数:password表示密码以明文形式存放,secret表示密码以密文形式存放。密码支持字母和数字。 (12)为之前设置的口令加密模式:switch(config)# 命令:service password-encryption 结果:将之前设置的所有口令加密。 (13)配置交换机的登录标语模式:switch(config)# 命令:banner motd %<标语>%参数:标语应该是警示性的文字,不识别中文。结果:下次进入某个需要输入密码的模式时将会显示该提示。 (14)禁止干扰信息模式:控制台模式命令:logging synchronous 结果:下次弹出日志信息时会强制回车。 2、交换机系统帮助命令 (1)显示系统信息命令Switch> show version (2)显示交换机当前配置命令show running-config (3)显示交换机已保存的配置命令show startup-config (4)保存现有配置命令copy running-configu startup-config (5)清除已保存的配置erase startup-config (6)了解在某模式下有哪些命令时,可以输入“?” (7)某个命令只记得一部分时,可以在记得的部分后输入“?”(无空格)(8)清楚某单词后可输入的命令时,可在此单词后输入“? ”(中间有空格)。(9)将命令补充完整。输入能唯一识别某个命令关键字的一部分后,可以按键盘上的TAB键可以将该关键字补充完整。

锐捷交换机常用配置基础命令

一、交换机基本配置 1、交换机命名: 在项目实施的时候,建议为处于不同位置的交换机命名,便于记忆,可提高后期管理效率。 switch(config)#hostname ruijie //ruijie为该交换机的名字 2、交换机配置管理密码: 配置密码可以提高交换机的安全性,另外,telnet登录交换机的时候,必须要求有telnet管理密码。 switch (config)#enable secret level 1 0 rg //配置telnet管理密码为rg,其中1表示telnet密码,0表示密码不加密 switch (config)#enable secret level 15 0 rg //配置特权模式下的管理密码rg,其中15表示为特权密码3、交换机配置管理IP switch (config)#interface vlan 1 //假设管理VLAN为VLAN 1 switch (config-if)#ip address 192.168.1.1 255.255.255.0 //给管理VLAN配置管理IP地址 switch (config-if)#no shutdown //激活管理IP,养成习惯,无论配置什么设备,都使用一下这个命令 4、交换机配置网关: switch(config)#ip default-gateway 192.168.1.254 //假设网关地址为192.168.1.254,此命令用户二层设备。通过以上几个命令的配置,设备便可以实现远程管理,在项目实施时(尤其是设备位置比较分散)特别能提高效率。 二、接口介质类型配置 锐捷为了降低SME客户的总体拥有成本,推出灵活选择的端口形式:电口和光口复用接口,方便用户根据网络环境选择对应的介质类型。 但光口和电口同时只能用其一,如图1,如使用了光口1F,则电口1不能使用。 1、接口介质类型的转换: Switch(config)#interface gigabitethernet 0/25-28

实验二 交换机配置方式及基本命令的熟悉

实验二交换机的配置方式及基本命令的熟悉 【实验目的】 通过对交换机设备的几种配置手段、配置模式和基本配置命令的认识,获得交换机的基本使用能力。 【实验任务】 1、认识交换机的的配置方式; 2、按照给出的参考拓扑图构建逻辑拓扑图; 3、按照给出的配置参数表配置各个设备; 4、练习交换机的一些基本命令。 【实验背景】 在前面的实验中我们已经接触了Cisco的路由器运行的Cisco互联网络操作系统(ISO,Internetwork Operating System),熟悉了Cisco ISO软件内置的命令行界面(CLI,command-line interface )。同样,交换机可以通过一个菜单驱动程序的界面,或者通过命令行界面〔CLI〕,或者在交换机配置了IP地址后通过Telnet远程登录、web登录的方式对交换机来进行配置。 交换机除了可以通过Console端口与计算机直接连接外还可以通过交换机的普通端口进行连接。如果是堆叠型的,也可以把几台交换机一起进行配置,因为实际上这个时候它们是一个整体,这时通过普通端口对交换机进行管理时,就不再使用超级终端了,而是以Telnet 虚拟终端或Web浏览器的方式实现与被管理交换机的通信。前提是在本地配置方式中已为交换机配置好了IP地址,我们可通过IP地址与交换机进行通信,不过要注意,只有是网管型的交换机才具有这种管理功能。实际上最常用的Catalyst交换机OS被称为Catalyst OS、Catos,其最大的特点是基于set命令。但我们常用的是与路由器的IOS相类似的基于IOS的Catalyst OS。下面简单介绍交换机的各种命今模式以及各种常用的命令。 表3.1 交换机的各种命令模式的访问方式、提示符、退出方法及其描述

华为交换机基本配置命令详细讲解

华为交换机基本配置命令详解 1、配置文件相关命令 [Quidway]display current-configuration 显示当前生效的配置 [Quidway]display saved-configuration 显示flash中配置文件,即下次上电启动时所用的配置文件 reset saved-configuration 檫除旧的配置文件reboot 交换机重启 display version 显示系统版本信息 2、基本配置 [Quidway]super password 修改特权用户密码 [Quidway]sysname 交换机命名 [Quidway]interface ethernet 1/0/1 进入接口视图 [Quidway]interface vlan 1 进入接口视图 [Quidway-Vlan-interfacex]ip address 10.1.1.11 255.255.0.0 配置VLAN的IP地址 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.1.1.1 静态路由=网关 3、telnet配置 [Quidway]user-interface vty 0 4 进入虚拟终端 [S3026-ui-vty0-4]authentication-mode password 设置口令模式 [S3026-ui-vty0-4]set authentication-mode password simple xmws123设置口令 [S3026-ui-vty0-4]user privilege level 3 用户级别 4、端口配置 [Quidway-Ethernet1/0/1]duplex {half|full|auto} 配置端口工作状态 [Quidway-Ethernet1/0/1]speed {10|100|auto} 配置端口工作速率 [Quidway-Ethernet1/0/1]flow-control 配置端口流控 [Quidway-Ethernet1/0/1]mdi {across|auto|normal} 配置端口平接扭接

华为交换机基本配置命令29908

华为交换机基本配置命令 一、单交换机VLAN划分 命令命令解释 system 进入系统视图 system-view 进入系统视图 quit 退到系统视图 undo vlan 20 删除vlan 20 sysname 交换机命名 disp vlan 显示vlan vlan 20 创建vlan(也可进入vlan 20) port e1/0/1toe1/0/5 把端口1-5放入VLAN 20 中 5700系列 单个端口放入VLAN [Huawei]intg0/0/1 [Huawei]port link-typeaccess(注:接口类型access,hybrid、trunk) [Huawei]port default vlan 10 批量端口放入VLAN [Huawei]port-group 1 [Huawei-port-group-1]group-member ethernet G0/0/1 to ethernet G0/0/20 [Huawei-port-group-1]port hybrid untagged vlan 3 删除group(组)vlan 200内的15端口 [Huawei]intg0/0/15 [Huawei-GigabitEthernet0/0/15]undo port hybrid untagged vlan 200 通过group端口限速设置 [Huawei]Port-group 2 [Huawei]group-member g0/0/2 to g0/0/23 [Huawei]qos lr outbound cir 2000 cbs 20000 disp vlan 20 显示vlan里的端口20 int e1/0/24 进入端口24 undo port e1/0/10 表示删除当前VLAN端口10 disp curr 显示当前配置 return 返回 Save 保存 info-center source DS channel 0 log state off trap state off通过关闭日志信息命令改变DS模块来实现(关闭配置后的确认信息显示) info-center source DS channel 0 log state on trap state on 通过打开日志信息命令改变DS模块来实现(打开配置后的确认信息显示)

交换机配置命令

交换机配置命令 Prepared on 24 November 2020

配置命令 交换机之间用交叉线 1进入特权模式:Switch>enable 2配置模式 Switch#config 3配置主机名:Switch(config)#hostname S1 4.设置访问口令S1#configure terminal S1(config)#line console 0 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#line vty 0 15 S1(config-line)#password cisco S1(config-line)#login S1(config-line)#exit 5.将使能加密口令设置为 class。 S1(config)#enable secret class S1(config)#配置默认网关 6.在虚拟接口vlan99设置交换机ip地址 S1(config)#interface vlan99 S1(config-if)# S1(config-if)#no shutdown S1(config-if)#exit 7.交换机 VLAN 分配端口 S1(config)#interface fa0/1 S1(config-if)#switchport mode access S1(config-if)#switchport access vlan 99 S1(config-if)#exit 8.给vlan命名 S1(config)#vlan 10 S1(config-vlan)#name Faculty/Staff .本征vlan即分配端口连接s1 使用中继vlan S1中继vlan S1(config)#interface FastEthernet 0/1 S1(config-if)#switchport mode trunk S1(config-if)#switchport trunk native vlan 99 9..设置交换机默认网关

思科交换机-常用命令及配置

思科交换机-常用命令及配置 switch> 用户模式 1:进入特权模式enable switch> enable switch# 2:进入全局配置模式configure terminal switch> enable switch#configure terminal switch(conf)# 3:交换机命名hostname name 以cisco001 为例 switch> enable switch#c onfigure terminal switch(conf)#hostname cisco001 cisco001(conf)# 4:配置使能口令(未加密)enable password cisco 以cisco 为例switch> enable switch#configure terminal cisco001(conf)# enable password cisco 5:配置使能密码(加密)enable secret ciscolab 以cicsolab 为例switch> enable switch#configure terminal switch(conf)# enable secret ciscolab

6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#configure terminal switch(conf)# interface vlan 1 switch(conf)# ip address 192.168.1.1 255.255.255.0 配置交换机端口ip 和子网掩码 switch (conf-if)#no shut 激活端口 switch (conf-if)#exit switch (conf)#ip default-gateway 192.168.254 设置网关地址 7:进入交换机某一端口interface fastehernet 0/17 以17 端口为例 switch> enable switch#configure terminal switch(conf)# interface fastehernet 0/17 switch(conf-if)# 8:查看命令show switch> enable switch# show version 察看系统中的所有版本信息 show interface vlan 1 查看交换机有关ip 协议的配置信息 show running-configure 查看交换机当前起作用的配置信息 show interface fastethernet 0/1 察看交换机1 接口具体配置和统计信息 show mac-address-table 查看mac 地址表

华三华为交换机-路由器配置常用命令汇总

H3C交换机配置命令大全 1、system-view 进入系统视图模式 2、sysname 为设备命名 3、display current-configuration 当前配置情况 4、language-mode Chinese|English 中英文切换 5、interface Ethernet 1/0/1 进入以太网端口视图 6、port link-type Access|Trunk|Hybrid 设置端口访问模式 7、undo shutdown 打开以太网端口 8、shutdown 关闭以太网端口 9、quit 退出当前视图模式 10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式 11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中 12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中 13、port trunk permit vlan all 允许所有的vlan通过 H3C路由器配置命令大全 1、system-view 进入系统视图模式 2、sysname R1 为设备命名为R1 3、display ip routing-table 显示当前路由表 4、language-mode Chinese|English 中英文切换 5、interface Ethernet 0/0 进入以太网端口视图 6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码 7、undo shutdown 打开以太网端口 8、shutdown 关闭以太网端口

华为三层交换机配置方法及命令

Enable //进入私有模式 Configure terminal //进入全局模式 service password-encryption //对密码进行加密 hostname Catalyst 3550-12T1 //给三层交换机定义名称 enable password 123456. //enable密码 Enable secret 654321 //enable的加密密码(应该是乱码而不是654321这样) Ip subnet-zero //允许使用全0子网(默认都是打开的) Ip name-server 172.16.8.1 172.16.8.2 //三层交换机名字Catalyst 3550-12T1对应的IP地址是172.16.8.1 Service dhcp //提供DHCP服务 ip routing //启用三层交换机上的路由模块 Exit Vtp mode server //定义VTP工作模式为sever模式 Vtp domain centervtp //定义VTP域的名称为centervtp Vlan 2 name vlan2 //定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002) Vlan 3 name vlan3 Vlan 4 name vlan4 Vlan 5 name vlan5 Vlan 6 name vlan6 Vlan 7 name vlan7 Vlan 8 name vlan8 Vlan 9 name vlan9 Exit interface Port-channel 1 //进入虚拟的以太通道组1 Interface gigabitethernet 0/1 //进入模块0上的吉比特以太口1 channel-group 1 mode on //把这个接口放到快速以太通道组1中 Interface gigabitethernet 0/2 //同上channel-group 1 mode on port-channel load-balance src-dst-ip //定义快速以太通道组的负载均衡方式(依靠源和目的IP的方式)

思科交换机配置命令大全

思科交换机配置命令大全switch> 用户模式 1:进入特权模式enable switch> enable switch# 2:进入全局配置模式configure terminal switch> enable switch#configure terminal switch(conf)# 3:交换机命名hostname aptech2950 以aptech2950为例switch> enable switch#configure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令enable password cisco 以cisco为例switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码enable secret ciscolab 以cicsolab为例

switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface vlan 1 aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip 和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway 192.168.254 设置网关地址 7:进入交换机某一端口interface fastehernet 0/17 以17端口为例switch> enable switch#configure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface fastehernet 0/17 aptech2950(conf-if)# 8:查看命令show

交换机配置和设备常用命令

常用命令等 1、连接交换机并设置软件连接交换机/路由器等: 如果设备管理器里边没有端口选项则说明USB-COM驱动未安装好;到这里记录下COM口的端口号,我这里是COM4。 打开securecrt软件:打开crt解压到的目录点软件启动

在弹出的窗口中点击下图中的按钮 按照下图中选择选项:

选择完成后点击确定按钮后敲击回车,如窗口中显示XXXXX>则说明设备连接成功。 2、配置5750交换机步骤 A、第一步删除5750交换机现有配置,复制下边命令并粘贴到crt命令行内: en ruijie delete config.text y reload y B、重新配置5750交换机: en

conf t hos btjx-zhl-25750-2 vlan 101 exit int vlan 101 ip add 192.168.101.252 255.255.255.0 exit ip route 0.0.0.0 0.0.0.0 192.168.101.254 enable sec ruijie lin vty 0 4 pass ruijie exit rldp enable int r g0/1 – 22 sw mo acc sw acc vlan 101 rldp port loo shutdown-port exit int r g0/23 – 24 me fi sw mo tr int g0/24

des btjx-zhl-25750-1 exit err re int 1800 end wr wr 此配置是11日没有拆下来的交换机的配置: 此配置是11日拆除下来的5750交换机的配置(需要增加部分配置) 上边配置的5750交换机23口24口都是级联口5750-1-24口接86,5750-1-23连接5750-2-24口 3、2952交换机配置,修改级联口部分: en ruijie conf t int g0/49 sw mo tr int g0/51 sw mo tr

cisco交换机常用配置命令

3、常用配置命令 3.1 把端口加入到vlan Switch>en Password: Switch #conf t /*进入配置模式*/ Enter configuration commands, one per line. End with CNTL/Z. Switch (config)#inter f 0/1 /*进入端口*/ Switch (config-if)#switchport access vlan X /*把端口加入到vlan X*/ Switch (config-if)#end Switch #wr /*保存*/ Building configuration... [OK] Switch # 3.2 添加新vlan(在核心交换机上写) Switch>en Password: Switch #conf t /*进入配置模式*/ Enter configuration commands, one per line. End with CNTL/Z. Switch (config)#Vlan X /*添加新Vlan*/ Switch (config-vlan)#inter vlan X /*进入Vlan*/ Switch (config-if)#ip address x.x.x.x 255.255.255.0/*设置vlan ip地址*/ Switch (config-if)#no shut 3.3 配置trunk,透传vlan Switch>en Password: Switch #conf t /*进入配置模式*/ Enter configuration commands, one per line. End with CNTL/Z. Switch (config)#inter fast 0/x /*进入级联端口*/ Switch (config-if)#switchport mode trunk /*修改端口模式*/ Switch (config-if)# switchport trunk allowed vlan all /*设置允许通过的vlan*/ 保存 删除命令:所有的命令前面加no。

华为交换机配置命令手册及实验

华为交换机配置命令手 册及实验 Huawei 交换机配置命令手册: 1、开始 建立本地配置环境,将主机的串口通过配置电缆与以太网交换机的Console 口连接。在 主机上运行终端仿真程序(如Windows 的超级终端等),设置终端通信参数为:波特 率为9600bit/s、8 位数据位、1 位停止位、无校验和无流控,并选择终端类型为 VT100。 以太网交换机上电,终端上显示以太网交换机自检信息,自检结束后提示用户键入回车,之后将出现命令行提示符(如)。 键入命令,配置以太网交换机或查看以太网交换机运行状态。需要帮助可以随时键入"" 2、命令视图 (1)用户视图(查看交换机简单运行状态和统计信息):与交换机建立连接即进入 (2)系统视图(配置系统参数)[Quidway]:在用户视图下键入system-view (3)以太网端口视图(配置以太网端口参数)[Quidway-Ethernet0/1]:在系统视图下键入 interface ethernet 0/1 (4)VLAN 视图(配置VLAN 参数)[Quidway-Vlan1]:在系统视图下键入vlan 123 Hessen was revised in January 2021

(5)VLAN 接口视图(配置VLAN 和VLAN 汇聚对应的IP 接口参数)[Quidway-Vlan- interface1]:在系统视图下键入interface vlan-interface 123 (6)本地用户视图(配置本地用户参数)[Quidway-luser-user1]:在系统视图下键入 local- user user1 (7)用户界面视图(配置用户界面参数)[Quidway-ui0]:在系统视图下键入user-interface 3、其他命令 设置系统时间和时区clock time Beijing add 8 clock datetime 12:00:00 2005/01/23 设置交换机的名称[Quidway]sysname TRAIN-3026-1[TRAIN-3026-1]

华为的交换机基本配置命令

华为的交换机基本配置命令很多,在此,yjbys小编为大家带来的是最新交换机的配置命令,希望对同学们考试有帮助! 1、配置文件相关命令 [Quidway]display current-configuration 显示当前生效的配置 [Quidway]display saved-configuration 显示flash中配置文件,即下次上电启动时所用的配置文件 reset saved-configuration 檫除旧的配置文件 reboot 交换机重启 display version 显示系统版本信息 2、基本配置 [Quidway]super password 修改特权用户密码 [Quidway]sysname 交换机命名 [Quidway]interface ethernet 1/0/1 进入接口视图 [Quidway]interface vlan 1 进入接口视图 [Quidway-Vlan-interfacex]ip address 10.1.1.11 255.255.0.0 配置VLAN的IP地址 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.1.1.1 静态路由=网关 3、telnet配置 [Quidway]user-interface vty 0 4 进入虚拟终端 [S3026-ui-vty0-4]authentication-mode password 设置口令模式 [S3026-ui-vty0-4]set authentication-mode password simple xmws123 设置口令 [S3026-ui-vty0-4]user privilege level 3 用户级别 4、端口配置 [Quidway-Ethernet1/0/1]duplex {half|full|auto} 配置端口工作状态 [Quidway-Ethernet1/0/1]speed {10|100|auto} 配置端口工作速率 [Quidway-Ethernet1/0/1]flow-control 配置端口流控 [Quidway-Ethernet1/0/1]mdi {across|auto|normal} 配置端口平接扭接 [Quidway-Ethernet1/0/1]port link-type {trunk|access|hybrid} 设置端口工作模式 [Quidway-Ethernet1/0/1]undo shutdown 激活端口 [Quidway-Ethernet1/0/2]quit 退出系统视图 5、链路聚合配置

Cisco交换机常用配置命令

Cisco交换机常用配置命令 CISCO交换机基本配置 switch>ena 進入特权模式 switch#erasenvram 全部清除交换机的所有配置 switch#reload 重新启动交换机(初始提示符为switch> ) ------------------------------------------------------------------------------------ CISCO交换机基本配置:Console端口连接 用户模式hostname>; 特权模式hostname(config)# ; 全局配置模式hostname(config-if)# ; 交换机口令设置: switch>enable ;进入特权模式 switch#config;进入全局配置模式 switch(config)#hostname cisco ;设置交换机的主机名 switch(config)#enable secret csico1 ;设置特权加密口令 switch(config)#enable password csico8 ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;虚拟终端允许登录 switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6 switch#write 保存配置設置 switch#copy running-config startup-config 保存配置設置,與write一樣switch#exit;返回命令 配置终端过一会时间就会由全局配置模式自动改为用户模式,将超时设置为永不超时 switch#conf t switch(config)#line con 0 switch(config-line)#exec-timeout 0 --------------------------------------------------------------------------------- 交换机显示命令: switch#write;保存配置信息 switch#showvtp;查看vtp配置信息 switch#show run ;查看当前配置信息 switch#showvlan;查看vlan配置信息 switch#showvlan name vlan2 switch#show interface ;查看端口信息

华为交换机配置命令超详解

华为交换机配置命令超详解 华为3COM交换机配置命令详解 1、配置文件相关命令 [Quidway]display current-configuration? ?? ? ;显示当前生效的配置 [Quidway]display saved-configuration? ?? ?? ???;显示flash中配置文件,即下次上电启动时所用的配置文件 reset saved-configuration? ?? ?? ???;檫除旧的配置文件 reboot? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? ;交换机重启 display version? ?? ?? ?? ?? ?? ?? ?? ???;显示系统版本信息 2、基本配置 [Quidway]super password? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? ;修改特权用户密码 [Quidway]sysname? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? ;交换机命名 [Quidway]interface ethernet 0/1? ?? ?? ?? ?? ?? ?? ?? ? ;进入接口视图 [Quidway]interface vlan x? ?? ?? ?? ?? ?? ?? ?? ? ;进入接口视图 [Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2? ?? ? ;静态路由=网关 3、telnet配置 [Quidway]user-interface vty 0 4? ?? ?? ?? ?? ?? ?? ?? ? ;进入虚拟终端 [S3026-ui-vty0-4]authentication-mode password? ?? ?? ?? ? ;设置口令模式 [S3026-ui-vty0-4]set authentication-mode password simple 222? ?;设置口令 [S3026-ui-vty0-4]user privilege level 3? ?? ?? ?? ?? ?? ? ;用户级别 4、端口配置 [Quidway-Ethernet0/1]duplex {half|full|auto}? ?? ?? ?? ? ;配置端口工作状态 [Quidway-Ethernet0/1]speed {10|100|auto}? ?? ?? ?? ? ;配置端口工作速率 [Quidway-Ethernet0/1]flow-control? ?? ?? ?? ?? ?? ? ;配置端口流控 [Quidway-Ethernet0/1]mdi {across|auto|normal}? ?? ?? ?? ? ;配置端口平接扭接 [Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式 [Quidway-Ethernet0/1]undo shutdown? ?? ?? ?? ?? ?? ? ;激活端口 [Quidway-Ethernet0/2]quit? ?? ?? ?? ?? ?? ?? ?? ? ;退出系统视图 5、链路聚合配置 [DeviceA] link-aggregation group 1 mode manual? ???;创建手工聚合组1 [DeviceA] interface ethernet 1/0/1? ?? ?? ?? ?? ?? ?? ?? ?? ???;将以太网端口Ethernet1/0/1加入聚合组1 [DeviceA-Ethernet1/0/1] port link-aggregation group 1 [DeviceA-Ethernet1/0/1] interface ethernet 1/0/2? ?? ?? ?? ???;将以太网端口Ethernet1/0/1加入聚合组1 [DeviceA-Ethernet1/0/2] port link-aggregation group 1 [DeviceA] link-aggregation group 1 service-type tunnel? ?? ???# 在手工聚合组的基础上创建Tunnel业务环回组。 [DeviceA] interface ethernet 1/0/1? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? # 将以太网端口Ethernet1/0/1加入业务环回组。

交换机常用配置命令

H3C交换机常用配置命令 一、用户配置 system-view H3C]super password H3C 设置用户分级密码 H3C]undo super password 删除用户分级密码 H3C]localuser bigheap 123456 1 Web网管用户设置,1(缺省)为管理级用户,缺省admin,admin H3C]undo localuser bigheap 删除Web网管用户 H3C]user-interface aux 0 只支持0 H3C-Aux]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟 H3C-Aux]undo idle-timeout 恢复默认值 H3C]user-interface vty 0 只支持0和1 H3C-vty]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟 H3C-vty]undo idle-timeout 恢复默认值 H3C-vty]set authentication password 123456 设置telnet密码,必须设置 H3C-vty]undo set authentication password 取消密码 H3C]display users 显示用户 H3C]display user-interface 显示用户界面状态 二、系统IP设置 H3C]vlan 20 H3C]management-vlan 20 H3C]interface vlan-interface 20 创建并进入管理VLAN H3C]undo interface vlan-interface 20 删除管理VLAN接口

1 交换机的基本配置方法

实验一交换机的基本配置方法 一. 实验目的: 1. 掌握交换机常用配置方法 2. 掌握中低端交换机的基本命令行 二.实验设备 华为交换机3台,计算机3台 三. 实验内容及步骤: (一)以太网交换机基础 以太网的最初形态就是在一段同轴电缆上连接多台计算机,所有计算机都共享这段电缆。所以每当某台计算机占有电缆时,其他计算机都只能等待。这种传统的共享以太网极大的受到计算机数量的影响。为了解决上述问题,我们可以做到的是减少冲突域中的主机数量,这就是以太网交换机采用的有效措施。 以太网交换机在数据链路层进行数据转发时需要确认数据帧应该发送到哪一端口,而不是简单的向所有端口转发,这就是交换机MAC 地址表的功能。 以太网交换机包含很多重要的硬件组成部分:业务接口、主板、CPU、内存、Flash、电源系统。以太网交换机的软件主要包括引导程序和核心操作系统两部分。 (二)以太网交换机配置方式 以太网交换机的配置方式很多,如本地Console 口配置,Telnet 远程登陆配置,FTP、TFTP 配置和哑终端(TTY teletypewriter的缩写)方式配置。其中最为常用的配置方式就是Console 口配置和Telnet 远程配置。 注意:第一次进行交换机、路由器配置时必须使用Console本地配置。 1.通过Console口搭建配置环境 第一步:如图所示,建立本地配置环境,只需将微机(或终端)的串口通过配置电缆与以太网交换机的Console口连接。 第二步:在微机上运行终端仿真程序(如Windows 3.X的Terminal或Windows 9X的超级终端等),设置终端通信参数为:波特率为9600bit/s、8位数据位、1位停止位、无校验和无流控,如图所示。 第三步:以太网交换机加电,终端上显示以太网交换机自检信息,自检结束后提示用户

相关主题