Download 網路基本觀念 - Yen-Cheng Chen / 陳彥錚

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

IEEE 802.1aq wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Net bias wikipedia , lookup

Distributed firewall wikipedia , lookup

Zigbee wikipedia , lookup

CAN bus wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Wake-on-LAN wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Deep packet inspection wikipedia , lookup

Computer network wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Airborne Networking wikipedia , lookup

IEEE 1355 wikipedia , lookup

Network tap wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Internet protocol suite wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Transcript
網路與通信協定
陳彥錚 (Yen-Cheng Chen)
[email protected]
http://www.ncnu.edu.tw/~ycchen/
內容大綱
 1. 網路基本認識
 2. OSI 7層參考模型
 3. Internet 通信協定集
 4. 網路設備
 5. 網管相關通信協定
1. 網路基本認識




網路分類
網路技術
網路傳輸介質
網路設備
網路分類
 網路 - 依終端應用區分
 數據通信網路 (Data Communication
Network)
 電信網路 (Telecommunication Network)
 網路 - 依距離區分
 LAN (Local Area Network)
 MAN (Metropolitan Area Network)
 WAN (Wide Area Network)
網路分類 (續)
 網路 - 依交換方式
 線路交換 (Circuit Switching)
 分封交換 (Packet Switching)
 網路 - 依傳輸介質
 有線網路 (Wired Network)
 無線網路 (Wireless Network)
Bandwidth
網路技術
Gigabit
Ethernet
ATM
Fast
Ethernet
FDDI
MAN & SMDS
Ethernet
Token Ring
Frame Relay
ISDN (basic rate)
Distance
LAN
MAN
WAN
網路傳輸介質
Media
Wireline
Transmission
Electric
Conductors
Wireless
Transmission
Optical
Fiber
Radio
Twisted
Pair
Coaxial
Cable
Mono-mode
Infrared
Laser Links
Multi-mode
Microwave
Satellite
Transmission
網路設備
 LAN/Internet設備
 Repeater
 Hub
 Bridge
 Switch
 Router
 Gateway
 WAN設備
 Modem
 Repeater
 ADM (Add-Drop Multiplexer)
 Cross-Connect
 Switch
 Multiplexer
 Concentrator
2. OSI 7層參考模型
 OSI Model
 OSI - Open Systems Interconnection
 由國際標準組織ISO (International Standard
Organization)制定之網路分層架構標準。
 OSI參考模型,從實體傳輸介質至上層網
路應用,由低而高共包括七個層級
 OSI之網路標準,依循OSI參考模型之七層
級制定,以便清楚完整規範網路應有之功
能元件以及必須遵守的準則。
OSI Reference Model
7
6
5
4
3
2
1
Application
7: 應用層
Presentation
6: 表現(展示)層
Session
5: 交談(會議)層
Transport
4: 傳輸層
Network
3: 網路層
Data Link
Physical
2: 資料鏈結層
1: 實體層
OSI 通信架構
Application
Application protocol
Application
Presentation
Presentation protocol
Presentation
Session
Session protocol
Session
Transport
Transport protocol
Transport
Network
Network
Network
Network
Data Link
Data Link
Data Link
Data Link
Physical
Physical
Physical
Physical
IMP 2
Host B
Host A
IMP 1
Layer 1 & 2
Layer 1. Physical layer
•Establishes the actual physical connection between the
computer equipment and the network.
•Provides the transmission of bits from one system to
another.
Layer 2. Data link layer
•Provides the transmission of packets.
•Performs error detection and correction functions to ensure
that a packet contains the same information received as
sent.
Layer 3 & 4
Layer 3. Network layer
•Determines the path that will be taken through the network.
•Controls the rate at which the network accepts packets, to
avoid and recover from congestion.
Layer 4. Transport layer
•Provides for the flow of data between sender and receiver,
•Ensures that the data arrives at the correct destination.
•Ensure that packets are sent at a rate the receiver and the
application can cope with.
•At the receiver, the transport layer reassembles the packets
into messages and delivers them to the next highest layer.
Layer 5 & 6
Layer 5. The session layer
•Allows the setup and termination of a communications path.
Ensures that the sender is authentic and has access rights
to establish a connection.
•Synchronizes the communication between two systems.
Layer 6. The presentation layer
•Converts outbound data from a machine-specific format to
an international standard format.
•Converts inbound data from international format to a
machine-specific format.
Layer 7
Layer 7. The application layer
•Provides the software for network services, such as file
transfer, remote login, remote execution, e-mail, etc.
•Provides the interface between user programs and the
network.
3. Internet通信協定集
 常稱TCP/IP通信協定
 並沒嚴格定義通信層級
 一般將TCP/IP通信協定分為四層
 處理層 (Process Layer)
 主機對主機層 (Host-to-host Layer)
 網際網路層 (Internet Layer)
 網路存取層 (Network Access Layer)
