华三交换机端口设置

合集下载

华三交换机端口安全操作

华三交换机端口安全操作
3. Trap 特性 Trap 特性是指当端口有特定的数据包(由非法入侵,用户上下线等原因引起)传送 时,设备将会发送 Trap 信息,便于网络管理员对这些特殊的行为进行监控。
1-1
H3C S5500-EI 系列以太网交换机 操作手册 端口安全
第 1 章 端口安全配置
1.1.3 端口安全模式
对于端口安全模式的具体描述,请参见 表 1-1。
i
H3C S5500-EI 系列以太网交换机 操作手册 端口安全
第 1 章 端口安全配置
ቤተ መጻሕፍቲ ባይዱ
第1章 端口安全配置
1.1 端口安全简介
1.1.1 概述
端口安全是一种基于 MAC 地址对网络接入进行控制的安全机制,是对已有的 802.1x 认证和 MAC 地址认证的扩充。这种机制通过检测数据帧中的源 MAC 地址来控制非 授权设备对网络的访问,通过检测数据帧中的目的 MAC 地址来控制对非授权设备 的访问。 端口安全的主要功能是通过定义各种端口安全模式,让设备学习到合法的源 MAC 地址,以达到相应的网络管理效果。启动了端口安全功能之后,当发现非法报文时, 系统将触发相应特性,并按照预先指定的方式进行处理,既方便用户的管理又提高 了系统的安全性。 非法报文包括: z 禁止 MAC 地址学习时,收到的源 MAC 地址为未知 MAC 的报文; z 端口学习到的 MAC 地址达到端口所允许的最大 MAC 地址数后,收到的源
H3C S5500-EI 系列以太网交换机 操作手册 端口安全
目录
目录
第 1 章 端口安全配置 ..............................................................................................................1-1 1.1 端口安全简介 ..................................................................................................................... 1-1 1.1.1 概述 ......................................................................................................................... 1-1 1.1.2 端口安全的特性 ....................................................................................................... 1-1 1.1.3 端口安全模式........................................................................................................... 1-2 1.2 端口安全配置任务简介....................................................................................................... 1-4 1.3 使能端口安全功能 .............................................................................................................. 1-4 1.3.1 配置准备 .................................................................................................................. 1-4 1.3.2 使能端口安全功能.................................................................................................... 1-4 1.4 配置端口允许的最大安全MAC地址数 ................................................................................ 1-5 1.5 配置端口安全模式 .............................................................................................................. 1-6 1.5.1 配置autoLearn模式.................................................................................................. 1-6 1.5.2 配置userLoginWithOUI模式 .................................................................................... 1-7 1.5.3 配置其它模式........................................................................................................... 1-7 1.6 配置端口安全的特性 .......................................................................................................... 1-8 1.6.1 配置NeedToKnow特性 ............................................................................................ 1-8 1.6.2 配置入侵检测特性.................................................................................................... 1-8 1.6.3 配置Trap特性........................................................................................................... 1-9 1.7 配置安全MAC地址 ............................................................................................................. 1-9 1.7.1 配置准备 .................................................................................................................. 1-9 1.7.2 配置安全MAC地址................................................................................................. 1-10 1.8 配置当前端口不应用服务器下发的授权信息 .................................................................... 1-10 1.9 端口安全显示和维护 ........................................................................................................ 1-10 1.10 端口安全典型配置举例................................................................................................... 1-11 1.10.1 端口安全autoLearn模式配置举例 ........................................................................ 1-11 1.10.2 端口安全userLoginWithOUI模式配置举例........................................................... 1-13 1.10.3 端口安全macAddressElseUserLoginSecure模式配置举例 ................................. 1-18 1.11 常见配置错误举例 .......................................................................................................... 1-21 1.11.1 端口安全模式无法设置 ........................................................................................ 1-21 1.11.2 无法配置端口安全MAC地址 ................................................................................ 1-21 1.11.3 用户在线情况下无法更换端口安全模式............................................................... 1-22

华三S5500交换机配置

华三S5500交换机配置

基于多个VLAN 在一个端口
[H3C]interface GigabitEthernet 1/0/2 进入第二个端口设置
[H3C-GigabitEthernet1/0/2]port link-type trunk 端口的链路类型的树干
[H3C-GigabitEthernet1/0/2]port trunk permit vlan all 如果使用单独的就不用增加这项
[H3C]pim
static-rp 192.168.100.1
undo 删除
[H3C]undo vlan 103 删除vlan 103
[H3C]interface GigabitEthernet 1/0/3 进入端口3
Please wait........................................... Done.
[H3C-GigabitEthernet1/0/2]quit 设置好了第二个端口的VLAN可以通过所有
[H3C-GigabitEthernet1/0/2]port trunk permit vlan 122 在此端口上增加VLAN组
[H3C-Vlan-interface104]ip address 192.168.69.1 255.255.255.0 设置IP
步骤三:将所要配置端口加入到VLAN组
[H3C] interface GigabitEthernet 1/0/1 设置第一个端口
[H3C-GigabitEthernet1/0/1]port access vlan 101 设置端口一为VLAN 101组
[H3C-GigabitEthernet1/0/3]undo port link-type 删除port link-type

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

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

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 为设备命名为R13、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 SwitchH3C S3600 SwitchH3C MSR 20-20 Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

