Ereme交换机配置命令

上传人:jin****ng 文档编号:164567924 上传时间:2022-10-25 格式:DOCX 页数:21 大小:39.92KB
收藏 版权申诉 举报 下载
Ereme交换机配置命令_第1页
第1页 / 共21页
Ereme交换机配置命令_第2页
第2页 / 共21页
Ereme交换机配置命令_第3页
第3页 / 共21页
资源描述:

《Ereme交换机配置命令》由会员分享,可在线阅读,更多相关《Ereme交换机配置命令(21页珍藏版)》请在装配图网上搜索。

1、Extrem XOS 交换机基本命令1.1 系统操作管理1.1.1 查看交换机信息show switch/可以看主备引擎工作情况,软件版本等1.1.2 选择软件/升级软件电脑以太网连接交换机运行 TFTP 软件 download image 192.168.1.30 bd8800-12.0.1.11-ssh.xmod vr VR-Default”/extreme放os有两个位置,一个primary, 一个secondary。本命令有参数可以 选择。当tftp电脑在交换机管理口时不需要加vr参数,如果在数据口一定要加 vr VR-Defaultrun updateuse image primar

2、y 选择下一次启动从primary启动,也可根据需要从secondary 启动1.1.3 时钟configure time 9 / 10 / 2007 15 : 31 : 301.1.4 修改密码configure account admin/修改 admin 用户的密码系统会出来如下提示,输入新密码就可以password:Reenter password:1.1.5 保存/使用配置(1) 当有配置修改过,在提示符前会多一个*号,如下所示:* X450a-48t.8 #(2) 保存配置:* X450a-48t.8 #Save 输入此命令后,系统会提示是不是要保存,选 YES 就完成保存。(3)

3、 save configuration Oct11_backup/可以保存成特定文件名的配置use configuration Oct11_backupupload configuration 1.1.1.1 450config.cfg vr VR-Default/文本格式tftp put/get 1.1.1.1 vr “VR-Default” primary.cfg primary.cfg/直接使用1.1.6 SNMP(1) 更改交换机的 hostname:configure snmp sysName +例如:configure snmp sysName hp enable snmp acc

4、ess 为了安全性,建议用如下命令删除缺省的community “public”和”private” config snmp delete community readonly public config snmp delete community readonly public(3) 再添加你自己的 communityconfig snmp add community readonly/readwrite1.1.7 看交换机管理信息sho management/可以看到 CLI、telnet、ssh、web access、snmp 等的设置情况1.1.8 看历史命令history1.1.9

5、Ping/telnetping vr “VR-Default“ /Ping + 参数/因为 XOS 交换机管理口数据和用户数据分别在两个 Virtual router 中传送,所以 ping/telnet 时要注意制定目的地址在那个 VR 中。如果在管理端口: telnet vr VR-Mgmt例: ping 192.168.0.1 telnet vr “VR-Default“ 10.0.1.11.1.10小技巧一TAB键TAB键的使用:如果不知道后面命令时,按TAB键,系统自动可以把后面 的参数显示出来;从参数中选择你需要的参数,只需要打前面字母,用TAB可 以自动补全1.1.11清空整个交

6、换机配置unconfig switch all1.2 协议配置管理1.2.1 启用/禁用端口(1) 启用端口,相当于其他厂商的 no shutdown:enable port 端口号(2) 关闭端口,相当于其他厂商的 shutdown: disable port 端口号 (3) 查看端口的状态: show port 2 information1.2.2 配置 vlan 相关(1) 创建 vlan 的命令如下:Create vlan +例如:Create vlan vlanlO(2) 给 vlan 打标签,设置 vlan 号:Configure vlan “vlan 名字” tag 例如: Co

7、nfigure vlan “vlanlO” tag 10/如果不配,系统会自动分配一个,不过自动分配不易管理。(3) 将端口加到缺省 vlan 中Configure vlan “default” add port 9将端口加到其他 vlan 中,先要将这个端口从缺省 vlan 里拿出,因为一个端口不能 同时属于两个 vlan(trunk 口除外):Configure vlan “default” delete port 9Configure vlan “vlanlO” add port 9(4) 配置这个 vlan 的 3 层 IP 地址:Configure vlan “vlanlO” ipa

