Download lecture_1

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 1355 wikipedia , lookup

Deep packet inspection wikipedia , lookup

Distributed firewall wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Internet protocol suite wikipedia , lookup

Computer network wikipedia , lookup

Network tap wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Airborne Networking wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Transcript
Computer Networks and Internets
1
Internet Growth
2
What a Network Include
• Transmission hardware
• Special-purpose hardware device
– Interconnect transmission media
– Control transmission
– Run protocol software
• Protocol software
– Encodes and format data
– Detects and corrects problems
3
What a Network Does
• Provide communication that is
–
–
–
–
–
Reliable
Fair
Efficient
Secure
From one application to another
4
What a Network Does – Con’t
• Automatically detect and corrects
–
–
–
–
Data corruption
Data loss
Duplication
Out-of-order delivery
• Automatically finds optimal path from source
to destination
5
Ping program
6
Ping Program – Con’t
7
Traceroute Program
8
Network Programming
• Network allows arbitrary applications to
communicate
• Programmer does not need to understand
network technologies
• Network facilities accessed through an
Application Program Interface
9
Basic Paradigm for Internet
Communication
• Establish contact
• Exchange data (bi-directional)
• Terminate contact
10
Establishing Contact
• Performed by pair of applications
• One application starts and wait for contact
(called server)
• Other applications initiate contact (called
client)
11
Representations and Translations
• Humans use names such as:
– www.netbook.cs.purdue.edu (computer)
– ftp (applications)
• Network protocols require binary values
• Library routines exist to translate from names
to numbers
12
Example API
13
Illustration of API Calls
14
Definition of the API
•
•
•
•
•
connection await_contact (appnum a)
connection make_contact (computer c, appnum a)
appnum appname_toappnum(char* a)
computer cname_to_comp(char* a)
int send(connection con, char* buffer, int length, int
flags)
• int recv(connection con, char* buffer, int length, int
flags)
• int recvln(connection con, char* buffer, int length)
• int send_eof(connection con)
15
Summary of Example API
16
Illustration of Echo Application
17
Examples
• echoserver.c and echoclient.c
• chatserver.c and chatclient.c
• webclient.c and webserver.c
18
Summary
• Studying networks is important because
– The world is interconnected
– Applications now operate in a distributed
environment
19