×

思科交换机查看配置

思科交换机查看配置(Cisco交换机VLAN与TRUNK链路配置命令)

admin admin 发表于2023-04-28 21:17:08 浏览102 评论0

抢沙发发表评论

本文目录

Cisco交换机VLAN与TRUNK链路配置命令

  你还在为Cisco交换机VLAN与TRUNK链路配置命令而烦恼么?不用担心,接下来是我为大家收集的Cisco交换机VLAN与TRUNK链路配置命令,欢迎大家阅读:
  Cisco交换机VLAN与TRUNK链路配置命令的方法
  在2950系列交换机上配置VLAN

  (1)使用vlan database命令进入VLAN配置模式

  C2950A#vlan database

  (2)创建VLAN

  C2950A(vlan)#vlan 2

  (3)划分VLAN(将交换机的2-14,23端口划入VLAN 2)

  C2950(config)#interface range f0/2-14

  C2950(config-if-range)#switchport mode access

  C2950(config-if-range)#switchport access vlan 2

  C2950(config)#interface f0/3

  C2950(config-if)#switchport mode access

  C2950(config-if)#switchport access vlan 2

  (4)查看vlan信息

  C2950#show vlan

  (5) 删除配置(删除VLAN 100下的端口)

  C2950(config)#interface range f0/2-14

  C2950(config-if-range)#no switchport access vlan 2

  配置Trunk的过程:

  (1) 选择需要的接口,进入接口配置模式

  Switch(config)# interface f0/24

  (2) 在接口配置模式下直接配置中继

  Switch (config-if)#switchport mode trunk

  (3) 添加VLAN(VID)

  Switch (config-if)#switchport trunk allowed vlan all

看了“Cisco交换机VLAN与TRUNK链路配置命令”还想看:

1. 思科交换机配置命令教程

2. 2015年网络工程师学习笔记:交换机及其配置

3. cisco交换机怎么配置vlan与trunk

4. 思科交换机配置教程详解

5. 交换机如何配置vlan及turnk口

6. h3c交换机配置命令详细解释

7. 华为交换机配置的命令有哪些

求:思科3640交换机查看vlan命令和配置命令和配置以太网接口命令.

1、查看vlan命令:

Switch#show vlan    #查看vlan数据库,vlan信息和所属接口

2、配置VLAN命令(交换机配置VLAN,并给将端口加入到该VLAN为例):

cisco-sw1(config)#vlan 2

cisco-sw1(config-vlan)#name test

cisco-sw1(config-vlan)#exit

cisco-sw1(config)#interface  fastEthernet 0/1

cisco-sw1(config-if)#switchport mode access

cisco-sw1(config-if)#switchport access vlan 2

3、接口配置命令(进入交换机某一端口)

switch》 enable

switch#configure terminal

switch(conf)# interface fastehernet 0/1

switch(conf-if)#

扩展资料:

思科交换机其他查看和配置命令:

1、Switch#show running-config#查看运行配置,可以通过回车键逐行显示,也可通过空格键逐页显示

2、Switch#show version#查看设备软件版本信息

3、Switch#show clock#查看系统时钟也可用于查看log日志后对应时钟分析异常log的发起时间

4、Switch#show log#查看日志,如接口异常关闭,链路的通断,主备机切换

5、Switch#show interface#查看接口详细状态,如IP地址、MAC地址、带宽负载及输入输出速率等

6、Switch#show interface description#快速查看接口连接状态与描述

7、Switch#show interface status#快速查看接口状态及所属vlan及速率双工

8、Switch#show cdp neighbor#查看CDP邻居,CDP协议属于思科私有协议,只能用于查看思科设备,可以查看设备的物理链路状态和连接接口管理地址

9、Switch#show mac-addess-table #查看交换机的MAC地址,括号里面是可选项

参考资料来源:百度百科--思科交换机

思科路由器查看配置的命令是什么

思科路由器查看配置的命令是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 ;重新引导

参考资料来源:Cisco-思科路由器

怎样查看思科交换机某个接口的配置

1、首先打开交换机开机,电脑连接后,进入用户模式。

2、输入“enable“ 或”en“,进入特权模式。

3、在特权模式下,输入”show interface f0/1“或”show int f0/1“,就可以查看f0/1接口的信息了。

4、在接口信息中相关信息较多,包括接口是否启用(up
or down),该接口的MAC地址,该接口是全双工还是半双工(Full-duplex   or  Half-duplex
),这里的f0/1的接口是处于启用状态(up),并处于全双工(Full-duplex)。

