![EX系列交換機配置操作手冊v2_第1頁](http://file4.renrendoc.com/view/49003bc56dbb84cadf19483eea8b2381/49003bc56dbb84cadf19483eea8b23811.gif)
![EX系列交換機配置操作手冊v2_第2頁](http://file4.renrendoc.com/view/49003bc56dbb84cadf19483eea8b2381/49003bc56dbb84cadf19483eea8b23812.gif)
![EX系列交換機配置操作手冊v2_第3頁](http://file4.renrendoc.com/view/49003bc56dbb84cadf19483eea8b2381/49003bc56dbb84cadf19483eea8b23813.gif)
![EX系列交換機配置操作手冊v2_第4頁](http://file4.renrendoc.com/view/49003bc56dbb84cadf19483eea8b2381/49003bc56dbb84cadf19483eea8b23814.gif)
![EX系列交換機配置操作手冊v2_第5頁](http://file4.renrendoc.com/view/49003bc56dbb84cadf19483eea8b2381/49003bc56dbb84cadf19483eea8b23815.gif)
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
用心、精心、決心、匠心命令行配置指導手冊Version2.0用心、精心、決心、匠心 2.2SYSTEM系統(tǒng)參數(shù)配置 26 Ftp............................2.8.. 2.3.4修改端口VLAN......................................................5刪除VLAN........................................................3.3..2.3.6配置VLAN網(wǎng)關IP..................................................3.3..用心、精心、決心、匠心 生成樹配置 35 2.6.3STP配置實例(生成樹) .4RSTP配置實例(快速生成樹) MSTP配置實例(多生成樹協(xié)議) 4.1 2.10.4端口鏡像工作原理................................................5.3. 用心、精心、決心、匠心 2.11端口MAC地址限制 562.12端口廣播風暴控制 56VRRP冗余協(xié)議 58 2.14BFD配置(雙向轉發(fā)檢測) 62 2.14.4檢測模式.........................................................4.5發(fā)送周期及檢測時間...............................................4.6參數(shù)修改.........................................................4.7會話建立.........................................................6.5. 2.15交換機FIREWALL限制功能 67 2.16VIRTUAL-CHASSIS設置 68 3.1交換機啟動和關閉 74 用心、精心、決心、匠心 3.2配置備份和恢復 74 3.6日常維護命令 77 re 3.6.6查看設備告警信息showchassisalarms 查看詳細的硬件溫度及狀態(tài)信息showchassisenvironment 78 第一章交換機基礎知識端口類型端口類型10/100/1000B-T10/100/1000B-T10/100/1000B-T10/100/1000B-T端口類型10/100/1000B-T10/100/1000B-T100B-FX/1000B-X最大電源容量190(320)W190(600)W190(320)W190(930)W最大電源容量190(320)W190(600)W190(190)W產(chǎn)品型號EX3200-24TEX3200-24PEX3200-48TEX3200-48P產(chǎn)品型號EX4200-24TEX4200-24PEX4200-24FPoE端口數(shù)88PoE端口數(shù)8N/A端口數(shù)88端口數(shù)用心、精心、決心、匠心10/10/100/1000B-T10/100/1000B-TEX4200-48TEX4200-48P190(320)W190(930)W8用心、精心、決心、匠心1.2Junos操作系統(tǒng)基礎Juniper交換機支持兩種配置方式:采用命令行的CLI(command-lineinterface)配置webJWeb是采用命令行的配置方console換機上打開telnet服務并且配置IPtelnet配置。系統(tǒng)初始化1.2.1交換機配置模式CLI有兩種模式:用戶模式和配置模式,用戶模式的提示符是>,配置模式的提示符是用戶模式:lab@EX4200>#用戶模式在用戶模式下可以顯示交換機的配置、端口狀態(tài)、路由信息等。登錄到交換機上即進入Example:login:rootPassword:lab@EX4200>配置模式:lab@EX4200##配置模式通過在用戶模式使用edit命令或者configure命令進入配置模式:ExampleExample:lab@EX4200>editEnteringconfigurationmodelab@EX4200#ExampleExample:lab@EX4200>configureEnteringconfigurationmodelab@EX4200#1.2.2交換機配置結構Juniper交換機的配置是一種層次化的配置模式,如下圖所示:第一層次protocols用心、精心、決心、匠心area-range等第四層參數(shù),而dead-interval、hello-interval等第五層參數(shù)則屬于第四由于是層次化結構,因此配置一個參數(shù)有兩種方式,一是在最外層使用一條set命令將所有層的參數(shù)一次寫完,另外一種方式是利用edit逐層進入需要配置參數(shù)的層次,然hellointerval方式:lab@EX4200#setprotocolsospfarea0interfacege-0/0/1.0hello-interval10lab@EX4200#editprotocols[editprotocols]lab@EX4200#editospf[editprotocolsospf]lab@EX4200#editarea0[editprotocolsospfarea]lab@EX4200#editinterfacege-0/0/1.0[editprotocolsospfareainterfacege-0/0/1.0]lab@EX4200#sethello-interval10[editprotocolsospfareainterfacege-0/0/1.0]lab@EX4200#lab@EX4200#editprotocols[editprotocols]lab@EX4200#editospf[editprotocolsospf]lab@EX4200#exit[editprotocols]lab@EX4200#lab@EX4200#editprotocolsospf[editprotocolsospf]lab@EX4200#exitlab@EX4200#lab@EX4200#editprotocols用心、精心、決心、匠心[editprotocols]lab@EX4200#editospf[editprotocolsospf]lab@EX4200#toplab@EX4200#lab@EX4200#setprotocolsospfarea0interfacege-0/0/1.0hello-interval10dead-interval10輸入以上命令之后,交換機的配置如下:protocols{ospf{area{interfacege-0/0/1.0{hello-interval10;}}}}注意:如果不知道一條命令里面后面是否還可以跟其它配置參數(shù),那么最好使用?幫助lab@EX4200#setprotocolsospfarea0interfacege-0/0/1.0hello-interval10?Possiblecompletions:<[Enter]>Executethiscommand+apply-groupsGroupsfromwhichtoinheritconfigurationdata+apply-groups-exceptDon'tinheritconfigurationdatafromthesegroups>authentication>bfd-liveness-detectionBidirectionalForwardingDetectionoptionsdead-intervaldemand-circuitdisableinterface-typeipsec-sa>ldp-synchronizationmetricDeadinterval(seconds)(1..65535)InterfacefunctionsasademandcircuitDisableOSPFonthisinterfaceTypeofinterfaceIPSecsecurityassociationnameAdvertisemaximummetricuntilLDPisoperationalInterfacemetric(1..65535)用心、精心、決心、匠心>neighborNBMAneighborno-neighbor-down-notificationDon'tinformotherprotocolsaboutneighbordownevents>passivepoll-intervalpriorityretransmit-intervalte-metrictransit-delay|DonotrunOSPF,butadvertiseitPollintervalforNBMAinterfaces(1..65535)Designatedrouterpriority(0..255)Retransmissioninterval(seconds)(1..65535)Trafficengineeringmetric(1..65535)Transitdelay(seconds)(1..65535)Pipethroughacommand1.2.3TAB和空格鍵的使用交換機JUNOS命令配置中,可以使用TAB鍵和空格鍵來進行參數(shù)的補全,在補全系統(tǒng)參數(shù)中兩個鍵的作用是一樣的,例如:labEX00#setpro<-輸入TAB鍵或者空格鍵,則會補全protocolslab@EX4200#setprotocols而對于用戶自己定義的參數(shù),則只能用TAB來補全,比如我們定義了一個lab@EX4200#setprotocolsospfexport?Possiblecompletions:<value>(Test_Policy_1[ExportpolicyOpenanexpressionOpenasetofvalueslab@EX4200#setprotocolsospfexportT<-輸入TAB鍵,則會補全Test_Policy_1lab@EX4200#setprotocolsospfexportTest_Policy_11.2.4用戶模式和配置模式show的區(qū)別在用戶模式下,是無法進行配置操作的,而只能查看系統(tǒng)的一些參數(shù)。所以用戶模式show看系統(tǒng)配置則使用showconfigure命令。例如用戶lab@EX4200>showinterfacesPhysicalinterface:ge-0/0/1,Enabled,PhysicallinkisUpInterfaceindex:142,SNMPifIndex:31用心、精心、決心、匠心Link-leveltype:Ethernet,MTU:1518,Speed:100mbps,Loopback:Disabled,Sourcefiltering:Disabled,Flowcontrol:EnabledDeviceflags:PresentRunningInterfaceflags:SNMP-TrapsInternal:0x4000CoSqueues:4supported,4maximumusablequeuesCurrentaddress:00:05:85:dc:cc:db,Hardwareaddress:00:05:85:dc:cc:dbLastflapped:2007-06-2920:37:17HKT(1w2d00:31ago)Inputrate:280bps(0pps)Outputrate:1280bps(1pps)Activealarms:NoneActivedefects:NoneLogicalinterfacege-0/0/1.0(Index83)(SNMPifIndex71)Flags:SNMP-Traps0x4000VLAN-Tag[0x8100.33]Encapsulation:ENET2Inputpackets:0Outputpackets:0Protocolinet,MTU:1500Flags:Nonelab@EX4200>lab@EX4200#showinterfacesge-0/0/1{unit0{familyethernet-switchingvlanmembers10;familyinet;}}lab@EX4200#因此說用戶模式和配置模式下的show命令是不同的,如果要在配置模式下運行用戶模式命令,則需要在命令前面加一個runlab@EX4200#runshowinterfacesPhysicalinterface:ge-0/0/1,Enabled,PhysicallinkisUpInterfaceindex:142,SNMPifIndex:31Link-leveltype:Ethernet,MTU:1518,Speed:100mbps,Loopback:Disabled,Sourcefiltering:Disabled,用心、精心、決心、匠心Flowcontrol:EnabledDeviceflags:PresentRunningInterfaceflags:SNMP-TrapsInternal:0x4000CoSqueues:4supported,4maximumusablequeuesCurrentaddress:00:05:85:dc:cc:db,Hardwareaddress:00:05:85:dc:cc:dbLastflapped:2007-06-2920:37:17HKT(1w2d00:36ago)Inputrate:792bps(0pps)Outputrate:672bps(0pps)Activealarms:NoneActivedefects:NoneLogicalinterfacege-0/0/1.0(Index83)(SNMPifIndex71)Flags:SNMP-Traps0x4000VLAN-Tag[0x8100.33]Encapsulation:ENET2Inputpackets:0Outputpackets:0Protocolinet,MTU:1500Flags:Nonelab@EX4200#lab@EX4200#runpingPING():56databytes64bytesfrom:icmp_seq=0ttl=64time=5.118ms64bytesfrom:icmp_seq=1ttl=64time=7.949ms64bytesfrom:icmp_seq=2ttl=64time=7.018ms---pingstatistics---3packetstransmitted,3packetsreceived,0%packetlossround-tripmin/avg/max/stddev=5.118/6.695/7.949/1.178mslab@EX4200#lab@EX4200#runping命令等同于lab@EX4200>ping5如何將配置轉換成set命令owconfigure“程序化”的配置,這樣的配置并不能直接粘貼到另外一臺交換機上,不過可以在show后面使用管道符號加上displayset將其轉換成set格式命令,然后可以直接粘貼到其它lab@EX4200#showprotocolsospfexportTest_Policy_1;用心、精心、決心、匠心area{interfacege-0/0/1.0{hello-interval10;}}lab@EX4200#showprotocolsospf|displaysetsetprotocolsospfexportTest_Policy_1setprotocolsospfareainterfacege-0/0/1.0hello-interval10lab@EX4200#在cisco中只要輸入命令,回車之后命令馬上生效,因為我們修改的就是系統(tǒng)正在使runningconfig。而在JUNOS中完全不同,我們操作(增加、刪除、修改)的那份配置文件只是一個候選文件(candidateconfigure),并不是正在運行的配置文件,只有將候選文件通過commit提交之后,配置才會真正的應用到當前系統(tǒng)使用的active配置文件中,從而使得修改的配置生效。commitcommitcheck檢為了避免提交時出錯,建議不要同時兩個人修改配置。lab@EX4200#showsystemhost-namehost-nameEX4200;lab@EX4200#setsystemhost-nameR1lab@EX4200#commitcommitcompletelab@EX4200#showsystemhost-namehost-nameEX4200;lab@EX4200#rollback1loadcompletelab@EX4200#showsystemhost-name用心、精心、決心、匠心host-nameEX4200;lab@EX4200#commitcommitcompletelab@EX4200#1.3EX交換機命令菜單結構vlans{vlan-name{//vlan名字,自定義,下面所有參數(shù)都是針對該vlanVLANvlan-idnumber;//設置vlanid}}chassis{ ethernet{aggregated- ethernet{ device-countnumber;//設置聚合端口數(shù)量,范圍是0-64 }}}interfaces{ae-x{ aggregated-ether-options{//設置聚合端口參數(shù) iodicfastslow秒發(fā)送,選擇}}}descriptiontext;//設置描述 ether-options{ 802.3adaex;etheroptions數(shù)//指定加入的聚合端口 link-modemode;//自動協(xié)商//流控制//設置端口工作模式//設置端口速 speed(speed|auto-negotiation|no-autonegotiation//設置端口速 率}mtubytes;//設置端口MTU值,默認是1514unitlogical-unit-number{ familyethernet-switching{ filterinputfilter-name; filteroutputfilter-name; //設置邏輯單元參數(shù)//設置二層輸入包過濾條件//設置二層輸出包過濾條件l3-interfaceinterface-name-logical-unit-number;下設置允許通過的native-vlan-idvlan-id//指定navitevlanid s vlan{用心、精心、決心、匠心members[(names|vlan-ids)];//設置端口屬于哪個VLAN或者允許哪些}} } }}protocols{dot1x{ authenticator{ authentication-profile-nameaccess-profile-name; static{ mac-address{ vlan-assignment(vlan-id|vlan-name interfaceinterface-names;}}interface(all|interface-name){ disable; maximum-requestsseconds; quiet-periodseconds; reauthentication{ intervalseconds;}retriesnumber;server-timeoutseconds; supplicant(single|single-secure|multiple); 用心、精心、決心、匠心supplicant-timeoutseconds; transmit-periodseconds; }} gvrp{ <enable|disable>; interface(all|[interface-name]){ disable;}join-timermillseconds;leave-timermilliseconds; leaveall-timermilliseconds; } igmp-snooping{ traceoptions{filefilename<filesnumber><sizesize><world-readable|no-world-readable><matchregex>;flagflag(detail|disable|receive|send);}vlan(vlan-id|vlan-number{ disable{ Interfaceinterface-name} interfaceinterface-name{ multicast-router-interface; static{ groupip-address; }}用心、精心、決心、匠心query-intervalseconds; query-last-member-intervalseconds; query-response-intervalseconds;robust-countnumber;}} lldp{//設置鏈路層自動檢測協(xié)議(LinkLayerDetectionProtocol) disable; advertisement-intervalseconds; hold-multipliernumber;interface(all|interface-name){ disable; } traceoptions{ filefilename<filesnumber><sizesize><world-readable|no-world-readable><matchregex>;flagflag(detail|disable|receive|send);} transmit-delayseconds; } lldp-med{ disable;fast-startnumber; interface(all|interface-name){ disable; location{ elinnumber; civic-based{ 用心、精心、決心、匠心whatnumber; country-codecode; ca-type{ ca-valuevalue; }}}}}} mstp{ disable; bridge-prioritypriority; configuration-namename; forward-delayseconds; hello-timeseconds; interface(all|interface-name){ disable; bpdu-timeout-action{ block;alarm;}costcost; edge; modemode; 用心、精心、決心、匠心prioritypriority;}max-ageseconds;max-hopshops; mstimsti-id{ lanvlanidvlanname interfaceinterface-name{ disable; costcost; edge;modemode; prioritypriority; }}revision-levelrevision-level; traceoptions{ filefilename<filesnumber><sizesize><no-stamp|world-readable|no-world-readable>;flagflag;}}rstp{disable; bridge-prioritypriority; forward-delayseconds; hello-timeseconds;用心、精心、決心、匠心interface(all|interface-name){ disable; bpdu-timeout-action{block; alarm; } costcost; edge; modemode; prioritypriority;}max-ageseconds;}traceoptions{filefilename<filesnumber><sizesize><no-stamp|world-readable|no-world-readable>;flagflag;}stp{ disable; bridge-prioritypriority;forward-delayseconds; hello-timeseconds; interface(all|interface-name){ disable; bpdu-timeout-action{ block; 用心、精心、決心、匠心alarm;}costcost;edge; modemode; prioritypriority; } max-ageseconds; }traceoptions{filefilename<filesnumber><sizesize><no-stamp|world-readable|no-world-readable>;flagflag;}} ethernet-switching-options{ analyzer{name{loss-prioritypriority; rationumber; input{ingress{ interface(all|interface-name); lanvlanidvlanname}egress{ interface(all|interface-name); }用心、精心、決心、匠心output{ interfaceinterface-name; lanvlanidvlanname}}} bpdu-block{ interface(all|[interface-name]); disable-timeouttimeout; }redundant-trunk-group{ group-namename{ interfaceinterface-name<primary>;}} secure-access-port interface(all|interface-name){allowed-mac{mac-address-list;} (dhcp-trusted|no-dhcp-trusted); mac-limitlimitactionaction; static-ipip-address vlanvlan-name;macmac-address;}} vlan(all|vlan-name){ (arp-inspection|no-arp-inspection);(examine-dhcp|no-examine-dhcp); (ip-source-guard|no-ip-source-guard); 用心、精心、決心、匠心mac-move-limitlimitactionaction;}}storm-control{ interface(all|interface-name){ levellevel; }}traceoptions{filefilename<filesnumber><no-stamp><replace><sizesize><world-readable|no-world-readable>;flagflag<disable>;} voip{ interface(all|[interface-name|access-ports]){ vlanvlan-name; forwarding-class<assured-forwarding|best-effort|expedited- forwarding|network-control>;}}} firewall{ familyfamily-name{ filterfilter-name{ termterm-name{ from{ match-conditions;} then{ action;action-modifiers;}用心、精心、決心、匠心}}}policerpolicer-name{ if-exceeding{ bandwidth-limitbps; burst-size-limitbytes; } then{ policer-action;}}} snmp{ rmon{ historyindex{ bucket-sizenumber; interfaceinterface-name; intervalseconds; ownerowner-name;}}} virtual-chassis{ mac-persistence-timerseconds; membermember-id{ mastership-prioritynumber; 用心、精心、決心、匠心role;}traceoptions{filefilename<filesnumber><sizesize><world-readable|no-world-readable><matchregex>;flagflag;}}第二章操作指導準備好EX交換機設備自帶的Console線纜(如果沒有的話,采用Cisco或者安耐特等打開計算機中的終端軟件工具。例如:CRT或者Windows自帶的超級終端。設置如奇偶校驗:無數(shù)據(jù)流控制:無打開配置到的CRT或者超級終端,按“Enter”鍵,屏幕出現(xiàn)登陸的提示符,即連接成功。如果沒有顯示,請檢查線纜或者終端的配置是否正確。2.2system系統(tǒng)參數(shù)配置system是屬于EX交換機基本配置部分,在進行其它配置之前需要先完成該部分內容配置,主要配置工作如下:用心、精心、決心、匠心setsetsystemroot-authenticationplain-text-passwordNewpassword:Retypenewpassword:setsetsystemhost-nameEX4200-1//EX4200-1為主機名setsetsystemname-serverdeletedeletesystemname-serversetsetsystemtime-zoneAsia/Shanghai//設置時區(qū)setdate200810301407.00//設置時間,在用戶模式下配置,MMDDhhmmsssetsetsystemntpserver//設置NTP服務器地址setsystemntpauthentication-key1typemd5value"password"http://設addressNTPIPdeletedeletesystemntp用心、精心、決心、匠心setsetsystemservicestelnetdeletedeletesystemservicestelnetsetsetsystemservicesftpdeletedeletesystemservicesftpsetsetsystemservicessshdeletedeletesystemservicessshsetsetsystemservicesweb-managementhttpdeletedeletesystemservicesweb-managementhttp用心、精心、決心、匠心setsetsystemloginuserlabclasssuper-user//添setsystemloginuserlabauthenticationplain-text-passwordNewpassword:Retypenewpassword:2修改用戶類別setsystemloginuserlabclassread-only//修改lab用戶為只讀用戶operatorread-onlysuper-userunauthorizedpermissions[clearnetworkresettraceview]permissions[view]permissions[all]permissions[none]修改用戶密碼setsetsystemloginuserlabauthenticationplain-text-password//修改lab用戶為只讀用戶deletedeletesystemloginuserlab//刪除lab用戶先創(chuàng)建一個新的用戶類別,指定該用戶類別具有的權限setsetsystemloginclasslab_classpermissionssetsystemloginclasslab_classpermissionssetsystemloginclasslab_classidle-timeoutconfigureview//添加類別名稱為accessaccess-controladminCanviewaccessconfigurationCanmodifyaccessconfigurationCanviewuseraccounts新建/修改用戶并指定該用戶類別為剛才創(chuàng)建的類別:用心、精心、決心、匠新建/修改用戶并指定該用戶類別為剛才創(chuàng)建的類別:admin-controllclearconfigureconadmin-controllclearconfigurecontrolfieldfirewallfirewall-controlfloppyflow-tapflow-tap-controlflow-tap-operationinterfaceinterface-controlmaintenancenetworkresetrollbackroutingrouting-controlretsecret-controlsecuritysecurity-controlsnmp-controltemsystem-controlracetrace-controlviewview-configurationAllpermissionbitsturnedonCanclearlearnednetworkinfoCanenterconfigurationmodeCanmodifyanyconfigCanusefielddebugcommandsCanviewfirewallconfigurationCanmodifyfirewallconfigurationCanreadandwritethefloppyCanviewflow-tapconfigurationCanmodifyflow-tapconfigurationCantapflowsCanviewinterfaceconfigurationCanmodifyinterfaceconfigurationCanbecomethesuper-userCanaccessthenetworkCanreset/restartinterfacesanddaemonsCanrollbacktopreviousconfigurationsCanviewroutingconfigurationCanmodifyroutingconfigurationCanviewsecretstatementsCanmodifysecretstatementsCanviewsecurityconfigurationCanmodifysecurityconfigurationCanstartalocalshellCanviewSNMPconfigurationCanmodifySNMPconfigurationCanviewsystemconfigurationCanmodifysystemconfigurationCanviewtracefilesettingsCanmodifytracefilesettingsCanviewcurrentvaluesandstatisticsCanviewallconfiguration(notincludingsecrets)setsetsystemloginuserlabclasslab_class//設置用戶為新建用戶類別用心、精心、決心、匠心vlansvlanseditvlansvlans面)里面可以創(chuàng)EX交換機支持三層功能,如果要在交換機上配置三層VLAN網(wǎng)關,需要先創(chuàng)建一個anEX的三層端口,而不同VLAN通過不同的unitxx子端口來產(chǎn)生(xx為子端口號),子端口VLAN配置步驟nVLANgesetvlans“l(fā)ab_vlan”vlanid10setinterfacesge-0/0/1unit0familyethernet-switchingport-modeaccesssetinterfacesge-0/0/1unit0familyethernet-switchingvlanmembers10setinterfacesvlanunit10familyinetaddress/24setvlansvlanl3-interfacevlan.10//vlan子端口和VLAN對應起來2.3.2VLAN配置規(guī)范要求2.3.3setsetvlans“l(fā)ab_vlan”vlanid10//創(chuàng)建vlanid為10,名字為lab_vlansetvlansjuniper_vlanvlan-id20將將端口加入到指定vlansetinterfacesge-0/0/1unit0familyethernet-switchingport-modeaccess用心、精心、決心、匠心//下面命令將端口//下面命令將端口加入到vlansetinterfacesge-0/0/1unitsetinterfacesge-0/0/2unit者setinterfacesge-0/0/1unit“l(fā)ab_vlan”0familyethernet-switchingvlanmembers100familyethernet-switchingvlanmembers200familyethernet-switchingvlanmembersshowshowvlansshowethernet-switchinginterfaceslab@EX4200-1#runshowvlansNameTagInterfacesdefaultge-0/0/7.0*,(*表示正在使用的接口)ge-0/0/14.0*,ge-0/0/17.0,ge-0/0/18.0,ge-0/0/19.0,ge-0/0/20.0,ge-0/0/21.0,ge-0/0/22.0,ge-0/0/23.0juniper_vlan20ge-0/0/2.0lab_vlan10ge-0/0/1.0mgmtbme0.32769lab@EX4200-1#lab@EX4200-1>showethernet-switchinginterfacesInterfaceStateVLANmembersBlockingbme0.32769nmgmtunblockedge-0/0/7.0updefaultunblockedge-0/0/14.0updefaultunblockedge-0/0/17.0ndefaultunblockedge-0/0/18.0ndefaultunblockedge-0/0/19.0ndefaultunblockedge-0/0/20.0ndefaultunblockedge-0/0/21.0ndefaultunblockedge-0/0/22.0ndefaultunblockedge-0/0/23.0ndefaultunblockedge-1/0/1.0nlab_vlanunblocked用心、精心、決心、匠心ge-1/0/2.0downjuniper_vlanunblockedlab@EX4200-1#4修改端口VLAN將端口加入到指定vlansetinterfacesge-0/0/1unit0familyethernet-switchingport-modeaccesssetinterfacesge-0/0/1unit0familyethernet-switchingvlanmembers10者setinterfacesge-0/0/1unit0familyethernet-switchingvlanmembers“l(fā)ab_vlan”deletedeleteinterfacesge-0/0/1unit0familyethernet-switchingport-modeaccessdeleteinterfacesge-0/0/1unit0familyethernet-switchingvlanmembers10者deleteinterfacesge-0/0/1unit0familyethernet-switchingvlanmembers“l(fā)ab_vlan”deletedeletevlansvlanl3-interfacevlan.10deletedeletevlans“l(fā)ab_vlan”setsetvlanslabvlan-id100//創(chuàng)建vlan100setinterfacesvlanunit100familyinetaddress29/25setvlansvlanl3-interfacevlan.100//vlan子端口和VLAN對應起來用心、精心、決心、匠心Trunk配置步驟setinterfacesge-0/0/1unit0familyethernet-switchingport-modetrunkdeleteinterfacesge-0/0/1unit0familyethernet-switchingport-modetrunksetinterfacesge-0/0/1unit0familyethernet-switchingvlanmembers[1020]deleteinterfacesge-0/0/1unit0familyethernet-switchingvlanmembers101端口配置規(guī)范要求(1)在連接路由器或者交換機的時候要求指定速率和工作模式。(3)和其它廠家互聯(lián),一定要在兩邊設置指定工作模式和端口速率,不能采用自動協(xié)商(避免協(xié)商出現(xiàn)問題)setinterfacesge-0/0/1ether-optionsspeed1g//設置端口為setinterfacesge-0/0/1ether-optionsspeedauto-negotiation//設置速率為自動協(xié)商setinterfacesge-0/0/1ether-optionsspeed后面可以跟的參數(shù)是:auto-negotiationEnableauto-negotiation用心、精心、決心、匠心3修改端口工作模式etherether-optionslink-modefull-duplexether-optionslink-modeautomatic//設置setinterfacesge-0/0/1//設置端口全雙工模式setinterfacesge-0/0/1工作模式為自動協(xié)商setinterfacesge-0/0/1ether-optionslink-mode后面可以跟的參數(shù)automaticfull-duplexhalf-duplexAutomaticnegotiateduplexFull-duplexoperationHalf-duplexoperationdeletedeleteinterfacesge-0/0/1unit0familyethernet-switching//刪setinterfacesge-0/0/1unit0familyinet//設置端口為L3模式setinterfacesge-0/0/1unit0familyinetaddress/30deletedeleteinterfacesge-0/0/1unit式參數(shù)setinterfacesge-0/0/15unit0familyethernet-switching//將端生成樹協(xié)議(SpanningTree)是一種鏈路管理協(xié)議,它為網(wǎng)絡提供二層路徑冗余同時防RSTP覽快速生成樹協(xié)議(rapidspaningtreeprotocol):802.1w由802.1d發(fā)展而成,這種協(xié)議在網(wǎng)絡結構發(fā)生變化時,能更快的收斂網(wǎng)絡。它比802.1d多了兩種端口類型:預備端口類型(alternateport)和備份端口類型。STP(SpanningTreeProtocol)是生成樹協(xié)議的英文縮寫。該協(xié)議可應用于環(huán)路網(wǎng)絡,通過一定的算法實現(xiàn)路徑冗余,同時將環(huán)路網(wǎng)絡修剪成無環(huán)路的樹型網(wǎng)絡,從而避免報文在環(huán)路網(wǎng)絡中的增生和無限循環(huán)。用心、精心、決心、匠心STP的基本原理是,通過在交換機之間傳遞一種特殊的協(xié)議報文(在IEEE802.1D中這種協(xié)議報文被稱為“配置消息”)來確定網(wǎng)絡的拓撲結構。配置消息中包含了足夠的信息來保證交換機完成生成樹計算。STP的基本思想就是生成“一棵樹”,樹的根是一個稱為根橋的交換機,根據(jù)設置不同,不同的交換機會被選為根橋,但任意時刻只能有一個根橋。由根橋開始,逐級形成一棵樹,根橋定時發(fā)送配置報文,非根橋接收配置報文并轉發(fā),如果某臺交換機能夠從兩個以上的端口報文,則說明從該交換機到根有不止一條路徑,便構成了循環(huán)回路,此時交換機根據(jù)端口的配置選出一個端口并把其他的端口阻塞,消除循環(huán)。當某個端口長時間不能接收到配置報文的時候,交換機認為端口的配置超時,網(wǎng)絡拓撲可能已經(jīng)改變,此時重新計算網(wǎng)功能介紹:生成樹協(xié)議最主要的應用是為了避免局域網(wǎng)中的網(wǎng)絡環(huán)回,解決成環(huán)以太網(wǎng)網(wǎng)絡的“廣播風暴”問題,從某種意義上說是一種網(wǎng)絡保護技術,可以消除由于失誤或者意外帶來的循交換機的端口狀態(tài)交換機上一個原來被阻塞掉的端口由于在最大老化時間內沒有收到BPDU,從阻塞狀態(tài)轉變?yōu)閮A聽狀態(tài),傾聽狀態(tài)經(jīng)過一個轉發(fā)延遲(15秒)到達學習狀態(tài),經(jīng)過一個轉發(fā)延遲時間如果到達傾聽狀態(tài)后發(fā)現(xiàn)本端口在新的生成數(shù)中不應該由此端口轉發(fā)數(shù)據(jù)則直接回到阻塞狀態(tài)。當拓撲發(fā)生變化,新的配置消息要經(jīng)過一定的時延才能傳播到整個網(wǎng)絡,這個時延稱為轉發(fā)延遲(ForwardDelay),協(xié)議默認值是15秒。在所有網(wǎng)橋收到這個變化的消息之前,若舊拓撲結構中處于轉發(fā)的端口還沒有發(fā)現(xiàn)自己應該在新的拓撲中停止轉發(fā),則可能存在臨時環(huán)路。為了解決臨時環(huán)路的問題,生成樹使用了一種定時器策略,即在端口從阻塞狀態(tài)到轉發(fā)狀態(tài)中間加上一個只學習MAC地址但不參與轉發(fā)的中間狀態(tài),兩次狀態(tài)切換的時間長度都是ForwardDelay,這樣就可以保證在拓撲變化的時候不會產(chǎn)生臨時環(huán)路。在802.1D的協(xié)議中,端口有這樣幾種狀態(tài):Blocking:處于這個狀態(tài)的端口不能夠參與轉發(fā)數(shù)據(jù)報文,但是可以接收配置消息,并Listening:處于這個狀態(tài)的端口也不參與數(shù)據(jù)轉發(fā),不進行地址學習;但是可以接收并用心、精心、決心、匠心Learning:處于這個狀態(tài)的端口同樣不能轉發(fā)數(shù)據(jù),但是開始地址學習,并可以接收、處理和發(fā)送配置消息。Forwarding:一旦端口進入該狀態(tài),就可以轉發(fā)任何數(shù)據(jù)了,同時也進行地址學習和配置消息的接收、處理和發(fā)送。A、STP沒有明確區(qū)分端口狀態(tài)與端口角色,收斂時主要依賴于端口狀態(tài)的切換。RSTP比較明確的區(qū)分了端口狀態(tài)與端口角色,且其收斂時更多的是依賴于端口角色的切換。B、STP端口狀態(tài)的切換必須被動的等待時間的超時。而RSTP端口狀態(tài)的切換卻是一種UP/A機制即Proposal/Agreement機制。其目的是使一個指定端口盡快進入Forwarding狀態(tài)。其過程的完成根據(jù)以下幾個端口變量:ProposingDiscardingLearning位。并向下游交換傳遞Proposal位被置位的BPDU。B)Proposed。當端口收到對端的指定端口發(fā)來的攜帶Proposal的BPDU的時候。該變量置位。該指示本網(wǎng)段上的指定端口希望忙進入Forwarding狀態(tài)。C)sync。當Proposed被設置以后,收到Proposal置位信息的根端口會依次為自己的其Alternate、Backup和邊緣端口會馬上設置該變量。根端口監(jiān)視其他端口的synced,當所有nt口角色定段是“根端口”,該變量被設置。Agreed變量一旦被置位,指定端口馬上轉入MSTP覽MSTP(MultipleSpanningTreeProtocol)MST(MultipleSpanningTree,多生成樹)多生成樹(MST)是把IEEE802.1w的快速生成樹(RST)算法擴展而得到的。采用多生成樹(MST),能夠通過干道(trunks)建立多個生成樹,關聯(lián)VLANs到相關的徑和負載均衡,提高了網(wǎng)絡容錯能力,因為一個進程(轉發(fā)路徑)的故障不會影響其他進程 (轉發(fā)路徑)。用心、精心、決心、匠心VLAN進程分配的橋中,必須用同樣的MST配置信息來配置一組橋,這使得這些橋能參和到一組生成樹進程中,具備同樣的MST配置信息的互連的橋構成多生成樹區(qū)(MSTRegion)。多生成樹(MST)使用修正的快速生成樹(RSTP)協(xié)議,叫做多生成樹協(xié)議(MSTP)。MSTP(MultipleSpanningTreeProtocol,多生成樹協(xié)議)將環(huán)路網(wǎng)絡修剪成為一個無環(huán)的樹型網(wǎng)絡,避免報文在環(huán)路網(wǎng)絡中的增生和無限循環(huán),同時還提供了數(shù)據(jù)轉發(fā)的多個冗余路徑,在數(shù)據(jù)轉發(fā)過程中實現(xiàn)VLAN數(shù)據(jù)的負載均衡。MSTP兼容STP和RSTP,并且可以彌補STP和RSTP的缺陷。它既可以快速收斂,也能使不同VLAN的流量沿各自的路徑分發(fā),從而為冗余鏈路提供了更好的負載分擔機制。通過增加“實例”(將多個VLAN整合到一個集合中)這個概念,將多個VLAN捆綁到一個實例中,以節(jié)省通信開銷和資源占用率。MSTP把一個交換網(wǎng)絡劃分成多個域,每個域內形成多棵生成樹,生成樹之間彼此獨立。MSTP將環(huán)路網(wǎng)絡修剪成為一個無環(huán)的樹型網(wǎng)絡,避免報文在環(huán)路網(wǎng)絡中的增生和無限循環(huán),同時還提供了數(shù)據(jù)轉發(fā)的多個冗余路徑,在數(shù)據(jù)轉發(fā)過程中實現(xiàn)VLAN數(shù)據(jù)的負載分2.6.3STP配置實例(生成樹)setprotocolsstpenablesetprotocolsstpbridge-priority8k優(yōu)先值,值從0-6553,值大優(yōu)先Junos8K=IOS8192,JunosK=IOS1024setprotocolsstpinterfacege-0/0/1.0priority8//設置stp端口優(yōu)先值,值從0-255,較小優(yōu)先setprotocolsstpinterfacege-0/0/2.0priority8setprotocolsstpenablesetprotocolsstpbridge-priority16ksetprotocolsstpinterfacege-0/0/1.0priority16setprotocolsstpinterfacege-0/0/2.0priority16setprotocolsstpenablesetprotocolsstpbridge-priority32ksetprotocolsstpinterfacege-0/0/1.0priority32setprotocolsstpinterfacege-0/0/2.0priority32用心、精心、決心、匠心Showspan-treebridge2.6.4RSTP配置實例(快速生成樹)setvlansvoice-vlandescription“VoiceVLAN"setvlansvoice-vlanvlan-id10setvlansemployee-vlandescription“EmployeeVLAN"setvlansemployee-vlanvlan-id20setvlansguest-vlandescription“GuestVLAN"setvlansguest-vlanvlan-id30setvlanscamera-vlandescription“CameraVLAN"setvlanscamera-vlanvlan-id40setinterfacesge-0/0/1unit0familyethernet-switchingvlanmemberssetinterfacesge–0/0/2unit0familyethernet-switchingvlanmemberssetinterfacesge–0/0/3unit0familyethernet-switchingvlanmemberssetinterfacesge–0/0/1unit0familyethernet-switchingport-moderunksetinterfacesge-0/0/2unit0familyethernet-switchingport-moderunksetinterfacesge-0/0/3unit0familyethernet-switchingport-moderunksetprotocolsrstpbridge-priority16k//設置rstp的優(yōu)優(yōu)先值setprotocolsrstpinterfacege-0/0/1.0cost1000//設置rstp端口權值setprotocolsrstpinterfacege-0/0/1.0modepoint-to-point//設置setprotocolsrstpinterfacege-0/0/2.0cost1000setprotocolsrstpinterfacege-0/0/2.0modepoint-to-pointsetprotocolsrstpinterfacege-0/0/3.0cost1000setprotocolsrstpinterfacege-0/0/3.0modepoint-to-pointPsetvlansvoice-vlandescription“VoiceVLAN"setvlansvoice-vlanvlan-id10setvlansemployee-vlandescription“EmployeeVLAN"setvlansemployee-vlanvlan-id20用心、精心、決心、匠心setvlansguest-vlandescription“GuestVLAN"setvlansguest-vlanvlan-id30setvlanscamera-vlandescription“CameraVLAN"setvlanscamera-vlanvlan-id40setinterfacesge-0/0/1unit0familyethernet-switchingvlanmemberssetinterfacesge–0/0/2unit0familyethernet-switchingvlanmemberssetinterfacesge–0/0/1unit0
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025-2030全球工業(yè)彩色標簽打印機行業(yè)調研及趨勢分析報告
- 2025-2030全球嵌入式格柵熒光燈行業(yè)調研及趨勢分析報告
- 2025年全球及中國電腦鎮(zhèn)痛泵行業(yè)頭部企業(yè)市場占有率及排名調研報告
- 2025年全球及中國可編程玩具行業(yè)頭部企業(yè)市場占有率及排名調研報告
- 四川省宜賓市高三“二診”測試語文試題(含答案)
- 2025商場地產(chǎn)景區(qū)蛇年元宵節(jié)情人節(jié)發(fā)財(好巳花生主題)活動策劃方案
- 物流協(xié)議合同
- 智能環(huán)保設備研發(fā)生產(chǎn)合同
- 2025委托代銷合同樣本新范文
- 三方消防工程合同
- 《聚焦客戶創(chuàng)造價值》課件
- 公安校園安全工作培訓課件
- PTW-UNIDOS-E-放射劑量儀中文說明書
- 保險學(第五版)課件全套 魏華林 第0-18章 緒論、風險與保險- 保險市場監(jiān)管、附章:社會保險
- 許小年:淺析日本失去的30年-兼評“資產(chǎn)負債表衰退”
- 典范英語2b課文電子書
- 17~18世紀意大利歌劇探析
- β內酰胺類抗生素與合理用藥
- 何以中國:公元前2000年的中原圖景
- 第一章:公共政策理論模型
- GB/T 4513.7-2017不定形耐火材料第7部分:預制件的測定
評論
0/150
提交評論