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).
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
private addresses range
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
How do IP messages work
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
Good info to know : Long winded chat gpt explanation for headers
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.
routing between administrative domains
( 2 independent entities each with own network sending and receiving data to one another)
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
ICMP helps determine if a host or route is alive
what are the two types of ICMP Messages?
- Error reporting
- Query