Table of Contents
1概述 1
1.1OSI 2
1.2TCP/IP 3
1.3OSI與TCP/IP 3
2OSI各層簡介 4
2.1物理層 Physical Layer 4
2.2數據鏈路層 Data Link Layer 6
2.3網絡層 Network layer 7
2.4傳輸層 Transport Layer 8
2.5會話層 Session Layer 9
2.6表示層 Presentation Layer 10
2.7應用層 Application Layer 10
1概述
數據通信網絡有兩大模型,我們最常見的就是OSI模型,它是一個推薦標準,而TCP/IP模型卻是事實上的標準。整個網絡系統的大廈都是由這兩大模型爲基礎構建起來的。本文的目的是通過對兩大網絡模型的介紹,讓讀者對整個網絡系統有個全局的認識,提供一個高屋建瓴地視角,併爲掌握網絡知識,和分析網絡問題打下基礎。
本文以OSI模型爲基礎,詳細介紹了各層的功能,數據在本層的表現形式,工作在本層的設備、協議和技術等。文中並沒有對某個特定的協議做過多描述或解釋,知道這個協議屬於哪一層就夠了,如果某個協議或技術在生產中使用比較普遍,後面的文檔中就會有詳細的介紹。
1.1OSI模型
圖02-01 OSI網絡模型
1.2TCP/IP模型
圖02-02 TCP/IP網絡模型
1.3OSI與TCP/IP對比
圖02-03 OSI與TCP/IP網絡模型對比
2OSI各層簡介
2.1物理層 Physical Layer
定義了機械的、電氣的、規程的、功能性的標準。
數據形式是二進制流(Bit Flowing)。
本層設備有中繼器(Repeater)集線器(Hub)等。
相關協議或標準:
V.35
X.21
RJ-45
RJ-11
EIA/TIA 232
EIA/TIA 449
EIA/TIA 422
EIA/TIA 485
Token Ring
FDDI
10Base5
10Base2
10BaseT
100BaseT
100BaseTX
100BaseT4
100BaseFX
1000BaseT
1000BaseX
1000BaseLX
1000BaseSX
1000BaseCX
G.651
G.652
G.653
G.654
G.655
G.656
OM1
OM2
OM3
STM1
STM4
STM16
STM64
STM256
2.2數據鏈路層 Data Link Layer
定義了幀結構和物理流控。
數據形式是幀(Frame)。
本層設備有網橋(Bridge)和交換機(Switch)。
在IEEE 802中又被分爲較下層的MAC(Media Access Control)層和較上層的LLC(Logic Link Control)層。
相關協議或標準:
WiMAX 802.16
Wi-Fi
IEEE 802.11
CSMA/CA
IEEE 802.5,Token Passing Ring
IEEE 802.3
CSMA/CD,Carrier-sense Multiple Access with Collision Detection,帶衝突檢測的載波偵聽多路訪問
PPP,Point-to-Point Protocol,點到點協議
SDLC,Synchronous Data Link Control,同步數據鏈路控制
HDLC,High-level Data Link Control,高級數據鏈路控制
ATM,Asynchronous Transfer Mode,異步傳輸模式
ISDN,Integrated Services Digital Network,綜合業務數字網絡
Frame Relay,幀中繼
Ethernet Version 2,以太網版本2
IEEE 802.3u,Fast Ethernet,快速以太網
IEEE 802.3z,Gigabit Ethernet,吉比特以太網
IEEE 802.3ab,Gigabit Ethernet,吉比特以太網
L2TP,Layer 2 Tunneling Protocol,二層隧道協議
PPTP,Point-2-Point Tunneling Protocol,點到點隧道協議
VLAN,Virtual Local Area Network,虛擬本地網
QinQ,Dot1Q in Dot1Q
STP,Spanning Tree Protocol,生成樹協議
2.3網絡層 Network layer
定義了包結構,編址,尋址,路由計算等。
數據形式是包(Packet)。
工作在網層的設備是路由器和三層交換機等。
相關協議或技術:
SLIP,Serial Line Internet Protocol,串行線路網際協議
CSLIP,Compressing Serial Line Internet Protocol,壓縮的串行線路網際協議
ARP,Address Resolution Protocol,地址解析協議
RARP,Reverse Address Resolution Protocol,反向地址解析協議
IPX,Internetwork Packet Exchange protocol,互聯網數據包交換協議
IP,Internet Protocol,互聯網協議
RSVP,Resource Reservation Protocol,資源預留協議
IGMP,Internet Group Management Protocol,互聯網組管理協議
ICMP,Internet Control Message Protocol,互聯網控制消息協議
IPsec,Internet Protocol Security,互聯網協議安全性
BGP,Border Gateway Protocol,邊界網關協議
IBGP,Internal Border Gateway Protocol,內部邊界網絡協議
EBGP,External Border Gateway Protocol,外部邊界網絡協議
EGP,Exterior Gateway Protocol,外部網關協議
GGP,Gateway to Gateway Protocol,網關到網關協議
RIP,Route Information Protocol,路由信息協議
IGRP,Intorior Gateway Routing Protocol,內部網關路由協議
EIGRP,Enhanced Inner Gateway Route Protocol,增加型內部網關路由協議
OSPF,Open Shortest Path First,最短路徑優先協議
2.4傳輸層 Transport Layer
管理網絡層連接,提供了可靠的包傳遞機制。
數據形式是分段或叫分片(Segment)。
相關協議或技術:
TCP,Transmission Control Protocol,傳輸控制協議
UDP,User Datagram Protocol,用戶數據報協議
SSL,Secure Socket Layer,安全套接層
TLS,Transport Layer Security,傳輸層安全協議
RTP,Real-Time Transport Protocol,實時傳輸協議
SPX,Sequenced Packet Exchange,順序包交換
ASP,AppleTalk Session Protocol,AppleTalk 會話協議
ATP,AppleTalk Transmission Protocol,AppleTalk 控制協議
2.5會話層 Session Layer
會話的建立或拆除等。
相關協議或技術:
NetBIOS
RTCP,Realtime Transport Control Protocol,實時傳輸控制協議
DAP,Directory Access Protocol,目錄訪問協議
LDAP,lightweight Directory Access Protocol,輕量級目錄訪問協議
RPC,Reomote Procedure Call,協和過程調用
H.323
H.245
H.225
2.6表示層 Presentation Layer
定義數據的結構和傳輸格式,編解碼,壓縮解壓縮,加解密等。
相關協議:
ASN.1,Abstract Syntax Notation 1,抽象語法標記
EBCDIC,Extended Binary Coded Decimal Interchange Code
ASCII,American Standard Code for Information Interchange,美國信息交換標準代碼
G.711
G.729a
G.726
G.728
MPEG,Motion Picture Experts Group,活動圖像專家組
JPEG,Joint Photographic Experts Group,聯合圖像專家組
GIF,Graphics Interchange Format,圖像互換格式
TIFF,Tagged Image File Format,標籤圖像文件格式
2.7應用層 Application Layer
提供接口給終端用戶應用,爲面向網絡的應用程序提供服務。
相關協議或應用:
DNS,Domain Name System,域名系統
HTTP,Hyper Text Transfer Protocol,超文本傳輸協議
HTTPS,Hyper Text Transfer Protocol over Secure Socket Layer
FTP,File Transfer Protocol,文件傳輸協議
SMTP,Simple Mail Transfer Protocol,簡單郵件傳輸協議
IMAP,Internet Message Access Protocol,互聯網消息訪問協議
POP,Post Office Protocol,郵局協議
POP3,Post Office Protocol Version 3,郵局協議版本3
MIME,Multipurpose Internet Mail Extensions,多用途互聯網郵件擴展
TELNET,Virtual Terminal,虛擬終端
SNMP,Simple Network Management Protocol,簡單網絡管理協議
RMON,Remote Network Monitoring,遠程網絡監控協議
RDP,Remote Desktop Protocol,遠程桌面協議
RSH,Remote Shell,遠程shell
RLOGIN,Remote Login,遠程登錄
RCP,Remote Copy,遠程複製
LPR,Remote Print,遠程打印
X11,X Window System,X桌面系統
CIFS,Common Internet File System,通用互聯網文件系統
Portmap,Port mapper management Protocol,端口映射管理協議
NIS YP,Network Information System Yellow Page,網絡信息系統黃頁
NFS,Network File system,網絡文件系統
BOOTP,Bootstrap Protocol,自舉協議
DHCP,Dynamic Host Configuration Protocol,動態主機配置協議
NTP,Network Time Protocol,網絡時間協議
TFTP,Trivial File Transfer Protocol,簡單文件傳輸協議