三層交換機(jī)直連_第1頁(yè)
三層交換機(jī)直連_第2頁(yè)
三層交換機(jī)直連_第3頁(yè)
三層交換機(jī)直連_第4頁(yè)
三層交換機(jī)直連_第5頁(yè)
已閱讀5頁(yè),還剩14頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、目錄:一、交換機(jī)登錄密碼設(shè)置二、三層交換機(jī)直連三、交換機(jī)劃分VLAN四、三層交換機(jī)VLAN實(shí)驗(yàn)五、思科三層交換機(jī)配置實(shí)驗(yàn)六、一、交換機(jī)登錄密碼設(shè)置cisco的3560、2960交換機(jī)配置telnet的方法首先,如果你要在別的vlan中也能夠telnet那么 必須要有三層設(shè)備,同時(shí),在三層設(shè)備上的ip routing 必須開(kāi)啟,開(kāi)啟方式是,在config模式下 輸入命令 ip routing 即可,然后就可以在任何一個(gè)vlan中 用交換機(jī)的ip地址來(lái)登陸 具體方法如下1,設(shè)置管理ip 就用來(lái)登陸交換機(jī)的ipconf tint vlan 1ip add2.必須要設(shè)置enalbe密碼 否則telne

2、t時(shí) 會(huì)提示 交換機(jī)沒(méi)有設(shè)置密碼 無(wú)法telnetconf tenab pass *3. 然后進(jìn)入到 vty模式下 開(kāi)啟交換機(jī)的遠(yuǎn)程telnet功能conf tline vty 0 4pass *login Switchen Switch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#enable password able 輸入EN 時(shí)的密碼Switch(config)#line cons 0Switch(config-line)#password lineSwitch(c

3、onfig-line)#loginSwitch(config-line)#line vty 0 4Switch(config-line)#password vtySwitch(config-line)#loginSwitch(config-line)#exitSwitch(config)#exit%SYS-5-CONFIG_I: Configured from console by consoleSwitch#copy running-config startup-configDestination filename startup-config? 2960%Error copying nvr

4、am:2960 (Invalid argument)登錄時(shí):User Access VerificationPassword: 輸入密碼 lineSwitchenPassword: 輸入密碼 able二、三層交換機(jī)直連3560 fa0/1-2960 fa0/2 (switch 1)3560 fa0/1-2960 fa0/2 (switch 2)3560 fa0/2-3560 fa0/2 (交換機(jī)直連)VLAN 2 192.168.2.1VLAN 3 192.168.3.1VLAN 4 192.168.4.1VLAN 5 192.168.5.12960-sw1Fa0/1-pc0 網(wǎng)關(guān):192.1

5、68.1.1 IP:192.168.1.22960-sw2Fa0/1-pc1 網(wǎng)關(guān):192.168.2.1 IP:192.168.2.2Switch 3560-1SwitchenSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#inter fa0/1Switch(config-if)#no switchport%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state

6、to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if)#ip address 192.168.1.1 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#inter fa0/2Switch(config-if)#no switchport%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, chang

7、ed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to upSwitch(config-if)#ip address 192.168.3.1 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#exitSwitch(config)#router ripSwitch(config-router)#network 192.168.1.0Switch(config-router)#network 192

8、.168.3.0Switch(config-router)#exitSwitch(config)#pc 1網(wǎng)關(guān):192.168.1.1 IP:192.168.1.2Switch 3560-1SwitchenSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#inter fa0/1Switch(config-if)#no switchport%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1,

9、changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if)#ip address 192.168.2.1 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#inter fa0/2Switch(config-if)#no switchport%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthe

10、rnet0/2, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to upSwitch(config-if)#ip address 192.168.3.2 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#router ripSwitch(config-router)#network 192.168.2.0Switch(config-router)#network 192.168.

11、3.0Switch(config-router)#exitSwitch(config)#pc 2網(wǎng)關(guān):192.168.2.1 IP:192.168.2.2三、交換機(jī)劃分VLAN說(shuō)明:一臺(tái)3560 交換機(jī) vlan 10 IP:192.168.10.1 端口:fa0/1 - 9 vlan 20 IP:192.168.20.1 端口:fa0/10 - 20 pc 0 網(wǎng)關(guān):192.168.10.1 IP:192.168.10.2 vlan 10 pc 1 網(wǎng)關(guān):192.168.10.1 IP:192.168.10.3 vlan 10 pc 2 網(wǎng)關(guān):192.168.20.1 IP:192.168.

