华为5700交换机配置命令备忘录

sys
sysname 3SW004
aaa
local-user admin password cipher abc123
local-user admin  service-type telnet http ssh
local-user admin privilege level 15
quit
user-interface vty 0 4
authentication-mode aaa
q
gvrp
undo auto enablephp

int vlan1
ip addr 192.168.1.22 24
q
interface GigabitEthernet0/0/21
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
interface GigabitEthernet0/0/22
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
interface GigabitEthernet0/0/23
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
interface GigabitEthernet0/0/24
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
interface GigabitEthernet0/0/25
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
interface GigabitEthernet0/0/26
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
interface GigabitEthernet0/0/27
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
#
interface GigabitEthernet0/0/28
port link-type trunk
port trunk allow-pass vlan 2 to 4094
gvrp
q
ip route-static 0.0.0.0 0.0.0.0 192.168.1.254html

http server load s5700s-li-v200r001c00.001.web.zip
http server enableweb

q缓存

save安全

 

New服务器

=====华为交换机CDP=============网络

首先要在全部的设备上用"ndp enable"命令启用NDP(Neighbor Discovery Protocol)。ssh

而后用"display ndp"命令就能够查看各接口下链接设备的信息了。ide

若是只是画网络拓扑,能够找些免费或试用版网管软件来自动绘制,好比《falconet网络管理软件》:
http://gzcnc.onlinedown.net/soft/39414.htmoop

=====如何查找华为交换机对应端口下设备的IP地址(总结)=============

以前发了一个贴,是为了寻求你们的帮助,具体状况看下面的连接吧!
http://bbs.51cto.com/viewthread.php?tid=817762
在这里呢,要多谢几位好童鞋的帮助,名字我就很少说了,只要是在上面帖子中发言的,俺都要感谢!呵呵。。。
接下来呢,我就总结下,关于知道交换机的某个端口号以后,想要查询其链接设备的IP地址的方法:
好比咱们如今想查询交换机E0/16这个端口下,所链接的服务器的IP地址。首先,在此交换机上,运行命令,DIS MAC-ADDRESS INTERFACE E0/16,查出服务器的MAC地址,而后进入三层交换机上,运行命令,DIS ARP | INCLUDE XXX(XXX是指服务器的MAC地址),这样就能查出对应的IP地址了!
在这里,运行此命令的时候(DIS MAC-ADDRESS INTERFACE E0/16),有可能会显示不出MAC地址,怎么办呢?呵呵,这个时候,在你所连的PC上,PING一下你的网关设备,即这里的三层交换机,再运行那个命令,就能显示出MAC地址了!
好了,一个不是很困难、不是很复杂的问题,可是对于我这个刚接触华为的新手来讲,仍是蛮收益的,总结就到这里吧!再次感谢全部回帖的朋友们。。。

在s2000上找到这个端口对应的MAC地址,在去三层上用ARP找到IP

思科的命令是
show mac table inte  fa 0/XX
show  ip arp HHH.HHH.HHH


=====华为S3300 S2300系列交换机 作IP、mac、端口三绑定=============
#
sysname S-switch-A
#
vlan batch 3
#
arp static 10.2.2.3 00e0-fc01-0000 vid 3 interface Ethernet0/0/1
#
interface Vlanif3
ip address 10.2.2.2 255.0.0.0
#
interface Ethernet 0/0/1
port trunk allow-pass vlan 3
#
return
上面应该是你要的。下面也有更全面的。

mac-address static 2-2-2 GigabitEthernet0/0/1 vlan 2
MAC+VLAN的绑定

dhcp snooping bind-table static ip-address 10.10.10.2 mac-address 0028-0120-0327 interface GigabitEthernet0/0/1
DHCP表的绑定

mac-address restrict
#
interface GigabitEthernet0/0/1
mac-table limit 100
port-security enable
port-security protect-action shutdown

常规端口安全配置

第二种方法:
1.直接在物理接口上:Interface Ethernet 0/0/1
User-bind static ip-address 1.1.1.1 mac-address 1111-11111-1111
须要把每一个接入到交换机接口的PC进行绑定
2.上网不能够在交换机换上作设置 能够到路由器和防火墙上作设置。若是在交换机上作了绑定 只能绑定的这个电脑只能使用绑定的IP才能通信。
3.通常支持网管的交换机好像均可以.主要看他支不支持。 IP和MAC的绑定功能能够网管2层搜索交换机都有 3层交换机更不用说了

 

 

一、若是咱们在华为防火墙的dhcp中配置静态ip绑定时提示已经存在于租约中时,请按如下操做。

首先在用户视图模式下清除DHCP动态地址绑定信息,命令以下:

<usg5120>reset dhcp server ip-in-use ip 192.168.1.106

 

二、若是出现:Error:The static-MAC is exist in this IP-pool. 这是三层交换机中的提示。

那么请在用户视图模式下用reset ip pool命令清除已存在的static-MAC对应的ip地址,

reset ip pool命令用来重置设备上已经配置的IP地址池。
命令格式:

reset ip pool { interface interface-name | name ip-pool-name } { low-ip-address high-ip-address | all | conflict | expired | used }

 

例如:reset ip pool interface Vlanif2 all

interface Vlanif2是个人current-configuration中name,不知道name是什么的就看current-configuration中显示。

 

最后咱们再配置静态ip绑定,注意进入接口模式再配置,命令以下:

[usg5120]dhcp server static-bind ip-address 192.168.1.106 mac-address 400e-8551-e90d

 

详解:

http://support.huawei.com/ecommunity/ask/10002059.html

http://bbs.51cto.com/thread-1009284-1.html

 

DHCP服务器配置显示和维护完成上述配置后,在任意视图下执行display命令,能够显示配置DHCP服务器后的运行状况。经过查看显示信息,用户能够验证配置的效果。在用户视图下使用reset命令清除DHCP服务器的相关信息。
表2-20 DHCP


服务器配置显示和维护

wKiom1M8y-SRE8BjAAMmoxmTOGQ142.jpg

 

 

继续完善命令:

S5700的配置文件备份和恢复。

wKioL1ORbLKh-NkIAABLGgsNV-o400.png

而后启动Tftpd32软件

输入如下命令备份配置文件:

<3SW002>tftp 192.168.1.119 put vrpcfg.zip

 

输入如下命令备份恢复文件:

<3SW002>tftp 192.168.1.119 get vrpcfg.zip

 

相似思科的show cdp neighbors功能:华为的是NDP

首先要在设备上用"ndp enable"命令启用NDP(Neighbor Discovery Protocol)。

而后用"display ndp"命令就能够查看各接口下链接设备的信息了。

 

==============================================

清除5700交换机的MAC缓存表

<CoreLayer-S5700-28C>system view
[CoreLayer-S5700-28C]mac-address update arp

另有一篇清除H3C交换机的MAC缓存表,能够供你们参考:

http://bbs.51cto.com/thread-876951-1.html 

 

端口绑定:

第一步:

 [CoreLayer-S5700-28C]user-bind static ip-address 192.168.1.120 mac-address 0025-ab57-4d21 interface GigabitEthernet0/0/13 vlan 1
[CoreLayer-S5700-28C]user-bind static ip-address 192.168.1.121 mac-address 0025-ab57-9d00 interface GigabitEthernet0/0/13 vlan 1

第二步:

[CoreLayer-S5700-28C]int g0/0/13

[CoreLayer-S5700-28C-GigabitEthernet0/0/13]ip source check user-bind enable

两步搞定。

相关文章
相关标签/搜索