# <center><i class="fa fa-edit"></i> Networking Fundamentals by Juniper </center>
*Introduction to how networks work, how they communicate information between computers, and how data such as email messages traverse the millions of miles of networks worldwide to end up at the correct computer.*
**Resources** :
* [Juniper Online Learning Modules](https://learningportal.juniper.net/juniper/resources/courses/golden/150407_netfun/mobile/?hnw_overview)
---
## 1. HOW NETWORKS WORK
Two basic kinds of networks:
1. Local Area Networks (LANs) = Any group of computers on a single, geographically limited network.
- Wired LAN: Switch
- Wireless LAN: Access point
- Combination of wired and wireless LAN
2. Wide Area Network (WAN) = A network that connects LANs over large geographic distances
>The post office model
>Mail is sorted into increasingly specific bins as it is carried towards its destination
>Networks forward packets of data from one device to another until the finals device forwards the data to the final destination computer
**Open Systems Interconnection (OSI) Reference Model**
Identifies seven layers of functionality computers use to communicate over a network and does not define specific protocols
Sending computer starts at layer 7 to 1; receiving starts at layer 1 to 7
Encapsulation: adds more headers/footers when travelling down the data stack
Decapsulation: removes headers when travelling up the data stack

**TCP/IP**
- Transmission Control Protocol/Internet Protocol
- Four layer model
- Defines specific protocols at each layer
Suite = multiple protocols working together
**Five-Layer Model**
- Combination of TCP/IP model and OSI model

**Traversing the Network Model**

1. Application Layer
Protocols = Specify details such as how data should be encoded, compresses, or encrypted, and how sessions should be managed
- HTTP (Hypertext Transfer Protocol) = communications protocol for the transfer of information on the Internet and the World Wide Web
- FTP (File Transfer Protocol) = network protocol used to transfer data from one computer to another through a network, such as over the Internet
- DNS (Domain Name System) = serves as the phone book for the Internet by translating human-readable computer hostnames, such as www.example.com, into IP addresses, such as 208.77.188.166
- SMTP (Simple Mail Transfer Protocol) = protocol for sending electronic mail on the Internet
2. Transport Layer
Specifies which Application Layer protocol should be used to process the data on the receiveng computer
>Port
>unique numerical identifier assigned to identify the Application Layer protocol
Add destination port number (recipient's name)and source port number (name in a letter's return address)
Two Transport Layer protocols:
* **User Datagram Protocol (UDP)**//[Dropping and hoping for the best]//Connectionless-oriented transport
Simple and fast "best effort" delivery service. Used for short messages and time-sensitive data (DNS, Online gaming, Voice over IP, Streaming video)
* **Transmission Control Protocol (TCP)**//[Sending a letter with a return receipt]//Connection-oriented service
Robust protocol providing delivery notification, error checking, and recovery procedures. (HTTP, SMTP, FTP)
Accepts data from the Application Layer protocol and cuts the data into smaller pieces called **segments.**

3. Network Layer
Receives data segments from the Transport Layer and adds a header to create a *packet.*
Adds destination IP address (recipient's address), source IP address (return address), and IP protocol number (unique identifier for each Transport Layer protocol
#IP = Internet Protocol (used to send data from one computer to another on the Internet)

4. Data Link Layer
Receives packets and adds its own header to each packet to create a frame.
Adds a physical address/MAC address (post office's sorting containers), Source Layer 2 Address and Destination Layer 2 Address
Adds Layer 3 Protocol
Performs a data integrity check by adding a checksum in the trailer (Cyclic Redundancy Check) at the end of a frame to ensure it hasn't been corrupted in transit.
Converts the data into the ones and zeros of digital communications for the Physical Layer.

#Ethernet = Lan network technology, set of standard define rules about frame format, how computers communicate over a single wire shared by all devices on the network
5. Physical Layer
Converts bits into electrical signals and sends them across the physical medium (fiber-optic cable, wireless environment)
The electrical or optical signal that equals a one, and the signal that equals a zero.
Define characteristics (cabling spesifications, voltage levels, max transmission distances)
>Like the mail truck
**Decapsulation**

**Notes for OSI Model**
- When a user read email, transfer a file, or surf the network, the user's software program (Web browser), interacts with the Application Layer.
- Presentation Layer converts or encodes data from Layer 7 into a standard format that the Application Layer on the other computer can understand and involve standard data compression or data encryption schemes
Text -> ASCII or HTML
Graphics -> JPEG or TIFF
- Session Layer establishes, manages, and ends the connections or sessions between the applications on the communicating computers.
- Network Layer chooses the best path for the packet to take.
**Network Addressing**

