OSI Model:
7. APPLICATION Layer :User Interface (Browser)
6. Presentation Layer : Data presentation and encryption (Common Format)
- ensures that information sent by the application layer of one system is readable by the application layer of another system
- translates between multiple data representation formats by using a common data representation format
- concerned with data structures and negotiation of data transfer syntax
5. Session Layer : Inter-host Connection (Dialog and Conversation)
- establishes, manages, and terminates sessions between communicating hosts
- synchronizes dialog between presentation layer entities and manages their data exchange
- offers provisions for efficient data transfer, class of service, and exception reporting of session, presentation, and application layer problems
4. Transport Layer : End to End Connection (Reliability, Flow control, Error correction)
- segments and reassembles data into a data stream
- concerned with how reliable transport over an internetwork is accomplished
- responsible for reliable network communication between end nodes and provides mechanisms for the establishment, maintenance, and termination of virtual circuits, transport fault detection and recovery, and information flow control
TCP: Connection -oriented
Software checking for segment
Re-send anything lost or error
Uses acknowledgments
Provides flow control
UDP: unreliable
connectionless
provides no software checking for segment
uses no acknowledgments
provides no flow control
3. Network layer : Addresses and Best Path (Path selection, Routing and Addressing)
- Provide connectivity and path selection between two end systems where routing occurs
- These may be located on geographically separated networks
Responsible for hierarchichal addressing, segment network and control flow of traffic, reduce congestion
IP Address: 32 bits long, Two components(network ID and host ID)
ARP: 根据IP地址找到对应的MAC地址
2. Data Link Layer : Access to media (frame, media access control, naming )
- provides reliable transit of data across physical layer
- is concerned with physical (as opposed to logical) addressing, network topology, network access, error notification, ordered delivery of frames, and flow control
数据链路层(DataLinkLayer):在物理层提供比特流服务的基础上,建立相邻结点之间的数据链路,通过差错控制提供数据帧(Frame)在信道上无差错的传输,并进行各电路上的动作系列。 在不可靠的物理介质上提供可靠的传输。
分为LLC 和 MAC两层, 分别针对网络层和物理层:
Logical Link Control LLC: Logical identifies different protocol types and encapsulate, Flow Control (基于滑动窗口,回退或选择重传)
Media Access Control MAC Protocol : Naming, Framing, Physical Addressing
Carrier Sense Multiple Access with Collision Detection CSMA/CD :
发送数据前 先侦听信道是否空闲 ,若空闲,则立即发送数据。若信道忙碌,则等待一段时间至信道中的信息传输结束后再发送数据;若在上一段信息发送结束后,同时有两个或两个以上的节点都提出发送请求,则判定为冲突。若侦听到冲突,则立即停止发送数据,等待一段随机时间,再重新尝试。
1. Physical Layer : Binary Transimission (Signal and Media)
- defines the electrical and functional specifications for the link between end systems (including media).
- defines voltage(电压) levels, timing of voltage changes, physical data rates, maximum transmission distances, physical connectors, and other, similar attributes
TCP Transmission Control Protocol
- Problems must be solved in TCP:
Reliable transferFlow controlSliding windowcongestion avoidance…Connection managementEstablish connection:three handshakesRelease connection: four handshakes
TCP Establish Connection
TCP Release Connection:
UDP User Datagram Protocol:
Why do we need UDP?
- No connection establishment (which can add delay) No delay
- Simple: no connection state at sender, receiver
- Small segment header
- No congestion control: UDP can blast away as fast as desired
Features:
Connectionless:no handshaking between UDP sender, receivereach UDP segment handled independently of othersOften used for streaming multimedia applications:loss tolerantrate sensitiveUDP are used in:RIP: To send the route information periodicallyDNS: Avoid the delay to setup the TCP connectionSNMP: When congestion, SNMP must still runable. Without the congestion and reliability control mechanism, UDP has better performance than TCP under the circumstances. Other protocols include TFTP, DHCPAdd reliability at application layer if necessary