Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cisco網路設備之設定與管理 台大計資中心 李美雯

Similar presentations


Presentation on theme: "Cisco網路設備之設定與管理 台大計資中心 李美雯"— Presentation transcript:

1 Cisco網路設備之設定與管理 台大計資中心 李美雯
Phone :

2 大  綱 OSI參考模式的架構 Cisco路由器的操作與設定 網路環境的管理 IP資料管制

3 OSI參考模式之架構

4 OSI參考模式 應用層 : 展現層 : 會議層 : 提供使用者介面或應用程式介面連接網路 負責同層協定間資料交換的格式
負責與展現層之間建立、管理以及結束通訊

5 OSI參考模式(Cont.) 傳輸層 : 網路層 : 定義兩個端點主機間建立連線的基本原則
提供傳輸控制協定(TCP)與使用者資料流協定(UDP) 網路層 : 提供封包在不同網路間傳遞 定義了網路的定址方式、不同網路間傳遞方式、子網路間的傳遞、路由的選擇…

6 OSI參考模式(Cont.) 資料連結層 : 實體層 : 提供資料送往目的地之資訊 處理端點系統間的實體位址對應
定義了網路媒介的型態、連接器的型態、以及通訊訊號的型態

7 OSI參考模式各層間的通訊 協定堆疊(protocol stack) :
負責網路設備間的通訊 定義網路間訊息流通的規則 OSI 各層次間使用PDU (Protocol Data Units)交換訊息 封裝(encapsulation) : 將PDU放在封包的header中,將資料傳至下一層協定堆疊

8 IOS提供的服務 執行網路協定與功能 提供高速資料傳輸 提供網路安全管理 具備擴充性 提供穩定的環境

9 IOS指令模式 層級式的指令模式 EXEC指令編輯器 User EXEC level Privileged EXEC level
只能顯示設備的資訊,而無法更改設定 eg. Hostname> ? Privileged EXEC level 可以使用設定與管理設備的所有指令 eg. Hostname# ?

10 顯示路由器資訊的基本指令 Router#show version
Cisco Internetwork Operating System Software IOS (tm) RSP Software (RSP-ISV-M), Version 12.0(6a), RELEASE SOFTWARE (fc1) Copyright (c) by cisco Systems, Inc. Compiled Wed 25-Aug-99 19:39 by phanguye Image text-base: 0x , data-base: 0x60C1A000 ROM: System Bootstrap, Version 11.1(2) [nitin 2], RELEASE SOFTWARE (fc1) BOOTFLASH: GS Software (RSP-BOOT-M), Version 11.1(8)CA1, EARLY DEPLOYMENT RELEAS E SOFTWARE (fc1) NtuRouter uptime is 2 weeks, 4 days, 8 hours, 46 minutes System restarted by reload at 09:29:59 CST Mon Jun System image file is "slot0:rsp-isv-mz.120-6a.bin"

11 顯示路由器資訊的基本指令 Show running-config : Show startpup-config 顯示設備正在使用的設定檔
顯示設備啟動時取得設定參數的設定檔

12 顯示路由器資訊的基本指令 ntuRouter#show running-config Building configuration...
Current configuration: ! version 12.0 ntuRouter#show startup-config Using 5663 out of bytes ! version 12.0

13 Global Configuration Mode
Router#configure terminal Router(config)#

14 Specific Configuration Modes
Interface : 提供每個介面上的設定 Router(config – if)# Subinterface 提供單一實體介面上設定多個虛擬介面 Router(config – subif)#

15 Specific Configuration Modes(Cont.)
Controller : 提供在控制器(如,E1與T1)上的設定 Router(config – controller)# Line 提供終端連線上的設定 Router(config – line)

16 Specific Configuration Modes(Cont.)
Router 提供IP路由協定上的設定 Router(config – router)#

17 Command Global command : 影響整個路由器的指令 Major Command Subcommand 進入介面的設定模式
Router(config) # interface serial 0 Subcommand 執行介面的設定指令 Router(config - if) # shutdown  

18 為路由器命名 Router(config) # hostname ntuRouter ntuRouter(config) #

19 新增介面上的說明 ntuRouter(config) # interface fastEthernet 2/0/0
ntuRouter(config - if) # description EE Lan

20 設定Console密碼 ntuRouter(config) # line console 0
ntuRouter(config - line) # login ntuRouter(config - line) # password cisco

21 設定虛擬終端的密碼 ntuRouter(config) # line vty 0 4
ntuRouter(config - line) # password nturwa

22 設定enable密碼,密碼加密 ntuRouter(config) # enable password cisco
ntuRouter(config) # enable secret nturwa ntuRouter(config) # service password-encrytion

