IPv4 Network Layer
- 84Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
Which OSI layer is the network layer, and which protocol is the focus of this material?
84 questions
- 1
Which OSI layer is the network layer, and which protocol is the focus of this material?
Model answer
The network layer is Layer 3, and the protocol discussed is IPv4, or Internet Protocol version 4.
Explanation
IPv4 operates at the network layer in the TCP/IP protocol stack.
- 2
Where does the network layer receive data from and pass it next?
Model answer
It receives data from the transport layer and passes it to the data link layer for delivery.
Explanation
The network layer carries data between the transport and data link layers.
- 3
What is IPv4's basic delivery goal?
Model answer
IPv4 makes a best-effort attempt to deliver a datagram from its source machine to its destination machine.
Explanation
IPv4 aims to get data to the destination host, not to a particular application on that host.
- 4
Why is delivering a datagram to the correct machine not the same as delivering it to the correct application?
Model answer
IP delivers data to a host; upper-layer protocols handle delivery to the specific process or application on that host.
Explanation
IP does not concern itself with whether the destination process is a browser, web server, or another program.
- 5
Which end-to-end services does IP itself not provide?
Model answer
IP does not provide guaranteed reliability, flow control, sequencing, or other end-to-end services.
Explanation
These services are not built into IP and may instead be provided by upper-layer protocols.
- 6
What does best-effort delivery mean in the context of IP?
Model answer
IP attempts to deliver data but does not guarantee that it arrives, arrives in order, or is retransmitted if lost.
Explanation
The protocol makes an effort to deliver datagrams without providing reliable, ordered delivery.
- 7
How does IP treat separate datagrams sent between hosts?
Model answer
It treats each datagram as an independent entity, unrelated to other datagrams.
Explanation
IP does not keep a connection or logical circuit linking the datagrams.
- 8
What does IP not do if datagrams arrive out of order?
Model answer
IP does not put them back into the correct order.
Explanation
Sequencing and reordering are not functions that IP provides.
- 9
How does IP forwarding through a network of routers move a datagram toward its destination?
Model answer
Each router examines the datagram, determines where to send it next, and forwards it one step closer to the destination.
Explanation
A datagram typically crosses multiple routers before it reaches its destination host.
- 10
What two basic functions of IP are defined in the material?
Model answer
The two functions are addressing and fragmentation.
Explanation
Addressing helps direct datagrams toward their destinations, while fragmentation can break them into smaller pieces when needed.
- 11
How many bits long is an IPv4 address?
Model answer
An IPv4 address is 32 bits long.
Explanation
IPv4 uses a 32-bit address to identify a host in the network.
- 12
What are the two conceptual parts of an IPv4 address?
Model answer
An IPv4 address has a network portion and a host portion, also described as the network number and local address.
Explanation
The network portion identifies the network, while the host portion identifies a machine within that network.
- 13
How do IPv4 addresses relate to other addresses on the same network?
Model answer
Machines on the same network share the network portion, while each machine has a distinct host portion.
Explanation
The distinct host portion identifies each machine on that network.
- 14
How does a subnet mask identify the network and host portions of an IPv4 address?
Model answer
The mask's 1 bits mark the network portion; the remaining 0 bits mark the host portion.
Explanation
The mask indicates how to divide an address into its network and host components.
- 15
Which address classes were used for ordinary host addressing in the original classful scheme?
Model answer
Classes A, B, and C were used for host addressing.
Explanation
Class D was used for multicast addresses, and Class E was reserved.
- 16
What were Class D and Class E addresses used for in the original classful scheme?
Model answer
Class D was used for multicast addresses, while Class E was reserved.
Explanation
Unlike Classes A, B, and C, these classes were not used for ordinary host addressing.
- 17
What were the default subnet masks for Class A, Class B, and Class C addresses?
Model answer
Class A used an 8-bit mask, 255.0.0.0; Class B used a 16-bit mask, 255.255.0.0; and Class C used a 24-bit mask, 255.255.255.0.
Explanation
In classful addressing, the address class determined the default network-mask length.
- 18
Why did classful addressing become inadequate as Internet use grew?
Model answer
It offered only fixed network sizes, limiting flexibility in address allocation and contributing to address exhaustion.
Explanation
Networks could only use the Class A, B, or C default sizes, even when a different size would better fit their needs.
- 19
What flexibility did classless addressing introduce?
Model answer
It removed the restriction to class-based default masks and allowed networks to use masks of different lengths.
Explanation
For example, a network could use a 25-bit, 27-bit, or 18-bit mask rather than only an 8-, 16-, or 24-bit mask.
- 20
What do the terms CIDR and VLSM refer to in the discussion of classless addressing?
Model answer
CIDR means classless inter-domain routing, and VLSM means variable-length subnet mask.
Explanation
Both terms are associated with using flexible network-mask lengths rather than relying only on classful defaults.
- 21
How can a network administrator choose an appropriate mask length with classless addressing?
Model answer
The mask length can be selected to provide a network size suited to the number of hosts needed.
Explanation
Flexible masks allow networks to be sized more appropriately than fixed classful masks.
- 22
What two types of routes does a host commonly have in its routing table?
Model answer
A host commonly has routes for networks directly connected to its interfaces and a default route.
Explanation
A host with multiple network interfaces can have a connected route for each network it is attached to.
- 23
What is the purpose of a host's default route?
Model answer
It provides a next destination for packets when the host has no more specific route for them.
Explanation
The host typically sends such packets to its router, which then handles forwarding.
- 24
Which command can display a host's routing table on Windows and Linux, according to the material?
Model answer
Use
netstat -rn.Explanation
The command displays the host's routing table.
- 25
How does a host decide whether to send a packet locally or to a router?
Model answer
It compares the destination address with its own address and subnet mask to determine whether the destination is on the same network.
Explanation
A same-network destination is sent locally; a destination on another network is sent to the host's router.
- 26
What does a host do when it determines that the destination is on its local network?
Model answer
It sends the data directly to the destination using Layer 2 delivery.
Explanation
The host uses ARP to obtain the destination machine's MAC address when needed.
- 27
What does a host do when it determines that the destination is on a different network?
Model answer
It sends the packet to its router, typically using its default route.
Explanation
The router forwards the packet toward the remote network.
- 28
Does a host ask its router whether a destination is local or remote?
Model answer
No. The host makes that decision itself by comparing the destination with its own IP address and subnet mask.
Explanation
The router is used as the next hop for remote destinations; it does not make the host's local-versus-remote decision.
- 29
A host has address 10.1.1.3 and can directly reach 10.1.1.2 on the same network. How does it send a packet to 10.1.1.2?
Model answer
It sends the packet directly on the local network, using ARP to learn the destination's MAC address if needed.
Explanation
The destination is on the host's own network, so the host uses direct Layer 2 delivery rather than sending the packet to its router.
- 30
How would that host send a packet to the remote address 9.10.11.12?
Model answer
It would determine that the address is on a different network and send the packet to its router.
Explanation
The router then forwards the packet toward the remote destination.
- 31
What is routing, and which layer performs it?
Model answer
Routing is the selection of a path for transmission, and it is a network-layer function.
Explanation
Routing directs datagrams toward their destinations using network-layer addresses.
- 32
What information does a router use to route a datagram?
Model answer
It examines the destination IP address and uses its routing table to choose where to forward the datagram.
Explanation
The selected route directs the datagram toward its destination.
- 33
What does a router do first with the Layer 2 frame carrying an IP datagram?
Model answer
It removes the Layer 2 frame and extracts the IP datagram.
Explanation
The router then examines the datagram's destination IP address to decide how to handle it.
- 34
What does a router do if an IP datagram is addressed to the router itself?
Model answer
It passes the datagram up its protocol stack for processing.
Explanation
Traffic addressed to the router itself is not forwarded as transit traffic.
- 35
How does a router handle a datagram destined for a directly connected network?
Model answer
It forwards the datagram directly toward the final destination on that network.
Explanation
A connected route identifies a network attached directly to one of the router's interfaces.
- 36
What does a router do when a destination is neither the router itself nor on a connected network?
Model answer
It checks its routing table and forwards the datagram toward the destination using a matching route.
Explanation
The next hop moves the datagram one step closer; the router need not know the complete path.
- 37
What does a connected route indicate in a router's routing table?
Model answer
It indicates that the listed network is directly connected to the router.
Explanation
The router can forward traffic for that network through its connected interface.
- 38
If a router has no specific route for a destination but has a default route, how can it forward the packet?
Model answer
It can use the default route to send the packet to the specified next hop or interface.
Explanation
A default route acts as a route for destinations not matched by more specific routes.
- 39
How is a default route commonly represented in a router's IPv4 routing table?
Model answer
It is represented by the all-zeros route.
Explanation
The all-zeros route serves as the default route when no more specific route matches.
- 40
Which command is used to view the routing table on the Cisco routers discussed in the material?
Model answer
Use
show ip route.Explanation
This command displays the router's IP routing table.
- 41
What does a router do if it needs to forward a packet onto a directly connected network but lacks the destination's MAC address in its ARP cache?
Model answer
It sends an ARP request for the destination host's IP address and uses the reply to learn its MAC address.
Explanation
The router needs the Layer 2 address to deliver the IP datagram on the local link.
- 42
What is the purpose of the IPv4 header?
Model answer
It defines the layout and meaning of bits so that hosts and routers can interpret and process IP datagrams consistently.
Explanation
Devices need a shared format to understand fields such as addresses, length, and fragmentation information.
- 43
What is the minimum and maximum size of an IPv4 header?
Model answer
The header is at least 20 bytes and can be up to 60 bytes.
Explanation
The first 20 bytes are required; optional fields can add up to 40 bytes.
- 44
How does the IPv4 header length field express the header's size?
Model answer
It gives the header length in 4-byte words.
Explanation
A value of 5 represents the minimum 20-byte header.
- 45
What does the IPv4 version field indicate?
Model answer
It identifies which version of the IP protocol is being used.
Explanation
For example, the version field distinguishes IPv4 from IPv6.
- 46
What is the purpose of the IPv4 type-of-service field?
Model answer
It can be used to support quality-of-service handling.
Explanation
The material notes this field but does not focus on its detailed operation.
- 47
What does the IPv4 total-length field measure?
Model answer
It gives the total length of the datagram, including both the header and the data.
Explanation
It is not limited to the payload alone.
- 48
Which IPv4 header fields are used for fragmentation?
Model answer
The identification, flags, and fragment-offset fields are used for fragmentation.
Explanation
Together, these fields help identify related fragments and reassemble their data.
- 49
What does the IPv4 time-to-live field do?
Model answer
It limits how long a packet can continue being forwarded; when its value reaches zero, a router discards the packet.
Explanation
This prevents packets from circulating indefinitely, such as in a routing loop.
- 50
Why is it important for the time-to-live field to stop packets caught in routing loops?
Model answer
Without a limit, packets could circulate indefinitely between routers.
Explanation
The time-to-live mechanism allows routers to discard looping packets instead of letting them persist.
- 51
What does the IPv4 protocol field identify?
Model answer
It identifies the upper-layer protocol that should receive the data, such as TCP, UDP, or ICMP.
Explanation
The receiving IP implementation uses this field to pass the data to the appropriate protocol.
- 52
What is the purpose of the IPv4 header checksum?
Model answer
It provides rudimentary error checking to detect changes or corruption in the IP header.
Explanation
If the header check fails, the packet is discarded.
- 53
What do the source and destination address fields in an IPv4 header represent?
Model answer
The source address identifies who sent the packet, and the destination address identifies where it is going.
Explanation
These fields identify the sending and intended receiving hosts.
- 54
Why are IPv4 options described as optional, and how long can they be?
Model answer
They need not appear in a datagram and can add between 0 and 40 bytes to the required header.
Explanation
The required header is 20 bytes, so optional fields account for the possible increase up to 60 bytes.
- 55
What is the relationship between a link's MTU and IP fragmentation?
Model answer
If a datagram is too large for a link's MTU, it may need to be fragmented to cross that link.
Explanation
The MTU limits how much data a Layer 2 frame can carry on a particular link.
- 56
Why can a datagram that fits on one network link need fragmentation on another?
Model answer
Different Layer 2 networks can have different MTUs, and a later link may have a smaller MTU.
Explanation
A datagram too large for the smaller link cannot pass across it intact.
- 57
How can PPPoE reduce the effective Ethernet MTU, and what value is given in the material?
Model answer
PPPoE adds an 8-byte PPP header, reducing the effective MTU to 1492 bytes.
Explanation
The added header leaves less room for the original packet on the link.
- 58
Why can a VPN cause fragmentation?
Model answer
VPN encapsulation adds headers to the packet, reducing the space available for the original data and potentially making the packet too large for a link.
Explanation
The added encapsulation can include a new IP header and a VPN header.
- 59
What is the purpose of the IPv4 identification field when fragmentation occurs?
Model answer
It lets the destination identify which fragments belong to the same original datagram.
Explanation
All fragments from one datagram carry the same identification value.
- 60
What does the unused flag in the IPv4 fragmentation flags field indicate?
Model answer
It is an unused flag.
Explanation
The other flags described are the don't-fragment and more-fragments flags.
- 61
What does the IPv4 don't-fragment flag request?
Model answer
It indicates that the datagram must not be fragmented.
Explanation
If fragmentation is required but prohibited, the router cannot forward the datagram by fragmenting it.
- 62
What happens when a router needs to fragment a datagram whose don't-fragment flag is set?
Model answer
The router does not fragment it and sends an ICMP error message back to the sending host.
Explanation
The flag prohibits fragmentation, so the router reports that the datagram cannot be forwarded as required.
- 63
What does the more-fragments flag indicate?
Model answer
A value of 1 indicates that more fragments follow; a value of 0 indicates that no more fragments follow.
Explanation
This flag helps distinguish the final fragment from earlier fragments.
- 64
What information does the fragment-offset field provide?
Model answer
It indicates where a fragment's data belongs in the original datagram when reassembling it.
Explanation
The destination uses fragment offsets to place fragment data in the correct position.
- 65
Can a fragment itself be fragmented again?
Model answer
Yes. A packet can be fragmented more than once.
Explanation
A fragment may encounter another link with a smaller MTU later in its path.
- 66
Where are IPv4 fragments reassembled?
Model answer
They are reassembled at the destination host, not by intermediate routers.
Explanation
Routers forward fragments without waiting to collect and reassemble them.
- 67
Why do intermediate routers not reassemble fragments?
Model answer
Fragments might be fragmented again later, and they are not guaranteed to follow the same path, so a router may not receive all of them.
Explanation
The destination is the device most likely to receive all the fragments needed for reassembly.
- 68
What happens to the IP header when a datagram is split into fragments?
Model answer
Each fragment receives its own IP header.
Explanation
The fragments are forwarded as separate datagrams and use matching identification values to show that they belong together.
- 69
Why is a fragment offset of 50 used when a fragment begins at byte 400 of the original data?
Model answer
The offset is expressed in 8-byte units, so byte 400 corresponds to an offset of 50.
Explanation
Dividing 400 by 8 gives the offset value used in the header.
- 70
Why is the IPv4 fragment offset expressed in 8-byte units?
Model answer
The offset field is 13 bits while the total-length field is 16 bits; using 8-byte units lets the offset represent the required positions across possible datagram sizes.
Explanation
The 8-byte unit results from the 3-bit difference between those field lengths.
- 71
What values do the more-fragments flag and offset have in an unfragmented datagram?
Model answer
The more-fragments flag is 0, and the offset is 0.
Explanation
These values indicate that the datagram is not one fragment among several.
- 72
How can the first fragment be identified from its more-fragments flag and offset?
Model answer
The first fragment has the more-fragments flag set to 1 and an offset of 0.
Explanation
It starts at the beginning of the original data and indicates that another fragment follows.
- 73
How can a middle fragment be identified from its more-fragments flag and offset?
Model answer
A middle fragment has the more-fragments flag set to 1 and a nonzero offset.
Explanation
Its nonzero offset places it after the beginning, while the flag indicates that further fragments follow.
- 74
How can the final fragment be identified from its more-fragments flag and offset?
Model answer
The final fragment has the more-fragments flag set to 0 and a nonzero offset.
Explanation
It begins after the original data's start and indicates that no more fragments follow.
- 75
Why is it not enough to know only that a fragment has a nonzero offset when determining its position?
Model answer
The actual offset value is needed to determine the fragment's position and order among the fragments.
Explanation
A nonzero value alone does not say which later portion of the original data the fragment contains.
- 76
What are the end-of-option-list and no-operation options used for?
Model answer
They can be used as padding; the end-of-option-list option also indicates that the options have ended.
Explanation
Padding helps fill space when options do not occupy the required header layout.
- 77
How must IPv4 options be positioned within the header?
Model answer
Options must start at the beginning of the options area rather than at an arbitrary position within it.
Explanation
No-operation padding can be used to space options appropriately.
- 78
What does the record-route option do, and why is it not commonly used to track a complete path?
Model answer
It records routers a packet passes through, but the available 40 bytes may not be enough to record the whole path.
Explanation
The material identifies traceroute as a tool commonly used to discover a packet's route.
- 79
What is source routing?
Model answer
It is an option that specifies routers the packet should pass through.
Explanation
Routers try to honor the path constraints specified in the source-routing option.
- 80
How does loose source routing differ from strict source routing?
Model answer
Loose source routing requires the packet to pass through specified routers but permits other routers too; strict source routing permits only the specified routers.
Explanation
The difference is whether additional, unspecified routers may be used.
- 81
What information can the IPv4 timestamp option record?
Model answer
It can record the time when a packet passes through routers.
Explanation
The option is used to keep track of packet passage through routers.
- 82
Which transport-layer protocol is given as providing reliability, flow control, and sequencing?
Model answer
TCP provides reliability, flow control, and sequencing.
Explanation
These are services that IP itself does not provide.
- 83
What role does ICMP play in relation to IP?
Model answer
ICMP is used to report errors.
Explanation
For example, a router can send an ICMP error when it cannot forward a datagram without prohibited fragmentation.
- 84
How can a network use services that IP does not provide itself?
Model answer
It can use other upper-layer protocols, such as TCP for reliability, flow control, and sequencing, or ICMP for error reporting.
Explanation
IP supplies basic best-effort delivery, while other protocols provide additional services.

Ask anything
We've read this whole study set, so questions about it get the best answers.