Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Operation.

Similar presentations


Presentation on theme: "Network Operation."— Presentation transcript:

1 Network Operation

2 Outlines Network Protocols OSI 7-layer TCP/IP Protocol Suits

3 Part 1 Network Protocols

4 How to Create A Network? A network is a combination of hardware and software that sends data from one location to another. Physical equipments carry signals from one point to another. Ex: interface card, cable, router, wire, … which all satisfy their especial protocols or standard. Programs make the services that we expect from a network possible. Ex: device driver, processes for the protocol suites 不管是硬體或軟體都要符合他們的 protocol.

5 Network Protocols To provide the services required to perform a task, the Internet has created a set of rules called protocols. These allow different networks, using different technologies, to be connected together and carry a message from one point to another. Example: TCP, UDP, IP, HTTP, IEEE 802.3, IEEE , GSM… We will describe them later. Internet standards IETF: Internet Engineering Task Force RFC: Request for comments 網路通訊協定(protocol)是網路上各個機器間的社會規範,描述電腦之間對於彼此通訊行為的一種期待。protocol 會定義的非常清楚, 會看到許多明定的規則. Example:A says Hello!B says Hello!這種「對於對方合理反應的期待」就是通訊協定。 Example:TCP 層 A 送出 request for creating connection, B 送回 response Model 則只是一種學理上的, 比較像指導方針, 或抽象的規範. Example:要求 A 要有禮貌, 要先打招呼 (但沒有說禮貌是 Hi, man! Hello! Good Morning, Sir! 等那一種) 這個章節便是要說明 inter-network 是如何運作的. 運作的方式, 可以先從 2 台 machine 之間的互動談起, 他們互動的規則就是各種的 protocols. 但這些 protocols 常常過於繁瑣, 不易明白, 而且世界上所使用的 protocols 實在太多了, 不可能一一說明. 所以就有人想要用簡單的 model 來描述這些 protocols 共同的特性, 應具備的功能. 所以你也可以將 model 反過來想成這些 protocols 的指導方針. 將來要說明那一個特定的 protocol 時, 只要知道代表它的 model, 就可猜出其大概的樣子. Ex: model: 汽車模型, 要有輪子(承載汽車重量, 轉動), 氣缸引擎, 座椅, 外殼; protocol: 真正的汽車型號.

6 Communication Protocols
網路通訊協定是網路上各個機器間的社會規範,描述電腦之間對於彼此通訊行為的一種期待。 Example:A says Hello!B says Hi! 這種「對於對方合理反應的期待」就是通訊協定。

7 Human v.s. Machine Protocols
TCP connection request Hi TCP connection response Hi Got the time? Get time 2:00 <file> A human protocol A computer network protocol

8 Protocols Protocols define format, order of messages sent and received among network entities, and actions taken on message transmission & receipt. TCP connection request response Get <file>

9 Physical Equipments Connecting devices End devices Hub, switch, bridge
Cable, UTP line, fifer Radio, transmitter, receiver Router End devices Notebook, personal computer, smart phone Network interface card 這些 connecting devices, 就像一個郵局, 貨運系統, 提供一個 infrastructure, 讓 data 可以傳送. Note that, 中間這些 device 是不管包在最深處的 data 是什麼. 而 end devices 才是真正會拆開封包看到最深層資料的設備.

10 Connections between Nodes
Node-to-node delivery Point-to-point delivery The link connection between two adjacent hosts Source-to-destination delivery End-to-end delivery The connection between source and destination hosts 中間的 hop (intermediate node) 只須要底下三層就夠了. node-to-node delivery: 直接交給鄰居收下來. source-to-destination delivery: 以送信為例, 依據信封上的住址, 信件被轉送最後的目的地 source destination node end link connection computer/node/hop/host/component

11 Local Area Network LAN (Local Area Network) is a network where any two devices in this network has a link and can communicate directly. We use physical addresses on the network interface card (NIC) to distinguish these network interface cards on the devices. By using a repeater/hub/switch, we can connect several computers such that there exists a link between any two devices of them.