8、ddress 192.l68.l.254/24(5) 配置交换机默认网关:configure iproute add default multicast | multicast-only |unicast | unicast-only vr For example:configure iproute add default l23.45.67.l(5) 启用三层转发功能: enable ipforwarding/注意需要三层互通,必须要输入这个命令 (6) 看 vlan 相关参数show vlan1.2.3 配置 802.1Q 口Extreme 交换机对于 802.1Q trunk 的设置是以

9、 Tag 的方式配置的,而且协议 是标准的802.1Q。所以以太网口缺省都在untag的vlan default里(vlanl)。此时 如果需要把这个端口做成trunk 口,很简单的只需要将这个端口再增加带Tag的 vlan就可以,这个trunk 口需要透传几个vlan,就允许几个tag vlan。命令如下: Configure vlan “vlan10” add port 9 tag1.2.4 配置端口冗余对于一个交换机有两条上连线路分别到两个中心/汇集交换机的情况,可以 采用端口冗余的配置config ports 25 redundant 26/26 口作为 25 口的冗余口,当 25 口

10、断了 26口就会激活工作(上连光口或者堆叠中不同的交换机口都可以做成相互冗余)unconfigure ports 25 redundant/删除冗余端口配置1.2.5 link aggregation 端口捆绑动态协议捆绑,使用中可以增加/删除新端口:enable share 1 grouping 1,2,3,4 algorithm address-based /使用标准 LACP协议sho lacp lag 1静态配置:enable share 1 grouping 1-2sho ports sharing disable sharing 1126 EAPS (以太网自动保护技术)创建 vl

11、an,并将 Control vlan 和 protect vlan 都加上相应物理端口。Config vlan add portCreate/delete eaps name config eaps mode master/transitconifg eaps primary/sec port 在 transit 的设备上也是需要随意指定这两个 的。config eaps add control/protect vlan(extremeware control vlan 必须要在 qp8configure vlan ec2 qosprofile qp8 show vlan ec2 可以检查)c

12、onfig eaps fast-convergence on/off 50ms 收敛enable eaps 全局下面和子进程都要 enableenable eaps sho eapssho eaps ed1ESP防止share link (两个EAPS重叠的链路部分)的super loop高级功能eaps 的 share port( ESP 协议) 避免 superloop master 尽量不要做这两个上如果是生产网,先配partner,避免影响网络。create eaps shared-port 5config eaps shared-port 5 link id 42config eap

13、s shared-port mode controller/partner如果断 common-link 时,需要检查 share-port 生效 sho eaps shared-port detail127 STP (生成树配置)基本配置:先创建vlan,并将Carrier vlan和protect vlan都加上相应物理端口。Config vlan add port:create vlan c1create vlan v1config vlan c1 tag 10config vlan v1 tag 20config vlan c1 add port 1 tagged/需要将相应的物理端口

14、加入 vlanconfig vlan v1 add port 1 tagged/需要将相应的物理端口加入 vlancreate stpd vdomain name: d1创建一个新的 STP domain。系统缺省已经建好了一个S0的stp domain,但是没有enable起来config stpd d1 mode dot1d/dot1w修改 stp 的工作模式。用如下 emistp 封装,可以不用修改mode,如果改成了 dot1w,那么一定要修改link-type。config stpd d1 add vlan c1 ports emistp 添加控制vlan和端口config stpd

15、 d1 add vlan v1 ports emistp /添加用户vlan和端口,并 采用emistp的封装模式。emistp端口缺省封装模式bpdu封装模式(有c vlan)。 还有802.1d (不能携带vlan信息),pvst (和其他厂商互联一定要改成pvst 了; 工作模式 osperation mode 也有 3 种 802.1d,802.1wRSTP, 802.1sMSTP。概念不同)以下为确定carrier vlan是C1create vlan c1config vlan c1 tag 10config stpd d1 tag 10config stpd vdomain na

16、me priority v/越小优先级越高enable stp /extreme交换机缺省没有启用stp,另外缺省封装用 emistpenable stpd auto-bind vlan 当有端口被加入该 vlan,系统自动把它和设好的STPD绑定如果对端不是 point-to-point 那么会高级功能:SW2.5 # config stpd d1 ports link-type回滚到802.1d封装模式autoauto-sensing modebroadcastbroadcast modeedgeedge modepoint-to-point point-to-point mode poi

