Domain 4 Flashcards
(110 cards)
What is a protocol?
It is an agreed upon set of rules. It defines the format and order of messages and actions taken upon receipt of the messages
Network protocols:
- determine how computers communicate with each other
- standards-based approach increase interoperability
Layered Models
- Divides networking processes into manageable layers
- Can modify one layer without affecting the others
- Easier to understand communication functions
What is encapsulation?
Encapsulates data into TCP segment into an IP packet, into a frame, into bits, across the wire.
Think 7 layers - encapsulate and decapsulate the message through the 7 layers
- Divide the network communications into 7 layers
- Divide tasks of communication into pieces for easier implementation
- Appending data around the information from on data packet to the data of another packet
- Each layer encapsulates information around the packet it received from the layer immediately above it, then sent to the layer below
- When the packed is received, the information that pertains to each layer is stripped from the packet as it moves up the protocol stack
What are the layers of the OSI model, in order?
The Open systems interconnect (OSI) model is a layered model showing the flow of information from one application on a system to another across a network. There are 7 layers in the model.
Please Do Not Throw Sausage Pizza Away
1) Physical -0’s and 1’s - bits - handles transmission across the physical media - includes such things as electircal pulses on wires, connection specifications between the interface hardware, and the network cable and voltage regulation
2) Data Link - Ethernet address and switches- Connects the physical part of the network (cables, electrical signals) with the abstract part (packets and data streams)
3) Network - IP addresses and routing - interaction with the network address scheme and connectivity over multiple network segments. Describes how systems on different network segments find and communicate with each other
4) Transport - Ports, TCP and UDP headers - interacts with you information and prepares it to be transmitted across the network. It is this layer that ensures reliable connectivity from end to end. The transport layer also handles the sequencing of packets in a transmission
5) Session - Data - hands the establishment and maintenance of connections between systems. It negotiates the connection, sets it up, maintains it and makes sure that information exchanged across the connection is in syn on both sides
6) Presentation - Data - present the data to the application in a way it makes sense - makes sure that the data sent from one side of the connection is received in a format that is useful to the other side (compresses, decompresses)
7) Application - application and its data - interacts with the application to determine which network services will be required. When a program requires access to the network, the application layer will manage requests from the program to the other layers down the stack
What are the attributes of the OSI model Layer 7 - Application Layer
- This is the layer that is closest to the users and programs.
- Identification of communication partners
- Determines security aspects of communication
- When a program requires access to the network, the Application Layer will manage request from the program to the other layers down the stack
- PDF, adobe, browser, etc live here
What are the attributes of the OSI model Layer 6 - Presentation Layer
- Provides representation of information to be processed by the application
- Provides translation services, such as EBCDIC to ASCII
- Performs encoding, compression and decompression
- makes sure that the data sent from on side of the connection is received in a format that is useful to the other side
What are the attributes of the OSI model Layer 5 - Session Layer
- Establishment and maintenance of connections between systems.
- Organizes and synchronizes communication
- Management of data exchange
- Establishes lines of communication and initial contact to destination computers
- Maintains the session allowing recovery and Restoration
- Allows both half-duplex and full-duplex communications
What are the attributes of the OSI model Layer 4 - Transport Layer
- TCP and UDP
- Optimizes network service usage
- Uniquely identifies endpoints by transport address
- ports live here
- Reliable and cost-effective data transfer and connectivity
- Maintains communication integrity
- Sequence control of packets in transmission, error detection and possible error recovery
- Prepares your information to be transmitted across the networ.
What are the attributes of the OSI model Layer 3 - Network Layer
- IPv4 and IPv6
- Routers
- Handles interaction with the network address scheme and connectivity over multiple network segments. It describes how systems on different network segments find and communicate with each other
- Provides network addressing to identify endpoints
- Performs routing and flow control
- Establishes network connection allowing transfer of data from one network endpoint to another
- Provides network path
What are the attributes of the OSI model Layer 2 - Data Link Layer
- Ethernet
- MAC addresses
- Switches
- Maps IP addresses to MAC addresses
- Connects the physical part of the network with the abstract part
- formats messages to allow for transfer of physical media
- Provides addressing for physical hardware
What are the attributes of the OSI model Layer 1 - Physical Layer
- Bits
- Cables
- Radio Waves
- Electrcity
- Light (fiber optics)
- Handles transmission across the physical media
- Provides for mechanical and electrical activation, maintenance and deactivation of physical connections for transmission
- Converts bits into electrical signals or light impulses for transmission
What are the layers of TCP/IP?
Application = layer 7, 6, 5
Host to Host transport = layer 4
Internet = layer 3
Network Access = Layer 2, 1
What is the Internet Protocol (IP)?
Most common Layer 3 protocol
- Works at the internet layer of the TCP/IP stack
- Deals with transmission of packets between endpoints
- The fundamental protocol of the internet
IPv4 - 32 bit source and desitnation addresses
What is Classless Inter-Domain Routing (CIDR)?
This is an IPv4 address class that allows for more flexible network sizes than those allowed by classful addresses. It allows for many network sizes beyond the arbitrary classful network sizes.
- Slash notation, for example /8 of /20 or /10
- Helps conserve IP addresses by allowing flexible subnet sizes
Once networks are in CIDR notation, additional routable network sizes are possible. Need 128 IP addresses? Chop Class C (/24) in half, resulting in two /25 networks. Need 64 IP addresses? Chop a /24 network into quarters resulting in four /26 networks with 64 IP addresses each
Designed to cut networks up more finely
What is classful addressing: A through E
Class A: 16.7M addresses – /8
Class B: /16
Class C: /24 - the first 24 bits describe the network and the remaining 8 describe the host
Class D: Multicast
Class E: Reserved (formally experimental)
What is IPv4 Broadcast Address and a SMURPH attack?
One to all type of address
- Sender will send ping to all hosts on a given network segment
Two Types:
1) Directed Broadcast - you direct to a specific network and the host portion is set to all 1s (255) which means it will send to all
2) Limited Broadcast - sends to everyone on the internet - all 1s which is 255.255.255.255. Routers block this by default otherwise you will ping the entire internet and if you get responses back its bad
SMURPH ATTACK: When you forge the address a ping is coming from to someone elses address. You ping the whole internet or a very large network. When the responses are received, it creates DOS for the address you forged the ping was coming from
What is Private Network Addressing
Maps private addresses to public addresses
Private IP addresses are only used internally, they are not used publically on the internet - your router assignes a private IP
IPv4 address space is scarce
- how do we solve this problem?
Set aside private addresses and marry this with NAT (network address translation). When you cross the firewall, the firewall will map you to a public address through NAT. Many people can use the public address. CIDR also allows smaller networks.
RFC 1918 is the private addresses
What is network address translation?
NAT - translates one IP address to another. It maps IPs and ports. It maps public to private and private to public so that not all IPv4 public addresses are used up for every single device. One router will
- One to one - one internal maps to one external
- Many to one - multiple map to one external
- Pool NAT - maps to a set of public addresses. Commonly used in large. If you have too much traffic and you fill the NAT table, new connections will break. Pool NAT throws in something like a firewall to increase the number addresses available to avoid losing connection because of an overflow from too much traffic.
What is the Domain Name System (DNS)?
The DNS is the protocol for translating IP addresses to domain names and back again.
Root level servers for top-level domains (.com, .org,, .edu, .gov, etc.).
www.microsoft.com translates to the IP address.
Various networks on the internet are divided up into groups called domains. The domains are structured in a hierarchy like a tree. The top level of the tree is called the root or top level domain. There are a handful of these like .com. EAch level down the hierarchy tree ads another level to the domain. Each level can be another domain or a host computer itself
DNS has security issues:
- no built-in security
- Attacker can spoof responses by guessing or brute forcing the DNS transaction ID and client source port. Once this is done, the network will cache that website so anyone on the network will automatically be brought to the spoofed website instead. This is a cache poisoning attack.
- Domain hijacking. It allows an attacker to take over a domain and redirect communications from a good domain to a bad one
**DNSSEC: Protect against DNS spoofing with DNSSEC (Domain name system security extentions). protect against cache poisoning and DNS spoofing. It uses encryption and PKI to provide origin authority and data integrity. It does not provide confidentiality. It authenticates the DNS server as the sender. Also has denial of existence check proving a DNS record does not exist. It is a digital signature for a packet - it can tell what you requested did not change
What are the DNS queries?
1) gethostbyname: when you have the fully qualified domain name or the local name within your private network and need the address
2) gethostbyaddr: When you have the address and need the name
What is IPv6?
Designed to meet addressing growth
- 128 bits = 340 undecillion addresses (7 addresses for each atom of every human)
- offers greater flexibility in allocating addresses
- Faster than V4 - every packet had to check a check sum in v4. Router would check the check sum at every hop, server would check the checksum at the TCP layer. So the check was done by the server. For v6 - they said drop the layer 3 checksum - routers dont check the check sum so it passes through the router faster.
Features:
- Tunnel v6 over v4 - carry the packet right over there TCP goes.
- If you tunnel v6 over v4 IDS have a terrible time detecting stuff
- You should detect v6 over v4 tunneling in your environment
- can support v4 on v6 backbone by translating v4 to v6
What is IPv6 addressing
- use hexidecimal notation
- No more NAT - and no more DHCP - how do systems assign themselves addresses?
- Autoconfiguration - use your MAC address which is unique and embed it in your address and assign the network prefix
Network prefix - represented in the first 48 bits (6 bytes)
Subnet ID - configured according to the addressing needs of the org.
Interface identification - uniquely identifies the v6 node. With v6 autoconfiguration, the MAC address of the client populates the interface identification portion of the v6 address.
Take the MAC and split it in half and append the network prefix.
They now added DHCP.
Packet: - The header information has changed to accommodate the v6 protocol:
- Hop Limit - renamed time to live (TTL) - was described as seconds. But now its more a accurate because its not seconds its a hop limit.
What is UDP? User datagram protocol
Connectionless communications
- sends packets out, doesnt care if they get there
- Much less overhead
- Good if small amount of packet loss is acceptable
- used for things like streaming audio because can afford to lose one or two packets - do less error checking so can move faster
Testable***:
- UDP ports:
- — DNS (53)
- — NTP - Network Time protocol) (123)
- — BOOTP/DHCP (dynamic host configuration protocol) (67 and 68)
- — SNMP (161)
It has an 8 byte header
- source port
- destination port
- message length
- checksum (only for v6)
So simple, build what you want
Faster and less reliable and is often the basis for query-type applications (NTP, DNS, NFS)
What is TCP - transmission control protocol?
Connection oriented communications
- ensures reliable packet delivery
- expensive overhead
- 3 way handshake
- — SYN
- — SYN-ACK
- — ACK
- establishes a virtual connection known as a session between hosts
- reliable connection over unreliable networks
- you waste 6 packets on every connection sending no data - you have SYN and FIN (which is used for shut down)
Header:
- urgent porter is useless (2 bytes)
- sequence number makes sure packets stay in sync - so you know if something is missing or out of order
- 20 bytes total
- a lot more in the header than UDP and IPv6
- *Key fields you need to know:
- Source port
- Destination port
- sequence number - track packets and provide reliable delivery of information
- acknowledgement number - used to acknowledge the receipt of information
- SYN bit - establish the connection
- ACK bit - system acknowledges the receipt of information
Slower but offers reliable delivery and is the basis for most internet applications
Well known TCP protocols memorize
Know that FTP classical uses 2 ports (active FTP)
**Active FTP - clients port connects to server 21. Then download from server 20 to client. Brand new connection. - firewall would break the connection.
Passive FTP works normally - not a backwards connection with a separate session
1) 20 - FTP data - download data from a server source is 20 - active FTP - broke firewalls. second connection. firewall views second connection as an unrelated connection and broke firewalls. Its a separate connection but for the same session you are trying to perform
2) 21 - FTP - connect to a server from port 21
3) 22 - SSH
4) 23 - Telnet
5) 25 - SMTP
6) 53 - Domain Name System (DNS)
7) 79 - Finger
8) 80 - HTTP
9) 443 - HTTPS
you can use any ports you want but if you use your own port assignments, no one will be able to communicate with you.