Network Layer

studied byStudied by 1 person
5.0(1)
get a hint
hint

what is the purpose of the network layer?

1 / 68

Tags and Description

69 Terms

1

what is the purpose of the network layer?

provides logical communication between hosts (not processes running on host) and doesn’t know the actual process being sent as that is responsible by transport layer

New cards
2

what parts is the network layer made up of ?

  • data plane

  • control plane

New cards
3

what is the data plane?

contains the forwarding function:

multiple per-router functions in network layer that determine how a datagram arriving at one router’s input link is forwarded to the router’s output link

functions include -

  • forwarding packets

  • blocking packets from exiting a router (eg. malicious host or to a forbidden destination host)

  • duplicating packets and sending them over multiple outgoing links

New cards
4

what is the control plane?

contains the routing protocol:

protocols that include network-wide logic that controls how data is routed amongst routes along an end-to-end path (from source to destination host) using routing algorithms

New cards
5

what are the 2 types of networking?

  • traditional - data plane forwarding function and control plane routing protocol are implemented together within a router

  • software-defined networking (SDN) - separates data plane and control plane. data plane in router and control plane in a separate service, eg. remote controller

New cards
6

where do network protocols run?

in hosts and in routers

New cards
7

what happens in the network layer on the sending side?

sending side ⇒ encapsulates segments from transport layer into datagrams (with network header) and sends to router

New cards
8

what happens in the network layer on the receiving side?

receiving side ⇒ receive datagram from nearest router, extract transport layer segment (by unwrapping the network datagram and removing network header) and sends segment to transport layer

New cards
9

what are the 2 key network layer functions?

forwarding

routing

New cards
10

what is forwarding?

forwarding is a router-local action which transfer packet from the router’s input link interface to its output link interface - takes nanoseconds and is implemented in hardware

  • actually moving the packet

  • eg. packet arriving at a nearby router needs to be forwarded to the next router on the path

New cards
11

what is routing?

routing is a network-wide process to determine end-to-end path that a packet takes - takes seconds and is implemented in software

  • network layer defines the route for the packet to take to arrive at the destination host

  • uses routing algorithms to define the best route (shortest, least cost etc.) and sends the forwarding information to the router

New cards
12

how does a router forward a packet?

using forwarding tables - every router has a forwarding table

the routing algorithm determines the content of the router’s forwarding table

  1. the router examines the values of certain fields in the arriving packet header

  2. uses the header values to get an index to use in the forwarding table

  3. value stored at forwarding table[index] indicates the outgoing link interface that the router needs to forward the packet to

<p>using forwarding tables - every router has a forwarding table</p><p>the routing algorithm determines the content of the router’s forwarding table</p><ol><li><p>the router examines the values of certain fields in the arriving packet header</p></li><li><p>uses the header values to get an index to use in the forwarding table</p></li><li><p>value stored at forwarding table[index] indicates the outgoing link interface that the router needs to forward the packet to</p></li></ol>
New cards
13

how are forwarding tables configured in the traditional network approach?

  • the routing algorithm is in every router and runs to find the best route

  • router contains forwarding and routing functions

  • routing algorithm functions in one router communicate with the routing algorithms in another to compute the values for forwarding table

  • the different algorithms in each router communicate by exchanging routing messages with routing information that follow a routing protocol

<ul><li><p>the routing algorithm is in every router and runs to find the best route</p></li><li><p>router contains forwarding and routing functions</p></li><li><p>routing algorithm functions in one router communicate with the routing algorithms in another to compute the values for forwarding table</p></li><li><p>the different algorithms in each router communicate by exchanging routing messages with routing information that follow a routing protocol</p></li></ul>
New cards
14

how are forwarding tables configured in the SND approach?

  • routing algorithm implemented centrally, remotely in a remote controller (eg. implemented as a data centre with high reliability + redundancy, managed by ISP or third party)

  • the remote controller distributes the forwarding table to every router

  • routing device (router) only does forwarding, remote controller computes and distributes the table

  • routers and remote controller communicate by exchanging messages containing the forwarding tables and other routing info

<ul><li><p>routing algorithm implemented centrally, remotely in a remote controller (eg. implemented as a data centre with high reliability + redundancy, managed by ISP or third party)</p></li><li><p>the remote controller distributes the forwarding table to every router</p></li><li><p>routing device (router) only does forwarding, remote controller computes and distributes the table</p></li><li><p>routers and remote controller communicate by exchanging messages containing the forwarding tables and other routing info</p></li></ul>
New cards
15

what is the architecture of a router?

contains 4 components

  1. input ports

  2. switching fabric

  3. output ports

  4. routing processor

<p>contains 4 components</p><ol><li><p>input ports</p></li><li><p>switching fabric</p></li><li><p>output ports</p></li><li><p>routing processor</p></li></ol>
New cards
16

what are input ports?