17、nt to point 是 rstp/mstp 1 个 vlan 只有两个 bridge en stpd s0 rapid-root-failover 快速收敛对于常用的环境既有 tag 口和其他交换机互联,又有 untag 的用户口,建议 1 个 vlan 一个 stpd 的配置,如下:configure vlan Default delete ports all create vlan managementconfigure vlan management tag 101 create vlan providerconfigure vlan provider tag 102 create

18、vlan provisioningconfigure vlan provisioning tag 103 configure vlan management add ports 47 taggedconfigure vlan management add ports 3 untaggedconfigure vlan provider add ports 47 taggedconfigure vlan provider add ports 1 untaggedconfigure vlan provisioning add ports 47 taggedconfigure vlan provisi

19、oning add ports 2 untaggedconfigure stpd d1configure stpd d1 mode dot1wconfigure stpd d1 add management ports 47 emistpconfigure stpd d1 tag 101configure stpd d1 add management ports 3 dot1d enable stpd d1configure stpd d2configure stpd d2 mode dot1wconfigure stpd d2 add provider ports 47 emistpconf

20、igure stpd d2 tag 101configure stpd d2 add provider ports 1 dot1d enable stpd d2configure stpd d3configure stpd d3 mode dot1wconfigure stpd d3 add provisioning ports 47 emistp/emistp/pvst+ encapsulation is for tagport;can add more portsconfigure stpd d3 tag 101/set tag vlan for bpduconfigure stpd d3

21、 add provisioning ports 2 dot1d/dot1d encapsulation is for untag port;canadd more portsenable stpd d3show stpd d1 ports / can see 2 ports in d1show stpd d2 ports / can see 2 ports in d1show stpd d3 ports / can see 2 ports in d11.2.8 VRRP (虚拟网关技术)VRRP 是一种网关冗余技术。如果主网关故障,备交换机会接管主交换机成 为主网关,当主网关恢复后又重新接管业

22、务。主网关上的配置如下:configure vlan vlan1 ipaddress 192.168.1.254/24create vrrp vlan vlan1 vrid 1/创建 vrid 为 1 的 vrrp 组configure vrrp vlan vlan1 vrid 1 prioirty 255/优先级设成 255,作为主网关。数字越大优先级越高。不配这个优先级的话缺省100,所以在备网关上一般 就不用做这个配置了。configure vrrp vlan vlanl vrid 1 add 192.168.1.254配置网关的 IP,在主网关上配的IP实际上和这个vlan的IP是相同

23、的。备网关选择一个不同的IP。enable vrrp/启用这个 VRRP备网关上的配置如下:configure vlan vlan1 ipaddress 192.168.1.253/24create vrrp vlan vlan1 vrid 1configure vrrp vlan vlan1 vrid 1 add 192.168.1.254 enable vrrp注意:每个交换机可以起64个虚拟网关;vrid只能使用七个不同的,不同的vlan 可以使用一样的vrid号。1.2.9 DHCP 请求转发两种实现方式:一种 bootprelay, 种 udp forwarding 用这两种方式都要

24、先把做DHCP的vlan/port定义出来 enable bootp vlan | all/连 DHCP server vlanenable dhcp ports vlan /连 dhcp client简单的实现方式可以用 bootprelay:configure bootprelay add 172.17.0.20 vr VR-Defaultconfigure bootprelay add 172.17.0.21 vr VR-Default enable bootprelay vr VR-Default/ 启用 DHCP relay如果需要为特定 vlan 的 DHCP client 指定

25、server 要使用 udp forwarding: configure vlan udp-profile | noneudp-profile 的举例如下:下面部分需要 policy file tftp 到 switch 上。和 ACL policy 的用法相同。tftp 10.120.80.135 -v VR-Default -g -l dhcptest.pol -r dhcptest.pol dhcptest.pol 文件的内容如下:entry one if match all destination-port 67 ; then destination-ipaddress 20.0.0.