12、20.2 vlan 20 pc 3 網(wǎng)關(guān):192.168.20.1 IP:192.168.20.3 vlan 20SwitchenSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 10Switch(config-vlan)#exitSwitch(config)#inter vlan 10%LINK-5-CHANGED: Interface Vlan10, changed state to upSwitch(config-if)#ip address 192

13、.168.10.1 255.255.255.0Switch(config-if)#exitSwitch(config)#inter fa0/1Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10(config-if)#exitSwitch(config-if)#inter fa0/2Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config)#vla

14、n 20Switch(config-vlan)#exitSwitch(config)#inter vlan 20Switch(config-if)#ip address 192.168.20.1 255.255.255.0Switch(config-if)#exitSwitch(config)#inter fa0/10Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 20Switch(config-if)#inter fa0/11Switch(config-if)#switchpor

15、t mode accessSwitch(config-if)#switchport access vlan 20Switch(config-if)#exitSwitch(config)#exitSwitch(config)#Switch# show vlan pc 1 fa0/1 網(wǎng)關(guān):192.168.10.1 IP:192.168.10.2 pc 2 fa0/2 網(wǎng)關(guān):192.168.10.1 IP:192.168.10.3pc 3 fa0/10 網(wǎng)關(guān):192.168.20.1 IP:192.168.20.2pc 4 fa0/11 網(wǎng)關(guān):192.168.20.1 IP:192.168.20.

16、3四、三層交換機(jī)VLAN實(shí)驗(yàn)將鼠標(biāo)移動(dòng)到連線的綠色點(diǎn)上即可看到兩端對(duì)應(yīng)端口3560 Gig0/1-2960 Gig1/1 (switch 1)3560 Gig0/2-2960 Gig1/1 (switch 2)VLAN 2 192.168.2.1VLAN 3 192.168.3.1VLAN 4 192.168.4.1VLAN 5 192.168.5.12960-sw1Fa0/1-pc1-1 vlan:2 網(wǎng)關(guān):192.168.2.1 IP:192.168.2.2Fa0/2-pc1-2 vlan:3 網(wǎng)關(guān):192.168.3.1 IP:192.168.3.22960-sw2Fa0/1-pc2-1

17、 vlan:4 網(wǎng)關(guān):192.168.4.1 IP:192.168.4.2Fa0/2-pc2-2 vlan:5 網(wǎng)關(guān):192.168.5.1 IP:192.168.5.2一、配置35601、在3560上配置VLAN以及相關(guān)信息SwitchenSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#exit%SYS-5-CONFIG_I: Configured from console by consoleSwitch#vlan database% Warning: It

18、is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 2VLAN 2 added: Name: VLAN0002Switch(vlan)#vlan 3VLAN 3 added: Name: VLAN0003Switch(vlan)#vlan 4VLAN 4 added: Name:

19、 VLAN0004Switch(vlan)#vlan 5VLAN 5 added: Name: VLAN0005Switch(vlan)#exitAPPLY completed.Exiting.Switch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#inter vlan 2%LINK-5-CHANGED: Interface Vlan2, changed state to upSwitch(config-if)#Switch(config-if)#ip address 1

20、92.168.2.1 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#inter vlan 3%LINK-5-CHANGED: Interface Vlan3, changed state to upSwitch(config-if)#Switch(config-if)#ip address 192.168.3.0 255.225.255.0Bad mask 0xFFE1FF00 for address 192.168.3.0Switch(config-if)#ip address 192.168.3.1 255.255.255.

21、0Switch(config-if)#inter vlan 4%LINK-5-CHANGED: Interface Vlan4, changed state to upSwitch(config-if)#Switch(config-if)#ip address 192.168.4.1 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#inter vlan 5%LINK-5-CHANGED: Interface Vlan5, changed state to upSwitch(config-if)#Switch(config-if)#

22、ip address 192.168.5.1 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#exit2、3560上配置trunk (注:這里使用的Packet Tracer 由于不支持通過(guò)switchport trunk encapsolution命令指定trunk協(xié)議,默認(rèn))Switch(config)#inter gi0/1Switch(config-if)#shutdown%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to administrati