23 顯示介面的設定 ntuRouter#show interfaces fastEthernet 2/0/0
FastEthernet2/0/0 is up, line protocol is up Hardware is cyBus FastEthernet Interface, address is d5.c940 (bia d5.c940) Description: EE Lan Internet address is /24 MTU 1500 bytes, BW Kbit, DLY 100 usec, rely 255/255, load 12/255 Encapsulation ARPA, loopback not set, keepalive set (10 sec) Full-duplex, 100Mb/s, 100BaseTX/FX ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:00, output 00:00:00, output hang never Last clearing of "show interface" counters never Queueing strategy: fifo Output queue 0/40, 0 drops; input queue 0/75, drops 5 minute input rate bits/sec, 681 packets/sec 5 minute output rate bits/sec, 774 packets/sec

24 暫停一個介面的使用 ntuRouter # configure term
ntuRouter(config) # interface fastEthernet 2/0/0 ntuRouter(config - if) # shutdown

25 Switch Configuration 設定switch名稱 設定IP address & gateway
Switch(config)#hostname ccSwitch 設定IP address & gateway ccSwitch(config)# interface vlan1 ccSwitch(config-if)# ip address ccSwitch(config)# ip default-gateway

26 Switch Configuration(Cont.)
設定密碼 ccSwitch(config)# Line vty 0 4 ccSwitch(config)# password xxxxx ccSwitch(config)# enable password yyyyy 新增一個ethernet vlan ccSwitch# vlan database ccSwitch(vlan)# vlan <vlan-id> name <vlan-name>

27 Switch Configuration(Cont.)
Assign static-access port to a vlan ccSwitch(config)# interface fa0/2 ccSwitch(config-if)# switchport mode access ccSwitch(config-if)# switchport access vlan2

28 Switch & Router Trunking
ccSwitch(config)# interface fa0/24 ccSwitch(config-if)# switchport mode trunk ccSwitch(config-if)# switchport trunk encapsulation

29 Switch & Router Trunking
ccRouter(config)# interface fa1/0/0.2 ccRouter(config-if)# encapsulation isl 2 ccRouter(config-if)# ip address

30 Switch & Switch Trunking
VTP Client : cSwitch(config)# interface fa0/24 cSwitch(config-if)# switchport mode trunk cSwitch(config-if)# switchport trunk encapsulation cSwitch# vlan database cSwitch(vlan)# vtp domain ntu cSwitch(vlan)# vtp client

31 Switch & Switch Trunking
VTP Server : sSwitch(config)# interface vlan 302 sSwitch(config-if)# ip address sSwitch# vlan database sSwitch(vlan)# vtp domain ntu sSwitch(vlan)# vtp Server

32 網路環境的管理 Cisco Discovery Protocol (CDP) : Telnet :
收集鄰接設備的資訊 Telnet : 收集遠端設備的資訊 CDP & Telnet協助管理者瞭解實體網路架構的型態

33 Show cdp 的選項 RouterA # show cdp ?
entry Information for specific neighbor entry interface CDP interface status and configuration neighbors CDP neighbor entries traffic CDP statistics <cr> RouterA (config) # no cdp run RouterA (config) # interface serial0 RouterA (config) # no cdp enable

34 CDP鄰接設備

35 Show CDP neighbors RouterA#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater Device ID Local Intrfce Holdtme Capability Platform Port ID RouterB Fas 10/ R Fas 0/0 Switch Fas 5/1/ S WS-C2916M-Fas 2/1

36 Show cdp entry * RouterA#show cdp entry * -------------------------
Device ID: RouterB Entry address(es): IP address: Platform: cisco 3640, Capabilities: Router Interface: FastEthernet10/1, Port ID (outgoing port): FastEthernet0/0 Holdtime : 142 sec Device ID: Switch IP address: Platform: cisco WS-C2916M-XL, Capabilities: Switch Interface: FastEthernet5/1/0, Port ID (outgoing port): FastEthernet2/1 Holdtime : 73 sec

37 Show cdp traffic RouterA#show cdp traffic CDP counters :
Packets output: , Input: Hdr syntax: 0, Chksum error: 0, Encaps failed: 0 No memory: 0, Invalid packet: 0, Fragmented: 0

38 Show cdp interface RouterA#show cdp interface
FastEthernet2/0/0 is up, line protocol is up Encapsulation ARPA Sending CDP packets every 60 seconds Holdtime is 180 seconds

39 Show sessions RouterA#show sessions
Conn Host Address Byte Idle Conn Name *

40 Show users RouterA#show users Line User Host(s) Idle Location
2 vty :01:15 mli.cc.ntu.edu.tw * 3 vty idle :00:

41 Telnet連線的暫停與復原 RouterB#<Ctrl-Shift-6>x RouterA#show sessions
Conn Host  Address Byte Idle Conn Name * RouterA#resume 1 [Resuming connection 1 to ] RouterB#

42 clear line RouterA#clear line 2 [confirm] [OK]

43 偵測網路狀態 CDP與Telnet提供管理者建立與維護網路Topology的資訊
Ping與Traceroute幫助管理者瞭解自己的網路Topology Ping : 顯示設備連接的狀況 Traceroute : 封包在設備之間傳送的路徑

44 Router Booting Sequence
Power-on self test(POST) Load and run bootstrap code Find the IOS software Load the IOS software Find the configuration Load the configuration Run

45 Router Major Components
RAM(Random-access memory) ROM(Read-only memory) Flash memory NVRAM Configuration register Interfaces

46 設定檔的複製

47 靜態路由(static route) 指定封包在來源端與目的端之間移動的路徑 靜態路由始終保存於路由表中
最常使用於單一網路(stub network) 單一網路指的是進出該網路只有一條路

48 靜態路由

49 靜態路由 ip route network [mask] {address | interface} [distance] [permanent] RouterA(config)# ip route

50 預設路由(default route) 一種特別型態的靜態路由 路由器找不到路徑時,從預設出口傳送出去
RouterB(config)# ip route

51 IP 資料管制 路由器是網路上資料的交會點 網路資料的過濾與控管 ACLs(Access Control Lists)適用於網路管理

52 ACL的型態與運用 ACL的型態 ACL的運用 Standard access lists Extended access lists
Inbound access lists Outbound access lists

53 建立ACL的原則 只允許一個ACL的情況 由上而下的處理程序 預設拒絕所有封包通過 先建立好ACL,設定在介面上

54 ACL的基本指令 Access-list指令 Access-group指令 建立一個ACL
Router(config)# access-list access-list-number {permit | deny} {test conditions} Access-group指令 啟動介面上IP存取控制的功能 Router(config-if)# {protocol} access-group access-list-number {in | out }

55 過濾TCP/IP封包 Standard ACL Extended ACL 檢查第三層(網路層)header 檢查來源端IP位址
使用代號由1~99 Extended ACL 檢查第四層(傳輸層)header 檢查目的端與來源端的IP位址,網路協定,TCP或UDP的通訊埠號碼 使用代號由100~199

56 Wildcard mask 指示一個IP位址需要檢查的位元 Wildcard mask的位元值為0,表示檢查對應位元內的值

57 檢查IP位址的所有位元 檢測條件:檢查IP位址的所有位元 (全部相同才符合) 例如,一個主機IP位址: 140.112.254.4
萬用字元遮罩: 

58 忽略IP位址的所有位元 檢測條件:忽略IP位址的所有位元 (任何一個IP都符合) 任何一個IP位址: 0. 0. 0. 0
萬用字元遮罩:

59 Standard ACL設定 access-list:資料過濾 ip access-group:運用在介面
Router(config)#access-list access-list-number {permit | deny} Source-address 〔wildcard mask〕 ip access-group:運用在介面 Router(config)#interface serial 0 Router(config-if)#ip access-group access-list-number {in | out}

60 網路架構

61 範例1 Router(config) # access-list 1 permit 140.112.0.0 0.0.255.255
Router(config) # interface ethernet 0 Router(config - if) # ip access-group 1 out Router(config) #interface ethernet 1

62 範例2 Router(config) # access-list 1 deny 140.112.3.90 0.0.0.0
Router(config) # access-list 1 permit Router(config) # interface ethernet 0 Router(config - if) # ip access-group 1 in

63 Extended ACL設定 access-list:資料過濾 ip access-group:運用在介面
access-list access-list-number {permit | deny} protocol source-address source-wildcard〔operator port〕 destination-address destination-wildcard〔operator port〕〔established〕〔log〕 ip access-group:運用在介面 Router(config)#interface serial 0 Router(config-if)#ip access-group access-list-number {in | out}

64 範例1 Router(config) # access-list 101 deny tcp eq 23 Router(config) # access-list 101 permit ip any any Router(config) # interface ethernet 0 Router(config - if) # ip access-group 101 in

65 顯示ACL的內容 Router(config)#show {protocol} access-lists {access-list-number | name}

66 範例 Router # show access-lists Standard IP access list 1
permit , wildcard bits permit , wildcard bits permit , wildcard bits Extended IP access list 101 deny tcp host any eq telnet permit ip any any


Download ppt "Cisco網路設備之設定與管理 台大計資中心 李美雯"

Similar presentations


Ads by Google