华3交换机配置命令大全

华3交换机配置命令大全

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 配置静态路由
#################################################################################################################
H3C华为交换机端口绑定基本配置2008-01-22 13:40
b)arp命令
使用特殊的arp static命令,来完成IP地址与MAC地址之间的绑定。例如:
[SwitchA]arp static 10.1.1.2 00e0-fc22-f8d3
配置说明:以上配置完成对PC机的IP地址和MAC地址的全局绑定。
3,端口 IP MAC
使用特殊的AM User-bind命令,来完成IP、MAC地址与端口之间的绑定。例如:
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地址和子网掩码
[h3c-vty0-4] acl 2000 inbound
shutdown:关闭vlan接口

华三交换机配置方法及操作案例

华三交换机配置方法及操作案例

华三交换机配置方法及操作案例一、系统IP配置:[H3C]vlan20[H3C]management-vlan20[H3C]interfacevlan-interface 20 创建并进入管理VLAN[H3C]undointerface vlan-interface 20 删除管理VLAN接口[H3C-Vlan-interface20]ipaddress 192.168.1.2 255.255.255.0 配置管理VLAN接口静态IP地址(缺省为192.168.0.234)[H3C-Vlan-interface20]undoip address 删除IP 地址[H3C-Vlan-interface20]ipgateway192.168.1.1 指定缺省网关(默认无网关地址) [H3C-Vlan-interface20]undoip gateway[H3C-Vlan-interface20]shutdown 关闭接口[H3C-Vlan-interface20]undoshutdown 开启[H3C]displayip 显示管理VLAN接口IP的相关信息[H3C]displayinterface vlan-interface 20 查看管理VLAN的接口信息<H3C>debuggingip 开启IP调试功能<H3C>undodebugging ip二、DHCP客户端配置:[H3C-Vlan-interface20]ipaddress dhcp-alloc 管理VLAN接口通过DHCP方式获取IP地址[H3C-Vlan-interface20]undoip address dhcp-alloc 取消[H3C]displaydhcp 显示DHCP客户信息<H3C>debuggingdhcp-alloc 开启DHCP调试功能<H3C>undodebugging dhcp-alloc三、端口配置:[H3C]interfaceEthernet0/3[H3C-Ethernet0/3]shutdown[H3C-Ethernet0/3]speed100 速率,可为10,100,1000和auto(缺省)[H3C-Ethernet0/3]duplexfull 双工,可为half,full 和auto(缺省) 光口和汇聚后不能配置[H3C-Ethernet0/3]flow-control 开启流控,默认为关闭[H3C-Ethernet0/3]broadcast-suppression20 设置抑制广播百分比为20%,可取5,10,20,100,缺省为100,同时组播和未知单播也受此影响[H3C-Ethernet0/3]loopbackinternal 内环测试[H3C-Ethernet0/3]loopbackexternal 外环测试,需插接自环头,必须为全双工或者自协商模式[H3C-Ethernet0/3]portlink-type trunk 设置链路的类型为trunk,可为access(缺省),trunk[H3C-Ethernet0/3]porttrunk pvid vlan 20 设置20为该trunk的缺省VLAN,默认为1(trunk线路两端的PVID必须一致)[H3C-Ethernet0/3]portaccess vlan 20 将当前access端口加入指定的VLAN[H3C-Ethernet0/3]porttrunk permit vlan all 允许所有的VLAN通过当前的trunk端口,可多次使用该命令[H3C-Ethernet0/3]mdiauto 设置以太端口为自动监测,normal(缺省)为直通线,across为交叉线[H3C]link-aggregationEthernet 0/1 to Ethernet 0/4 将1-4口加入汇聚组,1为主端口,两端需要同时配置,设置了端口镜像以及端口隔离的端口无法汇聚[H3C]undolink-aggregation Ethernet 0/1 删除该汇聚组[H3C]link-aggregationmode egress 配置端口汇聚模式为根据目的MAC地址进行负荷分担,可选为 ingress,egress和both,缺省为both[H3C]monitor-portEthernet 0/2 将该端口设置为镜像端口,必须先设置镜像端口,删除时必须先删除被镜像端口,而且它们不能同在一个端口,该端口不能在汇聚组中,设置新镜像端口时,新取代旧,被镜像不变[H3C]mirroring-portEthernet 0/3 to Ethernet 0/4 both 将端口3和4设置为被镜像端口,both为同时监控接收和发送的报文,inbound表示仅监控接收的报文,outbound表示仅监控发送的报文[H3C]displaymirror[H3C]displayinterface Ethernet 0/3<H3C>resetcounters 清除所有端口的统计信息[H3C]displaylink-aggregation Ethernet 0/3 显示端口汇聚信息[H3C-Ethernet0/3]virtual-cable-test 诊断该端口的电路状况四、VLAN配置:[H3C]vlan2[H3C]undovlan all 删除除缺省VLAN外的所有VLAN,缺省VLAN不能被删除[H3C-vlan2]portEthernet 0/4 to Ethernet 0/7 将4到7号端口加入到VLAN2中,此命令只能用来加access端口,不能用来增加trunk或者hybrid端口[H3C-vlan2]port-isolateenable 打开VLAN内端口隔离特性,不能二层转发,默认不启用该功能[H3C-Ethernet0/4]port-isolateuplink-port vlan 2 设置4为VLAN2的隔离上行端口,用于转发二层数据,只能配置一个上行端口,若为trunk,则建议允许所有VLAN通过,隔离不能与汇聚同时配置[H3C]displayvlan all 显示所有VLAN的详细信息S1550E支持基于端口的VLAN,通过创建不同的user-group来实现,一个端口可以属于多个user-group,不属于同一个user-group的端口不能互相通信,最多支持50个user-group[H3C]user-group20 创建user-group 20,默认只存在user-group 1[H3C-UserGroup20]portEthernet 0/4 to Ethernet 0/7 将4到7号端口加入到VLAN20中,初始时都属于user-group1中[H3C]displayuser-group 20 显示user-group 20的相关信息五、系统管理:[H3C]mac-addressblackhole H-H-H vlan 1 在VLAN1中添加黑洞MAC[H3C]mac-addressstatic H-H-H interface Ethernet 0/1 vlan 1 在VLAN1中添加端口一的一个mac [H3C]mac-addresstimer aging 500 设置MAC地址表的老化时间为500s[H3C]displaymac-address[H3C]displayarp[H3C]mac-addressport-binding H-H-H interface Ethernet 0/1 vlan 1 配置端口邦定[H3C]displaymac-address port-binding[H3C]displaysaved-configuration[H3C]displaycurrent-configuration<H3C>save[H3C]restoredefault 恢复交换机出厂默认配置,恢复后需重启才能生效[H3C]displayversion<H3C>reboot[H3C]displaydevice[H3C]sysnamebigheap[H3C]info-centerenable 启用系统日志功能,缺省情况下启用[H3C]info-centerloghost ip 192.168.0.3 向指定日志主机(只能为UNIX或LINUX,不能为Windows)输出信息,需先开启日志功能,缺省关闭[H3C]info-centerloghost level 8 设置系统日志级别为8,默认为 5.级别说明:1.emergencies2.alerts 3.critical 4.errors 5.warnings 6.notifications rmational8.debugging<H3C>terminaldebugging 启用控制台对调试信息的显示,缺省控制台为禁用<H3C>terminallogging 启用控制台对日志信息的显示,缺省控制台为启用<H3C>terminaltrapping 启用控制台对告警信息的显示,缺省控制台为启用[H3C]displayinfo-center 显示系统日志的配置和缓冲区记录的信息[H3C]displaylogbuffer 显示日志缓冲区最近记录的指定数目的日志信息[H3C]displaytrapbuffer 显示告警缓冲区最近记录的指定数目的日志信息<H3C>resetlogbuffer 清除日志缓冲区的信息<H3C>resettrapbuffer 清除告警缓冲区的信息六、案例:某公司有一台三层交换机、两台二层交换机,给每个部门划分不用VLAN,但是VLAN要互联,三层到二层交换机为了防止单线故障使用链路聚合,vlan2为销售部,vlan3为财务部。