23、vely down%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to downSwitch(config-if)#switchport mode Switch(config)#inter gi0/1Switch(config-if)#shutdownSwitch(config-if)#switchport mode trunkSwitch(config-if)#switchport trunk allowed vlan 1-5Switch(config-if)#no shut%

24、LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan3, changed state to up

25、%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan4, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan5, changed state to upSwitch(config-if)#inter gi0/2Switch(config-if)#shutdown%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to administratively down%LINEPROTO-5

26、-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to downSwitch(config-if)#switchport mode trunkSwitch(config-if)#switchport trunk allowed vlan 1-5Switch(config-if)#no shut%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Inte

27、rface GigabitEthernet0/2, changed state to upSwitch(config-if)#exitSwitch(config)#exit%SYS-5-CONFIG_I: Configured from console by consoleSwitch#show inter trunkPort Mode Encapsulation Status Native vlanGig0/1 on 802.1q trunking 1Gig0/2 on 802.1q trunking 1Port Vlans allowed on trunkGig0/1 1-5Gig0/2

28、1-5Port Vlans allowed and active in management domainGig0/1 1,2,3,4,5Gig0/2 1,2,3,4,5Port Vlans in spanning tree forwarding state and not prunedGig0/1 1,2,3,4,5Gig0/2 1,2,3,4,5Switch# 3、二層交換機(jī)配置Switch-2960-1 SwitchenSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(con

29、fig)#inter gi1/1Switch(config-if)#shutdown%LINK-5-CHANGED: Interface GigabitEthernet1/1, changed state to administratively down%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to downSwitch(config-if)#switchport mode trunkSwitch(config-if)#switchport trunk allowed vl

30、an 1-5Switch(config-if)#no shut%LINK-5-CHANGED: Interface GigabitEthernet1/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to upSwitch(config-if)#inter range fa 0/1 - 9Switch(config-if-range)#switchport access vlan 2% Access VLAN does not exist

31、. Creating vlan 2Switch(config-if-range)#inter range fa 0/10 - 20Switch(config-if-range)#switchport access vlan 2Switch(config-if-range)#inter range fa 0/10 - 20Switch(config-if-range)#switchport access vlan 3% Access VLAN does not exist. Creating vlan 3Switch(config-if-range)#Switch-2960-2SwitchenS

32、witch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#inter gi1/1Switch(config-if)#shutdown%LINK-5-CHANGED: Interface GigabitEthernet1/1, changed state to administratively down%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to down

33、Switch(config-if)#switchport mode trunkSwitch(config-if)#switchport trunk allowed vlan 1-5Switch(config-if)#no shut%LINK-5-CHANGED: Interface GigabitEthernet1/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to upSwitch(config-if)#inter range fa

34、 0/1 - 9Switch(config-if-range)#switchport access vlan 4% Access VLAN does not exist. Creating vlan 4Switch(config-if-range)#inter range fa 0/10 - 20Switch(config-if-range)#switchport access vlan 5% Access VLAN does not exist. Creating vlan 5Switch(config-if-range)#五、思科三層交換機(jī)配置實(shí)驗(yàn)3560 fa0/1-2960 fa0/1

35、5 (switch 1)3560 fa0/2-2960 fa0/15 (switch 2)VLAN 2 192.168.2.1VLAN 3 192.168.3.12960-sw1Fa0/1-pc1-1 vlan:2 網(wǎng)關(guān):192.168.2.1 IP:192.168.2.2Fa0/2-pc1-2 vlan:3 網(wǎng)關(guān):192.168.3.1 IP:192.168.3.22960-sw2Fa0/1-pc2-1 vlan:4 網(wǎng)關(guān):192.168.4.1 IP:192.168.4.2Fa0/2-pc2-2 vlan:5 網(wǎng)關(guān):192.168.5.1 IP:192.168.5.21、3560交換機(jī)的配

36、置 創(chuàng)建VTP域SwitchenSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname 35603560(config)#exit%SYS-5-CONFIG_I: Configured from console by console3560#vlan data% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being dep

37、recated. Please consult user documentation for configuring VTP/VLAN in config mode.3560(vlan)#vtp serverDevice mode already VTP SERVER.3560(vlan)#vtp domain syChanging VTP domain name from NULL to sy3560(vlan)#vtp password ciscoSetting device VLAN database password to cisco3560(vlan)#exitAPPLY compl