to receive packets

  • performs physical layer function - terminates incoming physical link at a router

  • performs link layer function - gets packet from link layer and transports it to network layer, interoperate with link layer at other side of incoming link

  • performs the lookup function on the forwarding table to determine the router output port that the packet needs to be forwarded to

  • control packets are forwarded from the input port to the routing processor

  • the number of ports supported by the router can vary

New cards
17

what is the switching fabric?

where switching occurs

  • connects the router’s input ports to its output ports

  • completely contained in router

New cards
18

what are output ports?

to send packets

  • stores packets received from switching fabric

  • transits packets on the outgoing link by performing link layer + physical layer functions

New cards
19

what is the routing processor?

performs control plane functions (routing) and network management functions

  • traditional routers - executes routing protocols, maintains routing tables and attached link state information, computes the forwarding table for that router

  • SDN routers - communicates with the remote controller to receive forwarding table entries computed by the remote controller and installs these entries in the router’s input ports.

New cards
20

what are routing algorithms?

used to find paths that packet needs to travel

New cards
21

what is a path?

path - sequence of routers the packet will traverse through from source to destination

New cards
22

how can we determine a good path?

good path = least cost, fastest, least congested

  • shortest

  • fastest

but the shortest and fastest path might not be the same

New cards
23
<p>this is a graph abstraction of a network</p>

this is a graph abstraction of a network

New cards
24

what are the different routing algorithm classifications?

  • centralised

  • decentralised

  • static

  • dynamic

  • load sensitive

  • load insensitive

New cards
25

what is a centralised routing algorithm?

all routers have the complete network topology (used link state algorithms)

New cards
26

what is a decentralised routing algorithm?

routers only knows the physical connection to the neighbouring routers (uses distance vector algorithms)

New cards
27

what is a static routing algorithm?

routes change slowly over time

New cards
28

what is a dynamic routing algorithm?

can change based on what information we know (eg. traffic updates, topology changes)

New cards
29

what is a load sensitive routing algorithm?

link costs vary dynamically to reflect congestion level in underlying link

New cards
30

what is a load insensitive routing algorithm?

link cost does not reflect the past or current level of congestion

New cards
31

what are the 2 types of protocols in the network layer?

IPv4

IPv6

New cards
32

what IP stack layers do routers run?

network layer

link layer

physical layer

New cards
33

what is the IPv4 datagram format?

  • header length

  • length

  • header checksum

  • options

  • data/ payload

  • source IP

  • destination IP

  • version number

  • type of service

  • identifier

  • flags

  • fragmentation offset

  • time to live

  • upper layer

datagram = segment + network header

5-2-7

<p></p><ul><li><p>header length</p></li><li><p>length</p></li><li><p>header checksum</p></li><li><p>options</p></li><li><p>data/ payload</p></li></ul><p></p><ul><li><p><mark data-color="red">source IP</mark></p></li><li><p><mark data-color="red">destination IP</mark></p></li></ul><p></p><ul><li><p>version number</p></li><li><p><mark data-color="blue">type of service</mark></p></li><li><p><mark data-color="blue">identifier</mark></p></li><li><p><mark data-color="blue">flags</mark></p></li><li><p><mark data-color="blue">fragmentation offset</mark></p></li><li><p><mark data-color="blue">time to live</mark></p></li><li><p><mark data-color="blue">upper layer</mark></p><p></p><p></p></li></ul><p></p><p>datagram = segment + network header</p><p>5-2-7</p>
New cards
34

what is the version number field and what size is it?

for IPv4 or IPv6

4 bits

New cards
35

what is the header length field and what size is it?

same as SEGMENT: header can vary in length because of optional fields, typical header length is 20 bytes

4 bits

New cards
36

what is the type of service field and what size is it?

distinguish between different types of IP datagrams and request services (real time, non-real time/ priority, high throughput)

[8 bits]

New cards
37

what is the datagram length field and what size is it?

header length + data length

[16 bits]

New cards
38

what are the identifier, flags, fragmentation offset fields used for?

contain information used for IP fragmentation and reassembly

New cards
39

what is the time to live field?

ensures datagram doesn’t live forever as there could could be errors, deadlock that causes processing time. each time datagram is processed by router TTL--, when TTL = 0, router drops datagram

New cards
40

what is the upper layer protocol field?

information about what the upper layer is: transport layer, TCP and UDP

New cards
41

what is the header checksum field?

electronic components can cause bit corruption and routers discard datagrams with detected errors. checksum must be recomputed and stored at each router since TTL + other fields can change

New cards
42

what are the source + destination IP address fields?

when a source creates a datagram, it inserts its IP address into the source IP address field and inserts the address of the ultimate destination into the destination IP address field

New cards
43

what is the options field?

optional fields that extends the header length

New cards
44

what is the data (payload) field

transport layer segment (either TCP segment or UDP segment) or other type of data eg. ICMP message

New cards
45

what is the average length of a datagram?

  • 20 bytes of datagram header

  • payload { 20 byes of transport layer header, application layer message }

  • in total- 40 bytes of header and an application layer message of variable length

