搜档网
当前位置:搜档网 › 路由和交换机的命令

路由和交换机的命令

路由和交换机的命令
路由和交换机的命令

链路聚合:

Switch2(config)#interface aggregateport 1 ! 创建聚合接口AG1

Switch2(config-if)#switchport mode trunk !配置AG模式为trunk

Switch2(config-if)# exit

Switch2(config)#interface range fastethernet 0/1-2 !进入接口0/1和0/2 Switch2(config-if-range)#port-group 1 !配置接口0/1和0/2属于AG1。Switch2# show aggregateport 1 summary ! 查看端口聚合组1的信息。快速生成树协议

Switch1(config)#spanning-tree !开启生成树协议。

Switch1(config)#spanning-tree mode rstp ! 指定生成树协议的类型为RSTP。

spanning-tree priority 0

MSTP配置

SWA(config)#spanning-tree

SWA(config)#spanning-tree mst configuration

SWA(config-mst)#instance 1 vlan 10

SWA(config-mst)#instance 2 vlan 20

SWA(config-mst)#name "test" 命名

SWA(config-mst)#revision 1

SWA(config)# spanning-tree mst 0 priority 8192

SWA(config)# spanning-tree mst 1 priority 4096 (设置SWA的实例1优先级最高,手动指定实例1的根桥为SWA)

SWA(config)# spanning-tree mst 2 priority 8192

配置PPP CHAP认证:

Ra(config)#interface serial 1/2

Ra(config-if)#encapsulation ppp ! 接口下封装数据链路层协议ppp。

Ra(config-if)#ppp authentication chap ! PPP启用CHAP认证方式。

Rb(config)#username ra password 0 star !以对方的主机名作为用户名,密码和对方路由器一致。

Rb(config)#interface serial 1/2

Rb(config-if)#encapsulation ppp

Ra#debug ppp authentication ! 观察PAP验证过程。

动态NAT:

实验步骤:1. 局域网路由器(Lanr)基本配置。

Lanr(config)#hostname lan-r 

Lanr(config)#interface serial 1/2

Lanr(config-if)ip address 220.180.117.3 255.255.255.0

Lanr(config-if)no shutdown

Lanr(config-if)#exit 

Lanr(config)#interface fa1/0

Lanr(config-if)ip address 192.168.100.254 255.255.255.0

Lanr(config-if)no shutdown

Lanr(config-if)#exit

2. 互联网路由器(Intr)基本配置。

Lanr(config)# hostname intr

Intr(config)#interface serial 1/2

Intr(config-if)ip address 220.180.117.2 255.255.255.0

Intr(config-if)clock rate 64000

Intr(config-if)no shutdown

Intr(config)#interface fa1/0

Intr(config-if)ip address 63.5.8.2 255.255.255.0

Intr(config-if)no shutdown

3.在局域网路由器上配置缺省路由。

Lanr(config)#ip route 0.0.0.0 0.0.0.0 serial1/2

4.配置反向NAT映射。

Lanr(config)#interface fa1/0

Lanr(config-if)#ip nat inside ! 定义F1/0为内网接口。

Lanr(config)#interface serial1/2

Lanr(config-if)#ip nat outside ! 定义S1/2为外网接口。

Lanr(config)#ip nat pool web-server 192.168.100.10 192.168.100.10 netmask 255.255.255.0 ! 定义内网服务器地址池。

Lanr(config)#access-list 10 permit host 220.180.117.3 ! 定义外网的公网IP地址。

Lanr(config)#ip nat inside destination list 10 pool web-server !将外网的公网IP转换为内网服务器地址。

Lanr(config)#ip nat inside source static tcp 192.168.100.10 80 220.180.117.3 80 !定义访问外网IP的80端口时转换为内网全局IP的80端口。

NAT:

R1配置:

R1(config)#interface fastEthernet 1/0

//路由器以太网接口配置模式

R1(config-if)#ip address 192.168.1.1 255.255.255.0