H3C华三交换机基本配置命令大全,别到用的时候找不到了

H3C华三交换机基本配置命令大全,别到用的时候找不到了

H3C华三交换机基本配置命令大全,别到用的时候找不到了!本期我们一起来学习一下H3C最详细的基础命令。

一、不知道密码,如何恢复出厂设置1、开机启动,Ctrl+B进入bootrom菜单,选择恢复出厂设置。

2、用com线连上电脑,用超级终端进入,然后重启电脑,看提示按ctrl+b 进入bootrom模式,然后按照菜单提示删除flash中的.cfg文件,然后重启就可以了。

二、将Trunk端口添加到vlan中Trunk端口可以允许多个VLAN通过,也就是可以加入多个VLAN,所以Trunk 端口的VLAN加入不可能是一个一个地加,而是采取批量添加的方式进行。

但只能在以太网端口视图下进行配置,配置步骤如表7-11所示。

【示例1】使用port trunk permit vlan命令将中继端口Ethernet2/0/1加入到2、6、10、50~100 VLAN中。

1. <H3C> system-view2. System View: return to User View with Ctrl+Z.3. [H3C] interface Ethernet2/0/14. [H3C-Ethernet2/0/1] port trunk permit vlan 2 6 10 50 to 100【示例2】使用undo port trunk permit vlan命令将中继端口Ethernet2/0/1从VLAN 1中删除。

