Topic 3- Internet Networking Flashcards

1
Q

Stream Transport

A

• Stream: sequence of bytes flows from one
application program to another
• Without attaching meaning to the bytes and without
inserting boundaries
• Two streams between pair of communicating
applications, one in each direction
• Accepts input from one, delivers to the other • Sending application can choose to generate one byte
at a time or can generate blocks of bytes
• Network can choose to combine smaller blocks into one
large block or divide a large block into smaller blocks

It is connection oriented, 1-1 communication of sequence of individual bites. It is used in most applications and built on TCP protocol.

Stream service is connection-oriented:
Applications must request connection be created Once established, connection allows applications to
send data in either direction Finally, when communication finishes, the
applications request the connection be terminated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Message transport

A

Message: the network accepts and delivers messages
• Each message delivered corresponds to message
transmitted • Never delivers part of a message, nor does it join
multiple messages together • Sender places exactly n bytes in outgoing message • Receiver receives n bytes in the incoming message

Connectionless, many to many communication of sequence of individual messages, each limited to 64 kbytes and used for multimedia applications such as zoom. It is built on UDP protocol.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

3 main message transport types

A

Message Transport Types
1. Unicast
• a message can be sent from an application on
one computer directly to an application on another, 1-to-1
2. Multicast
• a message can be multicast to some of the
computers on a network, 1-to-many
3. Broadcast
• a message can be broadcast to all computers on
a given network, 1-to-all

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Message vs stream reliability

A

Message UDP transport is unreliable • Unreliable means no guarantee:
1. Lost: never delivered
2. Duplication: more than one copy arrives
3. Ordered: out-of-order • Programmers must ensure the application operates
correctly even if packets are lost or reordered

Most applications require delivery guarantees
• Use stream services • Programmers tend to use stream service except in
special situations
• E.g. video, where multicast is needed, the
application provides support to handle packet reordering and loss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Client Server model

A

client-server model

handle all services in the Internet
• A server starts first and awaits contact • A client starts second and initiates the connection
• Application programs known as clients and servers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Characteristics of Client Software

A
  1. Invoked directly by a user, executes only for one
    session
  2. Runs locally on a user’s personal computer
  3. Actively initiates contact with a server
  4. Can access multiple services as needed, but
    usually contacts one remote server at a time
  5. Does not require especially powerful computer
    hardware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Characteristics of Server Software

A
  1. A special-purpose, privileged program
  2. Dedicated to providing one service that can handle
    multiple remote clients at the same time
  3. Is invoked automatically when a system boots, and
    continues to execute through many sessions
  4. Runs on a large, powerful computer
  5. Waits passively for contact from arbitrary remote clients
  6. Accepts contact from arbitrary clients, but offers a single
    service
  7. Requires powerful hardware and a sophisticated OS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

1 computer - multiple clients

A

Multiple Clients Benefits
• A computer with multiple clients is useful as services
can be accessed simultaneously • For example, a user can have three (3) windows open
simultaneously running three (3) applications:
1. Email 2. Chat service 3. Web browser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

1 Computer - Multiple Servers

A

• A computer that operate multiple servers is useful
• Hardware can be shared
• Has lower system administration overhead than
multiple computer systems • Demand for a server is often sporadic:
• Server can remain idle for long periods of time
and does not use the CPU while waiting for a
request to arrive
• If demand is low, consolidating servers can reduce
cost without reducing performance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

DNS

A

Domain name system

Translates human readable domain names (www.Amazon.com) to machine readable IP addresses (192.0.2.44)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

IP

A

Each computer in the Internet is assigned a unique
32-bit identifier known as an Internet Protocol (IP)
address
• 192.168.1.0
• It is an Internet layer address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Port number

A

Each service available in the Internet is assigned a unique 16-bit identifier known as port number
• Email: 25, HTTP: 80 • It is a Transport layer address

For example
A server for all google services (google, gmail, drive, photos) ip is not enough, it will reach the server but also a port number is required to specify the application chosen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Server Circular Dependencies

A

• Circular dependencies: a server for one service can
act as client for another
• Before it can fill in a web page, a web server may need to
become a client of a database • A server may also become the client of a security service
to verify a client is allowed access to the service

For example
When you as client enter username and password for mail service the mail is also a client for authentication server to check the details on the database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Concurrent Servers

A

• Most servers are concurrent (simultaneous)
• A server uses more than one thread of control • Concurrent execution depends on the OS being used
and the code is divided into 2 pieces
1. Main program (thread)
2. Handler
• Main thread accepts contact from client and creates a
thread of control for the client (always listening)
• Each thread of control interacts with a single client and
runs the handler code

After handling one client the thread terminates
• Main thread keeps server alive after creating a
thread to handle a request
• If N clients are simultaneously using a concurrent
server, N+1 threads will be running:
• N threads for each client
• +1 main thread to wait for additional requests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Server bottlenecks

A

Server Bottlenecks
• If a single server provides a given service
• the network connection between the server and
the Internet can become a bottleneck

How to avoid?
One way to avoid a bottleneck forms the basis of file sharing known as a peer-to-peer (P2P) architecture
• Data is distributed equally among a set of N servers • Each request is sent to the appropriate server
• Each server only provides 1/N of the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

API

A

Application Program Interface (API) : interface that
applications use to specify and enable communication between one another.
• Details of an API depend on the OS

This is the waiter

17
Q

Socket api

A

de facto standard for software that communicates
over the Internet is the socket API
• commonly abbreviated sockets.

Allows apps to interact with the transport and the lower layers on the model.
It has both IP address and port number in order to communicate
(Therefore it is not part of one layer in the model)

The socket API is a collection of socket calls that enable you to perform the following primary communication functions between application programs:

  • Set up and establish connections to other users on the network
  • Send and receive data to and from other users
  • Close down connections

A socket is an abstract representation (handle) for the local endpoint of a network communication path

In socket programming an application must specify
many details, such as
• address, port number, whether the application
will act as a client or as a server
• To avoid having a single socket function with many
parameters, designers of the socket API chose to
define many functions
• An application creates a socket, and then invokes functions for details

18
Q

Socket api- pros and cons

A

Advantage of socket approach is that most functions
have three or fewer parameters • Disadvantage is that a programmer must remember
to call multiple functions when using sockets

19
Q

The socket functions

A

On the pictures document.

Clients call =connect to establish a connection with a
specific server
connect (socket, saddress, saddresslen)

20
Q

Sockets in Message Paradigm

A

Socket functions used to send and receive messages are more complicated than stream paradigm because many options are available-

• A sender can choose whether to store the recipient’s
address in the socket and merely send data or to specify
the recipient’s address each time a message is transmitted

• One function allows a sender to place the address and
message in a structure and pass the address of the
structure as an argument, and another function allows a
sender to pass the address and message as separate
arguments