From Baruch New Media
Jump to: navigation, search

Networking Basic

The foundations of networking and the essential networking basics are switches, routers, and wireless access points. Through them, devices/nodes connected to your network can communicate with one another and with other networks, like the Internet. [1]

The OSI Reference Model

The OSI has seven different layers, divided into two groups. The top three layers define how the applications within the end stations will communicate with each other as well as with users. The bottom four layers define how data is transmitted end to end.

OSI Model
Layers Layer Name Functions Functions in Detail
Layer 7 Application • Provides a user interface • File, print, message, database, and application services
Layer 6 Presentation • Presents data
• Handles processing such as encryption
• Data encryption, compression, and translation services
Layer 5 Session • Keeps different applications’ data separate • Dialog control
Layer 4 Transport • Provides reliable or unreliable delivery
• Performs error correction before retransmit
• End-to-end connection
Layer 3 Network • Provides logical addressing,
which routers use for path determination
• Routing
Layer 2 Data Link • Combines packets into bytes and bytes into frames
• Provides access to media using MAC address
• Performs error detection not correction
• Framing /switching
Layer 1 Physical • Moves bits between devices
• Specifies voltage, wire speed, and pinout of cables
• Physical topology

[2] [3]


The Application Layer

the Application Layer is the one at the top - it’s what most users see. In the OSI model, this is the layer that is the “closest to the end-user”. Applications that work at Layer 7 are the ones that users interact with directly. A web browser (Google Chrome, Firefox, Safari, etc.) or other apps - Skype, Outlook, Office - are examples of Layer 7 applications.[4]

The Presentation Layer

The Presentation Layer represents the area that is independent of data representation at the application layer - in general, it represents the preparation or translation of application format to network format, or from network formatting to application format. In other words, the layer “presents” data for the application or the network. A good example of this is encryption and decryption of data for secure transmission - this happens at Layer 6 [5]

The Session Layer

When two devices, computers, or servers need to “speak” with one another, a session needs to be created, and this is done at the Session Layer. Functions at this layer involve setup, coordination (how long should a system wait for a response, for example) and termination between the applications at each end of the session.[6]

The Transport Layer

The Transport layer segments and reassembles data into a single data stream. Services located at this layer take all the various data received from upper-layer applications, then combine it into the same, concise data stream. These protocols provide end-to-end data transport services and can establish a logical connection between the sending host and destination host on an internetwork.

A pair of well-known protocols called TCP and UDP are integral to this layer, but no worries if you’re not already familiar with them because I’ll bring you up to speed later, in Chapter 3. For now, understand that although both work at the Transport layer, TCP is known as a reliable service UDP is not. This distinction gives application developers more options because they have a choice between the two protocols when they are designing products for this layer.

The Transport layer is responsible for providing mechanisms for multiplexing upper-layer applications, establishing sessions and tearing down virtual circuits. It can also hide the details of network-dependent information from the higher layers as well as provide transparent data transfer.

Connection-Oriented Communication
Establishing a connection-oriented session


  • The first “connection agreement” segment is a request for synchronization (SYN).
  • The next segments acknowledge (ACK) the request and establish connection parameters—the rules—between hosts. These segments request that the receiver’s sequencing is synchronized here as well so that a bidirectional connection can be formed.
  • The final segment is also an acknowledgment, which notifies the destination host that the connection agreement has been accepted and that the actual connection has been established. Data transfer can now begin.[7]






The Network Layer

The Network Layer is where you’ll find most of the router functionality that most networking professionals care about and love. In its most basic sense, this layer is responsible for packet forwarding, including routing through different routers. You might know that your Boston computer wants to connect to a server in California, but there are millions of different paths to take. Routers at this layer help do this efficiently.[8]

The Data Link Layer

The Data Link Layer provides node-to-node data transfer (between two directly connected nodes) and also handles error correction from the physical layer. Two sublayers exist here as well - the Media Access Control (MAC) layer and the Logical Link Control (LLC) layer. In the networking world, most switches operate at Layer 2. [9]

The Physical Layer

Physical Layer, which represents the electrical and physical representation of the system. This can include everything from the cable type, radio frequency link (as in 802.11 wireless systems), as well as the layout of pins, voltages, and other physical requirements. When a networking problem occurs, many networking pros go right to the physical layer to check that all of the cables are properly connected and that the power plug hasn’t been pulled from the router, switch, or computer, for example.[10]

Common Threat

Juice Jacking

MTA USB Charging Port.jpg

According to a warning put out, public USB ports can be hacked and loaded with malware that, when you plug your device in, will attempt to steal your personal data like passwords and even locking your device.

Headlined as “USB Charger Scam,” the DA warns travelers to avoid using public USB power charging stations in places like airports, hotels, and other public locations as it could contain data-stealing malware.

The best practice is not to use public USB ports. If you really have to juice up (and you will have to at some point on the road), charge using the wall outlet with your own AC adapter or bring along a couple of power banks for on-the-go charging. [11]

Juice Jacking is one of the most underrated security threats around but it is serious nonetheless. A cybercriminal can use free public charging spots to take complete control of your smartphone and inject malicious code. The tech required to compromise a public USB charging port is easily available and many innocent users are often fooled into getting malware installed on their smartphones.