三、H3C交换机基础配置说明1、以太网端口的链路类型Access link:只能允许某一个vlan的untagged数据流通过。

Trunk link:允许多个vlan的tagged数据流和某一个vlan的untagged数据流通过。

Hybrid link:允许多个vlan的tagged数据流和多个vlan的untagged数据流通过。

hybrid link端口可以允许多个vlan的报文发送时不携带标签,而Trunk端口只允许缺省vlan的报文发送时不携带标签。

华三交换机端口IP-MAC地址绑定

H3C交换机端口绑定IP+MAC的思路及配置客户的一个新项目,最近需要在H3C的交换机上做端口+IP+MAC绑定,最终目的是为了实现上网控制,大家都知道这是一件很繁琐的工作,前期要收集好MAC+IP+端口还有使用人的信息,客户终端有500台左右,所以前期收集资料的工作量蛮大,本来告诉客户在上网行为管理设备上做用户名密码认证+ARP绑定的方式,但客户说之前在核心交换机上做过ARP绑定,但有些人把本地的IP和MAC修改为与能上网的电脑IP和MAC一模一样,这样两台机器相当于同一台机器一样,都能同时在线上网了,也不会报IP地址冲突,只是上网速度会有一定的影响(会有丢包),若其中一台电脑不在线,另一台修改过得电脑上网完全没有影响。

结合上网行为管理设备做用户名和密码认证,用户又说怕能上网的那些人把自己的用户名和密码告诉别人,没办法彻底控制!晕现在基本上只能按照他们的要求去在接入层交换机上做端口+IP+MAC绑定了,接入层交换机有两种型号:S5120-52C-EI和S3100V2-16TP-EI,看了一下两种交换机都支持这种端口+IP+MAC的绑定方式,那就根据客户的需求来干吧~ 以下是总体思路和方法:首先,收集各终端的IP+MAC+端口信息以及使用人信息(估计3个工作日的时间),并做好记录;然后,在各台接入层交换机上根据前面收集到的信息就行配置(2个工作日左右),下面我们看一下配置:(1)1个端口下只有一台电脑的绑定方法如IP地址为10.100.10.2 ,MAC地址为00-1A-4D-1E-39-2D 的电脑接在交换机的G1/0/2端口,那么可以进行如下配置:interface GigabitEthernet 1/0/2 首先进入2号端口user-bind ip-addr 10.100.10.2 mac-addr 001A-4D1E-392D 绑定IP和MAC(2)1个端口下接了一个小交换机的绑定方式如:1号端口下接了一个8口的小交换机,交换机接有3台电脑,3台电脑的IP和MAC如下1电脑的IP:10.100.11.2 MAC:00-1A-4D-1E-39-812电脑的IP:10.100.11.3 MAC:00-1A-4D-1E-39-8E3电脑的IP:10.100.11.4 MAC:00-1A-4D-1E-39-8F那么这三台电脑都需要进行捆绑,可以进行如下配置:interface GigabitEthernet 1/0/1 首先进入1端口user-bind mac-addr 001a-4d1e-3981 ip-addr 10.100.11.2user-bind mac-addr 001a-4d1e-398e ip-addr 10.100.11.3user-bind mac-addr 001a-4d1e-398f ip-addr 10.100.11.4(3)若端口下没有接任何设备,那么当新接入一台终端后,就没有IP+MAC地址的限制了,就有可能会正常上网,因此还需要在这些空闲端口上关掉MAC地址自动学习的功能,命令如下:interface GigabitEthernet 1/0/20 首先进入空闲的20号端口mac-address mac-learning disable 关掉此端口的MAC地址学习功能最后,抽几台电脑进行测试,更改IP或MAC或端口,看看是否满足客户需求,但这里有一点要说明的是对于上面第二种情况,若端口接了一个小交换机或HUB,其中一台不能上网的电脑把IP和MAC修改为同接在一台小交换机上的可以上网的电脑的IP和MAC,也是可以上网的,现象就是同时在线会网速慢丢包,不同时在线是没有影响的。