12 Network Interface Card (1/2)
Ethernet card, PCMCI card, card Combination of hardware, software, firmware Sending side: Encapsulates datagram in frame Adds error checking bits, flow control, etc. host schematic application transport network link physical cpu memory host bus (e.g., PCI) controller physical transmission 網路卡扮演電腦與網路線間的橋樑(Network Interface) 網路卡的功能: a. 從電腦獲得資料給予網路纜線 b. 送資料給其他電腦 c. 控制兩端電腦與纜線系統速率的調整 d. 接收資料 傳送方電腦 辨識資料 將資料分成一小小的資料區段,便於協定可以處理 將每一個資料區段附上發送者與目的地電腦的位址,以便傳送到對方 增加時間戳記與錯誤檢查碼 將資料放在網路卡,並送入網路線上送出 network adapter card

13 Network Interface Card (2/2)
Receiving side Looks for errors, flow control, etc Extracts datagram, passes to upper layer at receiving side. sending host receiving host datagram datagram 接收方電腦 將資料從纜線接收。 將資料從網路卡中取出。 將資料的標頭、標尾等控制資訊取出。 將去除控制資訊的資料段依序組合成應用程式可用的資料。 controller controller Physical address …111011 Physical address …010010 PHY addr. 2 datagram frame

14 Network Topologies The term physical topology refers to the way in which a network is laid out physically. Network topology 大約可分為 3 種: bus, star, ring, 第一種 mesh 基本上可以用 bus, WLAN ad hoc 來達成. 另外還有 star 組成的 tree 或雪花, Irregular: mix of above 過去的網路設計三種都有, 但目前大多是為 star. Note: a, b & c 都只是一個 LAN, 但 d. 形成的環狀拓樸是用 router 組成的 backbone.

15 Internetwork By using routers/gateways, LANs can be connected to a larger network. Networks can be connected using connecting devices to form an internetwork (or an internet). 這些 network 再用網路連接設備互相連接, 就形成所謂的 internetwork, 或稱為 internet. 這些 network 可能是各種大小不同的 LAN, MAN or WAN. 用一些 connecting devices 相連. 圖中每兩個 routers 間其實也是一個很小的 network, 只有連接 2 routers 而已. an internet (lowercase “i”).

16 Categories of Networks
According to the size of networks, networks are categorized into three types: LAN/MAN/WAN. Networks Wide Area Network (WAN) Metropolitan Area Network (MAN) Local Area Network (LAN) 電腦網路可以擴充其區域, 依其含蓋的範圍大小, 可分為 LAN, MAN, WAN. LAN: LAN 的產生是為了單純的 resource sharing (hardware, software, and data). 通常是由 computers 與一些周邊所組成. 距離短、範圍小, 通常指用Ethernet連接的網路 Ex: 校園網路、企業網路、SOHO族網路 MAN (metropolitan area network) 大都會網路: 使用 network service provider 的 common carrier (共同的通訊通道) (例如 telephone company). 範圍約是一個 city or town. 各別的 user 的 computer 直接用 modem, cable modem 連到 ISP, 企業組織的 LAN 也可 (ADSL, T1, E1) 接上網路. 許多電話公司提供有名的 MAN 服務, 稱為 Switched Multimegabit Data Services (SMDS). WAN: 距離長、範圍大的網路, 通常指必須用數據機連接的網際網路服務提供者(Internet Service Provider,ISP)所提供的網路,我們透過ISP的網路與對方LAN通信 Ex: 跨國網路、中華電信的PSTN、台灣大哥大的WAP網路 WAN (Wide area network)用以將各別的LAN, computers 連成很廣大的區域, (state, country, world). 如同 MAN, WAN 也是許多 common carriers 所連接起來的. 使用者利用電話接到 Internet service provider (ISP). (ex: 電話公司: 中華電信; ISP: Hinet, Seednet, 碩博, spring, AT&T 這些都是 WAN) ISP 與電話公司協商拆帳, 取得使用者通訊的費用.

