TCP/IP stack, HTTP, REST Flashcards

1
Q

Why be concerned about TCP/IP stack?

A

It Important to understand how the information flows through the Internet.

TCP/IP stack is the most used currently in networking

Almost every industrial device has some form of Ethernet connection built into it—and Ethernet is part of the TCP/IP Model.

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

What is TCP/IP?

A

It is a four-layered model of communication protocols.

Nice to know: It is named after the two main protocols that are used in the model, namely, TCP and IP.

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

Which layers er present in the TCP/IP model?

A

Starting from the top:

Application Layer

Transport Layer

Internet Layer

Network Layer

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

What does the TCP/IP Application layer do?

A

Top Layer

Defines the interface of host programs, meaning that it is defining if HTTP, DNS, FTP, SMTP etc.. is going to be used.

Allows users to interact with other software apps.

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

What does the TCP/IP Transport layer do?

A

Second layer from the top

Protocols are defined - wether TCP or UDP is going to be used.

It divides the message received from the upper layer into segments (datagrams) for the lower level.

Offers an acknowledgement of the successful data transmission and error control.

TCP
Transmission Control Protocol - connection oriented.

UDP
User Datagram Protocol - connectionless oriented.

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

What does the TCP/IP Internet layer do?

A

Third layer from the top

Handles the routing and sending off data between different networks.

Using IP protocol.

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

What is TCP?

A

Transmission Control Protocol.

Reliable communication protocol because it is connection-oriented.

Connection is established before sending data –> either all data is delivered in the right order or you will be notified by an error.

Used by HTTP(s), Telnet, SMTP, FTP…

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

What is UDP?

A

User Datagram Protocol.

Unreliable communication protocol because it is Connection-less.

No prior communication is needed, datagrams are just send.

Lightweight protocol which makes it a bit faster than TCP.

Used by DNS, VoIP, TFTP…

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

What does the TCP/IP Network layer do?

A

Bottom layer

Defines how the data should be sent physically through the network.

Protocols used by this layer are ethernet, token ring, FDDI, X.25, frame relay.

Fx via Ethernet

Bogdan doesn’t really go into details when it comes to network & internet layer..

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

Bonus: What is the OSI model?

A

Open System Interconnection called OSI model.

Need more info

Find a model to visualise it.

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

What is HTTP?

A

Typer Text Transfer Protocol - application layer protocol.

HTTP can fetch resources like HTML, CSS, JSON, XML etc via the request/response pattern.

HTTP is connection-less, mediaindependent & stateless.

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

What is characteristic about HTTP?

A

HTTP is connection-less, requests are send and as soon the response comes back the connection is closed.

HTTP is media independent - Any type of data can be sent through this Protocol as long as the receiver knows how to handle the data.

HTTP is Stateless. A client can send as many request it want, the server will handle every request as if nothing happened beforehand.

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

What does REST stand for?

A

Representational State Transfer.

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

What is REST?

A

An architectural style which makes it easier for systems to communication between each other.

It is stateless and it separates the concerns of client-server making them more independent of each other.

Bonus information:
REST clarifies who is requesting for a services and who is fulfilling that request.

Uniform interface: REST services provide data as resources, with a consistent namespace

Layered System: components in the system cannot “see” beyond their layer. So, you can easily add load-balancers and proxies to improve security or performance.

Cacheable: Servers must mark their responses cacheable or not - so that clients can cache them and improve performance

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

What is a RESTful service?

A

Simply a services which is following the REST architecture.

RESTful Service breaks down transactions to create a series of small modules.

Each module addresses a particular underlying part of the transaction.

Components do not need to know how a source is doing
something.

Added a bit of explanation:
RESTful Service breaks down transactions to create a series of small modules - think of our web dev exam, we break our api into track, artist, album.

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

Which pattern does HTTP make use of to communicate?

A

Request/Response which is a message exchange pattern.

17
Q

Mention as many request methods you can.

Hint: 7

A

GET - Used to request data from a specific source. Nobody. Query paramsI
POST - Used to send/update data to a source. Body,Query paramsI
PUT - Mostly used to update data to a source. PUT requests are idempotent (always produce the sameresult)
HEAD - Like GET, but without the response body
DELETE - Deletes the specified resource
PATCH - Partial changes to a resource
OPTIONS - Describes the communication options forthe target source

18
Q

Bonus knowledge?

Mention the status code ranging from 100-500.

A

1xx: Information
2xx: Successful
3xx: Redirection
4xx: Client Error
5xx: Server Error