华三交换机端口镜像[新版]

华3多型号交换机端口镜像配置方法华3多型号交换机端口镜像配置方法有不少朋友在问华为交换机镜像方面的问题。

通过本人现有的资料和文档,现把各种型号的交换机镜像方法总结一下。

以便各位朋友能够方便查阅!我想在学会配置之前,对于端口镜像的基本概念还是要一定的了解吧!一、端口镜像概念:Port Mirror(端口镜像)是用于进行网络性能监测。

可以这样理解:在端口A 和端口B 之间建立镜像关系,这样,通过端口A 传输的数据将同时复制到端口B ,以便于在端口B 上连接的分析仪或者分析软件进行性能分析或故障判断。

二、端口镜像配置『环境配置参数』1. PC1接在交换机E0/1端口,IP地址1.1.1.1/242. PC2接在交换机E0/2端口,IP地址2.2.2.2/243. E0/24为交换机上行端口4. Server接在交换机E0/8端口,该端口作为镜像端口『组网需求』1. 通过交换机端口镜像的功能使用server对两台pc的业务报文进行监控。

2. 按照镜像的不**式进行配置:1) 基于端口的镜像2) 基于流的镜像2 数据配置步骤『端口镜像的数据流程』基于端口的镜像是把被镜像端口的进出数据报文完全拷贝一份到镜像端口,这样来进行流量观测或者故障定位。

【3026等交换机镜像】S2008/S2016/S2026/S2403H/S3026等交换机支持的都是基于端口的镜像,有两种方法:方法一1. 配置镜像(观测)端口[SwitchA]monitor-port e0/82. 配置被镜像端口[SwitchA]port mirror Ethernet 0/1 to Ethernet 0/2方法二1. 可以一次性定义镜像和被镜像端口[SwitchA]port mirror Ethernet 0/1 to Ethernet 0/2 observing-port Ethernet 0/8【8016交换机端口镜像配置】1. 假设8016交换机镜像端口为E1/0/15,被镜像端口为E1/0/0,设置端口1/0/15为端口镜像的观测端口。

华三路由器交换机配置命令