The term Juice Jacking was coined back in 2011 to describe such cyber attacks. Juice Jacking allows hackers to inject malware into any smartphone using free charging spots as they use USB ports which make it easier to transfer power and data over the same cable. As said above, the exploit to achieve this is easily available. [12]


The TCP/IP Model

The TCP/IP model (Transmission Control Protocol/Internet Protocol) is a model with four layers which is for both modeling current Internet architecture, as well as providing a set of rules that govern all forms of transmission over a network. The TCP/IP model describes a set of general design guidelines and implementations of specific networking protocols to enable computers to communicate over a network. TCP/IP provides end-to-end connectivity specifying how data should be formatted, addressed, transmitted, routed, and received at the destination. Protocols exist for a variety of different types of communication services between computers Consists of only 4 layers: application, transport, internet, and network.

093019 0615 TCPIPModelW1.png

TCP Characteristics

Here, are the essential characteristics of TCP/IP protocol

a) Support for a flexible TCP/IP architecture b) Adding more systems to a network is easy. c) In TCP/IP, the network remains intact until the source, and destination machines were functioning properly. d) TCP is a connection-oriented protocol. e) TCP offers reliability and ensures that data that arrives out of sequence should put back into order. f) TCP allows you to implement flow control, so the sender never overpowers a receiver with data.

[13] [14]

1) Network Layer

Handles physical transport of data frames. All devices connect to the network with a Network Interface Card (NIC). Switches and Hubs operate at this level. The NIC allows it to send and receive messages. The NIC has a MAC address which is just a unique identifier assigned by the manufacturer to identify that computer on the network. This NIC converts data into a format that ethernet can transport called frames. Provides the same functionality as the physical, the data link, and network layers in the OSI model. The mapping between IP addresses and network physical addresses. Encapsulation of IP datagrams, e.g packets, in a format understandable by the network. Switches - switch frames within a network and Breaks up collision domains. Each device connected to the switch has its own port on the switch and its own address to route traffic. Switches use the destination MAC address to forward the frame to the right recipient. It helps you to defines details of how data should be sent using the network.

It also includes how bits should optically be signaled by hardware devices which directly interfaces with a network medium, like coaxial, optical, coaxial, fiber, or twisted-pair cables.

A network layer is a combination of the data line and defined in the article of the OSI reference model. This layer defines how the data should be sent physically through the network. This layer is responsible for the transmission of the data between two devices on the same network.

2) Internet

At this level, the packets are moved from the source to the destination. Routers: routes Packets between networks and create internetwork. Routers use IP addresses to move packets between networks. They receive a frame, discard it, and extracts the IP information from it. Routers look at the destination IP address, checks its route tables, and determines where to send it. The router reads the IP address of a packet and determines if the packet was meant for its network or another network. Lies at the heart of TCP/IP. Based on the Internet Protocol (IP), which provides the frame for transmitting data from place A to place B.

The Internet layer offers the functional and procedural method for transferring variable length data sequences from one node to another with the help of various networks.

Message delivery at the network layer does not give any guaranteed to be reliable network layer protocol.

Layer-management protocols that belong to the network layer are:

Routing protocols Multicast group management Network-layer address assignment.

3) Transport

This stage provides reliable message delivery and error handling. There establishes a protocol for communication. The TCP created a connection between sender and receiver using a port. The port number identifies a particular application on a system sending or receiving network traffic. It allows multiple applications to communicate at a time. TCP is a connection-oriented, reliable protocol responsible for reliability and flow control. There is an alternative to TCP that is UDP. UDP is User Datagram Protocol. Unlike TCP, UDP is connectionless. It is very unreliable but it is very fast. This means if UDP gets lost, there is no way to handle it. Based on two main protocols: TCP (Transmission Control Protocol) and UDP (User Datagram protocol)

It determines how much data should be sent where and at what rate. This layer builds on the message which are received from the application layer. It helps ensure that data units are delivered error-free and in sequence.

The transport layer helps you to control the reliability of a link through flow control, error control, and segmentation or de-segmentation.

The transport layer also offers an acknowledgment of the successful data transmission and sends the next data in case no errors occurred. TCP is the best-known example of the transport layer.

Important functions of Transport Layers:

4) Application Layer

Combines the functions of the OSI application, presentation, and session layers. Protocols involved in this layer: HTTP, FTP, SMTP, etc. Allows programs to have access to network resources. For example your web browser. -Application-layer helps you to identify communication partners, determining resource availability, and synchronizing communication. -It allows users to log on to a remote host -This layer provides various e-mail services -This application offers distributed database sources and access for global information about various objects and services.


OSI Model vs TCP/IP Model

7-Figure5-1.png

The two most commonly used communication network models are TCP / IP and OSI. Many similarities and differences between them are here. The main difference is that the conceptual model is OSI which is not practical for communication, while TCP / IP is used for connection establishment and network communication. The horizontal approach is followed by TCP / IP, and the OSI model supports a vertical approach. For every network, including the Internet, TCP / IP is the standard protocol, whereas OSI is not a protocol, but a benchmark model for understanding and design.

