一、协议配置管理
1、启用/禁用端口
启用端口,相当于其他厂商的no shutdown:enable port <端口号>
关闭端口,相当于其他厂商的shutdown:disable port <端口号>
查看端口的状态:show port 2 information
2、link aggregation链路聚合
静态配置链路汇聚:enable share 1 grouping 1-2 show sharing//查看捆绑情况禁用链路汇聚:disable sharing 1
3、配置vlan相关
创建vlan的命令如下:Create vlan vlan10给vlan打标签,设置vlan号:Configure vlan “vlan10” tag 10//如果不配,系统会自动分配一个,不过自动分配不易管理,建议手动定义vlan id标签。
将端口加到缺省vlan中Configure vlan “default” add port 9
将端口加到其他vlan中,先要将这个端口从缺省vlan里拿出,因为一个端口不能同时属于两个vlan(trunk口除外):
Configure vlan “default” delete port 9
Configure vlan “vlan10” add port 9
配置这个vlan的3层IP地址:Configure vlan “vlan10” ipaddress 192.168.1.254/24
启用三层转发功能:enable ipforwarding//注意需要三层互通,必须要输入这个命令
看vlan相关参数:show vlan
4、配置802.1Q口
Extreme交换机对于802.1Q trunk的设置是以Tag的方式配置的,而且协议是标准的802.1Q。所以以太网口缺省都在untag的vlan default里(vlan1)。此时如果需要把这个端口做成trunk口,很简单的只需要将这个端口再增加带Tag的vlan就可以,这个trunk口需要透传几个vlan,就允许几个tag vlan。命令如下:Configure vlan “vlan10” add port 9 tag
5、配置ELRP防环路
在简单网络环境里面,可以通过以下命令来防止底层交换机端口成环:enable elrp-client configure elrp-client periodic vlan100 ports 1-48 interval 5 log disable-port permanent
6、配置端口隔离
通过以下命令可以使port_list里的端口之间的流量隔离:configure ports port_list isolation [on | off]
7、配置Jumbo Frame和MTU
如果需要交换机二层转发Jumbo Frame,使用以下命令:enable jumbo-frame port <all|port_list>
如果需要交换机在VLAN间三层转发大于1500的MTU,使用以下命令:configure IP-MTU <MTU Size (Default 1500)> VLAN <VLAN name>MTU 数值可以设置1500到9216。
8、STP(生成树配置)
推荐配置:
主核心交换机:
Conf vlan default add port 1-24 untag
create vlan sales tag 10
conf vlan sales add port 1-24 tag
create vlan marketing tag 20
conf vlan marketing add port 1-24 tag
conf forwarding L2-protocol fast-convergence off
conf stpd s0 mode dot1w
conf stpd S0 default-encapsulation dot1d
conf stpd s0 priority 4096
enable stpd s0 auto-bind vlan default
enable stpd s0 auto-bind vlan sales
enable stpd s0 auto-bind vlan marketing
conf stpd s0 tag 1
conf stpd s0 ports link-type point-to-point 1-24
enable stpd s0
备份核心交换机:
create vlan sales tag 10
conf vlan sales add port 1-24 tag
create vlan marketing tag 20
conf vlan marketing add port 1-24 tag
conf forwarding L2-protocol fast-convergence off
conf stpd s0 mode dot1w
conf stpd S0 default-encapsulation dot1d
conf stpd s0 priority 8192
enable stpd s0 auto-bind vlan default
enable stpd s0 auto-bind vlan sales
enable stpd s0 auto-bind vlan marketing
conf stpd s0 tag 1
conf stpd s0 ports link-type point-to-point 1-24
enable stpd s0
接入交换机(1-24口接终端,25-26上连核心):
conf vlan default del port 1-24
conf vlan default add port 25,26 unt
create vlan sales tag 10
conf vlan sales add port 1-12 unt
conf vlan sales add port 25,26 tag
create vlan marketing tag 20
conf vlan marketing add port 13-24 unt
conf vlan marketing add port 25,26 tag
conf forwarding L2-protocol fast-convergence off
conf stpd s0 mode dot1w
conf stpd S0 default-encapsulation dot1d
enable stpd s0 auto-bind vlan default
conf stpd s0 add sales port 25,26
conf stpd s0 add marketing port 25,26
conf stpd s0 tag 1
conf stpd s0 ports link-type point-to-point 25,26
enable stpd s0
注意:1-24口可以通过ELRP防止环路
9、VRRP(虚拟网关技术)
VRRP是一种网关冗余技术。如果主网关故障,备交换机会接管主交换机成为主网关,当主网关恢复后又重新接管业务。
主网关上的配置如下:configure vlan vlan1 ipaddress 192.168.1.254/24 create vrrp vlan vlan1 vrid 1//创建vrid为1的vrrp组configure vrrp vlan vlan1 vrid 1 prioirty 255//优先级设成255,作为主网关。数字越大优先级越高。不配这个优先级的话缺省100,所以在备网关上一般就不用做这个配置了。
configure vrrp vlan vlan1 vrid 1 add 192.168.1.254//配置网关的IP,在主网关上配的IP实际上和这个vlan的IP是相同的。备网关选择一个不同的IP。enable vrrp//启用这个VRRP。
备网关上的配置如下:
configure vlan vlan1 ipaddress 192.168.1.253/24
create vrrp vlan vlan1 vrid 1
configure vrrp vlan vlan1 vrid 1 add 192.168.1.254
enable vrrp
注意:不同的vlan可以使用一样的vrid号。
10、DHCP服务器(超过200个客户端建议用专门的DHCP服务器)
configure vlan test1 ipaddress 192.168.15.1/24
configure vlan test1 dhcp-address-range 192.168.15.10 - 192.168.15.20
configure vlan test1 dhcp-options default-gateway 192.168.15.1
configure vlan test1 dhcp-options dns-server 8.8.8.8
enable dhcp ports 1-4 vlan test
11、DHCP请求转发
实现方式:bootprelay DHCP client-------DHCP Relay Switch A -------DHCP Server
vlan:test vlanDS-3 ip:2.2.2.26
configure bootprelay add 2.2.2.26 vr VR-Default
enable bootprelay vlan test
enable bootprelay vlan DS-3
enable bootprelay vr "VR-Default"
12、查询/创建静态路由
创建普通的静态路由如下:configure iproute add 10.255.2.0 255.255.255.0 192.168.254.253
创建缺省静态路由如下:configure iproute add default 192.168.252.253
(防火墙上要做回指路由)
查询路由的命令如下:Show iproute
unconfigure access-list ports +具体端口号
unconfigure access-list vlan +vlan名字
check policy acltest //传入交换机后可以用本命令检查语法错误
refresh policy acltest //如果修改过acl,需要用此命令刷新一下后才能使修改部分生效
tftp 10.120.80.135 -v "VR-Default" -g -l acltest.pol -r acltest.polls//本命令检查acl有没有成功上传到交换机上
在本地编辑ACL:Edit policy <filename>
i To insert text ahead of the initial cursor position
a To append text after the initial cursor position
dd To delete the current line
yy To copy the current line
p To paste the line copied
:w To write (save) the file
:q To quit the file if no changes were made
:q! To forcefully quit the file without saving changes
:wq To write and quit the file
ACL文件的样本:
entry udprule {
if {
source-address 10.203.134.0/24;
destination-address 140.158.18.16/32;
protocol udp;
source-port 190;
destination-port 1200 - 1250;
} then {
deny;
}
}
entry icmprule {
if {
source-address 10.203.134.0/24;
protocol icmp;
icmp-type echo-request;
} then {
deny;
count icmpcnt;
}
}
13、物理端口和IP/MAC地址静态绑定
物理端口和IP/MAC地址手工绑定可以使用静态ACL,也可以使用动态ACL,动态ACL的好处是可以在show config里看到ACL的内容,举例如下:
create access-list permit1066 " source-address 192.168.10.66/32 ; ethernet-source-address 2C:16:DB:A0:DF:CF ;" " permit ;" application "Cli"
create access-list denyall " source-address 0.0.0.0/0 ;" " deny ;" application "Cli"
configure access-list add permit1066 first ports 1
configure access-list add denyall last ports 1
14、DHCP snooping和端口动态IP/MAC绑定
1. 配置DHCP Server信任端口和IP地址
configure trusted-port <PORT#> trust-for dhcp-server
configure trusted-servers vlan <VLAN NAME> add server <DHCP SERVER IP> trust-for dhcp-server
2. 配置DHCP Snooping
enable ip-security dhcp-snooping vlan <VLAN NAME> ports [ALL | <PORT-LIST>] violation-action drop-packet [block-mac | block-port | snmp-trap] [duration <duration_in_seconds> | permantently]
3. 配置IP端口根据dhcp snooping信息自动绑定
enable ip-security source-ip-lockdown ports [all | ports]
15、组播
交换机二层组播(IGMP, IGMP SNOOPING)默认是打开的。但需要在交换机上给跑组播应用的VLAN配置IP地址,以启动IGMP协议。
如果让交换机不过滤组播报文,可以执行:
Disable igmp
Disable igmp snooping
16、端口镜像
configure mirror <mirror_name> to <port number> (镜像数据包发送到的目的端口)
configure mirror <mirror_name> add VLAN <vlan_name> ingress (镜像某VLAN的数据包)
configure mirror <mirror_name> add port <port-number> ingress and egress (镜像某些端口的数据包)
enable mirror <mirror_name>
enable mirroring to port-list 1:27, 1:37, 1:47 loopback-port 1:1
configure mirroring add port 1:9 ingress-and-egress
configure mirroring add vlan v250
17、OSPF
如果不是使用area 0.0.0.0,需要新创建一个area(建议新开局使用area 0.0.0.0):create ospf area <area-id>
对于需要交换机OSPF路由信息的VLAN:configure ospf add vlan vlan2001 area <area-id> link-type point-to-point
对于交换机直连的VLAN:configure ospf add vlan vlan1101 area <area-id> passive
配置routerid(可选):
create vlan "lo0"
enable loopback-mode vlan lo0
configure vlan lo0 ipaddress 172.16.0.1 255.255.255.255
configure ospf routerid 172.16.0.1
启动OSPF:
enable ospf
18、策略路由PBR
配置例子:源地址是10.30.26.0/24的数据包,重定向到10.30.24.50
1. 把10.30.24.50设置为ARP表的静态条目(可选)
config iparp add 10.30.24.50 vr vr-d xx:xx:xx:xx:xx:xx
2. 编辑policy
edit policy leagsoft100
entry leagsoft100 {
if {
source-address 10.30.26.0/24;
} then {
redirect 10.30.24.50;
count leagsoft;
}
}
3. 在端口上应用policy
configure access-list leagsoft100 port 1:1 ingress
4. 查看计数(可选)
show access-list counter
故障排除
比如,POE功能故障,端口无法使用请先检查硬件
可以用以下命令让交换机自动做故障检测:
run diagnostics extended (此命令会重启交换机)
如果发现如下内容,申请返修
邮件标题请使用英文方括号产品类型加故障现象,比如:
[SUMMIT] X430-24p POE故障
邮件发送到support@extremenetworks.com,尽可能在邮件正文描述清楚故障详情。
上一步没看到问题,那么可能是软件故障,请使用 show tech 保存CRT LOG日志:
Show tech
然后发给上面的技术支持邮箱。
自助解决故障可以在Extreme Portal 的 GTAC Knowledge 查询关键字。