New cards
46

why is it important to know the length of a datagram?

need to know length of datagram because it needs to be transmitted through a link and the link layer frame can have size restraints

New cards
47

what happens to the IPv4 datagram when it is passed from the network layer to the link layer?

  1. the IP datagram is encapsulated within the link layer frame for transport between one router to another

  2. link layer protocols can differ and use different protocols so all can’t carry the same size of network packets

  3. each link layer frame has a variable: MTU maximum transmission unit which restricts IP datagram size

  4. if datagram size > MTU ⇒ fragmentation occurs

New cards
48

what is fragmentation?

breaking down payload into smaller IP datagrams called where each datagram has its own header, broken down based on the MTU

New cards
49

what are the steps of fragmentation?

  1. each datagram has an identification number assigned by the host

  2. each fragment of a datagram has the same source address, destination address and identification number as the original datagram

  3. when the destination receives the fragments, it can look at the identification number to show which fragments are part of the same datagram

  4. IP is unreliable and thus not guaranteed that the fragments will be sent in the same order or correctly

New cards
50

what fields are used for datagram reassembly?

flag

offset

New cards
51

how is the flag field used?

each fragment will have a flag bit - destination hosts needs to ensure that all fragments that make up a full datagram have been received

  • all fragments have flag bit = 1

  • the last fragment has flag bit = 0

New cards
52

how is the offset field used?

each fragment has an offset variable - offset specifies where there fragment fits in the original datagram so that the destination host can reassemble in the correct order + determine any missing fragments

  • starts at 0 and is split into 8 byte blocks

New cards
53
<p>this is an example of reassembly</p>

this is an example of reassembly

New cards
54

what is IPv4 addressing and why is it needed?

  • host has normally 1 link to the network

  • router has 2 or more links to the network

every host/ router can send/ receive IP datagrams so each interface needs to have an IP address

New cards
55

what is an interface?

interface = the boundary between both the host/router and any one of their links

New cards
56

how are IP addresses related to an interface?

IP address related to the host/ router interface rather than the actual host/ router

New cards
57

how are IP addresses formatted?

32 bits long

dotted decimal notation - each byte of the address is written in decimal form separated with a dot

cannot be chosen randomly

New cards
58

what sections make up this IP address? 223.1.1.0/24

  • subnet.subnet.subnet.host/subnetmask

  • part of the IP address shows what subnet it is connected to

New cards
59

what is a subnet?

small section of a network, formed by a network interconnecting many host interfaces and one router interface

New cards
60

what is a subnet address?

IP addressing assigns an address to a subnet

New cards
61

what is a subnet mask?

/XX indicated that the leftmost XX bits of the total 32 bits define the subnet address

eg. /24 is the submnet mask - 24 left-most bits belong to the network

there are different network classes based on what subnet mask are used

New cards
62

what are the different network classes?

Class A subnet mask /8 - Class B subnet mask /16 and Class C subnet mask /24

New cards
63

what is the difference between an /8 subnet and an /24 subnet?

/8 subnet vs. /24 subnet - 8 bits used, so the rest of the bits can be used to specify the hosts - so more IP addresses available, a bigger network that a /24 subnet

New cards
64

this is an example of how IP addresses make up a subnet

subnet.X.X.0 - the .0 means that you want to access all the interfaces on that subnet (network)

<p>subnet.X.X.0 - the .0 means that you want to access all the interfaces on that subnet (network)</p>
New cards
65

what is the internet’s address assignment strategy?

Classless Interdomain Routing CIDR [RFC 4632]

New cards
66

what is CIDR?

ip addressing format - 32 bits etc.

using /xx for the subnet mask

range of IP addresses with common prefixes

<p>ip addressing format - 32 bits etc.</p><p>using /xx for the subnet mask</p><p>range of IP addresses with common prefixes</p>
New cards
67

what is IPv6?

a new type of IP addressing with extended addressing capabilities needed as 32 bit IPv4 address space is being used up

New cards
68

what is the difference between IPv6 addresses and IPv4?

expanded addressing capabilities

  • 128 bits long - ensures we won’t run out of ip addresses,

  • unicast, multicast and new types of addresses (anycast address) that allows datagram to be delivered to an one of a group of hosts

fixed 40 byte header

  • the header has no optional fields that are in IPv4

  • faster processing of datagram by router

New cards
69

what is the format of an IPv6 datagram?

knowt flashcard image
New cards

Explore top notes

note Note
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 33 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 14 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 14 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 71 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 12565 people
Updated ... ago
4.7 Stars(41)

Explore top flashcards

flashcards Flashcard47 terms
studied byStudied by 22 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard129 terms
studied byStudied by 39 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard73 terms
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard85 terms
studied byStudied by 78 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard43 terms
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard36 terms
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard67 terms
studied byStudied by 5 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard81 terms
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)