38、eted.Exiting.3560# 配置中繼 3560#config tEnter configuration commands, one per line. End with CNTL/Z.3560(config)#int range fa0/1 - 23560(config-if-range)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Inte

39、rface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up3560(config-if-range)#end%SYS-5-CONFIG_I: Configured from console by console3560#vlan da

40、ta% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode. 創(chuàng)建VLAN 3560(vlan)#vlan 2VLAN 2 added: Name: VLAN00023560(vlan)#vlan 3VLAN 3 added: Name: VLAN00033560(vlan)#exitAPP

41、LY completed.Exiting.3560#show vtp statuVTP Version : 2Configuration Revision : 2Maximum VLANs supported locally : 1005Number of existing VLANs : 7VTP Operating Mode : ServerVTP Domain Name : syVTP Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0xBB 0x59 0x9

42、8 0xCF 0x69 0xAA 0x53 0x02 Configuration last modified by 0.0.0.0 at 3-1-93 00:15:00Local updater ID is 0.0.0.0 (no valid interface found)3560#conf tEnter configuration commands, one per line. End with CNTL/Z.3560(config)#ip routing3560(config)#int vlan 2%LINK-5-CHANGED: Interface Vlan2, changed sta

43、te to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to up3560(config-if)#ip address 192.168.2.1 255.255.255.03560(config-if)#no shut3560(config-if)#exit3560(config)#int vlan 3%LINK-5-CHANGED: Interface Vlan3, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface

44、 Vlan3, changed state to up3560(config-if)#ip address 192.168.3.1 255.255.255.03560(config-if)#no shut3560(config-if)#end%SYS-5-CONFIG_I: Configured from console by console3560#2、2960 交換機(jī)命名為2960-sw1 創(chuàng)建VTP域SwitchenSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(confi

45、g)#hostname 2960-sw12960-sw1(config)#exit%SYS-5-CONFIG_I: Configured from console by console2960-sw1#vlan data% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode.2960-sw1

46、(vlan)#vtp clientSetting device to VTP CLIENT mode.2960-sw1(vlan)#vtp domain syChanging VTP domain name from NULL to sy2960-sw1(vlan)#vtp password ciscoSetting device VLAN database password to cisco2960-sw1(vlan)#exitAPPLY completed.Exiting.2960-sw1#%LINEPROTO-5-UPDOWN: Line protocol on Interface Fa

47、stEthernet0/15, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/15, changed state to up 配置中繼2960-sw1#conf tEnter configuration commands, one per line. End with CNTL/Z.2960-sw1(config)#int f0/152960-sw1(config-if)#switchport mode trunk2960-sw1(config-if)#end%SYS-5-C

48、ONFIG_I: Configured from console by console2960-sw1#show vtp statuVTP Version : 2Configuration Revision : 2Maximum VLANs supported locally : 255Number of existing VLANs : 7VTP Operating Mode : ClientVTP Domain Name : syVTP Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledM

49、D5 digest : 0xBB 0x59 0x98 0xCF 0x69 0xAA 0x53 0x02 Configuration last modified by 0.0.0.0 at 3-1-93 00:15:002960-sw1#conf tEnter configuration commands, one per line. End with CNTL/Z.2960-sw1(config)#int f0/12960-sw1(config-if)#switchport mode access2960-sw1(config-if)#switchport access vlan 22960-

50、sw1(config-if)#end%SYS-5-CONFIG_I: Configured from console by console2960-sw1#3、2960 交換機(jī) 創(chuàng)建VTP域SwitchenSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname 2960-sw22960-sw2(config)#exit%SYS-5-CONFIG_I: Configured from console by console2960-sw2#vlan data

51、% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode.2960-sw2(vlan)#vtp clientSetting device to VTP CLIENT mode.2960-sw2(vlan)#vtp domain syChanging VTP domain name from N

52、ULL to sy2960-sw2(vlan)#vtp password ciscoSetting device VLAN database password to cisco2960-sw2(vlan)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/15, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/15, changed state to up2960-sw2(vlan)#exitAPPLY completed.Exiting.配置中繼2960-sw2#conf tEnter configuration commands, one per line. End with CNTL/Z.2960-sw2(config)#int f0/152960-sw2(config-if)#switchport mode trunk2960-sw2(config-if)#end%SYS-5-CONFIG_I: Configured from console by console2960-sw

溫馨提示

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

最新文檔

評(píng)論

0/150

提交評(píng)論