Week 1 Network layer Flashcards
What is the difference between a network node and network interface
Network Node: This refers to any device in a network that can send, receive, or forward information. Common examples include computers, routers, switches, and printers.
This is a component within a network node that enables it to connect to the network. Examples include Ethernet interfaces, Wi-Fi adapters, and network interface cards (NICs).
IF IT ASKS IF TWO DEVICES ARE ON THE SAME SUBNET IT MEANS?
THEY HAVE THE SAME NETWORK ADDRESS
What is the purpose of the Time To Live (TTL) field in an IP packet?
Purpose: Prevents packets from being forwarded endlessly in a loop.
Mechanism:
Initial TTL value: Set when the packet is created (e.g., 64 or 128).
Decrement by 1: Each time the packet is forwarded by a router, the TTL is decreased by 1.
When TTL = 0: The router discards the packet and sends an ICMP Time Exceeded message back to the sender.
What are the two main types of ICMP error reporting messages?
1) Destination Unreachable:
Generated by a router to inform the source host that the destination address is unreachable.
2) Time Exceeded:
Generated by a router when the TTL (Time to Live) field in the IP header reaches 0 or less than 1, indicating the packet was discarded due to timeout.
What are the two main types of ICMP query messages?
1) Echo Request and Echo Reply:
Used to determine if two systems can communicate with each other (used in ping for connectivity testing).
2) Timestamp Request and Timestamp Reply:
Used to determine the round-trip time needed for an IP datagram to travel from one host to another (helps with time synchronization).
If ICMP supports error reporting and queries, why does the IP protocol still say it has no mechanism to query the network?
IP Protocol:
The IP protocol itself does not have built-in mechanisms to ask if a host is reachable or report errors—it only forwards packets.
IP is a connectionless, best-effort protocol, meaning it does not track or verify packet delivery.
ICMP (Internet Control Message Protocol):
ICMP is a separate protocol used alongside IP to handle:
Error Reporting: Reports issues (e.g., “Destination Unreachable”, “Time Exceeded”).
Query Messages: Helps diagnose network issues (e.g., “ping” to check if a host is alive).
what does topology mean
How nodes are arranged in a network
physical topology- actual placement of devices (eg laptop on ground floor , another laptop on 1st floor…)
logical topology- how data flows in the network
difference between host and router
Host: A host is a device connected to a network that can send and receive data. Examples include computers, smartphones, and printers. Each host has a unique IP address within the network.
Router: A router connects multiple networks and manages traffic flow between them. For instance, it connects devices in a local area network (LAN) using private IP addresses to the internet, often through a single shared public IP address. Routers determine the best path for data packets and direct them accordingly.
functionality of network layer
Route datagrams between two network interfaces
* Fragment datagrams according to physical layer characteristics
Fragmentation - physical layer has MTU which determines the maximum size a datagram can be
if your datagram is larger than the mtu, datagram is fragmented into smaller fragments each with a size less than the MTU
at the destination(given by destination address in the header) fragments are reassembled in order (determined by fragmetation offset)
Fragments reassembled at destination as the fragments can take multiple routes so reassembly only occurs at destination when all fragments received
If a fragment is missing / corrupt reassembly wont occur
An IPv4 address can be either a public or a private address. A public IPv4 address uniquely identifies a device’s connection to the internet and allows it to be accessed globally, whereas a private IPv4 address is used for communication within a local network and cannot be accessed directly from the internet.
ksoapodksa
Topology of data flow in networks
Incomplete Graph: Indicates that not all nodes in the network are interconnected; some devices may only connect through specific routes or nodes.
Directed Graph: Indicates that the connections between nodes have a specified direction, meaning communication can occur in one way but not necessarily back the other way.
IPV 4 address structure (IPV 4 total 32 bits)
Network address - n bits
host address - 32 - n bits
How to get subnet mask
set prefix( network part bits to 1 ) and suffix (host part ) to be 1
2 reserved addresses:
* Network address (suffix set to 0s)
* Broadcast address (suffix set to 1s)
Number addresses on network is: 2^(32-n)
However no of host addresses is
2^(32-n) - 2
Destination: 10.197.0.0
Gateway: 10.90.0.13
Genmask: 255.255.0.0 (or /16)
ifc75
Destination: 10.112.0.0
Gateway: 10.90.0.20
Genmask: 255.255.0.0 (or /16)
ifc33
Hint Remember what masking does( no matter what the network part bits turned to one and suffix always turned to 0)
Which interface should a datagram for 10.112.15.20 be routed through?Multiple choice 5 Question 3
ifc33
ifc75
None of the above
Gateway: 10.90.0.13
Genmask: 255.255.0.0 (or /16)
This means that any IP address that falls within the range 10.197.0.0 to 10.197.255.255 will use this route.
This means that any IP address that falls within the range 10.112.0.0 to 10.112.255.255 will use this route.
Therefore you have to use ifc33