Internet通信協定
Application
HTTP
SMTP
NNTP TELNET
SNMP
DNS
TCP
Transport
Network
Network
Access
Data Link
FTP
ECHO
NTP
TIME
BOOTP DHCP
UDP
RIP
OSPF
BGP
ICMP
IGMP
IP
ARP
RARP
SLIP
PPP
IP (Internet Protocol)
 IP位於網際網路層,(OSI第三層)
 主要提供多個互連網路間之路由/繞送
(Routing)功能。
 協定特性:Connectionless、Unreliable
 為能提供有效路由功能,制定了IP定址機
制。
 每一TCP/IP網路上之主機均有一32-bit IP
位址。
 140.131.76.1
IP Address
 長度:4 Bytes (32-Bit)
 每一IP 位址包括兩個部份
 網路位址 (Network Address)
 主機位址 (Host Address)
Host
Network
 有時一網路會再分割為多個子網路,此時
主機位址又再細分為子網路(Subnet)及主
機(Host)兩個部份。
Network
Subnet
Host
IP 位址分類
網路遮罩(Netmask)
 網路遮罩,將一IP位址中之代表網路及子
網路位址之位元設為1,其餘設為0即為網
路遮罩。
 Class A  255.0.0.0
 Class B  255.255.0.0
 Class C  255.255.255.0
 網路遮罩與IP位址利用邏輯AND便可得到
網路位址。
Routers and the IP Addressing Principle
• Routers have two or more addresses. One for
each interface.
Routing Table
IF ((Mask[i] & Destination Addr) = = Destination[i])
Forward to NextHop[i]
IP Forwarding Process
 IF ((Mask[i] & Destination Addr) = = Destination[i])
Forward to NextHop[i]
TCP (Transmission Control Protocol)
傳輸控制協定(TCP)位於主機對主機層,
(相對於OSI第4層)。
連結導向(Connection-Oriented)
 three-way handshake
提供具可靠性(Reliable)之傳輸
 Sequencing, Checksum
負責傳送端(Sender)與接收端(Receiver)間
之流量控制(Flow Control)
 Sliding Window
UDP (User Datagram Protocol)
 UDP位於主機對主機層, 相對於OSI第4層。
 協定特性:Connectionless、Unreliable
 提供一簡單快速的主機間資金傳送機制。
通信埠(Port)
 每個主機之應用/處理層上可能有各種不同
的應用、服務、或資源,每當一主機收到
由網路上傳來之資料時,傳輸層必須提供
一能辨別網路應用服務之機制,以便將資
料分派至正確的處理程式。
 每一上層通信應用服務或程式對應一唯一
的TCP或UDP通信埠號(Port Number)。
常見TCP/IP應用服務與埠號
TCP
21
23
25
53
79
80
110
119
123
FTP
Telnet
SMTP
DNS
Finger
HTTP
POP3
NNTP
NTP
UDP
53
67
69
161
162
DNS
BOOTP
TFTP
SNMP
SNMP-Trap
Port: 1~1024,網際網路標準專用
4. 網路設備







Repeater
Hub
Bridge
Switch
Router
Routing Switch
Gateway
Repeater
 Operates at Layer 1, the physical layer.
 Connects two network segments into one large