路由器:1、进入SETUP模式Router#setup2、时间设置router#clock set hh:mm:ss date moth year3、 router>show historyRouter>terminal history size lines4、 router#show version5、 router#show running-config6、 router#show starup-config7、 router(config)#hostname name 主机命名8、 router(config)#banner motd # message # 开机时的固定显示信息9、 router(config)#enable password password 特权模式明文密码10、 router(config)#no enable password11、 router(config)#enable secret password 特权模式加密密码12、 router(config)#no enable secret13、 router(config)#service password-encryption特权模式把明文密码加密密码,但没enable secret安全可以反解14、 router(config)#line console控制台密码15、 router(config-line)#login16、 router(config-line)#password password17、 router(config-line)#exec-timeout mm ss 禁止控制台会话自动退出18、 router(config-line)#logging synchronous重显被打乱的控制台输入router(config)#no ip domain-lookup 禁止域名解析19、 router(config)#line vty 0 4虚拟终端密码20、 router(config-line)#login21、 router(config-line)#password password22、 router(config)#interface type number(slot/port)端口设置23、 router(config-if)#ip address ip summast24、 router(config-if)#clock rate 64000(时钟频率单位为bps,只在DCE端设置)25、 router(config-if)#bandwith 64(带宽设置,单位为KB)26、 router(config-if)#no shutdown(shutdown)27、 router(config-if )#media-type type(10base) 为以太网端口选择适当的介质类型28、 router(config-if )#ctrl+z保存退出到特权模式29、 router#30、 router>用户模式enable进入router#特权模式config terminal进入router(config)#全局配置模式31、Interface Router(config-if)#端口设置Subinterface Router(config-subif)# 子端口设置Controller Router(config-controller)# 控制口设置Line Router(config-line)# 虚拟口设置Router Router(config-router)# 路由设置IPX router Router(config-ipx-router)#IPX路由设置32、 router#show interface33、 router#show interface Ethernet 034、 router#show interface serial 035、 router#show running-config36、 router#show starup-config37、 router#show flash38、 router#show controller39、 router#show controller interface type40、 router#show running-configrouter#copy running-config starup-configrouter#copy running-config tftprouter#copy starup-config tftprouter#copy flash tftprouter#copy tftp star-configrouter#copy tftp flash--------------------------------------------------------------------------------端口状态Serial1 is up, line protocol is up正常工作Serial1 is up, line protocol is down连接问题Serial1 is down, line protocol is down端口问题Serial1 is administratively down, line protocol is down人为关闭配置寄存器的值1、关闭路由器的电源重新启动按住ctrl+break键入进2、>3、>o/r 0×2142(跳过nvarm启动恢复密码)4、>I5、当系统提示是否进入setup模式时,按N6、 router>7、 router>enable8、 router#9、进入修改后(包括密码、寄存器的值:0×2100为rom monitor启动、0×2101为setup 模式启动、0×2102为10、 router#copy running-config starup-config11、 router#reload12、也可以在router#setup进入setup模式静态路由协议设置router(config)#ip route network submask(要到达的网络号掩码)ip address(下一跳或出口ip地址)router(config)#ip route 0.0.0.0 s0(出口端口或下一跳IP地址)rip设置router(config)#router riprouter(config-router)#network network-numberrouter#show ip protocol查看RIP信息router#show ip route 查看路由表router#debug ip rip查看RIP更新信息router(config-router)#passive-interface e0(阻止发出作息)router(config-router)#ip rip receive version 1 2接收1、2RIP版本信息igrp设置router(config)#router igrp as numberrouter(config-router)#network network numberrouter#show ip route 查看路由表router#debug ip igrp events 查看IGRP路由更新大概信息router#debug ip igrp transaction 查看IGRP路由更新详细信息Router(config-router)#variance multiplier 控制 IGRP load balancingRouter(config-router)#traffic-share {balanced | min}控制load-balanced traffic 的分布eigrp设置router(config)#router eigrp as numberrouter(config-router)#network network numberrouter(config)#no auto-summry 关闭自动汇总router(config)# auto-summry 打开自动汇总(默认是打开的)router#show ip route eigrp 显示当前的路由表里的EIGRP条目router#show ip protocol 显示活动的路由协议进程的参数和当前的状态router#show ip eigrp neighbors 显示被EIGRP发现的邻居router#show ip eigrp traffic 显示发出和收到的IP EIGRP 包的数量router#show ip eigrp topology 显示IP EIGRP的拓扑表Router#debug ip eigrpospf设置1. Router(config)#router ospf process-idRouter(config-router)#network address(可以是网络号也可以是Ip地址 mask(通配掩码)area area-idRouter(config-if)# ip ospf priority numbe 配置OSPF的优先级Router#show ip protocols 验证OSPF的配置Router#show ip route 显示路由器学到的所有路由Router#show ip ospf interface type number 显示 area-ID 和邻接信息Router#show ip ospf neighbor 基于每接口显示OSPF邻居信息Router#debug ip ospf eventsRouter#debug ip ospf packet2. Router(config)# interface loopback number(lookback回路配置)Router(config-if)# ip address ip-address subnet-maskRouter(config-if)# ip ospf cost cost-numbe 修改OSPF 的Cost数值Router(config-if)# ip ospf authentication-key key 配置明文口令Router(config-if)# ip ospf messge-digest-key keyid md5 key 配置MD5口令(keyid和key必须配对一致,两邻居才可以通信)Router(config-route)# area area-id authentication [message-digest]message-digest为可选项,使用后路由器只传送口令消息的摘要(或散列)配置OSPF区域的验证:3. Router(config-if)# ip ospf hello-interval seconds 配置hello间隔:Router(config-if)# ip ospf dead-interval seconds配置down机判断间隔--------------------------------------------------------------------------------访问列表1.标准访问列表(standard access lists):只使用源IP地址来做过滤决定Router(config)#access-list 10 deny 172.16.40.0 0.0.0.255Router(config)#access-list 10 permit anyRouter(config)#int e1Router(config-if)#ip access-group 10 out使用IP标准ACL来控制VTY线路的访问.Router(config)#access-list 50 permit 172.16.10.3Router(config)#line vty 0 4Router(config-line)#access-class 50 in删除IP标准ACLRouter(config-line)#no ip access-class 50 inRouter(config)#no access-list 502.扩展访问列表(extended access lists):它比较源IP地址和目标IP地址,层3的协议字段,层4端口号来做过滤决定Router(config)#access-list 110 deny tcp any host 172.16.30.5 eq 21Router(config)#access-list 110 deny tcp any host 172.16.30.5 eq 23Router(config)#access-list 110 permit ip any anyRouter(config)#int e1Router(config-if)#ip access-group 110 out3.虚拟通道访问router(config)#access-list 12 permit 192.89.55.0 0.0.0.255router(config)#line vty 0 4outer(config-line)#access-class 12 in3.show ip interface:只显示IP访问列表信息4.show ip interface:显示所有接口的信息和配置的ACL信息5.show ip interface [接口号]:显示具体某个接口的信息和配置的ACL信息6.show running-config:显示DRAM信息和ACL信息,以及接口对ACL的应用信息. 交换机配置交换机上设置登陆口令Switch(config)# enable password level level passwordSwitch(config)# no enable password level level passwordhostname1900/2900(config)#hostname hostnameIP Address1900(config)#ip address {ip address} {mask}1900(config)#ip address 10.5.5.11 255.255.255.02950(config#interface vlan 12950(config-if)#ip address {ip_address} {mask}2950(config)#interface vlan 12950(config-if)#ip address 10.5.5.11 255.255.255.0default gateway1900/2950(config)#ip default-gateway {ip address}1900/2950(config)#ip default-gateway 172.20.137.1查看交换机的IP地址1900#show ipIP address: 10.5.5.11Subnet mask: 255.255.255.0Default gateway: 10.5.5.3Management VLAN: 12950#show interface vlan 1Vlan1 is up, line protocol is upHardware is Cat5k Virtual Ethernet, address is 0010.f6a9.9800 (bia 0010.f6a9.9800) Internet address is 172.16.80.79/24Broadcast address is 255.255.255.255设置双工选项1900(config)#interface e0/11900(config-if)#duplex {auto | full |full-flow-control | half}2950(config)#interface fe0/12950(config-if)#duplex {auto | full | half}设置端口速度:switch(config-if)# speed {10|100|auto}查勘双工选项Switch#show interfaces fastethernet0/3查看MAC地址表1900/2950#show mac-address-table配置永久MAC地址1900(config)#mac-address-table permanent {mac-address type module/port}1900(config)#mac-address-table permanent 2222.2222.2222 ethernet 0/31900#show mac-address-table2950(config)#mac-address-table static mac_addr {vlan vlan_id} [interface int1 [int2 ... int15]]--------------------------------------------------------------------------------配置受限静态MAC地址1900(config)#mac-address-table restricted static {mac-address type module/port src-if-list}1900(config)#mac-address-table restricted static 1111.1111.1111 e0/4 e0/11900#show mac-address-table2950(config)#mac-address-table secure mac-addr interface [vlan vlan-id]2950(config)#mac-address-table secure 0003.3333.3333 fa 0/1 vlan 12950#show mac-address-table配置端口安全性1900(config-if)#port secure max-mac-count count1900(config)#interface e0/41900(config-if)#port secure1900(config-if)#port secure max-mac-count 11900(config)#address-violation {suspend | disable | ignore1900# show mac-address-table security2950(config-if)#port security max-mac-count count2950(config)#interface fa0/12950(config-if)#port security2950(config-if)#port security max-mac-count 102950(config-if)#port security action {shutdown | trap} 2950#show mac-address-table secure2950#show port-security管理配置文件1900#copy nvram tftp://host/dst_file1900#copy tftp://host/src_file nvram1950#copy nvram tftp://10.1.1.1/wgswd.cfg2950#copy startup-config tftp://host/dst_file清除 NVRAM1900#delete nvram2950#erase startup-configvlan配置1900 VLAN建立1900下,使用vlan [vlan#] name [name] [vlan#]命令, 如下: >en#config t(config)#hostname 19001900(config)#vlan 2 name sales1900(config)#vlan 3 name marketing1900(config)#vlan 4 name mis1900(config)#exit端口分配1900(config)#int e0/21900(config-if)#vlan-membership static 21900(config)#int e0/41900(config-if)#vlan-membership static 31900(config)#int e0/51900(config-if)#vlan-membership static 41900(config-if)#exit1900(config)#exitVLAN验证1900#sh vlan2900 VLAN建立在2950下创建VLAN,在特权模式下使用vlan database命令2950#vlan database2950(vlan)#vlan 2 name MarketingVLAN 2 modified:Name: Marketing2950(vlan)#vlan 3 name AccountingVLAN 3 added:Name: Accounting2950(vlan)#applyAPPLY complete2950(vlan)#Ctrl+C2950#端口分配2950下的端口配置,使用switchport access vlan [vlan#]命令, 2950(config-if)#int f0/22950(config-if)#switchport access vlan 22950(config-if)#int f0/32950(config-if)#switchport access vlan 32950(config-if)#int f0/42950(config-if)#switchport access vlan 42950(config-if)#exit2950(config)#exit验证配置信息,如下:2950#sh vlan或2950#sh vlan brieftrunk配置1900 trunk配置1900(config)#int f0/261900(config-if)#trunk on2950下在接口配置模式,使用switchport命令,如下:2950(config)#int f0/122950(config-if)#switchport mode trunk2950(config-if)# switchport trunk encapsulation {isl|dot1q}2950(config-if)#^Z将某VLAN从中继中删除2950(config-if)# switchport trunk allowed vlan remove vlan-list添加某个VLAN到中继线路2950(config-if)# switchport trunk allowed vlan add vlan-listConfiguring Inter-VLAN Routing给连接1900的trunk端口配置,使用encapsulation isl [vlan#]命令,如下:2600Router(config)#int f0/0.12600Router(config-subif)#encapsulation isl [vlan#]2600Router(config-subif)#ip add ip add submask给连接2950的这样配置,如下:2600Router(config)#int f0/0.12600Router(config-subif)#encapsulation dot1q [vlan#]2600Router(config-subif)#ip add ip add submask--------------------------------------------------------------------------------VTP配置1900(config)#vtp server1900(config)#vtp domain noco1900(config)#vtp password noko在特权模式下使用show vtp命令验证,如下:1900#sh vtpVTP version: 1Configuration revision: 0Maximum VLANs supported locally: 1005Number of existing VLANs: 5VTP domain name: nocoVTP password: nokoVTP operating mode: Server2950如下:2950(config)#vtp mode server2950(config)#vtp domain noco验证信息,如下:2950#sh vtp ?counters VTP statisticsstatus VTP domain status2950#sh vtp statusNAT配置配置静态转换Router(config)#ip nat inside source static local-ip global-ipRouter(config-if)#ip nat insideRouter(config-if)#ip nat outside配置动态地址转换Router(config)#ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}Router(config)#access-list access-list-number permit source [source-wildcard]Router(config)#ip nat inside source listaccess-list-number pool name配置OverloadingRouter(config)#access-list access-list-number permitsource source-wildcardRouter(config)#ip nat inside source listaccess-list-number interface interface overload清除NAT Translation TableRouter#clear ip nat translation * 清除所有的动态地址转换条目Router#clear ip nat translation inside global-iplocal-ip [outside local-ip global-ip] 清除一个简单的动态地址转换条目(内、外)Router#clear ip nat translation outsidelocal-ip global-ip清除一个简单的动态地址转换(外)Router#clear ip nat translation protocol inside global-ipglobal-port local-ip local-port [outside local-iplocal-port global-ip global-port] 清除一个扩展动态地址转换条目Show命令输出信息Router#show ip nat translations------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------交换机:1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(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)# de脚本ion de脚本ion-string基于CLI的交换机的端口描述:switch(enable)set port name module/number de脚本ion-string6.在基于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 databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]--------------------------------------------------------------------------------10.在基于IOS的交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name]11.在基于IOS的交换机上配置VTP 模式:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(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 databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于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 costswitch(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 {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans]17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)# spanning-tree [vlan vlan-list] forward-time secondsswitch(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 {module/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 cv21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]--------------------------------------------------------------------------------25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf{ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令:ATM (config)# interface atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name …--------------------------------------------------------------------------------30. 创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# de脚本ion de脚本ion-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# …--------------------------------------------------------------------------------40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number ()41. 配置默认路由:switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP:router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mls rp management-interface47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl--------------------------------------------------------------------------------51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。

