Summit48 学习记录常用命令

Summit48 学习记录


常用命令:

upload config tftp 可上载配置文件

sh ver

sh config

有些extreme是用1:2这种方式表示端口的(如6808),1代表slot,2是端口
有些用1,2,3表示端口的,如:summit48 (叫Stand-alone交换机)

踢人:
先看看谁登录上了
show session
然后用clear session number

config account <username> 配置用户帐号

config banner

config ports <portlist> auto off {speed [10 | 100 | 配置端口
1000]} duplex [half | full]


config time <date> <time> 配置时间和日期:格式

mm/dd/yyyy hh:mm:ss

config vlan <name> ipaddress <ip_address> 配置vlan的ip地址
{<mask>}


create account [admin | user] <username> {<password>} 建立一个用户帐号,admin或者是user 普通模式

delete account <username> 删除帐号

delete vlan <name> 删除一个vlan

disable clipaging 关闭屏幕输出时候的暂停功能
enable 。。。。 开启

disable ports [<portlist> | all] 关闭一个端口,或所有端口

disable telnet 关闭telnet 方式访问交换机

disable web 关闭web方式访问交换机

enable telnet {access-profile [<access_profile> |
none]} {port <tcp_port_number>} 允许telnet访问

enable web {access-profile [<access_profile> |
none]} {port <tcp_port_number>} 允许web方式访问

show banner

unconfig switch {all} 恢复出厂值,但不包括用户改的时间和用户帐号信息

configure account 配置用户密码,不过首先你得先用create建立一个用户帐号才能用这个改密码 ExtremeWare支持2种级别的管理:user和administrator

config dns-client add <ipaddress> 配置一个dns server

ping {udp} {continuous} {size <start_size> {- <end_size>}} [<ip_address> | <hostname>]
{from <src_address> | with record-route | from <src_ipaddress> with record-route}

udp 是指用udp包代替icmp包来ping
continuos 连续ping
size 制定icmp包大小,如果start和end都设置的话,那么每发一个包就增加一个字节,如果制定开始100结尾200,那么第一次100,第二次101…… 如果没指定end则按开始包大小发
from 发送源端口

traceroute [<ip_address> | <hostname>] {from <src_ipaddress>} {ttl <TTL>} {port
<port>}
ttl 可指定ttl值
port 制定 udp端口号
show management 查看管理信息,以及snmp信息

config snmp add trapreceiver <ip address> {port <udp_port>} community <communitystring> {from <source ip address>} 配置snmp接收host和团体字符串

config snmp delete trapreceiver 这是删掉trap

config snmp access-profile readonly [<access_profile> | none]配置snmp的只读访问列表,none是去除
config snmp access-profile readwrite [<access_profile> | none]
这是控制读写控制

config snmp (add 6.22版本)community [readonly | readwrite] <string>控制只读和读写字符串 (在Extremeware Version 6.1.7 (Build 9)测试)


dhcp缺省在每个vlan的每个端口启用,用以下命令修改
enable dhcp ports <portlist> vlan <name>
disable dhcp ports <portlist> vlan <name>