26、5 ;entry two if match all destination-port 67 ; then vlan to7 ;1.2.10查询/创建静态路由创建普通的静态路由如下:configure iproute add 10.255.2.0 255.255.255.0 192.168.254.253创建缺省静态路由如下:configure iproute add default 192.168.252.253查询路由的命令如下:Show iproute1.2.11RIP 路由configure rip add vlanconfigure rip add vlan allenable rip

27、show rip interface /检查有没有show iproute/检查有没有带 r 标记的路由,就是 rip 路由发布缺省路由Enable rip originate-default1.2.12OSPF 路由基本配置: create ospf area 0.0.0.5configure ospf add vlan all area 0.0.0.0configure ospf add loop0 area 0configure ospf add v1 area 0.0.0.0 link-type point-to-point/注意设定 link-type 必须要第 1 次配就配上.中间

28、修改要先 unconfigconfigure ospf add v1 area 0.0.0.0 passive 对于 advanced edge license 的交换机 大部分vlan都需要用passive的方式加入ospf,这个可以不占用ospf neighbor的 数量(XOS12.0和以上的advanced edge license可以支持4个邻居,12.0以下支 持 2 个)BD-8810.85 # config ospf area 0.0.0.172 add range ip address IP address / NetmaskEnable loopback-mode vlan

29、 configure ospf routerid/先配好 routerid 后再 enable ospfenable ospf路由汇总config ospf area add range ip/mask advertise/noadvert type3 type 7/域间路由 rangeconfig ospf ase-summary add ip/mask cost tag/外部路由 summaryStub 区configure ospf area 0.0.0.6 stub summary /nosummary stub-default-cost 10 /nosummary 连 type3 l

30、sa 也不发送进入这个 area。show ospf area /检查是不是 stub area验证:config ospf vlan auth md5 32 pass /none 删除或配置验证virtual-linkconfigure ospf add/delete virtual-link router-id(远端 routerid) area-id (transit area) / 添加/删除sho ospf virtual-link/看 virtual-link 的 state 有没有 full修改缺省参数config ospf vlan priority 修改端口优先级,设成 0

31、就不能做 DR/BDR configure ospf area 0.0.0.0 priority 10 修改整个 area 的所有端口的优先级configure ospf area 0.0.0.0 timer 5 1 10 40 缺省值configure ospf metric-table 10M 10 100M 5 1G 4 10G 2 /修改缺省 cost发布缺省路由Enable ospf originate-default cost 10 type ase-type-1或者 enable ospf export static cost 10 type ase-type-1/把缺省路由作为

32、 1 条静态路由发布到 ospf路由分发:enable ospf export rip 将 rip 发入 ospf:enable ospf export rip cost 10 type ase-type-1 从 rip 发到 ospfenable ospf export rip rip_to_ospf 将 rip 通过策略文件有选择的发入 ospf 以下是 policy 文件的内容,需要通过 TFTP 进入 switch:tftp 10.120.80.135 -v VR-Default -g -l ripospf.pol -r ripospf.pol ripospf.pol 文件的内容如下:

33、entry rip_to_ospf if match any nlri 172.16.1.0/24;nlri 1.1.1.0/24; then cost 1;cost-type ase-type-1;Router-policy 如果条件都不匹配,最后是 deny。 等价路由enable iproute sharingconfig iproute sharing max-gatewaysshow ipconfig 检查有没有 enable 起 ECMP 多等价路由缺省的各种链路 cost 值configure ospf metric-table 10M 10 100M 5 1G 4 10G 2检

34、查结果sho ospf interfacessho ospf interfaces vlan1show ospf neisho ospf lsdb all1.2.13 组播配置(需要 Advanced/Core license)ip unicast-routing 都要做好,要 enable ipforwarding。组播是在 unicast 的基础上的。两种模式 Dense mode 主要用户密集使用 multicast;sparse mode 主要用在unicast网络中,部分机器有时候会使用multicast的环境。Dense mode配置步骤:ena igmp ena igmp sno

35、oping (纯 layer 2 的。让二层交换机 snooping 组播包。)en ipforwardingenable ipmcforwardingconfig pim add vlan all denseenable pimsparse mode配置步骤:ena igmpena igmp snoopingen ipforwardingenable ipmcforwarding config pim add vlan all sparse config pim cbsr vlan v1 40 设 CBSR 的 vlan,和 priority configure pim crp vlan v

