Skip to content

Commit 3ff8926

Browse files
authored
Update README.md
1 parent f8367ff commit 3ff8926

File tree

1 file changed

+99
-1
lines changed

1 file changed

+99
-1
lines changed

README.md

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
2. [TCP/IP PROTOCOL SUITE](#-tcp-ip-protocol-suite)
88
3. [IP Addresses & Subnet Masks](#-ip-addresses--subnet-masks)
99
4. [Network Devices](#-network-devices-explained)
10-
5. [How Data Travels](#-how-data-travels-across-networks)
10+
5. [How Data Travels](#-how-data-travels-across-networks)
11+
6. [What is a Route?](What is a Route?)
1112

1213
---
1314

@@ -504,3 +505,100 @@ Once the data reaches the recipient’s device, it is received and processed by
504505
505506
#### Conclusion:
506507
In conclusion, data travels through the internet in a complex but well-organized manner. From the origination point to the final destination, the data passes through various devices and networks, each playing a crucial role in ensuring efficient transmission. Understanding how data travels through the internet can help you appreciate the technology behind it and the effort that goes into making it possible for us to communicate, work, and access information across the globe.
508+
509+
---
510+
511+
## 🧭 What is a Route?
512+
513+
![7149bdf6-dd6d-4757-bcfe-0e12122f44f9](https://github.com/user-attachments/assets/fd1ca759-803e-4829-a0b1-80081afdb1a6)
514+
515+
A **route** is a path that data packets follow to reach a specific destination. The decision on which path to take is made by **routers** using a **routing table**.
516+
517+
---
518+
519+
## 📦 How Routing Works (Step by Step)
520+
521+
### 1. **Host Sends a Packet**
522+
523+
* A host (e.g., your computer) wants to send data to another IP address.
524+
* It checks: **Is the destination IP in my local network?**
525+
526+
* If **yes** → sends directly.
527+
* If **no** → sends the packet to the **default gateway** (usually your router).
528+
529+
---
530+
531+
### 2. **Router Receives the Packet**
532+
533+
* The router examines the **destination IP address**.
534+
* It checks its **routing table** to decide where to send the packet next.
535+
536+
---
537+
538+
### 3. **Routing Table Lookup**
539+
540+
Each router has a **routing table** with entries like:
541+
542+
| Destination Network | Next Hop | Interface | Metric |
543+
| ------------------- | ------------------ | --------- | ------ |
544+
| 192.168.1.0/24 | Directly connected | eth0 | 0 |
545+
| 0.0.0.0/0 | 192.168.1.1 | eth1 | 1 |
546+
547+
* **Destination Network**: The IP range this route covers.
548+
* **Next Hop**: The IP address of the next router on the path.
549+
* **Interface**: Which network interface to use.
550+
* **Metric**: Cost or preference (lower = better).
551+
552+
---
553+
554+
### 4. **Forwarding the Packet**
555+
556+
* The router forwards the packet out of the correct **interface** to the **next hop**.
557+
* This process continues until the packet reaches its **final destination**.
558+
559+
---
560+
561+
## 🔁 Types of Routes
562+
563+
### 🟩 1. **Directly Connected Routes**
564+
565+
* Networks that the router is physically connected to.
566+
567+
### 🟨 2. **Static Routes**
568+
569+
* Manually added by a network administrator.
570+
* Good for small or stable networks.
571+
572+
### 🟦 3. **Dynamic Routes**
573+
574+
* Learned using **routing protocols** like:
575+
576+
* **RIP** (Routing Information Protocol)
577+
* **OSPF** (Open Shortest Path First)
578+
* **BGP** (Border Gateway Protocol)
579+
* Routers communicate with each other to exchange route info and adapt to changes.
580+
581+
---
582+
583+
## 🌐 Default Route (0.0.0.0/0)
584+
585+
* A catch-all route: "If you don't know where it goes, send it here."
586+
* Usually points to the internet gateway.
587+
588+
---
589+
590+
## 🧠 Simple Example
591+
592+
You (Host: `192.168.1.10`) want to send data to a website (`93.184.216.34`):
593+
594+
1. Your PC sees it's not in your local network.
595+
2. It sends the packet to the default gateway: `192.168.1.1`.
596+
3. Router `192.168.1.1` checks its routing table.
597+
4. It finds the best next hop and forwards the packet.
598+
5. This process continues until the packet reaches the web server.
599+
6. Response packets follow the reverse path using similar routing logic.
600+
601+
---
602+
603+
604+

0 commit comments

Comments
 (0)