当前位置:首页 » 存储配置 » 交换机配置文档的正确命令是什么

交换机配置文档的正确命令是什么

发布时间: 2022-05-11 12:59:08

1. 华为二层交换机基本配置命令有哪些

所有厂家的交换机配置大同小异,最简单的就是不配置,接上就用。如果你想远程管理且交换机是可管理的,那就要为交换机配置地址,至少涉及以下命令:1.进入配置模式:config(任意配置命令都需要先进入这个状态)2.建立vlan(也可以使用原有的vlan1):vlan(建立vlanN,N一般是2~4096的任意值)3.为该vlan配置地址:interfacevlan(进入对vlanN的配置)ipaddress(为该vlan配置一个ip地址和掩码)exit(退出对该vlan的配置。有些交换机会提供end命令,直接退出配置状态,就是config状态)4.ipdefault-gateway(为该交换机建立默认网关,远程管理需要)5.write或save(保存你的配置)6.showrun(检查你的配置)然后你需要看很多资料,了解交换机能做什么,接下来是你要干什么,最后是结合资料上的对应命令来实现你的目标。

2. 交换机的配置命令

1.在基于IOS的交换机上设置主机名/系统名:
switch(config)# hostname hostname
在基于CLI的交换机上设置主机名/系统名:
switch(enable) set system name name-string

2.在基于IOS的交换机上设置登录口令:
switch(config)# enable password level 1 password
在基于CLI的交换机上设置登录口令:
switch(enable) set password
switch(enable) set enalbepass

3.在基于IOS的交换机上设置远程访问:

switch(config)# interface vlan 1

switch(config-if)# ip address ip-address netmask

switch(config-if)# ip default-gateway ip-address

在基于CLI的交换机上设置远程访问:

switch(enable) set interface sc0 ip-address netmask broadcast-address

switch(enable) set interface sc0 vlan

switch(enable) set ip route default gateway

4.在基于IOS的交换机上启用和浏览CDP信息:

switch(config-if)# cdp enable

switch(config-if)# no cdp enable

为了查看Cisco邻接设备的CDP通告信息:

switch# show cdp interface [type modle/port]

switch# show cdp neighbors [type mole/port] [detail]

在基于CLI的交换机上启用和浏览CDP信息:

switch(enable) set cdp {enable|disable} mole/port

为了查看Cisco邻接设备的CDP通告信息:

switch(enable) show cdp neighbors[mole/port] [vlan|plex|capabilities|detail]

5.基于IOS的交换机的端口描述:

switch(config-if)# description description-string

基于CLI的交换机的端口描述:

switch(enable)set port name mole/number description-string

6.在基于IOS的交换机上设置端口速度:

switch(config-if)# speed{10|100|auto}

在基于CLI的交换机上设置端口速度:

switch(enable) set port speed moudle/number {10|100|auto}

switch(enable) set port speed moudle/number {4|16|auto}

7.在基于IOS的交换机上设置以太网的链路模式:

switch(config-if)# plex {auto|full|half}

在基于CLI的交换机上设置以太网的链路模式:

switch(enable) set port plex mole/number {full|half}

8.在基于IOS的交换机上配置静态VLAN:

switch# vlan database

switch(vlan)# vlan vlan-num name vla

switch(vlan)# exit

switch# configure teriminal

switch(config)# interface interface mole/number

switch(config-if)# switchport mode access

switch(config-if)# switchport access vlan vlan-num

switch(config-if)# end

在基于CLI的交换机上配置静态VLAN:

switch(enable) set vlan vlan-num [name name]

switch(enable) set vlan vlan-num mod-num/port-list

9. 在基于IOS的交换机上配置VLAN中继线:

switch(config)# interface interface mod/port

switch(config-if)# switchport mode trunk

switch(config-if)# switchport trunk encapsulation {isl|dotlq}

switch(config-if)# switchport trunk allowed vlan remove vlan-list

switch(config-if)# switchport trunk allowed vlan add vlan-list

