Week 2 - The Network Layer Flashcards
How do nodes on a LAN communicate with each other?
MAC addresses
How long are IP addresses? How is each number represented?
32 bits long (4 octets long)
Represented by decimal numbers 0-255
How are IP addresses assigned and distributed?
distributed in large sections to organizations and companies
Do IP addresses belong to the networks or the devices attached?
The networks
Would your IP address change if you were at your house and if you were at a cafe?
Yes, IP address changes depending on network connected to
What is a dotted decimal notation?
When the IP address has numbers larger than what could be represented by 8 bits
example, would need 9-10 bits for the numbers 456 or 789
What does DHCP stand for? What does it do?
Dynamic Host Configuration Protocol
It assigns an IP address to a new connected device automatically
What is a static IP address? What is it usually assigned to?
An IP address that must be assigned manually
Usually assigned to servers and network devices
What is a dynamic IP address? What is it usually assigned to?
assigned automatically by the DHCP
usually to a client
What is a data packet at the Network layer called?
an IP datagram
What is a fragmented datagram called?
a packet
Define what an IP datagram is?
a highly structured series of fields that are strictly defined
What are the 2 primary sections of an IP datagram?
- header
- payload
How many total bytes is an IP datagram header?
32 bytes (includes the 0)
What are the first 3 fields in an IP datagram? Explain them.
- Version - 4 bits. What version of internet protocol is being used (IPv4 is common)
- Header Length - Almost always 20 bits long in IPv4. Declares how long the entire header is.
- Service type - 8 bits. Specifies QoS
What’s the minimum size for a header?
20 bytes
Define what is QoS?
Quality of Service
service that allows routers to make decisions about which IP datagram is more important
What are fields 4 and 5 in an IP datagram?
- Total Length - 16 bits. Indicates total length of IP datagram.
- Identification - 16 bits. Used to group messages together.
What is the max size for an IP datagram?
65,535 bits
What field is used when data is split up? How does that field help?
The identification field is used so receiving end understands that every packet with the same value in that field is part of the same transmission
What are fields 6, 7, and 8?
- Flags - indicates whether datagram is allowed to be fragmented or already fragmented
- Fragmentation - process of taking a single datagram and splitting it up into smaller datagrams
- TTL (time to live) - 8 bits. How many router hops the datagram can make before it’s thrown away.
How does the receiving end put back fragmented packets in the correct order?
It takes values from the fragmentation offset field and uses the identification field
Why would you need to fragment a datagram?
When a network that allows a larger datagram size crosses into a network that allows a smaller datagram size
What is the main purpose of the TTL field?
when an endless loop happens due to misconfiguration, the datagram isn’t continuously bounced between routers forever
What are fields 9 and 10 in an IP datagram?
- Protocol - 8 bits. Contains data about what transport layer protocol is being used (TCP, UDP)
- Header Checksum - like Ethernet checksum, its the checksum of contents of the entire IP datagram header
When does the header checksum field change?
at every router along with the TTL as it has to be recomputed at every router it touches
What are fields 11, 12, 13, and 14 of an IP datagram?
- Source IP address (32 bits)
- Destination IP address (32 bits)
- IP Options - optional field used to set special characteristics for datagrams for testing purposes
- Padding - uses series of 0s to make sure header is correct total size in case there is no IP options field (optional)
What is encapsulation?
The entire contents of an IP datagram are encapsulated as the payload of an Ethernet frame (encapsulates payload/message from layers above it to send below)
(kind of like mashing all the information together and the layers that need any specific information will unwrap it otherwise they add their layer data and move data to layer below)
What 2 sections are IP address split into? Which is which?
- Network ID
- Host ID
The first octet (at least) is the Network ID out of 4 octets (32 bits)
What is the address class system?
way of defining how the global IP address space is split up
What are the 3 types of address classes? Explain the difference
- Class A - first octet is the Network ID, rest are Host
- Class B - first 2 octets are Network ID, rest are Host
- Class B - first 3 octets are the Network ID, rest are Host
If the very first bits of an IP address is 0, what address class does it belong to?
Class A
If the first 2 bits of an IP address start with 10, what address class does it belong to?
Class B
If the first bits of an IP address are 110, what address class does it belong to?
Class C
How do you know how many possible addresses there are for Class A?
Since there are 24 bits left as the Host ID space (first octet is Network ID), you calculate 2^24 = 16,777,216 individual addresses
Less for Class B and C as there’s less Host ID space
A Class A address is any address with the first octet between ?–?
0-127
First bit has to be 0 for class A, so the possible values are 0-127
A Class B address is any address with the first octet between ?–?
128-191
A Class C address is any address with the first octet between ?–?
192-223
A Class D address always begins with how many bits? What are the first octet numbers?
1110 bits
224-239
What are Class E addresses? What do they make up? Why are they used?
all remaining IP addresses but unassigned and only used for testing purposes
What has this address class system mostly been replaced by?
CIDR (classless inter-domain routing)
What does ARP stand for and define it?
ARP - Address Resolution Protocol
a protocol used to discover the hardware address of a node with a certain IP address
(has the IP address, so sets out to find hardware address of a node)
Why would a fully formed IP datagram need a destination MAC address?
Once IP datagram is encapsulated inside Ethernet frame it needs the destination MAC address to complete the Ethernet Frame header
(knows where to send the frame)
What is an ARP table?
a list of IP addresses and the MAC addresses associated with them that almost all network-connected devices have
(Contact information - correlate the house number (MAC) with rest of address)
How does a system send information to a specific IP address that doesn’t have an entry in the ARP table to know its destination MAC address?
It sends out a broadcast ARP message to the MAC broadcast address (all F’s) and is delivered to all computers on the LAN
The network with that specific IP address answers the ARP broadcast and sends back an ARP response with the MAC address it needed.
Does a system store a MAC address in its local ARP table once it finds out the missing address associated with the IP address?
Yes it will likely store it for future use so it doesn’t have to send an ARP broadcast next time
When do ARP tables expire?
After a short amount of time to make sure network is refreshed and updated
Define what is subnetting?
Subnetting is the process of taking a large network and splitting it up into many smaller subnets or subnetworks
Explain the communication process in 4 steps from system to system: (for an address class system)
- System wants to communicate with specific IP address
- Core routers know this IP belongs to the Class A,B,C network
- Core routers route message to gateway router responsible for that network by looking at Network ID
- Packet gets to gateway router, router looks at Host ID to get data to proper system
What is a gateway router’s role?
Serves as the entry and exit path to a certain network
What do you do when there’s too many IPs for one router to handle?
split up large networks into many subnets with their own gateway routers with their own entry and exit point for each subnet
How does subnetting change how an IP address is read?
some bits of the IP address that would normally comprise the Host ID are used for the subnet ID
How are subnet IDs calculated?
via subnet masks
What are subnet masks?
32 bit numbers that are normally written out as 4 octets in decimal
so subnet masks are binary numbers that have 2 sections (1111 1111) and tells us what is the subnet ID and the 0s tell us what to keep as Host ID
What and why does the subnet mask tell you to ignore?
tells us to ignore the section with 1s and the part with 0s we can keep as Host ID
What is the purpose of a subnet mask?
to tell a router what part of an IP address is the subnet ID
How is the size of a subnet defined?
By its subnet mask
A single 8 bit number can represent how many different numbers in decimal?
256
0-255