Networking Flashcards
001 What is a host?
Any device that sends or receives traffic over a network:
Computer, laptop, phone, printer, server, cloud server.
Also any IoT device: TV, speakers, thermometers, lights, watches, fridge..
002 What are clients and servers?
Client initiates requests, server responds.
Servers are simply computers with software installed which responds to specific requests. For example a web server.
However these categories are relative to specific communication. When a device that we normally call a server request something from another device / server (e.g. software update), it then acts as a client.
003 What is IP address?
It’s an address that identifies each host on a network. It is made of 32 bits divided into 4 octets of 0-255.
004 What is a network?
It is a connection between hosts and what transports traffic between them. It is a logical grouping of hosts. They can contain other networks, referred to as sub-networks or subnets.
005 What is the difference between Repeater, Hub, Bridge, Switch and Router?
Data decays as it travels through a wire. A Repeater regenerates the signal, which enables us to create connections at greater distances.
When adding more and more hosts, connecting them all directly doesn’t scale. A Hub is simply a multiport repeater that not only regenerates the signal but also forwards it to all the remaining ports. It’s the first device that centrally connects multiple hosts. The problem with it is that everybody sees everybody else’s data.
A Bridge sits between two hubs. It only has two ports and it learns which hosts are on which side. It’s the first type of device that can keep traffic only within a relative network.
A Switch is like a combination of hub and bridge. It connects multiple hosts and it remembers which one is on which port. That means it can keep communication between two hosts only to their particular ports. It facilitates communication within a network, that has one IP address space.
A Router, on the other hand, is a device that enables connection between networks and to the network of networks, the Internet. Due to its position it provides a traffic control point, where security, filtering or redirecting can be handled.
006 How does Routing work? What is Interface, Route, Gateway?
How router works is that it learns which networks it is attached to. The point of connection is called Interface, the knowledge of the attached network is called Route and it is stored in a so-called Routing Table.
Router has an IP address in every network it is attached to. Such IP address is the identity of the Interface that particular network is attached to. It serves as what is known as Gateway or Default Gateway. A Gateway is each host’s way out of their local network.
007 What is OSI model?
It is basically a set of rules of networking divided into 7 layers. Each layer serves a specific function and if they all work correctly, hosts can share data with one another.
The Open Systems Interconnection (OSI) model describes seven layers that computer systems use to communicate over a network. It was the first standard model for network communications, adopted by all major computer and telecommunication companies in the early 1980s
The modern Internet is not based on OSI, but on the simpler TCP/IP model. However, the OSI 7-layer model is still widely used, as it helps visualize and communicate how networks operate, and helps isolate and troubleshoot networking problems.
OSI was introduced in 1983 by representatives of the major computer and telecom companies, and was adopted by ISO as an international standard in 1984.
008 What are the purposes of the first 3 layers of OSI model and which technologies are related to them?
Layer 1 - Physical layer - Transporting data in the form of 1’s and 0’s (bits) between hosts.
L1 techs: Cables, Wifi, Repeater, Hub
The physical layer is responsible for the physical cable or wireless connection between network nodes. It defines the connector, the electrical cable or wireless technology connecting the devices, and is responsible for transmission of the raw data, which is simply a series of 0s and 1s.
Layer 2 - Datalink layer - Hop to Hop delivery of data. It is what sends data to the physical layer and what retrieves it from there. It uses addressing scheme with so-called MAC addresses, which are unique identifiers of NIC - Network Interface Card or Wi-Fi Access Card. These devices are basically the points of connection of the physical layer to the hosts. Layer 2 enables communication (jump) from a host to a router or from a router to another router. These jumps are called hops. Very often many hops are needed to get to the target host. That’s why hop to hop delivery.
L2 techs: NICs - MAC addresses, Switches
The data link layer establishes and terminates a connection between two physically-connected nodes on a network. It breaks up packets into frames and sends them from source to destination. This layer is composed of two parts—Logical Link Control (LLC), which identifies network protocols, performs error checking and synchronizes frames, and Media Access Control (MAC) which uses MAC addresses to connect devices and define permissions to transmit and receive data.
Layer 3 - Network layer - End to End delivery of data using addressing scheme with IP addresses. Layers 2 and 3 work together to move the data across the Internet. What links layer 3 address (IP) to layer 2 address (MAC) is a protocol called ARP - Address Resolution Protocol.
L3 techs: IP addresses, Routers, any device with an IP address
The network layer has two main functions. One is breaking up segments into network packets, and reassembling the packets on the receiving end. The other is routing packets by discovering the best path across a physical network. The network layer uses network addresses (typically Internet Protocol addresses) to route packets to a destination node.
009 What is the purpose of the layer 4 of the OSI model?
Layer 4 - Transport layer - Service to Service delivery using adressing scheme with Ports. It uses 2 different strategies (protocols) how to distinguish between data streams, TCP and UDP. TCP favors reliability, UDP efficiency and they both have addressing space from 0 to 65535. The ports ensure that the right application gets the right data and the data streams are kept isolated from each other.
The transport layer takes data transferred in the session layer and breaks it into “segments” on the transmitting end. It is responsible for reassembling the segments on the receiving end, turning it back into data that can be used by the session layer. The transport layer carries out flow control, sending data at a rate that matches the connection speed of the receiving device, and error control, checking if data was received incorrectly and if not, requesting it again.
010 What are the 3 application layers in OSI model and what is their purpose?
5, 6, 7 - Session, Presentation, Application
The distinction between them is vague and it is often considered a one layer - Application layer.
5. Session Layer
The session layer creates communication channels, called sessions, between devices. It is responsible for opening sessions, ensuring they remain open and functional while data is being transferred, and closing them when communication ends. The session layer can also set checkpoints during a data transfer—if the session is interrupted, devices can resume data transfer from the last checkpoint.
6. Presentation Layer
The presentation layer prepares data for the application layer. It defines how two devices should encode, encrypt, and compress data so it is received correctly on the other end. The presentation layer takes any data transmitted by the application layer and prepares it for transmission over the session layer.
7. Application Layer
The application layer is used by end-user software such as web browsers and email clients. It provides protocols that allow software to send and receive information and present meaningful data to users.
A few examples of application layer protocols are the Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Post Office Protocol (POP), Simple Mail Transfer Protocol (SMTP), and Domain Name System (DNS).
011 What is a NIC?
Network Interface Card is a piece of hardware, typically a circuit board or chip, which is installed on a computer so it can connect to a network.
The network card operates as a middleman between a computer and a data network. For example, when a user requests a webpage, the computer will pass the request to the network card, which converts it into electrical impulses.
A web server on the internet receives the impulses and responds by sending the webpage back to the network card as electrical signals. The card gets these signals and translates them into the data that the computer displays.
012 What is TCP/IP model?
The Transfer Control Protocol/Internet Protocol (TCP/IP) is older than the OSI model and was created by the US Department of Defense (DoD). A key difference between the models is that TCP/IP is simpler, collapsing several OSI layers into one:
OSI layers 5, 6, 7 are combined into one Application Layer in TCP/IP
OSI layers 1, 2 are combined into one Network Access Layer in TCP/IP – however TCP/IP does not take responsibility for sequencing and acknowledgement functions, leaving these to the underlying transport layer.
Other important differences:
TCP/IP is a functional model designed to solve specific communication problems, and which is based on specific, standard protocols. OSI is a generic, protocol-independent model intended to describe all forms of network communication.
In TCP/IP, most applications use all the layers, while in OSI simple applications do not use all seven layers. Only layers 1, 2 and 3 are mandatory to enable any data communication.
013 What is TCP and UDP?
TCP - Transmition Control Protocol is a connection-oriented protocol, whereas UDP - User Datagram Protocol is a connectionless protocol. A key difference between TCP and UDP is speed, as TCP is comparatively slower than UDP. Overall, UDP is a much faster, simpler, and efficient protocol, however, retransmission of lost data packets is only possible with TCP. So TCP is more reliable, while UDP prioritizes speed and efficiency.
014 What is MAC address?
Media Access Control (MAC) Address –
MAC Addresses are unique 48-bits hardware number of a computer, which is embedded into a network card (known as a Network Interface Card) during the time of manufacturing. MAC Address is also known as the Physical Address of a network device.
015 What is the format of MAC address?
MAC Address is a 12-digit hexadecimal number (6-Byte binary number), which is mostly represented by Colon-Hexadecimal notation.
The First 6-digits (say 00:40:96) of MAC Address identifies the manufacturer, called OUI (Organizational Unique Identifier). IEEE Registration Authority Committee assigns these MAC prefixes to its registered vendors.
Here are some OUI of well-known manufacturers :
CC:46:D6 - Cisco
3C:5A:B4 - Google, Inc.
3C:D9:2B - Hewlett Packard
00:9A:CD - HUAWEI TECHNOLOGIES CO.,LTD
The rightmost six digits represent Network Interface Controller, which is assigned by the manufacturer.
As discussed above, the MAC address is represented by Colon-Hexadecimal notation. But this is just a conversion, not mandatory. MAC address can be represented using any of the following formats:
hyphen, colon or period-separated hexadecimal notation:
00-0a-83-b1-c0-8e
00:0a:83:b1:c0:8e
00.0a.83.b1.c0.8e
Colon-Hexadecimal notation is used by Linux OS and Period-separated Hexadecimal notation is used by Cisco Systems.
016 What is IP address?
An IP address is a unique address that identifies a device on the internet or a local network. IP stands for “Internet Protocol”, which is the set of rules governing the format of data sent via the internet or local network.
In essence, IP addresses are the identifier that allows information to be sent between devices on a network: they contain location information and make devices accessible for communication.
The internet needs a way to differentiate between different computers, routers, and websites. IP addresses provide a way of doing so and form an essential part of how the internet works.
017 What is ARP?
Address Resolution Protocol (ARP) is a communication protocol used to find the MAC (Media Access Control) address of a device from its IP address.
This protocol is used when a device wants to communicate with another device on a Local Area Network or Ethernet.
018 What is encapsulation and de-encapsulation?
In a networking model, the term encapsulation refers to a process in which protocol information is added to the data. The term de-encapsulation refers to a process in which information added through the encapsulation process is removed. Protocol information can be added before and after the data.
019 How does Switching work?
Switch is a device whose primary purpose is moving data within a network. All the devices communicating through a switch belong to the same IP network.
As switch is a layer 2 device, it only looks at the layer 2 header. Everything else from its perspective is simply considered as data.
It uses and maintains MAC Address Table, which maps switch ports to MAC Addresses. This table doesn’t start out populated. It starts out empty. As data flows throught it, the switch populates this table.
Beyond the MAC address table the switch performs 3 types of actions:
1) Learning = updating MAC Address Table with mapping of the switching port to the source MAC Address
2) Flooding = duplicating and sending the frame out of all the switch ports except from the source port
3) Forwarding = using MAC Address Table to deliver frame to the appropriate switching port
A switch also has its own MAC address, but it is not involved in the switching process. It only gets in use when we want to send data TO or FROM the switch, not through it. For example when we want to perform some switching set-up. In such case an IP address is also needed. The switch is then essentially acting as another host on the network.
020 What is Unicast and Broadcast and what is the difference between Unicast flooding and Broadcast flooding?
Unicast is a type of frame with another host as a destination MAC Address.
Broadcast is a type of frame with destination MAC Address FFFF.FFFF.FFFF (unspecified).
Flooding is on of the three actions a switch can do.
Unicast flooding only happens when the destination MAC Address is not in the MAC Address Table.
Whereas broadcast frames are always flooded.