17 Part 2 OSI Model 在電腦網路發展的初期, 每家廠商各自發展自己的通訊協定, 如 Apple 有 Apple Talk, Novell 有 IPX/SPX 等. 所以 ISO 才會提出 OSI model, 說明應該具備那些功能, 怎樣運作才是好的網路協定. 就如同一般的工作或寫程式, 都會把工作依據其性質切割成小塊, 進行模組化. 相同的一台電腦所需具備的網路功能也可切割成一個個的模組, 只要定義好模組間的 interface, 就可分別去設計或改進各個模組. 更進一步, 這些模組被設計成有階層式的概念, 上下層間都是提出要求與提供服務的關係, 讓電腦網路的功能更明確而簡單.

18 ISO OSI Reference Model
不同廠商各自發展其系統的通訊協定,各有目的與優點。 建立一套公認且通用的參考架構,可以釐清資料通訊的專用術語,彼此間的對應關係 ISO OSI 參考模型(Reference Model) 國際標準組織(International Standards Organization,ISO) 開放系統互連參考模型(Open System International reference model,OSI) 開放系統互連參考模型(Open System International reference model,OSI) OSI 定義一個指導性的規範, 說明 兩台可能完全不相同的電腦(不同的 OS, hardware, i.e., 架構完全不同) 應該如何溝通, 所以電腦應該有那些功能, 這些功能和其他電腦間的關係 句子中的 system, component 都是指 computers 或具有 network 功能的設備. 不同廠商各自發展其系統的通訊協定,各有目的與優點。建立一套公認且通用的參考架構,可以釐清資料通訊的專用術語,彼此間的對應關係,所以雖然有這麼多不同架構的電腦與不同的通訊軟硬體,但仍可以用OSI model來看待它們運作的方式。

19 The OSI Model (1/2) International Organization for Standardization (ISO) The Open Systems Interconnection model is a theoretical model that shows how any two different systems can communicate with each other. To show the function of each system To show the relationship between the systems Allow two different systems to communicate regardless of their underlying architecture Ethernet, ATM, WLAN, GPRS, FDDI, ... 國際標準組織(International Standards Organization,ISO) 開放系統互連參考模型(Open System International reference model,OSI) OSI 定義一個指導性的規範, 說明 兩台可能完全不相同的電腦(不同的 OS, hardware, i.e., 架構完全不同) 應該如何溝通, 所以電腦應該有那些功能, 這些功能和其他電腦間的關係 句子中的 system, component 都是指 computers 或具有 network 功能的設備. 不同廠商各自發展其系統的通訊協定,各有目的與優點。建立一套公認且通用的參考架構,可以釐清資料通訊的專用術語,彼此間的對應關係,所以雖然有這麼多不同架構的電腦與不同的通訊軟硬體,但仍可以用OSI model來看待它們運作的方式。

20 The OSI Model (2/2) A framework of seven layers
The functionality of each separate layer The relationship between two neighbor layers The relationship between two peer layers Not all of layers are necessary to implement The number of layers depends on the functionality of the device and its location in the network. Ex: End systems: 1-7 layers; Ether-switches: 1,2 layers; TCP/IP routers: 1,2,3 layers OSI model 定義了 概念性功能 層級架構 對等兩個 layer 間的關係 同一 machine 中上下 2 layers 間的關係 為何要階層化?Answer: 模組化, 替代性, 擴充性

21 7 Layers in the OSI Model 網路應用程式 應用層:讓各網路的AP有一套統一遵循規則
表述層:讓資料呈現方式有一致的標準 會議層:管理應用程式間的協議過程 傳輸層:提供 end-to-end 的錯誤偵測和更正 網路層:建立 source 與 destination 間的連線 資料鏈結層:提供 point-to-point 可靠的連線 實體層:定義網路媒介的實體特性

