【正文】
設計。局域網(wǎng)內(nèi)的主機將自己的缺省路由下一跳設置為該虛擬路由器的IP地址。 Command Purpose Step 1 interface interfaceid Enter interface configuration mode, and enter the Layer 3 interface on which you want to enable HSRP. Step 3 it can be learned on the other interfaces. ? (Optional) secondary—The IP address is a secondary hot standby router interface. If neither router is designated as a secondary or standby router and no priorities are set, the primary IP addresses are pared and the higher IP address is the active router, with the next highest as the standby router. Step 4 show standby [interfaceid [group]] Verify the configuration. Step 6 configure terminal Enter global configuration mode. Step 2 standby [groupnumber] priority priority [preempt [delay delay]] Set a priority value used in choosing the active router. The range is 1 to 255。 standby [groupnumber] [priority priority] preempt [delay delay] Configure the router to preempt, which means that when the local router has a higher priority than the active router, it assumes control as the active router. ? (Optional) groupnumber—The group number to which the mand applies. ? (Optional) priority—Enter to set or change the group priority. The range is 1 to 255。 standby [groupnumber] track type number [interfacepriority] Configure an interface to track other interfaces so that if one of the other interfaces goes down, the device39。 第6章靜態(tài)路由靜態(tài)路由是一種特殊的路由,它由管理員手工配置而成。【Switch相關配置】Switch configure terminal Enter configuration mands, one per line.如果在300秒之內(nèi)收不到從某一網(wǎng)上鄰居發(fā)來的路由刷新報文,則將該網(wǎng)上鄰居的路由從路由表中清除。為限制收斂時間,RIP規(guī)定metric取值0~15之間的整數(shù),大于或等于16的跳數(shù)被定義為。RIP使用跳數(shù)(Hop Count)來衡量到達信宿機的距離,稱為路由權(quán)(Routing Metric)。RIP路由RIP是一種基于距離矢量(DistanceVector)算法的協(xié)議,它使用UDP報文進行路由信息的交換。End with CNTL/Z.Switch(config) ip routing Switch(config)ip route next-network next-address舉例:Switch(config)ip route 在組網(wǎng)結(jié)構(gòu)比較簡單的網(wǎng)絡中,只需配置靜態(tài)路由就可以實現(xiàn)網(wǎng)絡互連,仔細設置和使用靜態(tài)路由可以防止路由振蕩,缺點是有可能會產(chǎn)生路由黑洞。路由協(xié)議配置優(yōu)先級0為系統(tǒng)保留給特殊用途來使用,255則是系統(tǒng)保留給IP地址擁有者。 the default is 0 (no delay before taking over). Use the no form of the mand to restore the default values. Step 5 the default is 0 (no delay before taking over). Use the no form of the mand to restore the default values. Step 4 Enter interface configuration mode, and enter the HSRP interface on which you want to set priority. Step 3 interface interfaceid Purpose Step 1 Command (Optional) Save your entries in the configuration file. copy runningconfig startupconfig Return to privileged EXEC mode. Step 5 end Create (or enable) the HSRP group using its number and virtual IP address. ? (Optional) groupnumber—The group number on the interface for which HSRP is being enabled. The range is 0 to 255。 standby [groupnumber] ip [ipaddress [secondary]] Enter global configuration mode. Step 2 configure terminal 當備份組內(nèi)的Master交換機不能正常工作時,備份組內(nèi)的其它Backup交換機將接替不能正常工作的Master交換機成為新的Master交換機,繼續(xù)向網(wǎng)絡內(nèi)的主機提供路由服務,從而實現(xiàn)網(wǎng)絡內(nèi)的主機不間斷地與外部網(wǎng)絡進行通信。虛擬的交換機擁有自己的真實IP地址(這個IP地址可以和備份組內(nèi)的某個交換機的接口地址相同),備份組內(nèi)的交換機也有自己的IP地址。交換機HSRP配置『兩臺交換機主備的配置流程』通常一個網(wǎng)絡內(nèi)的所有主機都設置一條缺省路由,主機發(fā)往外部網(wǎng)絡的報文將通過缺省路由發(fā)往該網(wǎng)關設備,從而實現(xiàn)了主機與外部網(wǎng)絡的通信。核心交換機將vlan做為一種接口對待,就象路由器上的一樣,如下所示: switch(config)interface vlan 10 switch (configif)ip address VLAN10接口IP switch (config)interface vlan 11 switch (configif)ip address VLAN11接口IP switch (config)interface vlan 12 switch (configif)ip address VLAN12接口IP再在各接入VLAN的計算機上設置與所屬VLAN的網(wǎng)絡地址一致的IP地址,并且把默認網(wǎng)關設置為該VLAN的接口地址。給VLAN分配IP地址分兩種情況,其一,給VLAN所有的節(jié)點分配靜態(tài)IP地址;其二,給VLAN所有的節(jié)點分配動態(tài)IP地址。配置VTP DOMAINVTP DOMAIN 稱為管理域。 驗證VLAN配置情況.Step 7 show interfaces interfaceid switchport remove關健字Step 5 配置二層口為trunkStep 4 switchport mode trunk 進入配置狀態(tài)Step 2 configure terminal 保存配置使用 default interface interfaceid 還原到缺省配置狀態(tài)。 copy runningconfig startupconfig 驗證端口的VLAN號Step 7 show runningconfig interface interfaceid 把端口分配給某一VLANStep 5 switchport access vlan vlanid 進入要分配的端口Step 3 interface interfaceid 目的 Step 1 命令 將端口分配給一個VLAN 注意 保存配置(可選)舉例如下:Switch vlan databaseSwitch(vlan) vlan 20 name test20Switch(vlan) exitAPPLY pleted.Exiting....Switch copy runningconfig startup config 更新VLAN數(shù)據(jù)庫并退出Step 5 exit 加入VLAN號及VLAN名Step 3 vlan vlanid name vlanname 目的 Step 1 命令 (可選) 保存配置用no vlan name 或 no vlan mtu 退回到缺省的vlan配置狀態(tài)舉例如下:Switch configure terminalSwitch(config) vlan 20Switch(configvlan) name test20Switch(configvlan) end也可以在VLAN狀態(tài)下,進行VLAN配置: copy runningconfig startup config 退出Step 6 end (可選)輸入一個VLAN名,如果沒有配置VLAN名,缺省的名字是VLAN號前面用0填滿的4位數(shù),如VLAN0004是VLAN4的缺省名字Step 4 name vlanname 配置正常范圍的VLANVLAN號1, 1002到1005是自動生成的不能被去掉。 交換機必須配置成VTP透明模式當需要生成VLAN 號從1006到4094. 本交換機支持基于每一VLAN的生成樹(PVST),最多支持128個生成樹。簡介VLAN(Virtual Local Area Network),是一種通過將局域網(wǎng)內(nèi)的設備邏輯地而不是物理地劃分成一個個網(wǎng)段從而實現(xiàn)虛擬工作組的技術(shù)。對于三層接口,你人工創(chuàng)建該邏輯接口:Figure 331 Typical EtherChannel Configuration 舉例:把交換機A,B的1,2號口添加到同一個組5里面SwitchA configure terminal SwitchA (config) interface range gigabitethernet0/1 2 SwitchA (configifrange) switchport mode accessSwitchA (configifrange) switchport access vlan 10SwitchA (configifrange) channelgroup 5 mode ONSwitch(configifrange) end SwitchB configure terminal SwitchB(config) interface range gigabitethernet0/1 2 SwitchB(configifrange) switchport mode accessSwitchB(configifrange) switchport access vlan 10SwitchB(configifrange) channelgroup 5 mode ONSwitchB(configifrange) end 第4章你可以把多干道端口加到一個邏輯的干道端口;把多訪問端口加到一個邏輯訪問端口;或者多隧道端口加到一個邏輯的隧道接口。以太通道端口組(Ethernet Port Groups