1 network operation. 2 outlines network protocols osi 7-layer tcp/ip protocol suits
Post on 22-Dec-2015
231 Views
Preview:
TRANSCRIPT
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
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 802.11, GSM… We will describe them later.
Internet standards IETF: Internet Engineering Task Force RFC: Request for comments
6
Communication Protocols
通訊協定( Communication Protocol )是用來溝通不同電腦的一種標準架構。
網路通訊協定是網路上各個機器間的社會規範,描述電腦之間對於彼此通訊行為的一種期待。
Example : A says Hello ! B says Hi ! 這種「對於對方合理反應的期待」就是通訊協定。
7
Human v.s. Machine Protocols
Hi
Hi
Got thetime?
2:00
TCP connection requestTCP connectionresponse
Get http://www.awl.com/kurose-ross
<file>time
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 requestTCP connectionresponse
Get http://www.awl.com/kurose-ross
<file>
9
Physical Equipments
Connecting devices Hub, switch, bridge Cable, UTP line, fifer Radio, transmitter,
receiver Router
End devices Notebook, personal
computer, smart phone Network interface card
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
source destination node node
end end
computer/node/hop/host/component
linkconnection
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, 802.11 card
Combination of hardware, software, firmware
Sending side: Encapsulates
datagram in frame Adds error checking
bits, flow control, etc.
controller
physicaltransmission
cpu memory
host bus (e.g., PCI)
network adaptercard
host schematic
applicationtransportnetwork
link
linkphysical
13
Network Interface Card (2/2)
Receiving side Looks for errors, flow control, etc Extracts datagram, passes to upper layer at
receiving side.
controller controller
sending host receiving host
datagram datagram
datagram
frame
PHY addr. 2
Physical address 2 00001010…010010
Physical address 1 00000111…111011
14
Network Topologies
The term physical topology refers to the way in which a network is laid out physically.
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).
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)
18
ISO OSI Reference Model
不同廠商各自發展其系統的通訊協定,各有目的與優點。
建立一套公認且通用的參考架構,可以釐清資料通訊的專用術語,彼此間的對應關係
ISO OSI 參考模型( Reference Model ) 國際標準組織( International Standards
Organization , ISO ) 開放系統互連參考模型( Open System
International reference model , OSI )
19
The OSI Model (1/2) International Organization for
Standardization (ISO) The Open Systems Interconnection model
is a theoretical model that shows howany 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, ...
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
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 提供傳話的服務
25
Physical Layer
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.
....100111010110000011101010100111001.....
logic 0
-3V
-25V
3V
25V
logic 1
undefined
RS 232 Voltage
26
Data-link Layer
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
Ethernet Frame
Preamble SourceDestination Type Data FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
Data form the network layer
Packet:
A network B
C
Network interface: the point connect to network
27
Media Access Layer
媒體存取控制層( Media Access Layer , MAC )
存取模式( Access Methods )定義電腦如何將資料放置纜線以及如何將資料從纜線中取出的規則,即定義電腦如何共享實體網路。
對應於 OSI 的資料鏈結層內的 MAC Layer 定義如何使用傳輸媒介做資料傳送的網路協定。
Logic Link Control
Media Access ControlData Link Layer
28
Logical Link Control Layer
邏輯鏈結控制層( Logical Link Control Layer , LLC )
MAC 上層的 LLC Layer ,負責處理資料的錯誤或遺漏或重覆接收等問題,便確保資料正確到達對方。
Data Link Layer =LLC+MAC MAC 通常為 hardware control 。
LLC
MAC
Data Link Layer
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)
Ethernet Frame
Preamble SourceDestination Type FCS
Bytes 8 6 6 2 46-1500 4
64-1518 bytes
From the transport layer
IP packet
32
Why Need Logical Addresses?
Different local area networks have different physical addresses.
We need an unique logical address to identify each network interface on the whole world.
Logical address + Physical address
33
Routing/Routed Protocols
Routed Protocol 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
sourceapplicatio
ntransportnetwork
linkphysical
HtHn M
segment Ht
datagram
destination
application
transportnetwork
linkphysical
HtHnHl M
HtHn M
Ht M
M
networklink
physical
linkphysical
HtHnHl M
HtHn M
HtHn M
HtHnHl M
router
switch
Encapsulationmessage M
Ht M
Hn
frame
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
1
54
2 3a b c d
b ad c b ac d
a b c d
37
Reliable Path
何謂可靠的傳播路徑? Answer :透過流量控制、錯誤檢查與更正、多工與反多工、重傳,提供通訊品質。
To create a connection between two end devices before transmission
1
54
2 3a b c d
b ad c b ac d
a b c d
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 連結導向( connection-oriented )
在傳送資料前,會先和遠端主機交換控制訊息( 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
user A-1
user A-2
user B-1
System A System Bsection
acknowledgea b c d
ba
d
c
c
synchronization point
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
45
Application Layer and Users
The application layer enables the user to access the network.
Define common applications Ex: FTP, SMTP, POP3
SMTP
IE outlook
SMTP
Exchange
mail serveryou
user
Application Protocol
46
Several Protocols and Their Layers of OSI Models
ApplicationPresentation
Session
Transport
NetworkData Link
Physical
SMTP 、 FTP 、HTTP
TCP UDP
SNMP 、 DNS 、RTP
IP
fiber 、 UTP 、 cable 、 wirelessEthernettoken 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 。
協定 D
協定 G
協定 A
協定 F
協定 E
協定 C協定 B
binding process A
binding process B
49
Internet
In 1969, a research of internetworking designed to connect several different heterogeneous network Defense Advanced Research Projects Agency
(DARPA) Fault tolerant
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
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
1
54
2 3
Datagram
one way
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: 140.138.137.201) Network mask (ex: 255.255.255.0) Default gateway (ex:140.138.136.202)
140.138.137.201=10001100 10001010 10001001 11001001 255.255.255.0 =11111111 11111111 11111111 00000000 140.138.137.0 =10001100 10001010 10001001 00000000
140.138.137.202=10001100 10001010 10001001 11001010 255.255.255.0 =11111111 11111111 11111111 00000000 140.138.137.0 =10001100 10001010 10001001 00000000
The same value: in the same network
140.138.135.108=10001100 10001010 10000111 01101100 255.255.255.0 =11111111 11111111 11111111 00000000 140.138.135.0 =10001100 10001010 10000111 00000000
Not the same: in different network
55
Physical vs. Logical Addresses
100 20 30 500
source A destination B node C node D
end end
20 100 137.201 135.108
Physical address
destination source
Logical address
source destination
Transport layer data
140.138.137.201 140.138.135.108
40 30 137.201 135.108
500 50 137.201 135.108
140.138.137.202 140.138.136.221
140.138.136.222 140.138.135.10440 50
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.
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.
top related