Week 1 Network layer Flashcards

1
Q

What is the difference between a network node and network interface

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

IF IT ASKS IF TWO DEVICES ARE ON THE SAME SUBNET IT MEANS?

A

THEY HAVE THE SAME NETWORK ADDRESS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of the Time To Live (TTL) field in an IP packet?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the two main types of ICMP error reporting messages?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two main types of ICMP query messages?

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

If ICMP supports error reporting and queries, why does the IP protocol still say it has no mechanism to query the network?

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what does topology mean

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

difference between host and router

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

functionality of network layer

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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.

A

ksoapodksa

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Topology of data flow in networks

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

IPV 4 address structure (IPV 4 total 32 bits)

A

Network address - n bits
host address - 32 - n bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How to get subnet mask

A

set prefix( network part bits to 1 ) and suffix (host part ) to be 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

2 reserved addresses:
* Network address (suffix set to 0s)
* Broadcast address (suffix set to 1s)

A

Number addresses on network is: 2^(32-n)

However no of host addresses is

2^(32-n) - 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

private addresses range

A

10.0. 0.0/8 IP addresses: 10.0. 0.0 – 10.255. 255.255.

172.16. 0.0/12 IP addresses: 172.16. 0.0 – 172.31. 255.255.

192.168. 0.0/16 IP addresses: 192.168. 0.0 – 192.168. 255.255.

if you see 10 , 172 , 192 likely to be a private address

17
Q

How do IP messages work

A

An IP Message, or datagram or packet, consists of:
— header
— data contents
* Data is provided by the transport layer (TCP) or
other protocols such as ICMP
* The full IP Message (Header + Data) becomes
payload for the layer below

18
Q

Good info to know : Long winded chat gpt explanation for headers

A

At the network layer, the header includes the source and destination IP addresses. This layer is responsible for determining the best path through the network to send packets from the source to the destination across different networks. The inclusion of source and destination IP addresses in the network layer header is crucial for:
1. Routing: Routers use the destination IP address in the header to decide the best path for forwarding the packet toward its final destination.
2. Addressing: The source IP address allows the recipient to know where the packet originated and enables responses or acknowledgments to be sent back to the sender.
3. Network Scalability: By using IP addresses, the network layer allows communication between devices on different networks, making the internet and large-scale networks possible.

19
Q

routing between administrative domains
( 2 independent entities each with own network sending and receiving data to one another)

A

Needs to address political constraints:
.Commercial traffic not allowed over
educational network
* Traffic from country X to avoid country Y
network
* Provider P1 preferred over Provider P2
* BGP (Border Gateway Protocol)

1) networks, like in schools may restrict the type of traffic they can carry. eg : they might prohibit commercial traffic to ensure that the network is used primarily for academic and research purposes.

2) Due to political tensions, regulations, or security concerns, there may be a requirement to avoid routing traffic through certain countries’ networks. (BGP can be used to exclude paths)

3) can easily figure out

20
Q

ICMP helps determine if a host or route is alive

what are the two types of ICMP Messages?

A
  • Error reporting
  • Query
21
Q

Error reporting messages report error situation to the original source

Two types of error reporting messages

A

Destination unreachable: generated by
a router to inform the source host that the
destination address is unreachable

  • Time exceeded: generated by a router
    when the TTL field in the IP header is equal
    or less than 1
22
Q

Query messages

A

Echo-request and echo-reply: to
determine whether two systems can
communicate with each other

  • Timestamp-request and timestampreply: to determine the round-trip time
    needed for an IP datagram to travel from one
    host to another

round trip time - time for echo request to reach targer + time for echo response to reach the source

23
Q

How would you describe the following IP address; 127.0.0.7?

Multiple choice 1 Question 1
privateIncorrect
loopback device
broadcast

A

The IP address 127.0.0.7 falls within the 127.0.0.0/8 range, which is reserved for loopback addresses. Loopback addresses are used for a device to send network traffic to itself for testing and other purposes.

24
Q

local host ?

A

single machine ( node/device) itself

25
Q
A