配置命令與實例-思科三層交換機_第1頁
配置命令與實例-思科三層交換機_第2頁
配置命令與實例-思科三層交換機_第3頁
配置命令與實例-思科三層交換機_第4頁
配置命令與實例-思科三層交換機_第5頁
已閱讀5頁,還剩5頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、cisco三層交換機配置命令比較全面的三層交換機配置實例Enable /進入私有模式Con figure termi nal /進入全局模式service password-e ncrypti on /對密碼進行加密host name Catalyst 3550-12T1 /給三層交換機定義名稱en able password 123456. en able密碼En able secret 654321 en able這樣)的加密密碼(應(yīng)該是亂碼而不是 654321Ip sub net-zero /允許使用全0子網(wǎng)(默認都是打開的)Ip n ame-server 172.16.8.1 172.

2、16.8.2 /3550-12T1 對應(yīng)的 IP 地址是 172.16.8.1三層交換機名字CatalystService dhcp / 提供 DHCRK務(wù)ip routing /啟用三層交換機上的 路由模塊ExitVtp mode server /定義VTP工作模式為sever模式Vtp domain centervtp / 定義 VTP域的名稱為 centervtpVlan 2 name vlan2 /定義vian并給vian取名(如果不取名的話,vian2的名字應(yīng)該是vlan002)Vla n 3 n ame vla n3Vla n 4 n ame vla n4Vla n 5 n ame

3、 vla n5Vla n 6 n ame vla n6Vla n 7 n ame vla n7Vlan 8 name vlan8Vlan 9 name vlan9Exitinterface Port-channel 1 / 進入虛擬的以太通道組 1switchport trunk encapsulation dot1q /給這個接口的 trunk 封裝為802.1Q 的幀格式switchport mode trunk / 定義這個接口的工作模式為 trunkswitchport trunk allowed vlan all /在這個 trunk 上允許所有的 vlan通過Interface g

4、igabitethernet 0/1 /進入模塊 0 上的吉比特以太口 1switchport trunk encapsulation dotlq /給這個接口的 trunk 封裝為802.1Q 的幀格式switchport mode trunk / 定義這個接口的工作模式為 trunkswitchport trunk allowed vlan all /在這個 trunk 上允許所有的 vlan通過channel-group 1 mode on / 把這個接口放到快速以太通道組 1 中Interface gigabitethernet 0/2 /同上switchport trunk enca

5、psulation dotlqswitchport mode trunkswitchport trunk allowed vlan allchannel-group 1 mode onport-channel load-balance src-dst-ip /定義快速以太通道組的負載均衡方式(依 * 源和目的 IP 的方式)interface gigabitethernet 0/3 /進入模塊 0 上的吉比特以太口 3switchport trunk encapsulation dotlq /給 trunk 封裝為 802.1Qswitchport mode trunk /定義這個接口的工作模

6、式為 trunkswitchport access vlan 8 /把這些接口都分配到 vlan8 中switchport access vlan 8 /把這些接口都分配到 vlan8 中允許所有 vlan 信息通過switchport trunk allowed vlan all /interface gigabitethernet 0/4 / 同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface gigbitethernet 0/5 / 同上

7、switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface gigbitethernet 0/6 / 同上switchport trunk encapsulation dotlqswitchport mode trunkswitchprot trunk allowed vlan allinterface gigbitethernet 0/7 / 進入模塊 0 上的吉比特以太口 7Switchport mode access / 定義這個接口的工作模式為訪問

8、模式switchport access vlan 9 / 定義這個接口可以訪問哪個 vlan (實際就是 分配這個接口到 vlan )no shutdownspanning-tree vlan 6-9 cost 1000 / 在生成樹中, vlan6-9 的開銷定義 為 10000nextin terface range gigabitethernet 0/8- 10 / 進入模塊 0 上的吉比特以太口 8,9,10switchport mode access / 定義這些接口的工作模式為訪問模式no shutdownspanning-tree portfast / 在這些接口上使用 port

9、fast (使用 portfast 以后,在生成樹的時候不參加運算,直接成為轉(zhuǎn)發(fā)狀態(tài))interface gigabitethernet 0/11 / 進入模塊 0 上的吉比特以太口 11 switchport trunk encapsulation dotlq / 給這個接口封裝為 802.1Q switchport mode trunk / 定義這個接口的工作模式為 trunk switchport trunk allowed vlan all / 允許所有 vlan 信息通過 interface gigabitethernet 0/12 / 同上 switchport trunk enc

10、apsulation dotlq switchport mode trunk switchport trunk allowed vlan allinterface vlan 1 / 進入 vlan1 的邏輯接口(不是物理接口,用來給 vlan 做路由用)ip address 172.16.1.7 255.255.255.0 / 配置 IP 地址和子網(wǎng)掩碼no shutdownstandby 1 ip 172.16.1.9 /開啟了冗余熱備份(HSRP,冗余熱備份組1, 虛擬路由器的 IP 地址為 172.16.1.9standby 1 priority 110 preempt / 定義這個三層

11、交換機在冗余熱備份組1 中的優(yōu)先級為 110, preempt 是用來開啟搶占模式interface vlan 2 / 同上ip address 172.16.2.252 255.255.255.0no shutdownstandby 2 ip 172.16.2.254standby 2 priority 110 preemptip access-group 101 in / 在入方向上使用擴展的訪問控制列表 101switchport access vlan 8 /把這些接口都分配到 vlan8 中interface vlan 3 /同上ip address 172.16.3.252 255

12、.255.255.0 no shutdownstandby 3 ip 172.16.3.254standby 3 priority 110 preemptip access-group 101 in interface vlan 4 /同上ip address 172.16.4.252 255.255.255.0 no shutdownstandby 4 ip 172.16.4.254standby 4 priority 110 preemptip access-group 101 ininterface vlan 5ip address 172.16.5.252 255.255.255.0

13、no shutdownstandby 5 ip 172.16.5.254standby 5 priority 110 preemptip access-group 101 ininterface vlan 6ip address 172.16.6.252 255.255.255.0 no shutdownstandby 6 ip 172.16.6.254standby 6 priority 100 preempt interface vlan 7ip address 172.16.7.252 255.255.255.0no shutdownstandby 7 ip 172.16.7.254st

14、andby 7 priority 100 preemptinterface vlan 8ip address 172.16.8.252 255.255.255.0 no shutdownstandby 8 ip 172.16.8.254standby 8 priority 100 preemptinterface vlan 9ip address 172.16.9.252 255.255.255.0 no shutdownstandby 9 ip 172.16.9.254standby 9 priority 100 preempt擴展的訪問控制 address 的作access-list 10

15、1 deny ip any 172.16.7.0 0.0.0.255 / 列表 101access-list 101 permit ip any anyInterface vlan 1 /進入 vlan1 這個邏輯接口Ip helper-address 172.16.8.1 / 可以轉(zhuǎn)發(fā)廣播( helper 用就是把廣播轉(zhuǎn)化為單播,然后發(fā)向 172.16.8.1 )Interface vlan 2Ip helper-address 172.16.8.1Interface vlan 3ip helper-address 172.16.8.1in terface via n 4ip helper-address 172.16.8.1in terface vla n 5ip helper-address 172.16.8.1in terface vla n 6ip helper-address 172.16.8.1in terface vla n 7ip helper-address 172.16.8.1in terface vla n 9ip helper-address 172.16.8.1router rip / 啟用路由 協(xié)議RIPversion 2 / 使用的是RIPv2,如果沒有這句,則是使用RIPv1n etwo

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論