Similarities between OSI and TCP / IP Reference Models

Both the reference models are based upon layered architecture. The layers in the models are compared with each other. The physical layer and the data link layer of the OSI model correspond to the link layer of the TCP/IP model. The network layers and the transport layers are the same in both models. The session layer, the presentation layer, and the application layer of the OSI model together form the application layer of the TCP/IP model.

- In both models, protocols are defined in a layer-wise manner. - In both models, data is divided into packets and each packet may take an individual route from the source to the destination.

[15] [16]



Data Protection and Crptography

Crypto 2 original.jpg

The practice and study of techniques for secure communication are called Cryptography. Early civilizations developed basic forms of cryptography to communicate during the war. Early cryptography-focused mostly on scrambling(encrypting) a message using a basic mathematical algorithm. Germans used the enigma machine to encrypt messages sensitive messages. Teams of mathematical from Poland and England worked the clock the decrypt the messages.

Encryption

Encryption is the process that scrambles readable text so it can only be read by the person who has the secret code, or decryption key. It helps provide data security for sensitive information. Encryption can help protect data you send, receive, and store, using a device. That can include text messages stored on your smartphone, running logs saved on your fitness watch, and banking information sent through your online account. Vast amounts of personal information are managed online and stored in the cloud or on servers with an ongoing connection to the web. It’s nearly impossible to do the business of any kind without your personal data ending up in an organization’s networked computer system, which is why it’s important to know how to help keep that data private.

Encryption is the process of taking plain text, like a text message or email, and scrambling it into an unreadable format — called “ciphertext.” This helps protect the confidentiality of digital data either stored on computer systems or transmitted through a network like an internet.

When the intended recipient accesses the message, the information is translated back to its original form. This is called decryption.

To unlock the message, both the sender and the recipient have to use a “secret” encryption key — a collection of algorithms that scramble and unscramble data back to a readable format.

Symmetric Key Encrytion

  This is a type of encryption where only one key (a secret key) is used to both encrypt and decrypt electronic information. The entities communicating via symmetric encryption must exchange the key so that it can be used in the decryption process. This encryption method differs from asymmetric encryption where a pair of keys, one public and one private, are used to encrypt and decrypt messages.
   By using symmetric encryption algorithms, data is converted to a form that cannot be understood by anyone who does not possess the secret key to decrypt it. Once the intended recipient who possesses the key has the message, the algorithm reverses its action so that the message is returned to its original and understandable form. The secret key that the sender and recipient both use could be a specific password/code or it can be a random string of letters or numbers that have been generated by a secure random number generator (RNG). 

Asymmetric Encrytion

   This is a method of converting the data into a cipher format using a key. The encrypted data can be safely shared with others. It will be difficult to break the cipher format if the algorithm/key used is strong and properly implemented. The receiver deciphers the data to the original format using the key, used earlier to encrypt it.
   A public key and Private keys are generated in pairs randomly, using an algorithm and the keys have a mathematical relationship with each other. The key should be longer in length (128 bits, 256 bits) to make it stronger and make it impossible to break the key even if the other paired key is known. The number of possible keys increases proportionally with the key length and hence cracking it also becomes tougher.

https://cyware.com/news/exploring-the-differences-between-symmetric-and-asymmetric-encryption-8de86e8a

  1. https://www.cisco.com/c/en/us/solutions/small-business/resource-center/networking/networking-basics.html
  2. https://kumarjanglu.online/blog/2019/05/20/7-layers-of-osi-model-ccna-course/
  3. Lammle, Todd. CCNA Routing and Switching Study Guide. Sybex Wiley, 2013.
  4. https://www.networkworld.com/article/3239677/the-osi-model-explained-how-to-understand-and-remember-the-7-layer-network-model.html
  5. https://www.networkworld.com/article/3239677/the-osi-model-explained-how-to-understand-and-remember-the-7-layer-network-model.html
  6. https://www.networkworld.com/article/3239677/the-osi-model-explained-how-to-understand-and-remember-the-7-layer-network-model.html
  7. Lammle, Todd. CCNA Routing and Switching Study Guide. Sybex Wiley, 2013.
  8. https://www.networkworld.com/article/3239677/the-osi-model-explained-how-to-understand-and-remember-the-7-layer-network-model.html
  9. https://www.networkworld.com/article/3239677/the-osi-model-explained-how-to-understand-and-remember-the-7-layer-network-model.html
  10. https://www.networkworld.com/article/3239677/the-osi-model-explained-how-to-understand-and-remember-the-7-layer-network-model.html
  11. https://mikeshouts.com/stop-charging-your-phone-with-public-usb-ports/
  12. https://threatbrief.com/juice-jacking-prevent-protect-smartphone/
  13. https://www.ece.uvic.ca/~itraore/elec567-13/notes/dist-03-4.pdf
  14. https://simple.wikipedia.org/wiki/TCP/IP_model
  15. https://www.studytonight.com/computer-networks/comparison-osi-tcp-model
  16. https://www.educba.com/osi-model-vs-tcp-ip-model/