Week 4 Flashcards

1
Q

What are layers of a network?

A

Each layer implements a service, relying on services implemented by a layer below

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

Why is layering good?

A
  • modularization
  • ease of maintenance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the 5 Internet Layer Stacks

A
  1. App
  2. Transport
  3. Network
  4. Link
  5. Physical
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the Application Layer do?

A

supporting network apps through HTTP, IMAP, SMTP, DNS

Info: MESSAGE

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

What does the Transport Layer do?

A

Process to process data transfer (TCP and UDP)

Info: SEGMENT

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

What does the Network Layer do?

A

moving packets known as DATAGRAMS.

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

What does the Link layer do?

A

Data transfer between neighboring elements (within the same network) called FRAMES

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

What does the Physical Layer do?

A

bits “on the wire”

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

Order of layering?

A

App > Transport > Network > Link > Physical

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

What are the 2 Main Network Architechtures?

A
  1. Client-Server Architecture
  2. P2P Architecture
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain the Client-Server structure

A

Server:
- always on host, permanent IP address
- ideally data centers

Client:
- initiates contact with the server.
- Clients do not interact with other clients

example: HTTP, IMAP, FTP

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

Explain the P2P Architechture

A
  • minimal or no reliance on dedicated servers
  • direct communication between hosts.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do Client-Servers processes interact with each other?

A

Through SOCKETS. send/receive through sockets, like a door.

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

What are sockets?

A

where a process sends messages into and receives messages from.

“door” of 2 houses, connecting the inside, outside, + road (link)

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

What info do we need to identify a process?

A
  1. Host’s address
  2. Port number
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

4 types/dimensions of transfer service an app needs?

A
  1. Reliable data transfer
  2. Throughput
  3. Timing / delay
  4. Security
17
Q

What are the 2 Main Transport services provided by the internet?

A

TCP and UDP

18
Q

For text-apps, what transfer servies would it need?

A

-No data loss
- Time sensitive (FOR TEXTS)

19
Q

For images/video apps, what transfer services would it need?

A
  • Throughput
  • Timing / delay sensitive
20
Q

Explain the TCP service.

A
  • Connection oriented
  • Has congestion control
21
Q

Pros of TCP

A
  • No loss (provides reliability)
  • Congestion controlC
22
Q

Cons of TCP

A
  • does NOT provide:
  • guaranteed timing, security, throughput
23
Q

Explain the UDP service model

A
  • lightweight transport protocol with minimal services
  • no handshaking required
24
Q

Pros of UDP

A
  • UDP has no constraints unlike TCP, you can send as much as you wantC
25
Cons of UDP
- unreliable data transfer - Does not provide timing, throughput guarantee, congestion control
26
Which types of apps can use UDP?
- Internet telephone - Interactive games
27
What are the 2 types of a network app?
1. Open Network (rules dictated by RFC) 2. Properiety Network
28
What are the parts of a destination address?
IP address and port number of BOTH client and server.
29
Parts of a Client Program with UDP: How do you create the client socket?
1. initialize server name and port 2. create client socket: USING SOCK_DGRAM
30
Parts of a Client Program with UDP: How do you send a message?
1. encode message 2. use .sendto() function
31
Parts of a Client Program with UDP: How do you receive message?
1. use .recvfrom() 2. close the socket
32
Parts of a Server Program with UDP: What socket do you need to make?
Server socket! Using SOCK_DGRAM
33
Parts of a Server Program with UDP: How do you receive packets?
INSIDE THE INFINITE LOOP: - use .recvfrom() - decode the message! - use .sendto()
34
Parts of a Client Program with TCP: How do you create the client socket?
1. initialize servername and port 2. Create client socket through SOCK_STREAM
35
Socket programming for TCP, how does client -> server handshake work exactly?
1. client and server handshake before sending data 2. client drops data into TCP connection 3. server "hears" the data and creates a new socket dedicated for that client
36
Parts of a Client Program with TCP: How to sent request to server?
using socket.send()
37
Difference between TCP and UDP client?
Nothing, just the SOCK_STREAM vs SOCK_DGRAM
38
Parts of a Server Program with TCP: How does accepting requests from a client work?
In a LOOP FOREVER: Server has to wait for incoming connection request: socket.accept() then, a NEW SOCKET must be created for the server
39
Parts of a Server Program with TCP: How does sending messages to a client work?
send an encoded messages to the client and close the connection.