Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.
-
date post
20-Dec-2015 -
Category
Documents
-
view
268 -
download
4
Transcript of Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.
![Page 1: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/1.jpg)
Network and the Internet
國立清華大學資訊工程學系
CS1356 資訊工程導論
112/04/18
![Page 2: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/2.jpg)
2
Network
• An intricately connected system of things or people – Webster dictionary
• Computer network– A linked computer
system
![Page 3: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/3.jpg)
3
Outline
• Layered approach for network
• Link layer
• Network layer/Transport layer
• Application layer
Link
Network
Transport
Application
![Page 4: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/4.jpg)
4
Layered Approach
What and why?
Link
Network
Transport
Application
![Page 5: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/5.jpg)
5
A Story
某日,某資工系某家族決定要去竹北某餐廳家聚。他們決定先在某資電館前集合,再出發到餐廳。家族共有 12 人,某學長有一輛車,可以坐 4 人,另外還有 2 個人有摩托車,共可以載 4 人,另外 4 個人決定坐公車。某學長車上有 GPS ,可以找出路要怎麼走;有摩托車的同學上網查出地圖路線;要坐公車的同學查出要轉一次車,再走一小段路就可以到餐廳了…
![Page 6: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/6.jpg)
6
Layered Approach
• 去竹北某餐廳家聚– Decide where to go and what to do
• 4 人坐車 , 4 人騎車 , 4 人搭公車 – Decide the transportation methods
• GPS, 地圖路線 , 公車班次– Decide the routes from the source to the
destination
• 汽車 , 摩托車 , 公車 , 司機 , 馬路 , 紅綠燈 , 路標…– Make the real transportation happen
Application layer
Transport layer
Network layer
Link layer
![Page 7: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/7.jpg)
7
Network layers
• Application: Constructs message with dest address
• Transport: Provides reliable data transfer services
• Network: Handles routing through the network
• Link: Handles actual transmission of packets
![Page 8: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/8.jpg)
8
Layered Approach: Why?
• Each task in different layer can be handled more easily without considering the details of the tasks in other layers.– For example, they can decide a “best”
restaurant without considering how to go there
• Methods in different layers can be changed easily.– For example, different applications can use the
same transport protocol.
![Page 9: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/9.jpg)
9
Protocols
• A set of rules used to communicate with each other across a network. – Example 1: 先在資電館前集合,再出發到餐廳– Example 2: bus route and schedule– Example 3: traffic regulations
• Protocol is a special algorithm that enables and controls the data communications.
![Page 10: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/10.jpg)
10
(Fig. 4.14)
![Page 11: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/11.jpg)
11
Message Encapsulation
• To transmit the data, each layer appends some information to the original message.
• The corresponding layer in the receiver side needs to “decapsulate” the message.
address 1name 1address 2
name 2address 3name 3address 4name 4
![Page 12: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/12.jpg)
12
Link Layer
Link
Network
Transport
Application
![Page 13: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/13.jpg)
13
LAN, MAN, WAN
• Network can be classified by the scope– Local area network (LAN)– Metropolitan area (MAN)– Wide area network (WAN)
• Network for different scopesuses different media and has different protocols.
![Page 14: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/14.jpg)
14
Network Topology
• Popular network topologies used in LAN– Bus (Ethernet)
– Star (Wireless network with central Access Point, AP)
• Different topology uses different protocols.
![Page 15: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/15.jpg)
15
Ethernet and CSMA/CD
• CSMA/CD: protocol for Ethernet– Carrier Sense, Multiple Access with Collision
Detection
– Broadcast messages to all machines on the bus
– Resend message if detecting more than one messages sent at the same time (collision)
![Page 16: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/16.jpg)
16
WiFi and CSMA/CA
• CSMA/CA: protocol for WiFi– Carrier Sense, Multiple Access with Collision
Avoidance
• Similar to CSMA/CD– Sensing carriers before sending
• WiFi cannot detect collisions – Self signal drowns out others– Hidden terminal problem
![Page 17: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/17.jpg)
17
Collision Avoidance
• Before sending data, a node listens to the channel for a period.– If the channel is silent, it sends data.– If the channel is busy, it waits another random
period. After waiting, if the channel is silent, it sends data immediately.
• Cannot avoid collisions totally.– Before sending data, it sends a request to AP.
AP sends an acknowledgement to all machines after receive the data.
![Page 18: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/18.jpg)
18
Network Equipments for LAN
• Hub: relays signals it received
• Repeater: connects two buses
• Bridge: similar to repeater,but only forwards necessarymessages
• Switch: a bridge that connects multiple buses– All those do not change the protocol
![Page 19: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/19.jpg)
19
Network layer/Transport layer
IP, TCP, UDP, and the Internet
Link
Network
Transport
Application
![Page 20: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/20.jpg)
20
Terminology
• An internet: – a network of networks– It is different from “the Internet”.
• The Internet: a global internet that uses TCP/IP protocol suite.– TCP/IP protocol suite: IP+TCP+UDP– TCP and UDP: Transport layer protocols – IP : Network layer protocol
![Page 21: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/21.jpg)
21
Internet Service Provider (ISP)
• A company/organization that offers its customers access to the Internet.
• The ISP hierarchy
![Page 22: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/22.jpg)
22
How ISPs Work
• Connection method to ISPs– Direct connection– Dial-up, DSL– Cable modem– Wireless
TANet 台灣學術網路 SeedNet 新世紀資通Hinet 中華電信 Cable modem 東森有線電視
![Page 23: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/23.jpg)
23
Internet Protocol (IP)
• A protocol used for communicating data across an internet.
• It is a connectionless protocol.– Telephone network is connection-oriented. – For the same source
and destination, different message may be routed differently.
![Page 24: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/24.jpg)
24
IP address
• How to design a global address–台灣 新竹市 光復路二段 101號– 886-3-571-5131
• IP address: the global identification for each computer connected to an internet– Pattern of 32 or 128 bits, usually represented
in the dotted decimal notation.– For example: 140.114.87.5 is for 楓橋驛站
nation-city-road-number
nation-area-phone number
![Page 25: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/25.jpg)
25
Gateway and Router
• Gateway: the “point” linked to an internet
• Router: forwards and routes messages– Forwarding: relay messages on an internet– Routing: update and maintain the forwarding
table
Destination Next hop Cost
140.114.87.5 103.121.1.2 …
140.114.79.3 … …
![Page 26: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/26.jpg)
26
Domain Name
• The mnemonic address for human– For example, bbs.cs.nthu.edu.tw is the
domain name for 楓橋驛站– Top level domains (TLD): suffixes in the
domain name: .gov, .edu, .com, .net, .org,…– Country-code TLD: .tw, .ca, .jp, .au, …– Subdomains: prefixes of an domain name,
bbs., www., …
![Page 27: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/27.jpg)
27
Domain Name System (DNS)
• Provides translation between IP addresses and domain names.– Name server– DNS lookup
Machines like binary addresses
Humans prefer domain names
DNS
![Page 28: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/28.jpg)
28
Transport Layer
TCP UDP
Handshaking
Retransmission
Flow control
Congestion control
• Two protocols• TCP (Transmission
Control Protocol)• UDP (User Datagram
Protocol)
![Page 29: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/29.jpg)
29
Transmission Control
• Handshaking: – Make reservation before go to a restaurant
• Retransmission: – Ask someone to repeat what he/she said
• Flow control: – Ask someone to talk slower
• Congestion control: – Lineup of a crowd of people
![Page 30: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/30.jpg)
30
Port Number
• TCP/UDP need to know which application should a received message be sent to– This is identified by port numbers– IP address is for the address of computer
• ExamplesPort number Application
53/TCP,UDP Domain Name System (DNS)
80/TCP,UDP Hypertext Transfer Protocol (HTTP)
513/TCP Login
![Page 31: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/31.jpg)
31
Application Layer
Client/server, peer to peer, distributed system
The Internet applications and WWW
Link
Network
Transport
Application
![Page 32: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/32.jpg)
32
Client/server Model
• Server provides service to clients– One server, many clients– Server must execute
continuously– Client initiates
communication
• Examples: – Printer server, – File server, – Web server, – Email server, – BBS server,– …
![Page 33: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/33.jpg)
33
Peer-to-peer (P2P) Model
• Two processes communicating as equals
• Examples:– Peer-to-peer file sharing:
• FastTrack, BitTorrent, …
– VoIP: Skype, …– Streaming media: TVant, …– Instant message, online
chat: MSN, google talk, …
![Page 34: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/34.jpg)
34
Distributed System
• Consists of software units that execute as processes on different computer.
• Examples:– Multitier architecture– Computer cluster– Cloud computing– Grid computing– BOINC system– …
![Page 35: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/35.jpg)
35
The Internet Applications
• Telnet, ssh
• WWW
• File transfer
• Peer2peer
• Internet phone (VoIP), instant message
• Streaming media
• …
![Page 36: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/36.jpg)
36
Electronic Mail (email)
• Email address
• Email server
• Email client– Outlook– Thunderbird– Pine
• Webmail – Yahoo mail, gmail, hotmail, …
![Page 37: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/37.jpg)
37
World Wide Web (WWW)
• A system, invented by Tim Berners-Lee (1989), of interlinked hypertexts via Internet.
![Page 38: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/38.jpg)
38
Web Browser
• A software application for retrieving, presenting, and traversing information resources on the World Wide Web.– Internet Explore– Mozilla Firefox– Apple Safari– Google Chrome
• Bookmark, RSS, download management
![Page 39: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/39.jpg)
39
HTTP and URL
Figure 4.8 A typical URL
• Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information
• Uniform Resource Locator (URL): web address
![Page 40: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/40.jpg)
40
HTML
• Hypertext Markup Language (HTML): encoded as text file
• Uses tags to communicate with browsers
• XML: eXtensible Markup Language – A language for constructing markup
languages (meta-language)
![Page 41: Network and the Internet 國立清華大學資訊工程學系 CS1356 資訊工程導論 2015/6/15.](https://reader031.fdocuments.net/reader031/viewer/2022020710/56649d415503460f94a1cab8/html5/thumbnails/41.jpg)
41
Related Courses
• Computer network–計算機網路概論、密碼與網路安全概論、訊號與系統、作業系統
• Textbook chap 4 sec1,2,3,4
• The Internet
References