5、再查看f0/2的接口信息,输入”show int f0/2“,这里的f0/2的接口是处于关闭状态(down),并处于半双工(Half-duplex )。

cisco交换机配置命令

switch》 用户模式1:进入特权模式 enableswitch》 enableswitch#2:进入全局配置模式 configure terminalswitch》 enableswitch#configure terminalswitch(conf)#3:交换机命名 hostname aptech3950 以aptech3950为例switch》 enableswitch#configure terminalswitch(conf)#hostname aptch-2950aptech3950(conf)#4:配置使能口令 enable password cisco 以cisco为例switch》 enableswitch#configure terminalswitch(conf)#hostname aptch3950aptech3950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例switch》 enableswitch#configure terminalswitch(conf)#hostname aptch3950aptech3950(conf)# enable secret ciscolab6:设置虚拟局域网vlan 1 interface vlan 1switch》 enableswitch#configure terminalswitch(conf)#hostname aptch3950aptech3950(conf)# interface vlan 1aptech3950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码aptech3950(conf-if)#no shut 是配置处于运行中aptech3950(conf-if)#exitaptech3950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch》 enableswitch#configure terminalswitch(conf)#hostname aptch3950aptech3950(conf)# interface fastehernet 0/17aptech3950(conf-if)#8:查看命令 showswitch》 enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令 switch》 enableswitch# erase startup-configureswitch# reload10:双工模式设置switch》 enableswitch#configure terminalswitch3950(conf)#hostname aptch-2950aptech3950(conf)# interface fastehernet 0/17 以17端口为例aptech3950(conf-if)#duplex full/half/auto 有full , half, auto 三个可选项11:cdp相关命令switch》 enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。用手按着交换机的MODE键,插上电源线在switch:后执行flash_ini命令:switch: flash_ini查看flash中的文件: switch: dir flash:把“config.text”文件改名为“config.old”: switch: rename flash: config.text flash: config.old执行boot: switch: boot交换机进入是否进入配置的对话,执行no : 进入特权模式察看flash里的文件: show flash : 把“config.old”文件改名为 “config.text”: switch: rename flash: config.old flash: config.text把“config.text”拷入系统的“running-configure”: copy flash: config.text system : running-configure把配置模式重新设置密码存盘,密码恢复成功。13:交换机telnet远程登录设置:switch》enswitch#configure terminalswitch(conf)#hostname aptech-2950aptech3950(conf)#enable password cisco 以cisco为特权模式密码aptech3950(conf)#interface fastethernet 0/1 以17端口为telnet远程登录端口aptech3950(conf-if)#ip address 192.168.1.1 255.255.255.0aptech3950(conf-if)#no shutaptech3950(conf-if)#exitaptech3950(conf)line vty 0 4 设置0-4 个用户可以telnet远程登陆aptech3950(conf-line)#loginaptech3950(conf-line)#password edge 以edge为远程登录的用户密码主机设置:ip 192.168.1.2 主机的ip必须和交换机端口的地址在同一网络段netmask 255.255.255.0gate-way 192.168.1.1 网关地址是交换机端口地址运行:telnet 192.168.1.1 进入telnet远程登录界面password : edge aptech3950》enpassword: ciscoaptech#14:交换机配置的重新载入和保存设置完成交换机的配置后:aptech3950(conf)#reload是否保存(y/n) y: 保存设置信息 n:不保存设置信息路由器命令router》 用户模式1:进入特权模式 enablerouter 》 enablerouter #2:进入全局配置模式 configure terminalrouter 》 enablerouter #configure terminalrouter (conf)#3:交换机命名 hostname routera 以routerA为例router 》 enablerouter #configure terminalrouter(conf)#hostname routerAroutera (conf)#4:配置使能口令 enable password cisco 以cisco为例router 》 enablerouter #configure terminalrouter(conf)#hostname routerArouterA (conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例router 》 enablerouter #configure terminalrouter(conf)#hostname routerArouterA (conf)# enable secret ciscolab6:进入路由器某一端口 interface fastehernet 0/17 以17端口为例router 》 enablerouter #configure terminalrouter(conf)#hostname routerArouterA (conf)# interface fastehernet 0/17routerA (conf-if)#进入路由器的某一子端口 interface fastethernet 0/17.1 以17端口的1子端口为例router 》 enablerouter #configure terminalrouter(conf)#hostname routerArouterA (conf)# interface fastehernet 0/17.17:设置端口ip地址信息router 》 enablerouter #configure terminalrouter(conf)#hostname routerArouterA(conf)# interface fastehernet 0/17 以17端口为例routerA (conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码routerA (conf-if)#no shut 是配置处于运行中routerA (conf-if)#exit8:查看命令 showrouter 》 enablerouter # show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间show controllers serial + 编号 查看串口类型show ip router 查看路由器的路由表9:cdp相关命令router 》 enablerouter # show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备10:csico2600的密码恢复重新启动路由器,在启动过程中按下win+break键,使路由器进入rom monitor在提示符下输入命令修改配置寄存器的值,然后重新启动路由器remmon1》confreg 0x2142remmon2》reset重新启动路由器后进入setup模式,选择“no”,退回到exec模式,此时路由器原有的配置仍然保存在startup-config中,为使路由器恢复密码后配置不变把startup-config中配置保存到running-config中,然后重新设置enable密码,并把配置寄存器改回0x2102:router》enable router#copy startup-config running-configrouter#configure terminalrouter(conf)#enable password ciscorouter(conf)#config-register 0x2102保存当前配置到startup-config , 重新启动路由器。router #copy running-config startup-config router #reload11:路由器telnet远程登录设置:router》enrouter #configure terminalrouter (conf)#hostname routerArouterA (conf)#enable password cisco 以cisco为特权模式密码routerA (conf)#interface fastethernet 0/1 以17端口为telnet远程登录端口routerA (conf-if)#ip address 192.168.1.1 255.255.255.0routerA (conf-if)#no shutrouterA (conf-if)#exitrouterA (conf)line vty 0 4 设置0-4 个用户可以telnet远程登陆routerA (conf-line)#loginrouterA (conf-line)#password edge 以edge为远程登录的用户密码主机设置:ip 192.168.1.2 主机的ip必须和交换机端口的地址在同一网络段netmask 255.255.255.0gate-way 192.168.1.1 网关地址是交换机端口地址运行:telnet 192.168.1.1 进入telnet远程登录界面password : edge routera》enpassword: ciscoroutera#12:配置路由器的标识 banner $……………$在全局配置的模式下利用“banner”命令可以配置路由器的提示信息,所有连接到路由器的终端都会收到。router》enrouter #configure terminalrouter (conf)#hostname routerArouterA(conf)#banner motd $This is aptech company’ router ! Please don’t change the configuration without permission!$13:配置接口标识 description ………接口标识用于区分路由器的各个接口。router》enrouter #configure terminalrouter (conf)#hostname routerArouterA(conf)#interface fastethernet 0/1 以0/1 接口为例routerA(conf-if)# description this is a fast Ethernet port used to connecting the company’s intranet! 14:配置超时 超时适用于设置在多长时间没有对console进行配置,自动返回exec会话时间。默认为10分钟。router》enrouter #configure terminalrouter (conf)#hostname routerArouterA(conf)#line console 0routerA(conf-if)#exec-timeout 0 0 第一个“0”分钟,第二个“0”秒15:配置串口参数 两台路由器通过串口连接需要一个做为DTE,一个做为DCE。DCE设备要向DTE设备提供时钟频率和带宽。DCE配置:router》enrouter #configure terminalrouter (conf)#hostname routerArouterA(conf)#interface serial 0/0routerA(conf_if)#clock rate 64000 提供时钟频率为64000routerA(conf_if)#bandwidth 64 提供带宽为64DTE配置:路由器串口配置ip地址router》enrouter #configure terminalrouter (conf)#hostname routerBrouterB(conf)#interface serial 0/0routerB(conf_if)#ip address 192.168.1.1 255.255.255.016:静态路由的配置配置路由器A的主机名和接口参数router》enable router#configure terminalrouter(conf)#hostname routerArouterA(conf)#interface fastethernet 0/1 路由器A的1端口为两路由器的连接端口routerA(conf-if)#ip address 192.168.2.1 255.255.255.0routerA(conf-if)#no shutdownrouterA(conf-if)#exitrouterA(conf)# interface fastethernet 0/0 路由器A的0端口为与主机的连接端口routerA(conf-if)#ip address 192.168.1.2 255.255.255.0routerA(conf-if)#no shutdown主机A的ip地址为 192.168.1.1 255.255.255.0 192.168.1.2配置路由器B的主机名和接口参数router》enable router#configure terminalrouter(conf)#hostname routerBrouterB(conf)#interface fastethernet 0/0 路由器B的0端口为两路由器的连接端口routerB(conf-if)#ip address 192.168.2.2 255.255.255.0routerB(conf-if)#no shutdownrouterB (conf-if)#exitrouterB(conf)# interface fastethernet 0/1 路由器B的1端口为与主机的连接端口routerB(conf-if)#ip address 192.168.3.1 255.255.255.0主机B的ip地址为 192.168.3.2255.255.255.0 192.168.3.1配置路由器A的静态路由表routerA(conf)#ip router 192.168.3.0 255.255.255.0 192.168.2.2 配置路由器B的静态路由表routerA(conf)#ip router 192.168.1.0 255.255.255.0 192.168.2.1在routerA和routerB上配置默认路由routerA(conf)#ip route 0.0.0.0 0.0.0.0 192.168.2.2routerA(conf)#ip classlessrouterB(conf)#ip route 0.0.0.0 0.0.0.0 192.168.2.1routerB(conf)#ip classless在routerA和routerB上配置动态路由(RIP)routerA(conf)#router riprouterA(conf)#network 192.168.1.0routerA(conf)#network 192.168.2.0routerB(conf)# router riprouterB(conf)#network 192.168.2.0routerB(conf)#network 192.168.3.0