在基于CLI的交换机上配置VLAN中继线:

switch(enable) set trunk mole/port [on|off|desirable|auto|nonegotiate]

Vlan-range [isl|dotlq|dotl0|lane|negotiate]

10.在基于IOS的交换机上配置VTP管理域:

switch# vlan database

switch(vlan)# vtp domain domain-name

在基于CLI的交换机上配置VTP管理域:

switch(enable) set vtp [domain domain-name]

11.在基于IOS的交换机上配置VTP 模式:

switch# vlan database

switch(vlan)# vtp domain domain-name

switch(vlan)# vtp {sever|cilent|transparent}

switch(vlan)# vtp password password

在基于CLI的交换机上配置VTP 模式:

switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]

12. 在基于IOS的交换机上配置VTP版本:

switch# vlan database

switch(vlan)# vtp v2-mode

在基于CLI的交换机上配置VTP版本:

switch(enable) set vtp v2 enable

13. 在基于IOS的交换机上启动VTP剪裁:

switch# vlan database

switch(vlan)# vtp pruning

在基于CL I 的交换机上启动VTP剪裁:

switch(enable) set vtp pruning enable

14.在基于IOS的交换机上配置以太信道:

switch(config-if)# port group group-number [distribution {source|destination}]

在基于CLI的交换机上配置以太信道:

switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}

15.在基于IOS的交换机上调整根路径成本:

switch(config-if)# spanning-tree [vlan vlan-list] cost cost

在基于CLI的交换机上调整根路径成本:

switch(enable) set spantree portcost moudle/port cost

switch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]

16.在基于IOS的交换机上调整端口ID:

switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority

在基于CLI的交换机上调整端口ID:

switch(enable) set spantree portpri {mlle/port}priority

switch(enable) set spantree portvlanpri {mole/port}priority [vlans]

17. 在基于IOS的交换机上修改STP时钟:

switch(config)# spanning-tree [vlan vlan-list] hello-time seconds

switch(config)# spanning-tree [vlan vlan-list] forward-time seconds

switch(config)# spanning-tree [vlan vlan-list] max-age seconds

在基于CLI的交换机上修改STP时钟:

switch(enable) set spantree hello interval[vlan]

switch(enable) set spantree fwddelay delay [vlan]

switch(enable) set spantree maxage agingtiame[vlan]

18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:

switch(config-if)#spanning-tree portfast

在基于CLI的交换机端口上启用或禁用Port Fast 特征:

switch(enable) set spantree portfast {mole/port}{enable|disable}

19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:

switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]

在基于CLI的交换机端口上启用或禁用UplinkFast 特征:

switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]

20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name cv

3. 交换机的基本命令是什么

“Switch>”

4. 这个交换机配置命令是何意思

交换机基本配置命令(3026)

PCA login: root ;使用root用户
password: linux ;口令是linux
# shutdown -h now ;关机
# init 0 ;关机
# logout
# login
# ifconfig ;显示IP地址
# ifconfig eth0 <ip address> netmask <netmask> ;设置IP地址
# ifconfig eht0 <ip address> netmask <netmask> down ; 删除IP地址
# route add 0.0.0.0 gw <ip>
# route del 0.0.0.0 gw <ip>
# route add default gw <ip> ;设置网关
# route del default gw <ip> ;删除网关
# route ;显示网关
# ping <ip>
# telnet <ip> ;建议telnet之前先ping一下

