From b33b741cece547792aceaf4e0c3948591aff23bc Mon Sep 17 00:00:00 2001 From: LeakedByteBuster <115739322+LeakedByteBuster@users.noreply.github.com> Date: Tue, 25 Jul 2023 04:04:57 +0100 Subject: [PATCH] Update README.md - Change Links - refractor README.md - Corrected some typing errors --- README.md | 241 +++++++++++++++++++++++------------------------------- 1 file changed, 101 insertions(+), 140 deletions(-) diff --git a/README.md b/README.md index fcfae16..8993354 100644 --- a/README.md +++ b/README.md @@ -3,34 +3,33 @@
## Content -- [What Is TCP/IP?](https://github.com/Mushigarou/NetPractice#what-is-tcpip) -- [Terminology](https://github.com/Mushigarou/NetPractice/tree/main#terminology) -- [What TCP/IP Can be Used For?](https://github.com/Mushigarou/NetPractice/tree/main#what-tcpip-can-be-used-for-non-exhaustive-list) -- [TCP/IP Model](https://github.com/Mushigarou/NetPractice/tree/main#tcpip-model) -- [IPv4 Subnetting](https://github.com/Mushigarou/NetPractice/tree/main#ipv4-subnetting) - - [What is subnetting](https://github.com/Mushigarou/NetPractice/tree/main#what-is-subnetting) - - [How To Write A CheatSheet?](https://github.com/Mushigarou/NetPractice/tree/main#how-to-write-a-cheatsheet) - - [How To Find The 7 Attributes of a Given IP Address?](https://github.com/Mushigarou/NetPractice/tree/main#how-to-find-the-7-attributes-of-a-given-ip-address) - - [Tips For Solving The 7 Attributes Faster](https://github.com/Mushigarou/NetPractice/tree/main#tips-for-solving-the-7-attributes-faster) - - [Subnetting In /17 - /24 Range](https://github.com/Mushigarou/NetPractice/tree/main#subnetting-in-17---24-range) - - [Subnetting In /1 - /16 Range](https://github.com/Mushigarou/NetPractice/tree/main#subnetting-in-1---16-range) -- [Network Devices](https://github.com/Mushigarou/NetPractice/tree/main#Network-Devices) - - [How Data Flows Through The Internet](https://github.com/Mushigarou/NetPractice/tree/main#How-Data-Flows-Through-The-Internet) - - [Hosts](https://github.com/Mushigarou/NetPractice/tree/main#Hosts) - - [Ip Addresses](https://github.com/Mushigarou/NetPractice/tree/main#Ip-Addresses) - - [Network](https://github.com/Mushigarou/NetPractice/tree/main#Network) - - [Repeater](https://github.com/Mushigarou/NetPractice/tree/main#Repeater) - - [Hub](https://github.com/Mushigarou/NetPractice/tree/main#Hub) - - [Switch](https://github.com/Mushigarou/NetPractice/tree/main#Switch) - - [Router](https://github.com/Mushigarou/NetPractice/tree/main#Router) - - [Other Network Devices](https://github.com/Mushigarou/NetPractice/tree/main#Other-Network-Devices) -- [OSI Model](https://github.com/Mushigarou/NetPractice/tree/main#) +- [What Is TCP/IP?](https://github.com/LeakedByteBuster/NetPractice#what-is-tcpip) +- [Terminology](https://github.com/LeakedByteBuster/NetPractice/tree/main#terminology) +- [What TCP/IP Can be Used For?](https://github.com/LeakedByteBuster/NetPractice/tree/main#what-tcpip-can-be-used-for-non-exhaustive-list) +- [A Brief Look at TCP/IP Model](https://github.com/LeakedByteBuster/NetPractice/tree/main#tcpip-model) +- [OSI Model](https://github.com/LeakedByteBuster/NetPractice/tree/main#) - [Physical Layer - Transporting Bits]() - [Data Link Layer - Hop to Hop]() - [Network Layer - End to End]() - - [IP Addresses and MAC addresses](https://github.com/Mushigarou/NetPractice/tree/main#IP-Addresses-and-MAC-addresses) - - [Overview of OSI Model]() - + - [IP Addresses and MAC addresses](https://github.com/LeakedByteBuster/NetPractice/tree/main#IP-Addresses-and-MAC-addresses) + - [Overview Of The OSI Model]() +- [IPv4 Subnetting](https://github.com/LeakedByteBuster/NetPractice/tree/main#ipv4-subnetting) + - [What is subnetting](https://github.com/LeakedByteBuster/NetPractice/tree/main#what-is-subnetting) + - [How To Write A CheatSheet?](https://github.com/LeakedByteBuster/NetPractice/tree/main#how-to-write-a-cheatsheet) + - [How To Find The 7 Attributes of a Given IP Address?](https://github.com/LeakedByteBuster/NetPractice/tree/main#how-to-find-the-7-attributes-of-a-given-ip-address) + - [Tips For Solving The 7 Attributes Faster](https://github.com/LeakedByteBuster/NetPractice/tree/main#tips-for-solving-the-7-attributes-faster) + - [Subnetting In /17 - /24 Range](https://github.com/LeakedByteBuster/NetPractice/tree/main#subnetting-in-17---24-range) + - [Subnetting In /1 - /16 Range](https://github.com/LeakedByteBuster/NetPractice/tree/main#subnetting-in-1---16-range) +- [Network Devices](https://github.com/LeakedByteBuster/NetPractice/tree/main#Network-Devices) + - [How Data Flows Through The Internet](https://github.com/LeakedByteBuster/NetPractice/tree/main#How-Data-Flows-Through-The-Internet) + - [Hosts](https://github.com/LeakedByteBuster/NetPractice/tree/main#Hosts) + - [Ip Addresses](https://github.com/LeakedByteBuster/NetPractice/tree/main#Ip-Addresses) + - [Network](https://github.com/LeakedByteBuster/NetPractice/tree/main#Network) + - [Repeater](https://github.com/LeakedByteBuster/NetPractice/tree/main#Repeater) + - [Hub](https://github.com/LeakedByteBuster/NetPractice/tree/main#Hub) + - [Switch](https://github.com/LeakedByteBuster/NetPractice/tree/main#Switch) + - [Router](https://github.com/LeakedByteBuster/NetPractice/tree/main#Router) + - [Other Network Devices](https://github.com/LeakedByteBuster/NetPractice/tree/main#Other-Network-Devices) ## What Is TCP/IP? ⭐ ***The Transmission Control Protocol/Internet Protocol** is a **set of protocols** (communication standards) that describe how two or more computers can **communicate over a network**.* @@ -61,14 +60,16 @@ ↥ back to top -## TCP/IP Model +## A Brief Look at TCP/IP Model + +The following table shows the protocols used at each layer of the TCP/IP Model -Layers | Short Explanation | Protocols | -------------------------|-------------------------|---------------------| -Application layer | Applications or processes create user data and communicate it on another or the same host (Make use of the Transport layer) | SMTP, SSH, FTP, HTTPS, HTTP, DHCP...| -Transport layer | Provides a channel for host-to-host communication on the same network or remote network separated by routers | TCP (connection-oriented), UDP (connectionless), SCTP (connection-oriented)...| -Internet layer | Provides unreliable datagram transmission between hosts, and the IP (Primary Protocol) establishes the basis for internetworking. its function in routing is to transport datagrams to the next closer host (IP router) to the final destination. | IP(IPv4, IPv6), ICMP, IGMP...| -Link + Physical layer | Defines the networking methods (protocols) within the scope of the local network link on which hosts communicate without intervening routers | Mac Address, Fiber, Wireless, Ethernet Cables... | +Layers | Protocols Used | +------------------------|---------------------| +Application layer | SMTP, SSH, FTP, HTTPS, HTTP, DHCP...| +Transport layer | TCP (connection-oriented), UDP (connectionless), SCTP (connection-oriented)...| +Internet layer | IP(IPv4, IPv6), ICMP, IGMP...| +Link + Physical layer | Mac Address, Fiber, Wireless, Ethernet Cables... | - ⭐ **Connection-oriented Protocol (TCP, SCTP...):** - requires both devices to be able to communicate with each other @@ -87,6 +88,69 @@ Link + Physical layer | Defines the networking methods (protocols) within the ↥ back to top +## OSI Model +⭐ ***Networking Goal** is to allow two hosts to share data between them* + +### Physical Layer - Transporting Bits +- Transporting bits by using an L1 technology + +### Data Link Layer - Hop to Hop +- Interact with the wire (i.e., L1) + - **NIC** Network Interface Cards / Wi-Fi Access Cards + - 🧮 Addressing Scheme - **MAC addresses** + + - **48 bits**, represented as **12 hex digits** + - 94-65-4c-3d-65-e5 (Windows) / 94\:65:4c\:3d\:65:e5 (Linux) / 9465.4c3d.65e5 (CISCO) + +💡 **Every NIC has a unique MAC address** + +💡 **ARP: Address Resolution Protocol Links a L3 address to a L2 address** + +### Network Layer - End to End +- 🧮 Addressing scheme - **IP Addresses** + +#### IP Addresses and MAC addresses +💡 *Takeaway: **L2 and L3 work together** to move **data across the internet*** + +
+Sending packets using IP Addresses and MAC addresses +
+ +
+ ↥ back to top +
+ +### Transport Layer - Service to Service + +⭐ ***Distinguish data streams**. This layer ensures that data is received by the right process in your host (multiple tabs in browser)* + - 🧮 Addressing Scheme - **Ports** + - [0 - 65535] -- TCP -- **favors reliability** + - **Servers listen** for requests to **predefined Ports** + - Clients **select a random** Port for **each connection** + +![transport layer in networking](https://github.com/Mushigarou/NetPractice/blob/main/Images/Transport%20Layer.png) + + +
+ ↥ back to top +
+ +### Overview of OSI Model + +
+OSI model with explanation +
+ +
+OSI model with explanation +
+ +⭐ *Takeaway:* **Network Devices and Protocol operation on specific layers, but these are not strict rules [Exceptions: routers, ARP...]. *It is just a model*** + +
+ ↥ back to top +
+ ## IPv4 Subnetting ### What Is Subnetting? @@ -111,11 +175,11 @@ Link + Physical layer | Defines the networking methods (protocols) within the ### How To Write A CheatSheet? -1️⃣: Start with 1, double until you reach 128 (right to left) +1️⃣ row: Start with 1, double until you reach 128 (right to left) -2️⃣: Subtract the top row from 256 +2️⃣ row: Subtract the top row from 256 (256-1 = 255 ...) -3️⃣: From /32, list CIDR notation (right to left) +3️⃣ row: From /32, list CIDR notation (decrement by 1 from right to left)
@@ -220,7 +284,7 @@ Link + Physical layer | Defines the networking methods (protocols) within the **Broadcast IP:** | 10.63.255.255 | 11.255.255.255 | 255.255.255.255 | **First host:** | 10.48.0.1 | 10.0.0.1 | 192.0.0.1 | **Last host:** | 10.64.255.254 | 11.255.255.254 | 255.255.255.254 | -**Next Network:** | 10.64.0.0 | 12.0.0.0 | **n/a** [No leading octet, we're at end of IPv4 addresses] | +**Next Network:** | 10.64.0.0 | 12.0.0.0 | **n/a** [No leading octet, we're at end of IPv4 addresses]| **# Total IP addresses:** | 1,048,576 [2 ^ (32-12)] | 33,554,432 [2^(32-7)] | 1,073,741,824 | **CIDR/Subnet:** | 255.240.0.0 | 254.0.0.0 | 192.0.0.0 | @@ -265,44 +329,6 @@ Link + Physical layer | Defines the networking methods (protocols) within the ↥ back to top
-## Network Devices -### How Data Flows Through The Internet -#### Hosts : -⭐ *Any system that **sends or receives traffic**.* - - phone - - computer - - laptop - - servers - - cloud servers - - Internet of Things (IoT) (speaker, refrigerator...) - -⭐ **Client:** initiates request. **Servers** respond. (Relative to specific communication) - -#### IP Addresses - -⭐ *IP Address is the **identity of each host*** - - IPv4 is 32bit - - Hierarchically assigned - -
-IP addresses -
- -💡 : all of those hosts above exist in a network - -#### Network - -💡: Before networks exist, if you want to upload some files from another host you had to use a drive, USB... - -⭐ *Network is what **transports traffic between hosts*** - - Logical grouping of hosts which require similar connectivity - - Subnetworks, subnet - - 💡 Networks connect to other networks (The Internet is simply an inter-connected network) - -
- ↥ back to top -
- #### Repeater 💡: A wire between two hosts is considered a network, the downside is that the signal **decays as it travels long distances** @@ -375,7 +401,7 @@ Link + Physical layer | Defines the networking methods (protocols) within the ⭐ ***Routing** is the process of moving data between networks* - **Primary purpose** of a Router is *Routing* -⭐ ***Switching** is the process of moving within networks* +⭐ ***Switching** is the process of moving data within networks* - **Primary purpose** of a switch is *Switching*
@@ -400,71 +426,6 @@ Any network device performs weather Routing and/or Switching ↥ back to top
-## OSI Model -⭐ ***Networking Goal** is to allow two hosts to share data between them* - -### Physical Layer - Transporting Bits -- Transporting bits by using an L1 technology - -### Data Link Layer - Hop to Hop -- Interact with the wire (i.e., L1) - - **NIC** Network Interface Cards / Wi-Fi Access Cards - - 🧮 Addressing Scheme - **MAC addresses** - - - **48 bits**, represented as **12 hex digits** - - 94-65-4c-3d-65-e5 (Windows) / 94\:65:4c\:3d\:65:e5 (Linux) / 9465.4c3d.65e5 (CISCO) - -💡 **Every NIC has a unique MAC address** - -💡 **ARP: Address Resolution Protocol Links a L3 address to a L2 address** - -### Network Layer - End to End -- 🧮 Addressing scheme - **IP Addresses** - -#### IP Addresses and MAC addresses -💡 *Takeaway: **L2 and L3 work together** to move **data across the internet*** - -
-Sending packets using IP Addresses and MAC addresses -
- -
- ↥ back to top -
- -### Transport Layer - Service to Service - -⭐ ***Distinguish data streams**. This layer ensures that data is received by the right process in your host (multiple tabs in browser)* - - 🧮 Addressing Scheme - **Ports** - - [0 - 65535] -- TCP -- **favors reliability** - - [0 - 65535] -- TCP -- **favors efficiency** - - **Servers listen** for requests to **predefined Ports** - - Clients **select a random** Port for **each connection** - -![transport layer in networking](https://github.com/Mushigarou/NetPractice/blob/main/Images/Transport%20Layer.png) - - -
- ↥ back to top -
- -### Overview of OSI Model - -
-OSI model with explanation -
- -⭐ *Takeaway:* **Network Devices and Protocol operation on specific layers, but these are not strict rules [Exceptions: routers, ARP...]. *It is just a model*** - -
-OSI model with explanation -
-
- ↥ back to top -
- -## How Hosts Speak On Internet - ## For More Information: - [Wikipedia](https://en.wikipedia.org/wiki/Internet_protocol_suite) - [IBM](https://www.ibm.com/docs/en/aix/7.2?topic=management-transmission-control-protocolinternet-protocol)