Friday, August 26, 2022

Doing it Easy: Network Fundamental Summary Notes

OSI Model 

1. Physical Layer: Any media or device that carries 1 & 0s between two nodes. 1 & 0s are bits. Cables/Hub/Repeater.

2. Data Link Layer: Responsible for putting and pulling 1 & 0s  (bits) from the wire to the next source. NIC/MAC. Likewise, it is delivering packets from one NIC to another NIC, hop-to-hop transfer. Frames.

3. Network Layer: Packets delivery from end to end. IP address/Routers. Facilitate communication between networks. 

Packet {DATA + IP + MAC}: 

The computer encapsulates it in an IP header which includes the source/destination IP of the two ends. 

IP header and data are further encapsulated in the MAC address header which includes the source/destination MAC of the current hop. 


Encapsulation and Decapsulation (sending top to bottom and receiving bottom to top)

4. Transport Layer: Responsible for distinguished network streams. The user requested a web address and that web server sends the data to the user. Final point; the user gets that information by 1 and 0s to the user NIC. 

A new user has to identify those 1 & 0s. Layer 4 does this by port numbers. TCP/UDP; 65,536

Layer2 (hop-to-hop) >> Layer3 (end-end) >> Layer4 (service-service)

<---------------------------- delivery -------------------------------------------->

Layer5/6/7: Session/Presentation/ Application Layer;

TCP/IP {Apllication/Transport/Internet/Network interface /Hardware}

Host to Host communication via Switch

Switch (Layer2):  Data Link Layer: Responsible for putting and pulling 1 & 0s  (bits) from the wire to the next source. NIC/MAC. Likewise, it is delivering packets from one NIC to another NIC, hop-to-hop transfer. Frames.

Use source/destination MAC address to make forwarding decisions.

Facilitates communication within networks. 

Learning > Flooding > Forwarding > Filtering 

  • Learning: learn the L2 header and user SRC/DST MAC to make forwarding decisions.
  • Flooding: if the switch receives a frame and it doesn't know about the port, then the switch duplicates the frame and sends it to all ports.
  • Forwarding: switch has a proper MAC address table. Here switch can forward frames via;
    • Store & forward: Store nothing, read the DST MAC and forward the frame. (fastest method). But no error detection. Nowadays switch copied the entire frame into the memory buffer, and checks for errors before forwarding, (slowest). but can prioritize the traffic to move fast.
    • at through
    • fragment free: prior two. inspect only the first 64 bits of the frame. good for error detection while storing the full frame and inspecting it before forwarding the frame. 

Host to Host communication via Switch: Operation

  • Host A wants to send something to host B. L2 header SRC/DST MAC. when the frame is received to switch, it will try to find the host B MAC address. then the switch is duplicated and floods the frame to all its ports except port 1 (filtering). 
  • switch recived the hostA from and then the switch flooded the frame to other ports. Thus host B and C get the frame.
  • hostB accepted the frame and generate a response.
  • when response arrive another MAC table learned, the switch forward the frame to host A.

Broadcast: between the switch flooding behavior, there end result is the same, but there ia a distiction.

Broadcast frame: address to everyone on the LAN done by using same ethernet header except the DST MAC address field is populated with a special address ffff:ffff:ffff. the all F's purpose is for broadcasting. if a switch received a fram with f:, switch cannot find a map. so switch will flood the frame. 

Broadcast is a frame address to everyone on LAN and flooding is an action a switch can take.

What is a Switch? the primary purpose is to facilitate communication within the networks. (hop-to-hop) L2 OSI. SRC/DST MAC, MAC address table. Map MAC --> Switch port. Frame {Data+MAC}

when data comes to a switch, it looks for the DST MAC address and the port. if the destination MAC doesn't know, the switch floods the frame to each port. 

The router? the primary purpose is to facilitate communication between the networks. L3. 

PC A wants to send a packet to PC B. 
PC A sends it to R1 and then R1 to R2 and finally, R2 sends it to PC B. (routing table).

ARP {L2 MAC| L3 IP} ARP uses known IP to discover unknown MAC address. 
PC-A: serverA same network while serverB is in another network. 

PC-A knows serverA IP address. PC-A issues an ARP request for the host's MAC address. ARP supports completing the L2 header. 

If PC-A wants to reach server-B, it sends the request to the nearest router as it is in a separate network, otherwise aka PC-A's default gateway. 



ARP's role is to create a proper L2 header that allows us to find the destination NIC and send the 1 and 0s. 

Host to Host Coummication 
  1. A sends data to B. A knows B's IP.
  2. A creates an L3 header (src/dst IP)
  3. L2 must be created because L2's primary job is to perform the communication within the network.
  4. L2 header (abc=SRC and xyz=DST), here A doesn't know the B MAC address yet.
  5. Hence, A cannot create a proper L2 header to deliver the packet to B's NIC. So A sends the ARP request to find B's MAC. 

6. A asking, if anyone who has 11's IP address, please send me your MAC. Here is my MAC=abc. ARP REQUEST
7. ARP request sends as a broadcast because A doesn't know about host B yet.
8. ARP response: Unicast; directly address to host A). 

Router Function is to facilitate communication between networks. ARP table bridge between L2 -> L3. 
  1. HostA packet --> R1 (a packet deliver to the R1 default gateway)
  2. hostA creates L3 header {SRC|DST hostA IP address}
  3. L3 header is not enough to deliver the packet to hostB.
  4. hostA encapsulate L3 header in L2 header which includes {SRC MAC host A, DST MAC R1)
  5. now R1 has the packet, now DST will be host B. this destination exist on R1 routing table. 
  6. R1 has L3 header and create L2 header to find the DST (host B MAC)
    1. R1 host A and DST host B IP adress.
    2. SRC: R1 int MAC = L3 header
    3. DST: host B MAC = L2 header
  7. L3 header is not changed which created by hostA. 
If you have any questions, please don't hesitate to comment below. Follow us for the latest news, new articles, doing-it-easy tutorials, labs, software, free exam vouchers, dumps, and many more. Cheers! 

No comments:

Post a Comment