R1(config-if)# ip nat inside

R1(config)#interface serial 4/0

R1(config-if)#clock rate 64000

R1(config-if)#ip address 192.168.2.11 255.255.255.0

R1(config-if)# ip nat outside

R1(config)#ip nat inside source static 192.168.1.2 192.168.2.3

R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.2.1

R2配置:

R2(config)#interface fastEthernet 1/0

//路由器以太网接口配置模式

R2(config-if)#ip address 1.1.1.1 255.255.255.0

R2(config)#interface serial 4/0

R2(config-if)#clock rate 64000

R2(config-if)#ip address 192.168.2.1 255.255.255.0

OSPT:

SWA(config)# router ospf 1

SWA(config-router)# network 192.1.4.0 0.0.0.255 area 0

SWA(config-router)# network 192.168.1.0 0.0.0.255 area 0

端口安全:

//进入端口0/3

Ruijie(config-if)# switchport mode access

//启用端口安全功能

Ruijie(config-if)# switchport port-security

//配置端口安全容许的最大安全地址数为1

Ruijie(config-if)# switchport port-security maximum 1

//配置安全端口的为例模式为保护模式

Ruijie(config-if)# switchport port-security violation protect

//在接口下绑定一个安全地址,IP为192.168.1.102 MAC地位为

0018.8BB8.8B9F

Ruijie(config-if)# switchport port-security mac-address 0018.8BB8.8B9F ip-address192.168.1.102

配置扩展IP访问控制列表。

Switch(config)#ip access-list extended denystudentwww !命名

Switch(config-ext-nac1)#deny tcp 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255 eq www !禁止WWW服务。

Switch(config-ext-nacl)#permit ip any any ! 允许其它服务。

Switch#show ip access-lists denystudent www

3.在接口下应用访问控制列表。

Switch(config)#inter vlan 30

Switch(config-if)ip access-group denystudentwww in

Switch(config)#interface fa0/5

Switch(config-if)#switchport mode access

基于时间的访问控制列表:

Router#clock set 12:40:08 15 april 2007日-月-年 ! 设置路由器的时钟。

3.定义时间段。

Router(config)#time-range freetime Router(config-time-range)#absolute start 8:00 1 jan 2008 end 18:00 31 dec 2010

!定义绝对时间段。

Router(config-time-range)#periodic daily 0:00 to 8:00 !

定义周期性时间段

Router(config-time-range)#periodic daily 17:00 to 23:59 ! 定义周期性时间段,此处不能写24:00。

4.定义访问控制列表规则。

Router(config)#access-list 100 permit ip any host 192.168.1.2

!定义扩展访问控制列表,允许访问主机192.168.1.2。

Router(config)#access-list 100 permit ip any any time-range freetime

!允许在规定的时间段访问任何网络。

交换机路由器基本命令

准备工作: 1)SecureCRT 软件(推荐使用8.0注册机版) 2)console线一条,RS232转USB线一条(淘宝购买) RS232转USB线插在电脑上,打开设备管理(快捷键devmgmt.msc),就会有提示,用360驱动(或其他驱动软件)打上即可。 下图为驱动安装成功后的设备管理器界面(本人电脑系统为win10)。 注意:com口与电脑上USB口是对应的,接在另一个USB口,com口的序号会变化。 file:///C:/Users/Potter/AppData/Local/Temp/msohtmlclip1/01/clip_imag e002.jpg 3)电脑一台 4)网络基础知识(OSI,IP,路由交换基础等) 5)登陆设备( CLI命令行) 设备-----Console—RS232-USB---电脑,打开SecureCRT软件 file:///C:/Users/Potter/AppData/Local/Temp/msohtmlclip1/01/clip_imag e004.jpg 一,锐捷交换机( 和cisco命令类似) 1,设备登陆 Web登陆:192.168.1.1 admin/admin Console密码:默认为空,如果不行试试ruijie / admin 2,系统基本配置