22 Functionalities in Each OSI Layer
網路應用程式 應用層:讓各網路的AP有一套統一遵循規則 表述層:讓資料呈現方式有一致的標準 會議層:管理應用程式間的協議過程 傳輸層:提供 end-to-end 的錯誤偵測和更正 網路層:建立 source 與 destination 間的連線 資料鏈結層:提供 point-to-point 可靠的連線 實體層:定義網路媒介的實體特性

23 Layered Concept 同一機器上,每一層都只提供服務給上層和要求下層提供服務 不同機器間,每一層都只與同一層交談
Ex:layer 3  layer 4  layer 5 Layer 4 asks layer 3 to do something. Layer 4 provides its results to layer 5. Layer 3 and Layer 5 can not talk. 不同機器間,每一層都只與同一層交談 Peer-to-peer concept Ex:layer 4 只與 layer 4 談資料流量的問題 Note:透過雙方的 layer 3 提供傳話的服務

24 Flow of Data in the OSI Model
peer-to-peer 這張圖說明 Device A 送一個 Data 給 Device B 的過程, 各個 layer 所扮演的角色. 電腦 A 的 Data 要透過實體介質送到電腦 B, 必須先經過自己的 7 個 layers. 在每一層中, 都會加上一些控制的資訊, 稱為 Header 或 Trailers, 將來自上層的資料(不管內容是甚麼)包起來, 送給下一層. 到電腦 B 中, 以相反的方向拆除 Header 或 Trailer, 最後萃取出 Data. encapsulation decapsulation

25 Physical Layer Transmitting bit streams over a physical medium.
logic 0 -3V -25V 3V 25V logic 1 undefined RS 232 Voltage Transmitting bit streams over a physical medium. Encode and decode Transform a stream of bits into a signal Mechanical and physical specifications of the physical devices are defined. 負責兩個相臨節點(node)之間,經由實際的傳輸線路,傳送一連串的位元 定義載送資料硬體的特性:電壓準位、介面接腳數目與位置、最大傳輸距離、實體資料傳輸速率、編碼及解碼、亂碼及順碼 將 bits 分成一個個的 group, 在將 group 轉成 signal Example:RS232C、IEEE802.3 LAN的纜線標準、光纖標準

26 Data-link Layer Node-to-node delivery: directly connected
B network A Node-to-node delivery: directly connected Organize bits into logical units called frames. Header and Trailer Physical address in a network Error detect or correct Network interface: the point connect to network Packet: Preamble Source Destination Type Data FCS Bytes 8 6 2 4 bytes Data form the network layer 提供兩個相臨節點(node)之間可靠的(reliable)底層實體傳輸服務 定義框架(frame)格式,nodes共享實體網路的方式,判斷實體層是否傳送錯誤,解決資料的錯誤或遺漏、重覆接收、資料到達順序不對的問題 提供相臨兩節點的 physical addresses. 利用 redundant data 來做 error check or detect. Example:IEEE 802 系列 Ethernet Frame

27 Media Access Layer 媒體存取控制層(Media Access Layer,MAC)
存取模式(Access Methods)定義電腦如何將資料放置纜線以及如何將資料從纜線中取出的規則,即定義電腦如何共享實體網路。 對應於OSI 的資料鏈結層內的MAC Layer定義如何使用傳輸媒介做資料傳送的網路協定。 Logic Link Control Data Link Layer Media Access Control

28 Logical Link Control Layer
邏輯鏈結控制層(Logical Link Control Layer,LLC) MAC上層的LLC Layer,負責處理資料的錯誤或遺漏或重覆接收等問題,便確保資料正確到達對方。 Data Link Layer =LLC+MAC MAC通常為 hardware control。 LLC Data Link Layer MAC

29 Deriver 驅動程式(driver)通常位於此層(Data Link Layer),是用來協調電腦系統與某周邊設備進行溝通的軟體(firmware)。 Driver也負責資料的收送。 位於MAC Layer上方。

30 Ethernet Ethernet is the most prevalent local area network in use today. For physical and data-link layers. Usually, your computer has a Ethernet card. The Ethernet protocol uses a 48-bit MAC address, which is normally written in hexadecimal format as shown below:

31 Network Layer Delivery packets between the original source and final destination. End-to-end delivery of individual packets Unique logical address (ex: IP address) IP packet Preamble Source Destination Type FCS Bytes 8 6 2 4 bytes From the transport layer 建立來源電腦(source)與目的電腦(destination)間的網路路徑(path)。 管理路徑上定址、封包交換、路由選擇、控制封包(packet)的壅塞(congestion)來傳遞資料。 Logical address 必須是 worldwide unique. 在 packet 傳送的過程中, logical address 是不變的, 只有在每一 node, physical address 會改變. Example:Internet Protocol IP Datagram 的長度存在 Total Length欄位中,16bits (以byte為單位) Ethernet Frame

32 Why Need Logical Addresses?
Logical address + Physical address Different local area networks have different physical addresses. We need an unique logical address to identify each network interface on the whole world. 不同的 datalink layer, 其 physical address 的格式, frame 傳送的方式都不一樣, 所以要有 router 隔開, 幫忙轉送封包, 且以 IP address 當作區別的 ID.

33 Routing/Routed Protocols
To encapsulate a packet with data It is like to make a letter with an envelope. Used on all hosts/routers Ex: IP、IPX、AppleTalk Routing Protocol To find a path to deliver packets It is like the rules in a freight transportation company。 Used on routers Ex: OSPF、RIP、IGRP Routed Protocol:用封裝packet來攜帶data,像信件的作用。 Ex: IP、IPX、AppleTalk Routing Protocol:用以選擇最佳路徑來傳送 packets,像貨運公司的作用。 Ex: OSPF、RIP、IGRP freight: 貨物; 貨運(通常與 express 快遞相對)

34 Connection of Two Remote Computers by Routers

35 Encapsulation source destination application transport network link
message M application transport network link physical segment Ht M Ht datagram Ht Hn M Hn frame Ht Hn Hl M link physical switch destination network link physical Ht Hn M Ht Hn Hl M M application transport network link physical Ht Hn M Ht M Ht Hn M router Ht Hn Hl M

36 Transport Layer Source-to-destination (end-to-end) delivery of the entire message. Break the entire message into several packets Ask network layer to send packet individually Reorganize the received packets to a message Packets may arrive out of order or lost. Retransmit packets 建立端點對端點(end-to-end),i.e., source 與destination間的可靠的傳播路徑。 負責提供兩個使用者之間以原先約定的通訊品質來傳送資料。 連接導向connection 非連接導向connectionless Network layer 是對各別的 packet 提供 end-to-end delivery. 所以這些 packet 可能會 lost, out of order Transport layer 是對整個 message, 提供 end-to-end deliver, 換言之, source 要切割 message, destination 還要將 packet 組合起來成為 whole message. Ex: IP packet 最多可載送 2^16 words (32bits)=64k word = 256kbytes 提供通訊品質:流量控制、錯誤檢查與更正、反多工 Example:TCP、UDP, Stream Control Transmission Protocol (SCTP), ,Datagram Congestion Control Protocol (DCCP). a b c d a b c d 1 2 3 c d b a d c b a 4 5

37 Reliable Path 何謂可靠的傳播路徑? Answer:透過流量控制、錯誤檢查與更正、多工與反多工、重傳,提供通訊品質。
To create a connection between two end devices before transmission a b c d a b c d 1 2 3 c d b a d c b a 4 5

38 Flow control 流量控制(flow control)的機制在控制網路上資料傳送的速度,以避免因接收端電腦的緩衝器已滿,從網路上新接收的資料必須丟棄。

39 Retransmission The destination checks whether the entire message is received. Sequence number If some packets lost, the destination asks the source to transmit these packets again.

40 Multiplexing 多工(Multiplexing)是將多筆 OSI第 n 層應用程式的通訊連線合在一起,使用第 n-1 層的一條通訊連線 。 n layer (ex: AP layer) n-1 layer (ex: TCP layer)