config cpu-dos-protect [alert-threshold <packets per second>] [notice-threshold
<packets per second>] [timeout <seconds>] [messages [on | off] [filter-precedence
<number>] 配置拒绝服务保护


enable cpu-dos-protect 是dos保护功能启用
disable cpu-dos-protect

show cpu-dos-protect 显示配置信息 (以上为6。22版本)

config ip-mtu <size> vlan <vlan name> 配置mtuT的值可以设置为1500到9216



config slot <slot number> module [f32t | f32fi | f32f | f48t | f96t | g4x | g6x | g8x
| g8t | g12x | g12ts | wdmi] 在6808 BlackDiamond上配置slot

clear slot <slot number> 如果模块不匹配的话用这个命令清除配置

show slot {<slot number>}检查配置:卡的类型,当前工作状态,端口信息

配置交换机端口的速度,双工:
缺省是自动协商
config ports <portlist> auto off {speed [10 | 100 | 1000]} duplex [half | full]
auto off是关闭自动协商

负载均衡:
和cisco的FEC差不多,也是允许使用多个端口绑定在一起来增加带宽
有三种算法:
1. 基于端口。(默认)就是说可以用指定物理端口来转发流量进行负载均衡就是说把某几个端口的流量均衡一下
2. 基于地址,包括 ip地址,ipx地址等(推荐)用地址来进行负载均衡mac ip tcp udp都可以
config sharing address-based <l2 | l2_l3 | l2_l3_l4>
l2 表示用mac地址
l3表示用ip
l4表示tcp和udp端口号
show sharing address-based

3. 循环

配置负载均衡:
首先得建立一个负载均衡端口组,组中第一个端口配置为master逻辑端口,它代表这个组。在summit交换机上建立负载均衡可以:
1. 一个组中最多包含8个端口
2. 端口不用连续
定义一个负载均衡组,先分配一个组号,逻辑端口号,并使能这个组(不知道怎么说这句话)
enable sharing <port> grouping <portlist> {port-based | address-based | round-robin}
disable sharing <port>

负载均衡的例子:
enable sharing 9 grouping 9-12 #定义一个负载均衡组9,包括9-12端口
如果这些端口属于某个vlan,那么将会从vlan中删除

校验:show ports configuration

端口镜像:
什么是镜像就不用说了吧,cisco也有^_^
1. 物理端口,把这个端口的数据都复制到镜像端口中去
2. Vlan,把vlan的所有数据都复制到镜像口
3. 虚端口,vlan中指定端口复制到镜像口
一旦最为镜像口就不能上网了
例子:

enable mirroring to port 3 #选择3作为镜像口
config mirroring add port 1 #把端口1的流量发送到3
config mirroring add port 1 vlan default #把1和vlan default的流量都发送到3

交换机的vlan default包含所有的端口,就是说说有的端口都属于default(初始状态),并且所有口都是untagged,内部vlanid为1

config vlan <old_name> name <new_name> vlan改名

show vlan {<name> | detail} 查看vlan信息
show vlan stats vlan <name> ... <name> 查vlan状态
show protocol {<protocol>} 查看协议

局域mac的vlan例子:
enable mac-vlan mac-group any ports 10-15
enable mac-vlan mac-group 10 ports 16-17
enable mac-vlan mac-group 200 ports 18-20
config mac-vlan add mac-address 00:00:00:00:00:01 mac-group 10 engineering
config mac-vlan add mac-address 00:00:00:00:00:02 mac-group any marketing
config mac-vlan add mac-address 00:00:00:00:00:03 mac-group 200 sales

FDB转发数据库:
create fdbentry [<mac_address> | any-mac] vlan <name> dynamic
[qosprofile <qosprofile> {ingress-qosprofile <iqosprofile>} |
ingress-qosprofile <qosprofile> {qosprofile <qosprofile>}]
关联一个qos和fdb动态表项

create fdbentry <mac_address> vlan <name> ports [<portlist | all]
{qosprofile <qosprofile>} {ingress-qosprofile <iqosprofile>}
和fdb永久表项关联qos

create fdbentry 00:E0:2B:12:34:56 vlan marketing port 3:4
增加一个fdb表项

基于MAC的安全配置:
基于mac的安全允许你控制fdb的学习和传播

config ports [<portlist> vlan <name> | all] limit-learning <number>限制端口的mac条目范围是 0 to 500,000
config ports [<portlist> vlan <name> | all] unlimited-learning清除

show vlan <name> security 显示安全配置
show ports <portlist> info detail 显示port安全配置
config ports [<portlist> vlan <name> | all] lock-learning 锁住现有的mac,不再学习新的表项
config ports [<portlist> vlan <name> | all] unlock-learning 解锁

show fdb {<mac_address> | vlan <name> | ports <portlist> | permanent}显示fdb表项

QoS配置:
基于策略的qos允许你对于一些重要的应用程序提供保护带宽,比如,voip要有特殊的带宽控制。用qos可以保留足够的带宽来给特殊的应用。

如何配置:
配置qos你要用qos profiles定义交换机如何来区分不同种类的流量

1. 配置qos profile
2. 创建traffic grouping,
如应用到一个 vlan config vlan <name> qosprofile <qosprofile>

3. 监控

Qos profile
一个qosprofile用特殊的流量属性定义了一类服务,比如带宽,参数包括:
Minimum bandwidth 保留全部带宽的最小百分比使用物理端口的硬件队列,缺省是0%
Maximum bandwidth 最大使用带宽
Priority
Buffer

show qosprofile <qosprofile>
show ports <portlist> info {detail}
or
show vlan 检查qos 配置


Access-Lists
要构建一个表,倪要先指定一个规则,一个缺省规则包含目标和源ip的反码,没有第4层信息。

例子:
&#8226; Deny UDP port 32 and TCP port 23 traffic to the 10.2.XX network.
&#8226; All other TCP port 23 traffic destined for other 10.X.X.X networks is permitted using QoS profile
Qp4.
&#8226; All remaining traffic to 10.2.0.0 uses QoS profile Qp3.
With no default rule specified, all remaining traffic is allowed using the default QoS profile.
create access-list deny102_32 udp dest 10.2.0.0/16 ip-port 32 source any ip-port any
deny ports any(我理解是交换机的所有端口) precedence 10
create access-list deny102_23 tcp dest 10.2.0.0/16 ip-port 23 source any ip-port any
deny ports any precedence 20
create access-list allow10_23 tcp dest 10.0.0.0/8 ip-port 23 source any ip-port any
permit qosprofile qp4 ports any precedence 30
create access-list allow102 ip dest 10.2.0.0/16 source 0.0.0.0/0 permit qosprofile qp3
ports any precedence 40

show access-list {<name> | port <portlist>}
show access-list-monitor

过滤ICMP包:
echo的icmp code是8
echo reply的code是0
create access-list denyping icmp destination any source any type 8 code 0 deny ports
any

配置NAT
1. Enable nat #启用nat
2. 建立nat规则(动态和静态)
Static NAT Rule Example
config nat add out_vlan_1 map source 192.168.1.12/32 to 216.52.8.32/32
Dynamic NAT Rule Example
config nat add out_vlan_1 map source 192.168.1.0/24 to 216.52.8.1 - 216.52.8.31
Portmap NAT Rule Example
config nat add out_vlan_2 map source 192.168.2.0/25 to 216.52.8.32 /28 both portmap
Portmap Min-Max Example
config nat add out_vlan_2 map source 192.168.2.128/25 to 216.52.8.64/28 tcp portmap
1024 - 8192

3. show nat rules {vlan <outside_vlan>}
show nat stats
检查
disable nat 关闭nat

一般配置:

1.先建立一个vlan

create vlan test

2.然后在配置vlan的接口地址

configure vlan test ipaddress
config vlan test ipaddress 123.45.67.8 / 24
configure test tag 900 为test 打标签为900


3. 配置缺省网关

config iproute add default <gateway>

4.Save 存储配置文件
5.configure test add ports 45 tagged 增加45进test vlan
6.configure ports 45 auto on 配置45端口
7.enable ports 45 使能45端口
8.Enable ipforwarding on the <vlan name> 使vlan能够转发ip
9.conf vlan xxx proto ip #重要,不然不能添加端口untagged

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值