[1] Networking Flashcards
What does “IP” cover
- the format for each data unit (“packet”)
- the addressing for hosts on a network
- mechanisms for routing packets between hosts
What is the format of an IP address?
IPv4 is 32 bit (consists of four octets)
IPv6 is 128 bit
What are some key components of an IP packet?
The header, which includes the Protocol (TCP or UDP), the Time to Live (number of hops left), Source Address and Destination Address
The Data
How does IP prevent infinite loops?
Each packet has a TTL which counts down with each hop
When the TTL reaches 0, the packet is discarded
What are the two ways of specifying a network in IP?
- Classful IP Addressing. Class A has few networks but each has many hosts
- CIDR (Classful Inter-Domain Routing)
What IP Class is reserved for multicast adresses
Class D.
Class E exists but is reserved for future use
How does CIDR notation work?
The number after the slash is the size of the subnet mask e.g. for 198.51.100.14/24, the first 24 bits specify the subnet
What is VLSM?
Variable Length Subnet Masking (VLSM) allows multiple different subnet masks to be implemented in order to further break up a subnet
What is ARP?
Address Resolution Protocol (ARP) is used to find the MAC address of a device from its IP
What is the process for ARP?
- A host broadcasts an ARP Request on 255.255.255.255 to all devices on that network
- Any matching devices then unicast their MAC address
What is proxy ARP?
When one device responds to ARP requests on behalf of another that isn’t on that network
For example, the router might respond that it has a route to a neighbouring subnet
Is ARP cached?
Yes. The ARP cache is a table of entries that stores the previous IP, MAC address and Network Interface (e.g. “eth0”) of previous ARP requests
What are the key parts of an ARP packet?
- Hardware type (e.g. ethernet)
- Protocol type e.g. IPv4
- IP & MAC addresses of the source and target
What is NAT?
Network Address Translation maps one IP address to another by modifying the IP header of network packets
What is the primary purpose of NAT?
It maps a single public (routable) IP address to one or more private (unroutable) IP addresses
What are the types of NAT?
- Static NAT
- Dynamic NAT
- Port Address Translation
How does Static NAT work?
It is a 1-to-1 mapping e.g. the same host is always mapped to the same IP
How does Dynamic NAT work?
The NAT device is assigned a pool of IP addresses which are shared between the hosts
How does Port Address Translation Work?
The NAT uses one public IP address but allows connections on multiple ports. Each port is mapped to a different host
The source address packet is modified so the target knows how to respond
How is NAT different based on connection source?
- Source NAT is used for hosts on private networks that want to initiate outbound connections; the source address is modified
- Destination NAT allows devices outside the private network to connect in; it modifies the destination address
What are the layers of the OSI model?
[7] Application [6] Presentation [5] Session [4] Transport [3] Network [2] Data Link [1] Physical
What is Layer 7 of the OSI model?
Application e.g. SMTP / FTP / HTTP
It is the interface permitting the user to send and receive data through clients and applications
What is Layer 6 of the OSI model?
Presentation e.g. compression and encryption
It converts the requests to a form that the application can use
What is Layer 5 of the OSI model?
Session
It open, closes and manages session between the process and response
What is Layer 4 of the OSI model?
Transport i.e. how data is broken down into packets
e.g. TCP / UDP
Defines how data will be sent (i.e. as packets) between the process and the response. It provides data validation and security
What is Layer 3 of the OSI model?
Network e.g. IP
Looks for the best path to reach the destination
What is Layer 2 of the OSI model?
Data Link e.g. MAC addresses
This layer is used for directly connected devices
Communication between adjacent nodes
What is Layer 1 of the OSI model?
Physical
Handles bit level communication between nodes
At which OSI layer is HTTP?
Layer 7: Application
At which OSI layer is compression?
Layer 6: Presentation
At which OSI layer is encryption?
Layer 6: Presentation
At which OSI layer is TCP?
Layer 4: Transport
At which OSI layer is UDP?
Layer 4: Transport
At which OSI layer is IP?
Layer 3: Network
At which OSI layer is packets?
Layer 3: Network
At which OSI layer are MAC addresses?
Layer 2: Data Link