41 De-multiplexing 反多工(de-multiplexing):將一筆 OSI 第n-1層的通訊連線,依據其不同的服務對象,分送給多個第 n 層的通訊軟體 。 IP 利用 protocol number 指定傳輸層 傳輸層利用 port number 指定應用程式 AP layer TCP layer

42 Connection-oriented v.s. Connectionless
在傳送資料前,會先和遠端主機交換控制訊息(handshake),以確定對方已準備好接收資料。當handshake完成,表示已建立連結。此後透過訊息的交換,判斷是否要重傳封包、暫緩傳送。 SCTP (Stream Control Transmission Protocol) & TCP (Transmission Control Protocol) 非連結導向(connectionless) 此協定將每一筆資料視為獨立的個體,只負責將訊息傳到網路上,不檢查資料是否被正確的接收。 UDP (User Datagram Protocol)

43 Session Layer Control the dialog between users
User: running program Establish, maintain, and synchronize the dialog between communicating systems Add synchronization points for backup delivery in case of system or network failure 處理兩個端點應用程式之process-to-process的溝通,以決定彼此間對談的方式。 例如對談時由那一端發送,何時發送,發送多久,若網路中斷將由誰重傳。 可以在每一個 synchronization point, 記錄已經有那一些 sessions 已經收到, 若是 network 或 system failure, 則在 last synchronization point 之前的 sessions 無需重傳 (ex: a,b) , 只要傳送之後的 session (ex: c,d) . Ex: 如果每一個 session 是 synchronization point 的分界, 下課了session 中斷, 下次上課會從此 session 開始的地方重新開始教. 通常網路不會 implement session layer, 若有需要 session layer 的功能, 則會被包含在 application layer. synchronization point System A System B section user A-1 c a b c d a acknowledge user B-1 b d user A-2 c

44 Presentation Layer Concern with the syntax (format) and semantics (meaning) of the information exchanged between two systems. Coding (ASCII vs. Unicode) Compress and decompress Encrypt and decrypt data for security 定義兩端主機間資料交談的語法或格式 此層提出一套標準的程序,讓資料轉成一致的格式,以方便在網路上傳送。另一端的傳輸層再將其轉譯回應用程式所接受的樣子。 Example:處理不同字集的轉換(EBCDICASCII)、資料的壓縮與還原、加密與解密、圖形的處理 通常網路不會 implement presentation layer, 若有需要 presentation layer 的功能, 則會被包含在 application layer. Ex: encryption/decryption 可在 network layer 與 application layer 執行. TCP/IP 將此層工作交由AP處理。

45 Application Layer and Users
The application layer enables the user to access the network. Define common applications Ex: FTP, SMTP, POP3 you mail server user IE outlook Exchange 提供使用者(i.e., 網路應用程式)使用網路的資源,建立連線的層級 使用者必須依照此層的規範來寫自己的應用程式 Example: 檔案傳輸協定(File Transfer Protocol,FTP) CuteFTP、Ws_ftp等應用程式 模擬終端機協定(Telnet)NetTerm 、telnet等應用程式 SMTP, POP3 for  IE Outlook, Becky 上圖是 you send an to mail server 的例子, client: Outlook, Becky; server: exchange, apache, gmail, sendmail. SMTP SMTP Application Protocol

46 Several Protocols and Their Layers of OSI Models
Application Presentation Session Transport Network Data Link Physical SMTP、FTP、HTTP TCP UDP SNMP、DNS、RTP IP fiber、UTP、cable、wireless Ethernet token ring 802.2 LLC FDDI x. 25 LAP/LAPB IPX SPX x.25 PLP NetWare Service

47 Binding Process 連結(Bind)不同的協定堆疊運作。 連結程序A連結協定A、E、F、G。
連結程序B連結協定A、C 、 E、F、G。 協定 G 協定 F 協定 D 協定 E 協定 B 協定 C 協定 A binding process A binding process B

48 Part 3 TCP/IP Protocol Suite