segment, or to expand an existing segment.
 Enhances data signals and thus can be used to
extend maximum cabling distances.
 There is no network intelligence built into a simple
repeater; it is used strictly for signal propagation.
Hub
 Operates at Layer 1, the physical layer.
 Simply a multiport repeater.
 Can be used to increase overall network size and
number of nodes on a single segment.
 Can isolate faults within the subnet.
 Allows you to add stations to a segment without
disrupting the entire network.
Bridge
 Operates at Layer 2, the data link layer.
 Allows networks with different physical signaling, but
with compatible data link addressing schemes, to
communicate.
 Helps reduce traffic on a backbone LAN by filtering
any information coming from one segment to another
that does not need to be forwarded through the
backbone.
 A common use for a bridge is to allow users on an
Ethernet LAN and a Token Ring LAN to communicate
with each other.
Bridge Example
Application
Application
Presentation
Presentation
Session
Session
Transport
Bridge
Network
Transport
Network
Data Link
Data Link
Data Link
Data Link
Physical
Physical
Physical
Physical
Switch
 Operates at Layer 2, the data link layer.
 Dispatches data to its destination, which it
determines from the packet’s lower-layer
media access control (MAC) address.
 Can limit traffic, and does not understand
network protocols.
Router
 Operates at Layer 3, the network layer.
 Connects two networks with different
technologies, and provides an intelligent
means of transferring packets from one
network to the other.
 Also forwards traffic among multiple hubs and
bridges.
Router Example
Application
Application
Presentation
Presentation
Session
Session
Transport
Router
Transport
Network
Network
Network
Network
Data Link
Data Link
Data Link
Data Link
Physical
Physical
Physical
Physical
Routing Switch
 Operates at Layer 3, the network layer.
 Combines the intelligence of a router with the
efficiency of a switch,
 Routing data at higher speeds.
Gateway
 Operates at Layer 7, the application layer.
 Can encompass all seven of the OSI model
layers.
 A computing system that can be programmed
to do any number of intricate protocol
conversions and negotiations, such as
between IP and IPX.
5. 網管相關通信協定





SNMPv1
SNMPv2C
ICMP
ARP/RARP
DHCP
SNMPv1
(Simple Network Management Protocol version 1)
The most common management protocol in use in data networks.
Provides a means of obtaining information from, and sending
information to, network devices.
Based on the manager-agent model.
Uses Management Information Bases (MIBs) to exchange
information between the manager and the agent.
Using the SNMP protocol, a manager can query and modify the
status and configuration information on each managed device by
making requests to the agent running on the managed device.
All commands use the UDP/IP protocol, which means that
communication between the manager and the agent is
connectionless.
SNMP operates at Layer 7, the application layer.
SNMPv2C (version 2)
SNMPv2C includes the basic functions of SNMPv1.
Adds
 new message types,
 standardized multi-protocol support,
 enhanced security,
 new MIB objects, and
 a way to co-exist with SNMPv1.
SNMPv2C is useful for the retrieval of large amounts of
management information using fewer network resources.
ICMP
(Internet Control Message Protocol)
ICMP is the part of IP that handles error and control
messages.
ICMP operates at Layer 3, the network layer.
ICMP supports an echo function, which sends a packet
on a round-trip between two hosts.
Ping, which sends a signal to see if an interface is up
and running, is based on ICMP echo.
ICMP can also send an address mask request that
returns the address of the subnet mask on the remote
system. This feature is important for non-SNMP devices.
ARP/RARP
(Address Resolution Protocol / Reverse ARP)
 ARP/RARP are used at Layer 2, the link layer,
 ARP is used to map an IP address to a MAC (or
link level, or hardware) address.
 RARP is used to map a MAC address to an IP
address.
DHCP
(Dynamic Host Configuration Protocol)
DHCP allows IP addresses to be allocated on a temporary
basis (a lease).
When the lease for an IP address expires, the address can
be reused by a different node.
This is useful in environments supporting mobile users who
connect to the network with a laptop from many different
places.
This helps alleviate the problem of limited IP addresses and
simplifies TCP/IP client configurations.