Networking Flashcards
What are the seven layers of OSI-7 model?
- Application
- Presentation
- Session
- Transport
- Network
- Data link
- Physical
How physical layer works?
It broadcast signal over the medium (wifi - radio, cable - electrical, fiber - light) as fourier transformations.
All the physical properties are defined by standards - transmitting and receiving, voltage, timings, rates distances, modultation, connector
Transmits RAW bit streams.
Vulnerable to collisions - when multiple devices send data at the same time signal gets distorted and unreadable
What is networking HUB?
Networking hub is a physical layer device that repeats signal over multiple cable connections.
Networking hub does not check for errors or collisions, it only repeats the signal.
Networking hub performance is degrading when more devices are added to network, because it works as broadcast device and easily can create collisions between devices.
How data link layer works?
It is one layer on top of the physical layer.
DL introduces MAC address and splits data sent over the local network in FRAMES.
DL works between 2 or more devices in the same network and sends data using MAC addresses (from device and to device)
DL is responsible for collisions and error correction.
On each hop Frame is removed and new frame is created - changing from MAC address and to MAC address.
DL allows sending frames using unicast and broadcast (dest mac address is FF FF..)
What is MAC Address?
MAC address stands for “Media Access Control address”.
All physical devices has MAC address.
MAC address consists is 48 bits long and 24 first bits are manufacturer id and last 24 bits are device id.
What Frame packet consists of?
Frame is DL packet.
PREAMBLE - identify start of frame
dest MAC - destination mac address (all F’s for broadcast)
source MAC - network device address (network card)
EtherType - IPv4, IPv6, ARP
Payload - 46b to 1500b
Checksum - 32bits
What is Unicast?
Unicast is a one-to-one transmission from one point in the network to another point
What is Broadcast?
Broadcasting is a method of transferring a message to all recipients simultaneously
What is PREAMBLE in frame packet?
56 bits (alternating 010101) beginning of a frame to allow devices to synchronize when a frame packets starts.
What is networking Switch?
Networking switch is a devices that works in DL.
It receives frames consisting with mac addresses and retransmits only to dedicated hosts.
When mac address not in the switch table then it broadcasts.
Switch check frames checksum and retransmits only valid packets.
What is multicast?
Multicast is communication between a single sender and multiple receivers on a network.
How network layer works?
NL is on top of the DL. And each frame of DL contains Ethernet Frame.
Media layer works across multiple networks and sends data from one ip address to another ip address.
NL can send multiple types of packets - IPv4, IPv6, ICMP (ping)
What Ethernet Frame consists of?
Source ip address
Destination Ip address
Protocol - ICMP (Ping), TCP, UDP
TTL - how many hops it can jump before expire
Data - array of bytes
Ethernet frame is surrounded by data link frame containing mac addreses.
How do you map IP addresses to MAC addresses?
Address Resolution Protocol (ARP) - Finds mac address for the IP
- Broadcasts request for mac address with an ip address
- Creates data link frame packet that contains ip packet using
- Compares subnet mask and destination ip and checks if in current network
2 Sends request for mac address which maps to ip addresses in the network - Waits till mac addresses are received
- Chooses most narrow ip address (if no address maps, takes the widest address which is gateway for the internet)
- Encapsulates ethernet frame inside the data link frame using mac addresses and sends packets.
- Repeats the process on each hop
What is DHCP?
Dynamic Host Configuration Protocol - automatically assigns ip to a host