49 Internet In 1969, a research of internetworking designed to connect several different heterogeneous network Defense Advanced Research Projects Agency (DARPA) Fault tolerant 1969年,美蘇正處於冷戰時期,此時美國國防部(Defense)委託高等研究計劃署(ARPA)研究當部分網路遭受攻擊癱瘓後是否能讓資料在其他未癱瘓網路繼續傳輸,即是研發一種不受戰事破壞的分散式強韌網路系統,於是發展實驗性的封包交換網路─ARPANET(即是目前Internet的前身)。 由於實驗性APRANET非常成功,使的許多機構開始與他連線應用於日常資料傳輸,在1975年ARPANET由實驗性網路轉變為應用網路,而網路管理職責就交給國防部通訊署(DCA)。 在1983年,為顧及國防安全,ARPANET正式分裂成兩個網路,其一為美國防禦資料網路(DDN)的非機密部份,稱之MILNET,僅供美國國防部使用,其二是新的、且較小的ARPANET,僅供有和政府簽約合作的研究單位使用,此時美國軍方把TCP/IP納入軍規標準中,與ARPANET連線主機都必須改用此新協定,原本採用的NCP協定就由當時日趨普遍的TCP/IP所取代,同一時期,Internet這名詞也開始被廣泛引用,那時它代表由MILNET與ARPANET所構成的複合體網路。 到了1985年,當時,由於ARPANET隸屬國防部,未和政府簽約的機構即無法用它,為此,美國國家科學基金會(NSF) 建立一採用TCP/IP協定的網路─NSFNET,原始的NSFNET網路速度才56Kbps,相當於目前一般數據機的速度,在1987年獲得聯邦政府撥款補助,並在全美各地架設七個超級電腦中心。 1980年代末期,美國國防部開始刪減ARPANET的預算,當時,NSF已開始使用較ARPANET快三倍的T1(1.544Mbps)傳輸線路,NSFNET屬於一般性的研究網路,該網除了提供學術界免費的服務外,也服務業界,並酌收些許使用費,由於NSFNET的廣泛使用。 在1987年,NSF舖設了一條主幹網路(backbone) ,成為一個具有主幹網路和地域性網路與區域網路的三層式網路。 在1990年,NSFNET正式取代ARPANET成為Internet的骨幹,之後又由美國國家研究教育網路(NREN)取而代之成為骨幹。

50 TCP/IP Transmission Control Protocol/ Internet Protocol (TCP/IP)
A protocol suit that controls the Internet The set, or suite, of protocols that controls the Internet today is referred to as the TCP/IP protocol suite. The TCP/IP protocol suite was defined as having four layers: host-to-network (or link), internet (network), transport and application.

51 Layers of TCP/IP Application Layer Host-to-host Transport Layer
TCP/IP 分為四層: 網路存取層 Network Access Layer, 網際層 Internet Layer, 傳輸層 Host-to-host Transport Layer, 應用層Application Layer. TCP/IP 並未定義任何的 physical layer 的 protocol, 所以對於任意的 bearer, 只要在 data-link layer 定義出相對應之 adapter, 就可將 IP 對應到底層. 通常 bearer 最熟悉的就是 Ethernet, ATM, GPRS. Network Access Layer 包含 OSI 的最低三層,其功能為: 把 IP 資料段封裝到網路所傳送得訊框內 把 IP 位址對應到網路使用的實體位址 網路存取協定種類繁多,各對應一種實體網路標準,以驅動程式的形態出現。 最常用的網路存取層協定: RFC826,位址解析協定(Address Resolution Protocol,ARP),把IP位址對應成Ethernet位址。 RFC894,規範 IP 資料段封裝的一套標準。 Internet Layer Network Access Layer

