# Chapter 4

&#x20;A **communication protocol** is a system of rules that allows two or more entities of a [communications system](https://en.wikipedia.org/wiki/Communications_system) to transmit [information](https://en.wikipedia.org/wiki/Information) via any kind of variation of a [physical quantity](https://en.wikipedia.org/wiki/Physical_quantity). The protocol defines the rules, [syntax](https://en.wikipedia.org/wiki/Syntax), semantics and [synchronization](https://en.wikipedia.org/wiki/Synchronization) of [communication](https://en.wikipedia.org/wiki/Communication) and possible [error recovery methods](https://en.wikipedia.org/wiki/Error_detection_and_correction). Protocols may be implemented by [hardware](https://en.wikipedia.org/wiki/Computer_hardware), [software](https://en.wikipedia.org/wiki/Software), or a combination of both.

A **Request for Comments** (**RFC**) is a publication from the [Internet Society](https://en.wikipedia.org/wiki/Internet_Society) (ISOC) and its associated bodies, most prominently the [Internet Engineering Task Force](https://en.wikipedia.org/wiki/Internet_Engineering_Task_Force) (IETF), the principal technical development and standards-setting bodies for the [Internet](https://en.wikipedia.org/wiki/Internet).

An RFC is authored by individuals or groups of engineers and [computer scientists](https://en.wikipedia.org/wiki/Computer_scientist) in the form of a [memorandum](https://en.wikipedia.org/wiki/Memorandum) describing methods, behaviors, research, or innovations applicable to the working of the Internet and Internet-connected systems. It is submitted either for [peer review](https://en.wikipedia.org/wiki/Peer_review) or to convey new concepts, information, or occasionally engineering humor. The IETF adopts some of the proposals published as RFCs as [Internet Standards](https://en.wikipedia.org/wiki/Internet_Standard). However, many RFCs are informational or experimental in nature and are not standards.

&#x20;A **default gateway** is the [node](https://en.wikipedia.org/wiki/Node_\(networking\)) in a [computer network](https://en.wikipedia.org/wiki/Computer_network) using the [internet protocol suite](https://en.wikipedia.org/wiki/Internet_protocol_suite) that serves as the forwarding host ([router](https://en.wikipedia.org/wiki/Router_\(computing\))) to other networks when no other route specification matches the destination [IP address](https://en.wikipedia.org/wiki/IP_address) of a packet.

IEEE is the world’s largest technical professional organization dedicated to advancing technology for the benefit of humanity.

&#x20;The **Internet Architecture Board** (**IAB**) is "a committee of the [Internet Engineering Task Force](https://en.wikipedia.org/wiki/Internet_Engineering_Task_Force) (IETF) and an advisory body of the [Internet Society](https://en.wikipedia.org/wiki/Internet_Society) (ISOC). Its responsibilities include architectural oversight of IETF activities, Internet Standards Process oversight and appeal, and the appointment of the [Request for Comments](https://en.wikipedia.org/wiki/Request_for_Comments) (RFC) Editor. The IAB is also responsible for the management of the IETF protocol parameter registries.

IAB subsidiary groups  : IETF (short-term result in RFC ) and IRTF ( long-term)

Standards that we used to see :

* RS23-C : EIA
* OSI : defined by ISO ( International Organization for Standardization )
* TCP/IP : IAB ( TCP/IP defined in RFC )
* T1 : AT\&T

{% file src="https://2277444168-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mc7aa7TpYiFT5jdyFYT%2F-MchMrmkjSv7mJTNinqZ%2F-MchO9qoasmv4bltdAQC%2FOSI_Stk.gif?alt=media&token=2f1ec8b8-9489-4a86-b45f-6d30458fd2a0" %}

Header is used to describe meta data, the header is divided into several fields that will describe the characteristics of the data. In the data link layer, apart from having a header, it also has a tailer which functions to checksum crc to see if there are any wrong bits.

Encapsulation: the process of adding a header in each layer drop

In Physical Layer all data become bits stream.

In data communications networks, **packet segmentation** is the process of dividing a data [packet](https://en.wikipedia.org/wiki/Network_packet) into smaller units for transmission over the network. Packet segmentation happens at layer four of the [OSI model](https://en.wikipedia.org/wiki/OSI_model); the [transport layer](https://en.wikipedia.org/wiki/Transport_layer). Segmentation may be required when:

* The data packet is larger than the [maximum transmission unit](https://en.wikipedia.org/wiki/Maximum_transmission_unit) supported by the network
* The network is unreliable and it is desirable to divide the information into smaller segments to maximize the probability that each one of them can be delivered correctly to the destination

In MSS ( Message Segment Size ) maximum size is 1460&#x20;

Message in Application Layer

Segment in Transport Layer

Network Layer&#x20;

**Internet Protocol version 4** (**IPv4**) is the fourth version of the [Internet Protocol](https://en.wikipedia.org/wiki/Internet_Protocol) (IP). It is one of the core protocols of standards-based [internetworking](https://en.wikipedia.org/wiki/Internetworking) methods in the [Internet](https://en.wikipedia.org/wiki/Internet) and other [packet-switched](https://en.wikipedia.org/wiki/Packet-switched) networks. IPv4 was the first version deployed for production on [SATNET](https://en.wikipedia.org/wiki/SATNET) in 1982 and on the [ARPANET](https://en.wikipedia.org/wiki/ARPANET) in January 1983. It is still used to route most Internet traffic today, despite the ongoing deployment of a successor protocol, [IPv6](https://en.wikipedia.org/wiki/IPv6).

IPv4 uses a 32-[bit](https://en.wikipedia.org/wiki/Bit) address space which provides 4,294,967,296 (232) unique addresses, but large blocks are reserved for special networking methods.

Routing&#x20;

layer 2 . one hop

layer 3 . end to end

Addressing IPv4 :

1. Physical address ( MAC Address ) : like your ID Number&#x20;
2. Logical Address ( IP Address )
3. Port Number : to identify which website as the destination
4. Virtual Host&#x20;

**Routing Information Protocol (RIP)** is a distance-vector routing protocol. Routers running the distance-vector protocol send all or a portion of their routing tables in routing-update messages to their neighbors.

You can use RIP to configure the hosts as part of a RIP network. This type of routing requires little maintenance and also automatically reconfigures routing tables when your network changes or network communication stops. RIPv2 was added to the IBM product so you can send and receive RIP packets to update routes throughout your network.

**Open Shortest Path First** (**OSPF**) is a [routing protocol](https://en.wikipedia.org/wiki/Routing_protocol) for [Internet Protocol](https://en.wikipedia.org/wiki/Internet_Protocol) (IP) networks. It uses a [link state routing](https://en.wikipedia.org/wiki/Link-state_routing_protocol) (LSR) algorithm and falls into the group of [interior gateway protocols](https://en.wikipedia.org/wiki/Interior_gateway_protocol) (IGPs), operating within a single [autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_\(Internet\)) (AS). It is defined as OSPF Version 2 in RFC 2328 (1998) for [IPv4](https://en.wikipedia.org/wiki/IPv4).The updates for [IPv6](https://en.wikipedia.org/wiki/IPv6) are specified as OSPF Version 3 in RFC 5340 (2008).OSPF supports the [Classless Inter-Domain Routing](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) (CIDR) addressing model.

OSPF is a widely used IGP in large [enterprise networks](https://en.wikipedia.org/wiki/Enterprise_network). [IS-IS](https://en.wikipedia.org/wiki/IS-IS), another LSR-based protocol, is more common in large [service provider](https://en.wikipedia.org/wiki/Network_service_provider) networks.

&#x20;A **routing protocol** specifies how [routers](https://en.wikipedia.org/wiki/Router_\(computing\)) communicate with each other to distribute information that enables them to select routes between [nodes](https://en.wikipedia.org/wiki/Node_\(networking\)) on a [computer network](https://en.wikipedia.org/wiki/Computer_network). Routers perform the traffic directing functions on the Internet; [data packets](https://en.wikipedia.org/wiki/Data_packet) are forwarded through the networks of the internet from router to router until they reach their destination computer. [Routing](https://en.wikipedia.org/wiki/Routing) algorithms determine the specific choice of route. Each router has a prior knowledge only of networks attached to it directly. A routing protocol shares this information first among immediate neighbors, and then throughout the network. This way, routers gain knowledge of the [topology of the network](https://en.wikipedia.org/wiki/Network_topology). The ability of routing protocols to dynamically adjust to changing conditions such as disabled connections and components and route data around obstructions is what gives the Internet its [fault tolerance](https://en.wikipedia.org/wiki/Fault_tolerance) and [high availability](https://en.wikipedia.org/wiki/High_availability).

**Dynamic routing**, also called **adaptive routing**, is a process where a router can forward data via a different route or given destination based on the current conditions of the communication circuits within a system. The term is most commonly associated with [data networking](https://en.wikipedia.org/wiki/Data_networking) to describe the capability of a network to 'route around' damage, such as loss of a node or a connection between nodes, so long as other path choices are available. Dynamic routing allows as many routes as possible to remain valid in response to the change. ( need to exchange routing information )\


&#x20;**Static routing** is a form of [routing](https://en.wikipedia.org/wiki/Routing) that occurs when a router uses a manually-configured routing entry, rather than information from dynamic routing traffic. In many cases, static routes are manually configured by a [network administrator](https://en.wikipedia.org/wiki/Network_administrator) by adding in entries into a [routing table](https://en.wikipedia.org/wiki/Routing_table), though this may not always be the case.[\[2\]](https://en.wikipedia.org/wiki/Static_routing#cite_note-SLA-2) Unlike [dynamic routing](https://en.wikipedia.org/wiki/Dynamic_routing), static routes are fixed and do not change if the network is changed or reconfigured. Static routing and [dynamic routing](https://en.wikipedia.org/wiki/Dynamic_routing) are not mutually exclusive. Both dynamic routing and static routing are usually used on a router to maximize routing efficiency and to provide backups in the event that dynamic routing information fails to be exchanged. Static routing can also be used in [stub networks](https://en.wikipedia.org/wiki/Stub_network), or to provide a [gateway of last resort](https://en.wikipedia.org/wiki/Default_route).

LAYER 4&#x20;

transport layer&#x20;

end to end Quality service

TCP \~ reliable

UDP \~ fast&#x20;



LAYER 5

session layer is like a host that regulates the running of the ongoing process The session layer is used to remember where the last process that occurred before the interrupt occurred so after completing the interrupt the process does not have to be repeated from the beginning and will also continue from where the process was stopped because of the interrupt



LAYER 6

presentation layer&#x20;

Encoding Decoding

Compression Decompression

Encryption Decryption&#x20;



LAYER 7&#x20;

application layer

it is an action which pages destination ( get , put , post , delete , etc )

http number , protocol&#x20;



layer 1 repeater have to use the same network

layer 2 switch or bridge can used different network like for example ethernet wireless and wired.

Ethernet have 2 standards : Ethernet 2.0 and IEEE 802.3



&#x20;