enable //进入用户模式,华为H3C无对应命令clockset 10:00:00 3 17 2017 //clock set 小时:分:秒月日年! config //进入全局模式,对应华为H3C的sys hostname xx //修改设备名称 ! 3,配置vlan ! config //进入全局模式 vlan 10 name xxx //创建一个vlan,并命名 vlan 20 name xxx exit ! no vlan 10 //删除一个vlan ! int range gi 0/2-4 sw mo ac //配置多个接口为access模式 sw ac vl 10 //配置多个接口加入vlan10 exit

华为交换机路由器常用命令

华为交换机路由器常用命令

华为交换机路由器常用命令 网络技术/wangzhijun1743 发表于2007-03-24, 12:25 交换机命令 [Quidway]dis cur ;显示当前配置 [Quidway]display current-configuration ;显示当前配置[Quidway]display interfaces ;显示接口信息[Quidway]display vlan all ;显示路由信息 [Quidway]display version ;显示版本信息[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的I P地址 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关[Quidway]rip ;三层交换支持 [Quidway]local-user ftp [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]interface ethernet 0/1 ;进入端口模式[Quidway]int e0/1 ;进入端口模式 [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]port access vlan 3 ;当前端口加入到VLA N [Quidway-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN [Quidway-Ethernet0/3]port trunk pvid vlan 3 ;设置trunk端口的P VID [Quidway-Ethernet0/1]undo shutdown ;激活端口 [Quidway-Ethernet0/1]shutdown ;关闭端口 [Quidway-Ethernet0/1]quit ;返回 [Quidway]vlan 3 ;创建VLAN [Quidway-vlan3]port ethernet 0/1 ;在VLAN中增加端口 [Quidway-vlan3]port e0/1 ;简写方式

华为路由器交换机配置命令大全

华为华为路由器交换机配置命令大全一、计算机命令 PCAlogin:root;使用root用户 password:linux;口令是linux #shutdown-hnow;关机 #init 0;关机 #logout;用户注销 #login;用户登录 #ifconfig;显示IP地址 #ifconfig eth0 netmask;设置IP地址 #ifconfig eht0 netmask down;禁用IP地址 #route add 0.0.0.0 gw;设置网关 #route del 0.0.0.0 gw;删除网关 #route add default gw;设置网关 #route del default gw;删除网关 #route;显示网关 #ping;发ECHO包 #telnet;远程登录 二、华为路由器交换机配置命令:交换机命令 [Quidway]dis cur;显示当前配置 [Quidway]display current-configuration;显示当前配置 [Quidway]display interfaces;显示接口信息 [Quidway]display vlan;显示vlan信息 [Quidway]display version;显示版本信息 [Quidway]super password;修改特权用户密码 [Quidway]sysname;交换机命名 [Quidway]interface ethernet0/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;静态路由=网关[Quidway]rip; rip协议 [Quidway]local-user ftp [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]interface ethernet0/1;进入端口模式 [Quidway]int e0/1;进入端口模式 [Quidway-Ethernet0/1]duplex{half|full|auto};配置端口工作状态

最全华为路由器交换机配置命令大合集

?全面分析路由交换机配置实例应用 了解一些关于路由交换机配置的知识还是非常有用的,这里我们主要介绍路由交换机配置实例应用,在局域网中,通过路由交换机配置VLAN可以减少主机通信广播域的范围。 当VLAN之间有部分主机需要通信,但交换机不支持三层交换时,可以采用一台支持802.1Q的路由交换机配置实现VLAN的互通.这需要在以太口上建立子接口,分配IP地址作为该VLAN的网关,同时启动802.1Q。组网:路由器E0端口与交换机的上行trunk端口(第24端口)相连,交换机下行口划分3个VLAN,带若干主机。拓扑图如下: 1.路由交换机配置 1.[Router] 2.[Router]inter e0 3.[Router-Ethernet0]ip add 4.[Router-Ethernet0]inter e0.1 //定义子接口E0.1 5.[Router-Ethernet0.1]ip add 6.[Router-Ethernet0.1]vlan-type dot1q vid 1 //指定以太网子接口属于VLAN1, 此命令应用在以太网子接口上。 7.[Router-Ethernet0.1]inter e0.2 //定义子接口E0.2 8.[Router-Ethernet0.2]ip add 9.[Router-Ethernet0.2]vlan-type dot1q vid 2 //指定以太网子接口属于VLAN2 10.[Router-Ethernet0.2]inter e0.3 //定义子接口E0.3 11.[Router-Ethernet0.3]ip add 12.[Router-Ethernet0.3]vlan-type dot1q vid 3 //指定以太网子接口属于VLAN3 13.[Router-Ethernet0.3]inter e0 14.[Router-Ethernet0]undo shut 15.% Interface Ethernet0 is up 16.[Router-Ethernet0] //用网线将E0端口连到S3026第24端口 17.%19:46:32: Interface Ethernet0 changed state to UP 18.%19:46:32: Line protocol ip on interface Ethernet0, changed state to UP 19.%19:46:32: Line protocol ip on interface Ethernet0.1, changed state to UP 20.%19:46:32: Line protocol ip on interface Ethernet0.2, changed state to UP

交换机和路由器的基本配置

实验一交换机和路由器的基本配置 交换机的基本配置 【实验名称】 交换机的基本配置。 【实验目的】 掌握交换机命令行各种操作模式的区别,能够使用各种帮助信息,以及用命令进行基本的配置。 【背景描述】 你是某公司新进的网管,公司要求你熟悉网络产品,公司采用全系列锐捷网络产品,首先要求你登录交换机,了解、掌握交换机的命令行操作技巧,以及如何使用一些基本命令进行配置。 【需求分析】 需要在交换机上熟悉各种不同的配置模式以及如何在配置模式间切换,使用命令进行基本的配置,并熟悉命令行界面的操作技巧。 【实验拓扑】 图1-1 实验拓扑图 【实验设备】 三层交换机1台 【预备知识】 交换机的命令行界面和基本操作 【实验原理】 交换机的管理方式基本分为两种:带内管理和带外管理。通过交换机的Console口管理交换机属于带外管理,不占用交换机的网络接口,其特点是需要使用配置线缆,近距离配置。第一次配置交换机时必须利用Console端口进行配置。 交换机的命令行操作模式,主要包括:用户模式、特权模式、全局配置模式、端口模式等几种。 ???用户模式进入交换机后得到的第一个操作模式,该模式下可以简单查看交换机的软、硬件版本信息,并进行简单的测试。用户模式提示符为switch> ???特权模式由用户模式进入的下一级模式,该模式下可以对交换机的配置文件进行管理,查看交换机的配置信息,进行网络的测试和调试等。特权模式提示符为switch# ???全局配置模式属于特权模式的下一级模式,该模式下可以配置交换机的全局性参数(如主机名、登录信息等)。在该模式下可以进入下一级的配置模式,对交换机具体的功能进行配置。全局模式提示符为switch(config)# ???端口模式属于全局模式的下一级模式,该模式下可以对交换机的端口进行参数配置。端口模式提示符为switch(config-if)# 交换机的基本操作命令包括:

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

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 关闭以太网端口

路由器常用配置命令

Cisco常用配置命令Cisco常用配置命令 一.交换机的基本配置 C2950# config terminal 进入全局配置模式 show interface fastethernet0/1 查看端口0/1的配置结果 show interface fastethernet0/1 status 查看端口0/1的状态 show mac-address-table 查看整个MAC地址表 clear mac-address-table restricted static 清除限定性地址 C2950(config)# hostname 2950A / 设置主机名为2950A interface f0/23 / 进入端口23的配置模式 enable password cisco / 设置enable password为cisco enable secret cisco1 / 设置enable secret为cisco1 ip address 192.168.1.1 255.255.255.0 / 设置交换机IP 地址 ip default-gateway 192.168.1.254 / 设置默认网关 ip domain-name https://www.sodocs.net/doc/a73465866.html, / 设置域名 ip name-server 200.0.0.1 / 设置域名服务器 配置查看MAC地址表 mac-address-table ? mac-address-table aging-time 100 / 设置超时是时间为100s mac-address-table permanent https://www.sodocs.net/doc/a73465866.html, /f0/3 加入永久地址mac-address-table restricted static 0000.0c02.bbcc / f0/6 f0/7 加入静态地址 end show mac-address-table /查看整个Mac地址表 clear mac-address-table restricted static C2950(config-if)# interface fastethernet0/1 /进入接口F0/1子配置模式 interface Ethernet0 /进入以太网口0子配置模式 no shutdown /激活接口 speed ? /查看speed命令的子命令 speed 100 /设置该端口速率为100Mb/s dulplex full/half/auto /设置该端口为全双工 description TO_PC1 /设置该端口描述为TO_PC1 show interface fastethernet 0/1 /查看端口0/1的配置结果 show interface fastethernet 0/1 status /查看端口0/1的状态 配置VTP和STP 一. 配置VTP 2950A #vlan database /进入VLAN配置子模式 show vtp status /查看VTP设置信息 show vlan /查看VLAN配置信息 copy running-config startup-config /保存配置文件 2950A(vlan)#vtp server/client /设置本交换机为server/client模式

思科交换机路由器命令大全

思科交换机路由器命令 大全 YUKI was compiled on the morning of December 16, 2020

1. 交换机支持的命令:交换机基本状态: 交换机口令设置: 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)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端 口1switch(config-if)#switchport access vlan 2 ; 当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为干线switch(config- if)#switchport trunk allowed vlan 1,2 ;设置允许 的vlanswitch(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地址: 交换机显示命令:

交换机和路由器常用命令大全

交换机和路由器配置命令 Cisco 交换机的命令行模式: 1、用户模式 Switch> 2、特权模式 Switch>enable Switch# 3、全局配置模式 Switch#config terminal Switch(config)# 4、接口模式 Switch(config)#interface fastethernet 0/1 Switch(config-if)# Fastethernet表示百兆位以太网接口。 Ethernet表示十兆位以太网接口。 Gigabitethernet表示千兆位以太网接口。 Tengigabitethernet表示万兆位以太网接口。 如果从特权模式回到用户模式,需要输入disable命令,其他无论在那个模式,只要输入命令exit就能回到前一个模式,在全局模式或是接口模式,只要输入命令end都能回到特权模式,或者按下ctrl+z 组合键等效于命令end。 (命令行帮助机制:1、“?”。2、Tab键。)

常用快捷组合键: Ctrl+A 光标移动到命令行的开始位置。 Ctrl+E 光标移动到命令行的结束位置。 一、常用命令介绍: 1、hostname 用于配置主机名,可简写为host. Switch(config)#host sw1 Sw1(config)# 2、show version 显示系统IOS名称以及版本信息,可简写为sh ver. 3、Show running-config 查看交换机当前配置信息,可简写为sh run. 4、Show startup-config 显示已保存的配置信息,可简写为sh star. 5、Copy running-config startup-config 保存当前配置信息,可简写 为copy run star。这个命令还等效于write(简写为wr)。 保存当前配置如下: Switch#wr 或者switch#copy run star 6、erase nvram 删除已保存的配置信息,这命令等效于erase startup-config.(擦除)。 7、reload 重新启动。 8、设置console口永不超时命令exec-timeout 0 0 (第一个0为分钟, 第二个0为秒钟)。 Switch(config)#line con 0 Switch(config-line)#exec-timeout 0 0

最全华为路由器交换机配置命令大合集

全面分析路由交换机配置实例应用 也许很多人对路由交换机配置还不是特别的了解,没有关系,下面我们主要针对路由交换及,详细的分析其配置应用,希望对您有所帮助。 了解一些关于路由交换机配置的知识还是非常有用的,这里我们主要介绍路由交换机配置实例应用,在局域网中,通过路由交换机配置VLAN可以减少主机通信广播域的范围。 当VLAN之间有部分主机需要通信,但交换机不支持三层交换时,可以采用一台支持802.1Q的路由交换机配置实现VLAN的互通.这需要在以太口上建立子接口,分配IP地址作为该VLAN的网关,同时启动802.1Q。组网:路由器E0端口与交换机的上行trunk端口(第24端口)相连,交换机下行口划分3个VLAN,带若干主机。拓扑图如下: 1.路由交换机配置 1.[Router] 2.[Router]inter e0 3.[Router-Ethernet0]ip add 4.[Router-Ethernet0]inter e0.1 //定义子接口E0.1 5.[Router-Ethernet0.1]ip add 6.[Router-Ethernet0.1]vlan-type dot1q vid 1 //指定以太网子接口属于VLAN1, 此命令应用在以太网子接口上。 7.[Router-Ethernet0.1]inter e0.2 //定义子接口E0.2 8.[Router-Ethernet0.2]ip add 9.[Router-Ethernet0.2]vlan-type dot1q vid 2 //指定以太网子接口属于VLAN2 10.[Router-Ethernet0.2]inter e0.3 //定义子接口E0.3 11.[Router-Ethernet0.3]ip add 12.[Router-Ethernet0.3]vlan-type dot1q vid 3 //指定以太网子接口属于VLAN3 13.[Router-Ethernet0.3]inter e0 14.[Router-Ethernet0]undo shut 15.% Interface Ethernet0 is up 16.[Router-Ethernet0] //用网线将E0端口连到S3026第24端口 17.%19:46:32: Interface Ethernet0 changed state to UP 18.%19:46:32: Line protocol ip on interface Ethernet0, changed state to UP 19.%19:46:32: Line protocol ip on interface Ethernet0.1, changed state to UP 20.%19:46:32: Line protocol ip on interface Ethernet0.2, changed state to UP

交换机和路由器常用命令注释

H3C交换机和路由器常用命令注释 原文地址:H3C交换机和路由器常用命令注释作者:济南百谷信息 、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通过 H 3C路由器常用命令注释 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 关闭以太网端口 9、quit 退出当前视图模式 10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由 11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 Switch H3C S3600 Switch H3C MSR 20-20 Router 小技巧 1、调整超级终端的显示字号; 2、捕获超级终端操作命令行,以备日后查对; 3、language-mode Chinese|English 中英文切换; 4、复制命令到超级终端命令行,粘贴到主机; 5、交换机清除配置:reset save ;reboot ; 6、路由器、交换机配置时不能掉电,连通测试前一定要 检查网络的连通性,不要犯最低级的错误。 7、192.168.1.1/24 等同192.168.1.1 255.255.255.0;在配置交换机和路由器时,192.168.1.1 255.255.255.0 可以写成:192.168.1.1 24

锐捷交换机命令大全

【第一部分】交换机支持的命令: 1.交换机基本状态: switch: ;ROM状态,路由器是rommon> hostname> ;用户模式 hostname# ;特权模式 hostname(config)# ;全局配置模式 hostname(config-if)# ;接口状态 2.交换机口令设置: 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 ;设置登录口令xx switch#exit ;返回命令 3.交换机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 2 switch(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模式

了解华为路由器交换机配置命令大全.doc

了解华为路由器交换机配置命令大全 欢迎来到学习啦,本文为大家提供了解华为路由器交换机配置命令大全,欢迎大家阅读学习。 为华路由器为面向运营商数据通信网络的高端路由器产品,覆盖骨干网、城域网的P/PE位置,帮助运营商应对网络带宽快速增长的压力。支持RIP、OSPF、BGP、IS-IS等单播路由协议和IGMP、PIM、MBGP、MSDP等多播路由协议,支持路由策略以及策略路由。 史上最全华为路由器交换机配置命令大合集,熟练掌握下面的华为路由器交换机配置知识点,你只需花几分钟的时间就能明白华为路由器交换机配置。交换机的配置命令等等。 华为路由器交换机配置命令:计算机命令 PCAlogin:root;使用root用户 password:linux;口令是linux #shutdown-hnow;关机 #init0;关机 #logout;用户注销 #login;用户登录 #ifconfig;显示IP地址 #ifconfigeth0netmask;设置IP地址 #ifconfigeht0netmaskdown;禁用IP地址 #routeadd0.0.0.0gw;设置网关 #routedel0.0.0.0gw;删除网关

#routeadddefaultgw;设置网关 #routedeldefaultgw;删除网关 #route;显示网关 #ping;发ECHO包 #telnet;远程登录 华为路由器交换机配置命令:交换机命令 [Quidway]discur;显示当前配置 [Quidway]displaycurrent-configuration;显示当前配置 [Quidway]displayinterfaces;显示接口信息 [Quidway]displayvlanall;显示路由信息 [Quidway]displayversion;显示版本信息 [Quidway]superpassword;修改特权用户密码 [Quidway]sysname;交换机命名 [Quidway]interfaceethernet0/1;进入接口视图 [Quidway]interfacevlanx;进入接口视图 [Quidway-Vlan-interfacex]ipaddress10.65.1.1255.255.0.0;配置VLAN的IP地址 [Quidway]iproute-static0.0.0.00.0.0.010.65.1.2;静态路由=网关 [Quidway]rip;三层交换支持 [Quidway]local-userftp [Quidway]user-interfacevty04;进入虚拟终端

华为路由器和交换机的常用命令

一. 端口: 路由器——ethernet(以太口)、Serial(串口)、loopback(虚拟端口) 交换机——ethernet、vlan、loopback 注意:交换机默认其24个端口全在vlan 1里面,交换机在给vlan配了ip之后就具有路由器的功能了。另一个需要注意的是,所用的端口是否被shutdown了,如果被shutdown 了,需要进入相应的端口执行undo shutdown。 二. 配置ip 除了交换机的以太口不可以配置ip外,其他端口都可以,配置方法相同。 [Quidway] interface *(所要配置的端口,如vlan 1) [Quidway-*]ip add *.*.*.*(ip)*.*.*.*(掩码)/*(掩码位数,一般只在路由器上适用)————————————————————————————————————— 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] [detail] 在基于CLI的交换机上启用和浏览CDP信息: switch(enable) set cdp {enable|disable} module/port 为了查看Cisco邻接设备的CDP通告信息: switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端口描述: switch(config-if)# description description-string 基于CLI的交换机的端口描述:

锐捷交换机、路由器常用命令

锐捷交换机、路由器常用命令EXEC模式: 用户模式switch> 交换机信息的查看,简单测试命令 特权模式switch# 查看、管理交换机配置信息,测试、调试 配置模式: 全局配置模式switch(config)# 配置交换机的整体参数 接口配置模式switch(config-if)# 配置交换机的接口参数 进入全局配置模式 Switch#c onfigure terminal Switch(config)#exit Switch# 进入接口配置模式 Switch(config)#interface fastethernet 0/1 Switch(config-if)#exit Switch(config)# 从子模式下直接返回特权模式 Switch(config-if)#end

Switch# 命令行其他功能 获得帮助 switch#? switch#show ? 命令简写 全写:switch# configure terminal 简写:Switch# config 使用历史命令 Switch# (向上键) Switch# (向下键) 配置交换机Telnet功能 配置远程登陆密码 Switch(config)#enable secret level 1 0 ruijie 配置进入特权模式密码 Switch (config)#enable secret level 15 0 ruijie

为交换机配置管理IP Switch (config)#interface vlan 1 Switch (config-if)#no shutdown Switch (config-if)#ip address 192.168.1.1 255.255.255.0 Switch (config-if)#end 配置文件的管理 保存配置 将当前运行的参数保存到flash 中用于系统初始化时初始化参数 Switch#copy running-config startup-config Switch#write memory Switch#write 删除配置 永久性的删除flash 中不需要的文件 使用命令delete flash:config.text 删除当前的配置:在配置命令前加no 例:switch(config-if)# no ip address 查看配置文件内容 Switch#show configure 查看保存在FLASH里的配置信息

交换机和路由器配置基本命令

en 进入特权模式 conf 进入全局配置模式 in s0 进入serial 0 端口配置 ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 添加ip 地址和掩码,电信分配enca hdlc/ppp 捆绑链路协议hdlc 或者ppp ip unn e0 exit 回到全局配置模式 in e0 进入以太接口配置 ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 添加ip 地址和掩码,电信分配exit 回到全局配置模式 ip route 0.0.0.0 0.0.0.0 s 0 添加路由表 ena password 口令 write exit 以上根据中国电信ddn 专线多数情况应用 普通用户模式 enable 转入特权用户模式 exit 退出配置 help 系统帮助简述 language 语言模式切换 ping 检查网络主机连接及主机是否可达 show 显示系统运行信息 telnet 远程登录功能 tracert 跟踪到目的地经过了哪些路由器 #? 特权用户模式 clear 清除各项统计信息 clock 管理系统时钟 configure 进入全局配置模式 debug 开启调试开关 disable 返回普通用户模式 download 下载新版本软件和配置文件 erase 擦除FLASH中的配置 exec-timeout 打开EXEC超时退出开关 exit 退出配置 first-config 设置或清除初次配置标志 help 系统帮助简述 language 语言模式切换 monitor 打开用户屏幕调试信息输出开关 no 关闭调试开关 ping 检查网络主机连接及主机是否可达 reboot 路由器重启 setup 配置路由器参数 show 显示系统运行信息 telnet 远程登录功能

交换机路由器常用命令

交换机基本配置命令 1、交换机口令设置 switch>enable ;进入特权模式 switch#config terminal ;进入全局配置模式 switch(config)#hostname ;设置交换机的主机名 switch(config)#enable secret xxx ;设置特权加密口令为xxx switch(config)#enable password xxx ;设置特权非密口令为xxx switch(config)#line console 0 ;进控制台口(Rs232)初始化 switch(config-line)#line vty 0 4 ;进入虚拟终端virtual tty switch(config-line)#login ;允许登录 switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令 2、交换机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 ;将当前端口1加入VLAN 2 switch(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 switch(config)#vtp mode client 3、为交换机设置IP地址 switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address ;添加远程登录IP switch(config)#ip default-gateway ;添加默认网关 路由器基本配置命令 1、路由器显示命令 router#show run ;显示接口 router#show interface ;显示接口 router#show ip route ;显示路由 router#show cdp neighbors ;看邻居 router#reload ;重新启动 2、路由器口令设置 router>enable ;进入特权模式 router#config terminal ;进入全局配置模式 router(config)#hostname ;设置路由器的主机名 router(config)#enable secret xxx ;设置特权加密口令为xxx router(config)#enable password xxx ;设置特权非密口令为xxx router(config)#line console 0 ;进控制台口(Rs232)初始化 router(config-line)#line vty 0 4 ;进入虚拟终端virtual tty router(config-line)#login ;允许登录 router(config-line)#password xx ;设置登录口令xx router(config)# (Ctrl+z) ; 返回特权模式 router#exit ;返回命令 3、为接口配置ip地址 router(config)#int s0/0 ;进行串Serail接口 router(config-if)#no shutdown ;激活接口 router(config-if)#clock rate 64000 ;设置时钟 router(config-if)#ip address 10.1.1.1 255.255.0.0 ;设置IP地址和子网掩码

相关主题