52 Internet Protocol (IP)
IP datagram IP is an unreliable protocol and a best-effort delivery service. Problem: different route, out of sequence, lost, duplicated Solution: Upper layer Internet Layer 提供異質網路上的定址能力與資料封包格式的轉換。 最常用的網際層協定: RFC791,網際協定(Internet Protocol,IP),提供基本的封包傳送服務。 RFC792,網際控制訊息協定(Internet Control Message Protocol,ICMP),透過IP來傳送控制訊號。 IP 提供非連線性的服務(Connectionless) IP 在傳送資料前,不會和遠端主機交換控制訊息(handshake)建立連線。 IP 是不可靠(unreliable):表示此協定不包含驗證資料是否正確到達網路另一端的技術。 IP 不具備錯誤偵測(Error Detection)與錯誤更正(Error Correction)的功能。 Best effort: IP 不處理下列的問題: Datagram 重覆接收, 延遲或順序不對, 資料損壞, Datagram遺失 因為 IP 被設計用於任何實體網路,因此底層的實體網路可能不可靠,造成 IP datagram 遺失、重覆接收、延遲、順序不對或損壞。上層的協定程式必須要處理這些問題。 one way 1 2 3 Datagram 4 5 another way

53 IP addresses IPv4 (version 4)
A 32-bit IP address, which is presented in dotted decimal notation.

54 IP address and Network Mask
You have to set the computer A IP address (ex: ) Network mask (ex: ) Default gateway (ex: ) = = = The same value: in the same network = = = Not the same: in different network = = =

55 Physical vs. Logical Addresses
Physical address destination source Logical address source destination 20 100 Transport layer data destination B source A node D node C 20 30 40 50 100 500 網段為 /2 的 220= B, 可用的 IP 為 221 及 222. end end 500 50 40 30

56 Transport Layer of TCP/IP (1/2)
User Datagram Protocol (UDP) Basic necessaries for end-to-end delivery of a transmission Transmission Control Protocol (TCP) Fully and reliable transport layer services to applications TCP divides a message into a sequence of segments that are numbered sequentially. If one segment is lost, it is sent again. If a segment is received out of order, it is ordered by its sequence number. Transport Layer 提供端點對端點之間的資料傳輸服務。 最常用的網際層協定: 使用者資料段協定(User Datagram Protocol,UDP),只負責將訊息傳到網路上,是一種不可靠、非連結導向的協定。簡單、效率高、延遲時間小. 使AP在協定所在造成的額外負擔最少的情況下,經由網路交換訊息。 傳輸控制協定(Transmission Control Protocol,TCP),會檢查資料是否循序正確的傳到網路上,提供可靠、連結導向的傳輸服務。提供 AP 層完整的 transport 服務。以確認重傳(Positive Acknowledgement with Re-transmission,PAR)的方式來提供可靠性。以三段式交握(Three-way Handshake)來建立與結束連結(Connection)。 使用者依據應用程式的特性來選擇TCP或UDP。

57 Transport Layer of TCP/IP (2/2)
Stream Control Transmission Protocol (SCTP) Designed for new services expected from the Internet, such as Internet telephony and video streaming. Like UDP, it is suitable for real-time transmission of audio and video Like TCP, it provides error and flow control. To identify which protocol is used in the transport layer, we use the protocol number. Ex: The protocol number of TCP is 6, and the port number of UDP is 17.

58 Application Layer of TCP/IP
The application layer is responsible for providing services to the user. Define common applications Ex: FTP, SMTP, POP3 you mail server user IE outlook Exchange Handle all of the functionalities associated with session, presentation and application layers. 提供使用者(i.e., 網路應用程式)使用網路的資源,建立連線的層級 使用者必須依照此層的規範來寫自己的應用程式 Example: 檔案傳輸協定(File Transfer Protocol,FTP) CuteFTP、Ws_ftp等應用程式 模擬終端機協定(Telnet)NetTerm 、telnet等應用程式 SMTP, POP3 for  IE Outlook, Becky 上圖是 you send an to mail server 的例子, client: Outlook, Becky; server: exchange, apache, gmail, sendmail. SMTP SMTP Application Protocol


Download ppt "Network Operation."

Similar presentations


Ads by Google