华三交换机端口安全操作


i
H3C S5500-EI 系列以太网交换机 操作手册 端口安全
第 1 章 端口安全配置
第1章 端口安全配置
1.1 端口安全简介
1.1.1 概述
端口安全是一种基于 MAC 地址对网络接入进行控制的安全机制,是对已有的 802.1x 认证和 MAC 地址认证的扩充。这种机制通过检测数据帧中的源 MAC 地址来控制非 授权设备对网络的访问,通过检测数据帧中的目的 MAC 地址来控制对非授权设备 的访问。 端口安全的主要功能是通过定义各种端口安全模式,让设备学习到合法的源 MAC 地址,以达到相应的网络管理效果。启动了端口安全功能之后,当发现非法报文时, 系统将触发相应特性,并按照预先指定的方式进行处理,既方便用户的管理又提高 了系统的安全性。 非法报文包括: z 禁止 MAC 地址学习时,收到的源 MAC 地址为未知 MAC 的报文; z 端口学习到的 MAC 地址达到端口所允许的最大 MAC 地址数后,收到的源
安全模式类型 noRestrictions
autoLearn secure userLogin
表1-1 端口安全模式描述表
描述无限制状态
此时 NeedToKnow 特 性和入侵检测特 性无效
此模式下,端口学习到的 MAC 地址被保存在安全 MAC 地址表项中;
当端口下的安全 MAC 地址数超过端口允许学习的最 大安全 MAC 地址数后,端口模式会自动转变为 secure 模式。之后,该端口不会再添加新的安全 MAC,只有 源 MAC 地址为安全 MAC 地址、已配置的静态 MAC 地址的报文,才能通过该端口
禁止端口学习 MAC 地址,只有源 MAC 地址为端口上 的安全 MAC 地址、已配置的静态 MAC 地址的报文, 才能通过该端口
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
相关文档
最新文档