----------------------------------------
交换机命令
~~~~~~~~~~
[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
[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 静态路由=网关

[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

[Quidway-Ethernet0/1]plex {half|full|auto} 配置端口双工工作状态
[Quidway-Ethernet0/1]speed {10|100|auto} 配置端口工作速率
[Quidway-Ethernet0/1]flow-control 配置端口流控
[Quidway-Ethernet0/1]mdi {across|auto|normal} 配置端口MDI/MDIX状态平接或扭接
[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} 设置接口工作模式
[Quidway-Ethernet0/1]shutdown 关闭/重起接口
[Quidway-Ethernet0/2]quit 退出系统视图

[Quidway]vlan 3 创建/删除一个VLAN/进入VLAN模式
[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 在当前VLAN增加/删除以太网接口
[Quidway-Ethernet0/2]port access vlan 3 将当前接口加入到指定VLAN
[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} 设trunk允许的VLAN
[Quidway-Ethernet0/2]port trunk pvid vlan 3 设置trunk端口的PVID

[Quidway]monitor-port <interface_type interface_num> 指定和清除镜像端口
[Quidway]port mirror <interface_type interface_num> 指定和清除被镜像端口
[Quidway]port mirror int_list observing-port int_type int_num 指定镜像和被镜像

[Quidway]description string 指定VLAN描述字符
[Quidway]description 删除VLAN描述字符
[Quidway]display vlan [vlan_id] 查看VLAN设置

[Quidway]stp {enable|disable} 开启/关闭生成树,默认关闭
[Quidway]stp priority 4096 设置交换机的优先级
[Quidway]stp root {primary|secondary} 设置交换机为根或根的备份
[Quidway-Ethernet0/1]stp cost 200 设置交换机端口的花费

[SwitchA-vlanx]isolate-user-vlan enable 设置主vlan
[SwitchA]Isolate-user-vlan <x> secondary <list> 设置主vlan包括的子vlan
[Quidway-Ethernet0/2]port hybrid pvid vlan <id> 设置vlan的pvid
[Quidway-Ethernet0/2]port hybrid pvid 删除vlan的pvid
[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged 设置无标识的vlan
如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
所以设置PVID为所属vlan id, 设置可以互通的vlan为untagged.
----------------------------------------
路由器命令
~~~~~~~~~~
[Quidway]display version 显示版本信息
[Quidway]display current-configuration 显示当前配置
[Quidway]display interfaces 显示接口信息
[Quidway]display ip route 显示路由信息

[Quidway]sysname aabbcc 更改主机名
[Quidway]super passwrod 123456 设置口令
[Quidway]interface serial0 进入接口
[Quidway-serial0]ip address <ip><mask>
[Quidway-serial0]undo shutdown 激活端口
[Quidway]link-protocol hdlc 绑定hdlc协议
[Quidway]user-interface vty 0 4
[Quidway-ui-vty0-4]authentication-mode password
[Quidway-ui-vty0-4]set authentication-mode password simple 222
[Quidway-ui-vty0-4]user privilege level 3
[Quidway-ui-vty0-4]quit

[Quidway]debugging hdlc all serial0 显示所有信息
[Quidway]debugging hdlc event serial0 调试事件信息
[Quidway]debugging hdlc packet serial0 显示包的信息

静态路由:
[Quidway]ip route-static <ip><mask>{interface number|nexthop}[value][reject|blackhole]
例如:
[Quidway]ip route-static 129.1.0.0 16 10.0.0.2
[Quidway]ip route-static 129.1.0.0 255.255.0.0 10.0.0.2
[Quidway]ip route-static 129.1.0.0 16 Serial 2
[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2

动态路由:
[Quidway]rip
[Quidway]rip work
[Quidway]rip input
[Quidway]rip output
[Quidway-rip]network 1.0.0.0 ;可以all
[Quidway-rip]network 2.0.0.0
[Quidway-rip]peer ip-address
[Quidway-rip]summary
[Quidway]rip version 1
[Quidway]rip version 2 multicast
[Quidway-Ethernet0]rip split-horizon ;水平分隔

[Quidway]router id A.B.C.D 配置路由器的ID
[Quidway]ospf enable 启动OSPF协议
[Quidway-ospf]import-route direct 引入直联路由
[Quidway-Serial0]ospf enable area <area_id> 配置OSPF区域

标准访问列表命令格式如下:
acl <acl-number> [match-order config|auto] 默认前者顺序匹配。
rule [normal|special]{permit|deny} [source source-addr source-wildcard|any]
例:
[Quidway]acl 10
[Quidway-acl-10]rule normal permit source 10.0.0.0 0.0.0.255
[Quidway-acl-10]rule normal deny source any

扩展访问控制列表配置命令

配置TCP/UDP协议的扩展访问列表:
rule {normal|special}{permit|deny}{tcp|udp}source {<ip wild>|any}destination <ip wild>|any}
[operate]

配置ICMP协议的扩展访问列表:
rule {normal|special}{permit|deny}icmp source {<ip wild>|any]destination {<ip wild>|any]
[icmp-code] [logging]

扩展访问控制列表操作符的含义
equal portnumber 等于
greater-than portnumber 大于
less-than portnumber 小于
not-equal portnumber 不等
range portnumber1 portnumber2 区间

扩展访问控制列表举例
[Quidway]acl 101
[Quidway-acl-101]rule deny souce any destination any
[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo
[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo-reply

[Quidway]acl 102
[Quidway-acl-102]rule permit ip source 10.0.0.1 0.0.0.0 destination 202.0.0.1 0.0.0.0
[Quidway-acl-102]rule deny ip source any destination any

[Quidway]acl 103
[Quidway-acl-103]rule permit tcp source any destination 10.0.0.1 0.0.0.0 destination-port equal ftp
[Quidway-acl-103]rule permit tcp source any destination 10.0.0.2 0.0.0.0 destination-port equal www

[Quidway]firewall enable
[Quidway]firewall default permit|deny
[Quidway]int e0
[Quidway-Ethernet0]firewall packet-filter 101 inbound|outbound

地址转换配置举例
[Quidway]firewall enable
[Quidway]firewall default permit
[Quidway]acl 101
[Quidway-acl-101]rule deny ip source any destination any
[Quidway-acl-101]rule permit ip source 129.38.1.4 0 destination any
[Quidway-acl-101]rule permit ip source 129.38.1.1 0 destination any
[Quidway-acl-101]rule permit ip source 129.38.1.2 0 destination any
[Quidway-acl-101]rule permit ip source 129.38.1.3 0 destination any
[Quidway]acl 102
[Quidway-acl-102]rule permit tcp source 202.39.2.3 0 destination 202.38.160.1 0
[Quidway-acl-102]rule permit tcp source any destination 202.38.160.1 0 destination-port great-than
1024

[Quidway-Ethernet0]firewall packet-filter 101 inbound
[Quidway-Serial0]firewall packet-filter 102 inbound

[Quidway]nat address-group 202.38.160.101 202.38.160.103 pool1
[Quidway]acl 1
[Quidway-acl-1]rule permit source 10.110.10.0 0.0.0.255
[Quidway-acl-1]rule deny source any
[Quidway-acl-1]int serial 0
[Quidway-Serial0]nat outbound 1 address-group pool1

[Quidway-Serial0]nat server global 202.38.160.101 inside 10.110.10.1 ftp tcp
[Quidway-Serial0]nat server global 202.38.160.102 inside 10.110.10.2 www tcp
[Quidway-Serial0]nat server global 202.38.160.102 8080 inside 10.110.10.3 www tcp
[Quidway-Serial0]nat server global 202.38.160.103 inside 10.110.10.4 smtp udp

PPP验证:
主验方:pap|chap
[Quidway]local-user u2 password {simple|cipher} aaa
[Quidway]interface serial 0
[Quidway-serial0]ppp authentication-mode {pap|chap}
[Quidway-serial0]ppp chap user u1 //pap时,不用此句

pap被验方:
[Quidway]interface serial 0
[Quidway-serial0]ppp pap local-user u2 password {simple|cipher} aaa

chap被验方:
[Quidway]interface serial 0
[Quidway-serial0]ppp chap user u1
[Quidway-serial0]local-user u2 password {simple|cipher} aaa
参考资料:http://forum.huawei-3com.com/archiver/?tid-13322.html

5. CISCO交换机的查看配置命令是什么

1、Router#show startup-config //查看启动配置文件

启动配置文件startup-config位于路由器的NVRAM中,可以长期保存。它在启动路由器时装入RAM,成为running-config。

2、Router#show version //查看路由器的版本信息

3、Router#show ip interface brief //查看路由器的接口状态

(5)交换机配置文档的正确命令是什么扩展阅读:

工作在数据链路层。交换机拥有一条很高带宽的背部总线和内部交换矩阵。交换机的所有的端口都挂接在这条背部总线上,控制电路收到数据包以后,处理端口会查找内存中的地址对照表以确定目的MAC(网卡的硬件地址)的NIC(网卡)挂接在哪个端口上。

通过内部交换矩阵迅速将数据包传送到目的端口,目的MAC若不存在,广播到所有的端口,接收端口回应后交换机会“学习”新的地址,并把它添加入内部MAC地址表中。使用交换机也可以把网络“分段”,通过对照MAC地址表,交换机只允许必要的网络流量通过交换机。

通过交换机的过滤和转发,可以有效的减少冲突域,但它不能划分网络层广播,即广播域。交换机在同一时刻可进行多个端口对之间的数据传输。每一端口都可视为独立的网段,连接在其上的网络设备独自享有全部的带宽,无须同其他设备竞争使用。当节点A向节点D发送数据时,节点B可同时向节点C发送数据,而且这两个传输都享有网络的全部带宽,都有着自己的虚拟连接。

假使这里使用的是10Mbps的以太网交换机,那么该交换机这时的总流通量就等于2×10Mbps=20Mbps,而使用10Mbps的共享式HUB时,一个HUB的总流通量也不会超出10Mbps。

总之,交换机是一种基于MAC地址识别,能完成封装转发数据包功能的网络设备。交换机可以“学习”MAC地址,并把其存放在内部地址表中,通过在数据帧的始发者和目标接收者之间建立临时的交换路径,使数据帧直接由源地址到达目的地址。

6. 交换机的命令具体怎么使用

交换机的命令非常多,主要是用来配置交换机的,只有可网管的交换机(有console口的交换机)才能进行配置。
不同厂家、不同型号的交换机的配置命令也不大一样。
举个CISCO的命令例子吧:
hostname是给交换机命名的命令,如交换机本来的名字是Switch,使用(config)#hostname
JIAOHUANJI,就可以把交换机的名字改成JIAOHUANJI了。
交换机配置时还分很多种模式,每种模式下的配置命令也都有很大区别,具体的真不是三两句说得清的,你只有买些教材看看了。

7. 交换机配置相关命令是什么

你那什么牌子的呀 他的设置大同小类了
我给你几个 前面是通用的 后面的你自己慢慢研究 不会问我了
交换机基本配置命令(3026)

PCA login: root ;使用root用户
password: linux ;口令是linux
# shutdown -h now ;关机
# init 0 ;关机
# logout
# login
# ifconfig ;显示IP地址
# ifconfig eth0 <ip address> netmask <netmask> ;设置IP地址
# ifconfig eht0 <ip address> netmask <netmask> down ; 删除IP地址
# route add 0.0.0.0 gw <ip>
# route del 0.0.0.0 gw <ip>
# route add default gw <ip> ;设置网关
# route del default gw <ip> ;删除网关
# route ;显示网关
# ping <ip>
# telnet <ip> ;建议telnet之前先ping一下
交换机命令
[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
[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 静态路由=网关

[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

[Quidway-Ethernet0/1]plex {half|full|auto} 配置端口双工工作状态
[Quidway-Ethernet0/1]speed {10|100|auto} 配置端口工作速率
[Quidway-Ethernet0/1]flow-control 配置端口流控
[Quidway-Ethernet0/1]mdi {across|auto|normal} 配置端口MDI/MDIX状态平接或扭接
[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} 设置接口工作模式
[Quidway-Ethernet0/1]shutdown 关闭/重起接口
[Quidway-Ethernet0/2]quit 退出系统视图

[Quidway]vlan 3 创建/删除一个VLAN/进入VLAN模式
[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 在当前VLAN增加/删除以太网接口
[Quidway-Ethernet0/2]port access vlan 3 将当前接口加入到指定VLAN
[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} 设trunk允许的VLAN
[Quidway-Ethernet0/2]port trunk pvid vlan 3 设置trunk端口的PVID

[Quidway]monitor-port <interface_type interface_num> 指定和清除镜像端口
[Quidway]port mirror <interface_type interface_num> 指定和清除被镜像端口
[Quidway]port mirror int_list observing-port int_type int_num 指定镜像和被镜像

[Quidway]description string 指定VLAN描述字符
[Quidway]description 删除VLAN描述字符
[Quidway]display vlan [vlan_id] 查看VLAN设置

[Quidway]stp {enable|disable} 开启/关闭生成树,默认关闭
[Quidway]stp priority 4096 设置交换机的优先级
[Quidway]stp root {primary|secondary} 设置交换机为根或根的备份
[Quidway-Ethernet0/1]stp cost 200 设置交换机端口的花费

[SwitchA-vlanx]isolate-user-vlan enable 设置主vlan
[SwitchA]Isolate-user-vlan <x> secondary <list> 设置主vlan包括的子vlan
[Quidway-Ethernet0/2]port hybrid pvid vlan <id> 设置vlan的pvid
[Quidway-Ethernet0/2]port hybrid pvid 删除vlan的pvid
[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged 设置无标识的vlan
如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
所以设置PVID为所属vlan id, 设置可以互通的vlan为untagged.

8. 交换机与路由器的常用配置命令是什么

1. 交换机支持的命令:
交换机基本状态: switch: ;ROM状态,
路由器是rommon>hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态

交换机口令设置: switch>enable ;进入特权模式
switch#config terminal ;进入全局配置模式
switch(config)#hostname ;设置交换机的主机名
switch(config)#enable secret xxx ;设置特权加密口令
switch(config)#enable password xxa ;设置特权非密口令
switch(config)#line console 0 ;进入控制台口
switch(config-line)#line vty 0 4 ;进入虚拟终端
switch(config-line)#login ;允许登录
switch(config-line)#password xx ;设置登录口令
xxswitch#exit ;返回命令

交换机VLAN设置:

switch#vlan database ;进入VLAN设置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#no vlan 2 ;删vlan 2
switch(config)#int f0/1 ;进入端口1
switch(config-if)#switchport access vlan 2 ;当前端口加入
vlan 2switch(config-if)#switchport mode trunk ;设置为干线
switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan
switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继
switch(config)#vtp domain ;设置发vtp域名
switch(config)#vtp password ;设置发vtp密码
switch(config)#vtp mode server ;设置发vtp模式
switch(config)#vtp mode client ;设置发vtp模式

交换机设置IP地址:

switch(config)#interface vlan 1 ;进入vlan 1
switch(config-if)#ip address ;设置IP地址
switch(config)#ip default-gateway ;设置默认网关
switch#dir flash: ;查看闪存

交换机显示命令:

switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息
switch#show run ;查看当前配置信息
switch#show vlan ;查看vlan配置信息
switch#show interface ;查看端口信息
switch#show int f0/0 ;查看指定端口信息

2. 路由器支持的命令:
路由器显示命令:

router#show run ;显示配置信息
router#show interface ;显示接口信息
router#show ip route ;显示路由信息
router#show cdp nei ;显示邻居信息
router#reload ;重新起动

路由器口令设置:

router>enable ;进入特权模式
router#config terminal ;进入全局配置模式
router(config)#hostname ;设置交换机的主机名
router(config)#enable secret xxx ;设置特权加密口令
router(config)#enable password xxb ;设置特权非密口令
router(config)#line console 0 ;进入控制台口
router(config-line)#line vty 0 4 ;进入虚拟终端
router(config-line)#login ;要求口令验证
router(config-line)#password xx ;设置登录口令xx
router(config)#(Ctrl+z) ; 返回特权模式
router#exit ;返回命令

路由器配置:

router(config)#int s0/0 ;进入Serail接口
router(config-if)#no shutdown ;激活当前接口
router(config-if)#clock rate 64000 ;设置同步时钟
router(config-if)#ip address ;设置IP地址
router(config-if)#ip address second ;设置第二个IP
router(config-if)#int f0/0.1 ;进入子接口
router(config-subif.1)#ip address ;设置子接口IP
router(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议
router(config)#config-register 0x2142 ;跳过配置文件
router(config)#config-register 0x2102 ;正常使用配置文件
router#reload ;重新引导

路由器文件操作:

router# running-config startup-config ;保存配置
router# running-config tftp ;保存配置到tftp
router# startup-config tftp ;开机配置存到tftp
router# tftp flash: ;下传文件到flash
router# tftp startup-config;下载配置文件ROM状态:
Ctrl+Break ;进入ROM监控状态
rommon>confreg 0x2142 ;跳过配置文件
rommon>confreg 0x2102 ;恢复配置文件
rommon>reset ;重新引导
rommon> xmodem: flash: ;从console传输文件

rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP
rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码
rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP
rommon>TFTP_FILE=c2600.bin ;指定下载的文件
rommon>tftpdnld ;从tftp下载
rommon>dir flash: ;查看闪存内容
rommon>boot ;引导IOS

静态路由:

ip route ;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;
静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例

动态路由:

router(config)#ip routing ;启动路由转发
router(config)#router rip ;启动RIP路由协议。
router(config-router)#network ;设置发布路由
router(config-router)#negihbor ;点对点帧中继用。

最好是去官方网站参考手册。

9. 华为交换机查看配置的命令是什么

华为交换机常用命令:

1、displaycurrent-configuration显示当前配置

2、/1/4显示接口信息

3、displaypacket-/1/4显示接口acl应用信息

4、displayaclall显示所有acl设置3900系列交换机

5、displayaclconfigall显示所有acl设置6500系列交换机

6、displayarp10.78.4.1显示该ip地址的mac地址,所接交换机的端口位置

7、displaycpu显示cpu信息

8、system-view进入系统图(配置交换机),等于configt命令

9、aclnumber5000在system-view命令后使用,进入acl配置状态

10、在上面的命令后使用,acl配置例子

11、//在上面的命令后使用,acl配置例子

12、interfaceGigabitEthernet1/0/9//在system-view命令后使用,进入接口配置状态

13、[86ZX-S6503-GigabitEthernet1/0/9]qos//在上面的命令后使用,进入接口qos配置

14、[86ZX-S6503-qosb-GigabitEthernet1/0/9]packet-filterinbounser-group5000//在上面的命令后使用,在接口上应用进站的acl

15、[Build4-2_S3928TP-GigabitEthernet1/1/4]packet-filteroutbounser-group5001//在接口上应用出站的acl

16、undoaclnumber5000//取消aclnumber5000的设置

17、iproute-static0.0.0.00.0.0.010.78.1.1preference60//设置路由

18、/0/14//重置接口信息

19、save//保存设置

20、quit//退出

热点内容
频率计源码 发布:2024-09-08 07:40:26 浏览:778
奥迪a6哪个配置带后排加热 发布:2024-09-08 07:06:32 浏览:100
linux修改apache端口 发布:2024-09-08 07:05:49 浏览:208
有多少个不同的密码子 发布:2024-09-08 07:00:46 浏览:566
linux搭建mysql服务器配置 发布:2024-09-08 06:50:02 浏览:995
加上www不能访问 发布:2024-09-08 06:39:52 浏览:811
银行支付密码器怎么用 发布:2024-09-08 06:39:52 浏览:513
苹果手机清理浏览器缓存怎么清理缓存 发布:2024-09-08 06:31:32 浏览:554
云服务器的优点与缺点 发布:2024-09-08 06:30:34 浏览:734
上传下载赚钱 发布:2024-09-08 06:14:51 浏览:258