华为和思科交换机的配置命令

思科设备中的基本操作   cisco》enable或en 进入特权模式   Password: 输入特权模式密码   cisco# 已进入特权模式   cisco#show running-config 查看当前配置   cisco#show startup-config 查看启动配置   cisco#show interfaces fastethernet 0/1 查看快速以太端口   cisco#show interfaces ethernet 0/1 查看以太端口   cisco#show logging 查看系统日志   cisco#show version 查看IOS版本   cisco#show in? 列出以in开始的所有命令   cisco#show in ? 列出interfaces有关的命令   cisco#show interfaces列出接口有关的下级命令   cisco#config terminal 进入配置模式   ciscointerfaces fastethernet 0/1 进入接口配置模式   cisco#ip address 配置IP地址和掩码   ciscospeed 10或100或auto 设置端口速度   ciscofull-duplex 设置半双工   ciscohalf-duplexin 设置全双工   ciscoexit 返回上级   ciscoend 退到最后一级     
华为设备中的基本操作   huawei》enable或en 进入特权模式   Password:输入特权模式密码   huawei# 已进入特权模式   huawei#show running-config 查看当前配置   huawei#show startup-config 查看启动配置   huawei#show interfaces fastethernet 0/1 查看快速以太端口   huawei#show interfaces ethernet 0/1 查看以太端口   huawei#show logging 查看系统日志   huawei#show version 查看IOS版本   huawei#show in? 列出以in开始的所有命令   huawei#show in ? 列出interfaces有关的命令   huawei#show interfaces列出接口有关的下级命令   huawei#config terminal 进入配置模式   huaweiinterfaces fastethernet 0/1 进入接口配置模式   huawei#ip address 配置IP地址和掩码   huawei#speed 10或100或auto 设置端口速度   huawei#duplex full或half或auto 设置双工模式   huawei#exit 返回上级   huawei#end 退到最后一级     从上面基本操作的对比可以看出cisco和华为几乎一某一样,华为几乎是全部照搬了CISCO CLI的技术。   下面是几点说明   1、在显示当前位置上作了调整竟CISCO中仅提示在接口模式下改为更具体的在接口模式下的某个端口   2、在进入特权模式下时不论采用串口连接还是虚拟连接密码都一样,而CISCO则不同。   3、CISCO具体划分了在配置和显示快速以太网接口和以太网接口时需要不同的命令和标时而华为则统一为以太口接口   虽然可以看出华为已经将界面表现的和CISCO非常的象,但其可以操作的命令却远远不如CISCO丰富,也就说明了其功能远不如cisco但对于现在的网管必修的两门专业MCSE和CCNA来说,无疑华为是想做CISCO的轿子发展自己的天地。也使得CISCO认证和华为认证的价值拉近,更说明了华为做CISCO轿子的决心。   另外,在操作方式上的快捷方式如:ctrl + b\ctrl + p等华为也可以支持。

求思科交换机的配置命令

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
module/port]
基于CLI交换机启用浏览CDP信息:
switch(enable)
set
cdp
{enable|disable}
module/port
查看Cisco邻接设备CDP通告信息:
switch(enable)
show
cdp
neighbors
5.基于IOS交换机端口描述:
switch(config-if)#
description
description-string
基于CLI交换机端口描述:
switch(enable)set
port
name
module/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)#
duplex
{auto|full|half}
基于CLI交换机设置太网链路模式:
switch(enable)
set
port
duplex
module/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
module/number
switch(config-if)#
switchport
mode
access
switch(config-if)#
switchport
access
vlan
vlan-num
sw
查看原帖》》
采纳哦