Tech Fundamentals Flashcards
What are the layers in OSI model?
MEDIA: how data is moved from A to B
Physical - network cards etc - it is dum. retransmits regardless of collisions. Standards to transmit/receive data. No addresses and no access control. Broadcast.
Data link - Switch is a device example. Mac address table connects a mac address to a port (first frame sent). Collisions avoided through media control and collisions are isolated. Runs on top of functional physical layer and is smart. Frames - format container for sending info. Introduces mac address that belong to a device. MAC addresses are globally unique. frames are converted to signals in order to travel over the physical layer. Looks for carrier signal before sending to avoid collisions. Removes the encapsulation (frame) before sending the payload to the application. If collision, jam, random backoff, then retry again and again and again with longer backoff times.
Network - Router is an example of a device. Needs one or more layer 2 (data link) in order to work. Layer 3 moves data between data links. In order for layer 2 to talk to another layer 2, they must use the same protocol. Layer 3 can span between these different layer 2s. It adds IP (IP addresses), ARP (address resolution protocol,route tables, routers, and routing. Encapsulation is an IP Packet. Frame is removed from packet and repacketed with each hop on intermediate networks. Frame is wrapped around the packet for each hop to designate the new sender. Trace! Internet protocol uses packets with source and destination IP addresses along with the frame for payload. Protocol field contains data for layer 4. TCP, UDP, ICMP (pings). Denotes which protocol to pass the packet into. TTL (v 4)/ Hop Limit (v 6) defines how many hops a packet can do before being discarded.
HOST: How data is chopped up and translated
Transport
Session
Presentation
Application - browser
WHat does each layer in the OSI know and depend on?
They know only about themselves and the layers below. EX 3 knows about 3, 2, 1
What is a frame made up of?
Preamble signals start of frame
MAC HEADER:
Destination MAC address
Source MAC address - allows replies
Ether type - which protocol on layer three is sending the frame in (IP is an ether type)
PAYLOAD - data being sent
Frame check sequence - destination can check if corruption has occurred.
What is an IP address structure IPv4?
Packets travel to the IP address. Dotted decimal notation. Uses 4 decimal numbers from 0 - 255.
IP addresses have two parts. Network and Host.
Binary is underlying the IP address represented with a dotted decimal. If the network component between two IP addresses matches, then the addresses are on the same network.
Like a house number being on the same street as another house number. The network portion of the IP address is the street. The host ID’s a specific house on that street.
IP addresses need to be unique, especially on local networks.
Subnet masks are on layer 3. They allow an IP address to determine whether another IP address is on the same network.
Route tables & routes
Every router has at least 1 route table. destination + next hop or target. Every packet the router checks the destination.
What is the Default route?
The least specific route is in a route table. Usually, the router is for home networks.
Broad Gateway Protocol
A set of connected routers that communicate the networks they know about.
What does ARP do?
Address resolution protocol. Gives you the MAC address for a given IP address. within a local network data is moved via frames. Does a roll call to find the matching IP address. Get’s the MAC address from that ARP on the destination. Strips the frame and de-encapsulates the data. Layer 2 is used for local communications.
What can layer 3 NOT do?
Channels of communication src ip are used to dest IP only.
It does not care about the ordering of packets that it sends between the source and destination.
Layer 4 & 5 Transport & Session
TCP and UDP are two protocols that run on top of IP. TCP for ordering and accuracy. Creates bi-directional comms. UDP is single direction (great for twitch…right…RIGHT?!)
TCP segments - talk about it
Segments are unique to TCP. Segments are placed inside packets. Segments don’t care about the IP for dest or src.
Segments - have src and dest PORTS instead. TCP IP combo has an IP address and a PORT. Single channel, single conversation, is identified by the combo of IP & Port.
Also, having sequence NUMBER puts a segment in its place. 1/23, 4/23, 2/23 Acknowledge field. receiver denotes the speed of packet uptake with acknowledgment.
CheckSUM will ensure that every packet makes its way there.
TCP header is short for all these fields in the TCP segment
What is a Network ACL in AWS?
Network ACL (access control list) is a stateless firewall that uses initiating traffic and subsequent traffic to set rules to allow traffic in OR out. That means TWO RULES per connection (in and out)
What will a security group firewall setup rules look like?
If inbound or outbound is allowed then the opposite is true as well. This is known as a stateful firewall.
What is the difference between stateless and stateful firewalls?
Stateful firewalls require only one rule to allow traffic. if inbound or outbound traffic are allowed then the inverese is also allowed. Network access control list (ACL)
Stateless firewalls require two rules per comms channel. One which will allow inbound and one which will allow outbound. Security groups.
NAT Network Address Translation
Allow multiple devices to share a single public IP address. Process to help with the shortage of IPv4 addresses. Translates to single then translates back.
What are types of NATs?
Static. 1:1 both directions - Needs to be consistent (Gateway)
Dynamic - pool of public to use for private. Efficient with many private to few public.
Port address Translation (PAT) - many private to a single IP address. NAT Gateway.
None for IPv6 (SO MANY ADDRESSES!)
Describe Static NAT
Private IPS can’t comm over internet. Need to translate private IP to public IP address and translate it back. The NAT device (or router) has a NAT table that stores the translations.
Router sees the packet being sent public IP so it changes the private IP into a public IP and puts that in the source IP.
Internet gateway AWS does this.
Describe Dynamic NAT
I{P addresses are assigned from a pool to devices sending packets to the public internet. These assignments are temporary. Multiple private devices can use the same IP so long as they do not use the IP at the same time.
IF no IP available, access to public internet will fail.
Describe Port address translation (PAT)
How the AWS NAT gateway works.
n:1 many private IPs
Uses ports to allow multiple private IPS to run on a single public IP address. Information to connect the private and public IP/Port combination so that translation can be done in both directions. Source port is randomly assigned.
IPv4 Info how many addresses?
How do you get one?
start and end?
classes?
over 4.3 billion addresses
it is allocated - it cannot be random
part is private
0.0.0.0
255.255.255.255
Class A: 0 - 127.255.255.255 HUGE networks (businesses)
Class B: 128.0.0.0
Used for larger business but didn’t need class A
first 2 octet for network last two is for subnets etc
Class C: over 2 million networks
first 3 network rest is for host or subnet
Class D: controlled by regional authorities
Describe IPv6
How many?
340 Trillion, Trillion, Trillion addresses.
HUGE!
Subnetting IPv4
/16 network is prefix - 1st two are the network
/8 is a class A network
Dividing a network into parts to allow more networks
/16 divided into two /17’s
/17’s are both divided into 2 more /18’s
At the end you would get 4 /18’s
Breaking down a larger network into many smaller networks. (each have a higher prefix.
Halfing the ranges progressively.
DDOS attacks Explain them
There are a few ways to overload websites or internet-based services.
Application layer - HTTP floods (inbalnace in processes delivery vs requests). Making a request is easy. Responding is hard.
Protocol - SYN Flood Spoof a source attempts to contact and hangs connection waiting to get an acknowledgment from the fake requestor.
Volumetric - DNS amplification large amt of data.
Often orchestrated via compromised machines (botnets) less size of botnet. Protocol imbalance. LARGE responses with small requests needed to initiate. Legitimate requests will be laggy. Impacts the data connection. Takes down larger websites.
Cannot be combated with normal network protections while still keeping the service available.
VLAN is…
A virtual local area network. Segmenting a network for different purposes. Security, telephony, support, floors, finance, etc. VLAN implemented with layer 2. Frames with dest and src MAC addresses.
.1Q changes frames by adding a field - enables VLAN ID or VID.
separates frames into logical networks.
QnQ - provider bridging - another VLAN field on a frame. Keep same field from before then add an S TAG or service tag.
If two VLANS want to communicate they must use a router.
Isolated traffic!
Separate network. Won’t see each other’s traffic.
.1Q VLAN Describe it…
truck port has all VLANIDs associated to it. ACCESS has one. Trunk is a connection between two .1Q devices.
Access ports comm with stations using ethernet.
VLAN switch forwards to other access ports.
AWS Direct connect vifs
IP conversion - what does the table look like?
What would 133.55.55.8 be in binary?
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1