36、l mgroup_vl 4 设 Crp 的 vlan, 和 priorityoroijp_vL pcienable pim检查结果:sho igmpshow igmp groupshow igmp snooping cacheshow pimshow pim detailshow pim rp-set 239.1.1.1 show pim cache detail clear pim cache1.2.14 ACL1、动态ACL,动态ACL重起就丢失:create access-list tel protocol icmp;icmp-type echo-request deny;count t

37、estconfigure access-list add tel first ports 23 ingressconfigure access-list delete tel ports 23 2、静态ACL,保存在配置里的,重起一直在:1 )现在 TFTP 服务器中,编辑好一个扩展名为 pol 的文件。例:文件名为MyAccessProfile.pol的文件文件内容如下:entry AllowTheseSubnets if source-address 10.203.133.0 /24; then permit;2)将MyAccessProfile.pol 上传到交换机中去tftp 10.1

38、20.80.135 -v VR-Default -g -l MyAccessProfile.pol -r MyAccessProfile.pol(4)check policy acltest /传入交换机后可以用本命令检查语法错误refresh policy acltest /如果修改过acl,需要用此命令刷新一下后才能使修改部分 生效(5)将ACL应用于端口、VLAN、或者telnetping等操作configure telnet access-profile vaccess_profile I none / 在 telnet 上例:configure telnet access-profi

39、le MyAccessProfileconfig access-list acltest acl 名字ports 3/vlan 2 ingress 在物理端口或 vlan 上( 6)清除 ACLunconfigure access-list ports +具体端口号/清除端口上的 ACLunconfigure access-list vlan +vlan 名字清除 vlan 上的 ACL( 7 )几个脚本文件实例acltest.pol 文件的内容如下:Entry permit-establishedIf /写 if 就是 if match allSource-address 10.0.0.0/

40、24;Protocol TCP;Tcp-flags syn; then Permit;Count syn; /可以设置一个计数器来看有多少条记录匹配Entry default If source-address 0.0.0.0/0 then Deny;Count default;如果条件都不匹配,缺省最后是permit。(和cisco不同),所以最后要配置 deny所有IP协议层的东西。注:一定要在最后的讦语句中加入source-address 0.0.0.0/0,如果什么都没有加,会把二层的arp也被禁止。其他例子如下:只允许10.120.80.0的这个网段去http, telnet和pin

41、gotelnet innp httpjcmi t_nk. polEntry permithttp if protocol tcp;source-address 10.120.80.0/24;destinationport 80;t henpermit;count httpent;Entry permittelnet if protocol tcp;source-address 10.120.80.0/24;destinationport telnet;t henpermit;count telnetent; entry icmp if source-address 10.120.80.0/24

42、; protocol icmp; then permit;count icmpcnt;entry denyall if source-address 0.0.0.0/0 then deny;count denycnt;1.2.15策略路由 PBR策略路由PBR是优先于路由选择一种特殊ACL,这种ACL应用到了端口/vlan上后, 可以在转发数据前,先把符合条件的数据直接重定向redirect到指定的端口而不管路由表路 由是走哪个端口的。具体使用方法和ACL 一模一样。PBR 的 pol 文件举例如下:Entry pbr if source-address 10.120.80.0/24;dest

43、ination-address 1.1.1.1/24thenredirect 2.1.1.24;1.3 XOS 参考文档关于 XOS 的配置和命令手册,参见 Extreme 网站,可以自由下载: wareVersionl2-l-100272.zip SoftwareVersion12-1-100273.zip1、更改交换的名字configure snmp sysname 2、管理当前会话show sessionshow session detailshow session history3、终止一个会话clear session clear session all4、退出会话exitlogou

44、t5、创建、删除一个用户,并为用户设定一个密码create account admin | user delete account 6、给默认用户设定密码,或者新建的,但是没有设定密码的用户设定密码configure account configure account all | password-policy char-validationconfigure account all | password-policy historyconfigure account all | password-policy max-ageconfigure account all | password-policy min-length7、创建一个新的vlan(1)

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!