Networking chapter 4

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/136

flashcard set

Earn XP

Description and Tags

The network layer

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

137 Terms

1
New cards

network layer

  • Responsible for carrying a packet from one computer to another

  • Responsible for host-to-host delivery

  • Between Transport(gives services to) and Data Link (receives services from) layers

2
New cards

internetworking

  • Refers to the logical gluing of heterogeneous physical networks together to look like a single network to the upper transport and application layers

  • Source and destinations are usually referred to as hosts

  • A host/router is referred to as a hop

3
New cards
4
New cards

network layer at source

  • Receives data from the transport layer

  • Adds the universal addresses of sender and receiver

  • Makes sure the packet is of correct size for passage through the next link, fragments if necessary

5
New cards

network layer at router or switch

  • Responsible for routing the packet using a routing table

  • The packet may go through another fragmentation if need be

6
New cards

network layer at destination

  • Address verification, error detection, reassembling fragments

  • Delivering packet to the transport

7
New cards

addressing

Used to uniquely and universally identify each device on the internet to allow global communication between all device

8
New cards

multiple addresses

Each address belongs to a single host but a single host can have _________ _______ if it has multiple connections to the internet

9
New cards

internet/IP address

  • The identifier used in the network layer of the internet model is called

  • Is a 32-bit binary address (in IPv4)

  • Unique and universal (one host can have multiple IP addresses)

10
New cards

wastage

With IP addressing being 32-bits there are 2^32 possible hosts, assumed to be too many initially but now not sufficient due to a number of reasons, mainly ______

11
New cards

classful addressing

  • Address spacing is divided into 5 classes A-E

  • First few bits indicate the class of an address in binary/dotted-decimal notation

12
New cards

classes A-C

  • These classes are used for unicast communication

  • Hosts need to have at least one unicast address to be able to send and receive

13
New cards

class D

  • This class is used for multicast communication (only as a destination)

  • If a host belongs to a group/groups, It can have 1+ multicast addresses

14
New cards

class E

  • Is a reserved class

  • The idea behind this class was to use them for special purposes

15
New cards

netid and hostid

Address in classes A, B, and C are divided into _____(network) and _____(host) of varying length from class to class

16
New cards

problem with classful addressing

Each class is divided into a fixed number of block with each block having a fixed size

17
New cards

common IP address notations

  • Binary notation

  • Dotted-decimal notation

18
New cards

binary IP address notation

One or more spaces inserted between each octet

19
New cards

dotted-decimal IP address notation notation

  • More compact

  • Easier to read for humans

20
New cards

packetizing

  • Encapsulating packets received from upper-layer protocols and makes new packets out of them

  • Done by the IP protocol in the Internet model

21
New cards

fragmenting

  • Each router decapsulates the IP datagram from the received frame, processes it, and then encapsulates it in another frame

22
New cards

criteria for format and size for fragmenting

  • Received frame: Depends on the protocol used by the physical network from which the frame has just arrived

  • Departing frame: Depends on the protocol used by the physical network to which the frame is going

23
New cards

address resolution

Maps an IP address to a MAC address

24
New cards

network layer protocols

  • IP

  • ARP

  • RARP (DHCP)

  • ICMP

  • IGMP

25
New cards

IP protocol

  • Main protocol

  • Glue that holds the internet together

  • Responsible for host-to-host delivery

  • Needs the services of other protocols

26
New cards

reverse address resolution protocol

  • Maps a MAC address to an IP address

  • Gets used in situations like when a diskless host is booted

  • Gets binary image of its OS from a remote file server but doesn’t know its IP address

  • Obsolete (replaced by DHCP - Dynamic Host Configuration Protocol)

27
New cards

internet control message protocol

Handles unusual situations such as the occurrence of an error

28
New cards

internet group management protocol

  • Built for multicasting

  • Used by IP because IP is designed for unicast delivery

29
New cards

IPv4

  • Designed with internetworking in mind

  • Unreliable and connectionless datagram protocol

  • Only detects errors and discards corrupted packets

  • Paired with TCP for more reliability

30
New cards

IP datagram

  • Consists of a 20-byte header and a text part (optional part with variable length)

31
New cards

big endian order

  • IP datagrams are transmitted in this order

  • From left to right, with the high-order bit of the version field going first

  • SPARC is an example of this order

32
New cards

little endian

  • Software conversion is required on machines using this order

  • Pentium is an example of this order

33
New cards

version

  • 4 bits

  • Keeps track of which version of the protocol the datagram belongs (for future transitions between new old versions)

34
New cards

IHL

  • Length of the header in 32-bit words

  • Minimum value is 5 when no options are present

  • Maximum is 15, which limits the header to 60 bytes (optional field to 40 bytes)

35
New cards

type of service

  • 8 bits

  • Designed to distinguish between different classes of service - for various combination of reliability and speed

  • Mostly ignored by current routers

36
New cards

total length

  • 16 bits

  • Describes size of everything in the data gram (header and data)

37
New cards

identification

  • 16 bits

  • Used by the destination host to determine which datagram a newly arrived fragment belongs to

38
New cards

DF

  • 1 bit

  • The destination is incapable of putting the pieces back together

  • All machines are required to accept fragments of 576 bytes or less

39
New cards

MF

  • 1 bit

  • All fragments except the last one have this bit set to know when all fragments of a datagram have arrived

40
New cards

fragment offset

  • 13 bits

  • Tells where in the current datagram this fragment belongs

  • All fragments except the last one must be a multiple of 8 bytes

  • A maximum of 8192(2^13) fragments per datagram allowed

  • Gives a maximum datagram length of 8×8192 bytes (2^16)

41
New cards

time to live

  • A counter used to limit packet lifetimes (max 255 seconds)

  • In practice, counts the number of hops

  • Set by source host

  • Approximately 2 times the max hops between any two hosts

  • Decremented on each hop

  • Decremented multiple times when queued for a long time in a router

  • When 0, is discarded and a warning packet is sent to the source host

42
New cards

protocol

  • 8 bits

  • Identifies which transport process to give it to (TCP, UDP, ..)

43
New cards

header checksum

  • 16 bits

  • Verifies header only

  • Sum of all fields is assumed to be zero upon arrival

  • Recomputed at each hop because at least one field always changes (Time to live)

44
New cards

options

  • Allow subsequent versions of the protocol to include information not present in the original design

  • Permit experimenters to try out new ideas

  • Avoid allocating header bits to information that is rarely needed

45
New cards

types of options

  • Security

  • Strict source routing

  • Loose source routing

  • Record route

  • Timestamp

46
New cards

security of options

  • For a router to specify not to route through certain countries

  • Ignored by all routers in practice

47
New cards

strict source routing of options

  • Gives the complete path from source to destination as a sequence of IP addresses

  • Useful for system managers to send emergency packets when routing tables are corrupted/making timing measurements

48
New cards

loose source rooting of options

  • Requires the packet to traverse the list of routers specified and order specified

  • May pass through other routers on the way

  • Most useful for when political/economic considerations dictate passing through/avoiding countries

49
New cards

record route of options

  • Tells the routers along the path to append their IP address to the option field

  • For system managers to track down bugs in routing algorithms

50
New cards

timestamp of optional header of IPv4

  • 32-bit

  • Used for debugging routing algorithms

51
New cards

class a

  • Divided into 128 blocks with unique NetIds

  • Block 1 from 0.0.0.0 to 0.255.255.255 - NetId 0

  • Block 2 from 1.0.0.0 to 1.255.255.255 - NetId 0

  • Last block from 127.0.0.0 to 127.255.255.255 - NetId 126

  • These classes addresses were designed for large organizations (up to 16 million hosts (2^24)

52
New cards

network address

Given that an organization is granted a block from class A with a given netid “x”, the first address (x.0.0.0) is called the ________ _________ and is used to identify the organization

53
New cards

126

Total number of organization that can be assigned class A addresses

54
New cards

wastage of granting an organization a block of a class

the number of addresses in each block (16,777,214= 2^24-2) are larger than the needs of almost all organizations

55
New cards

class b

  • Divided into 2^14 blocks

  • Each block has a different NetId (second portion of the IP address)

  • 16 blocks are reserved for private addresses (total number of organization that can be assigned this classes addresses is 16384 - 16

  • Designed for midsize organizations

  • Many addresses are wasted as there are more than the need of midsize organizations

56
New cards

class c

  • Divided into 2^21 blocks with each block having different NetId

  • Third portion of IP address

  • 256 blocks used for private addresses(total number of organizations that can be assigned in this class is 2,097,152 -256)

  • Designed for small organizations

  • Limited blocks in this class - most organizations do not want a block in this class

57
New cards

class d

Only one block in this class designed for multicasting

58
New cards

class e

One block in this class designed for use as reserve addresses for research by the Internet Engineering Task Force to develop internet standards

59
New cards

network address

  • An address that defines the network itself

  • Cannot be assigned to a host

60
New cards

properties of network address

  • All hostid bytes are 0s; (different from a netid although this address has netid)

  • Defines the network to the rest of the Internet; routing to a host is based on this address

  • In classful addressing, the network address is the one that is assigned to the organization

61
New cards

internet corporation for assigned names and numbers

  • Manages network addresses to avoid conflicts

  • Nonprofit

  • Delegates parts of the address space to various regional authorities which in turn allocate IP addresses to ISPs and other companies

62
New cards

special IP addreses

  • An IP address with all 0s (hostid and/or netid) - means this is a host/network

  • An IP address with all 1s (netid and/or hostid) - means all the hosts on the indicated network for broadcasting

63
New cards

hierarchy of IP addreses

  • Site level

  • Host level

64
New cards

same netid

All the hosts in a network must have the ____ ___ which does not allow dividing a network into logical groups

65
New cards

subnetwork

  • Solution to allow for subdivision of networks into logical groups (internal split, but still act as a single network to the outside world)

  • Routing of a datagram now involves three steps: Delivery to the site, delivery to the ________, and delivery to the host

66
New cards

subnetid

With the existence of subnets, IP hostid is divided into _______ and hostid which can be changed later if required by ICANN

67
New cards

mask

32 bit number used for a router to find a network/subnet address

68
New cards

default mask

  • Used by routers outside of the organization

  • Gives the network address when AND’ed with an address in the block

    • The number of 1s is the same as the number of bits in the netID (8 for A, 16 for B, and 24 for C); the rest are all 0

69
New cards

subnet mask

  • Routers inside the organization use this type of mask

  • To make this type of mask, change some of the leftmost 0s in the default mask to 1s

70
New cards

2^n

The number of subnets is determined by the number of 1s

71
New cards

classless addressing

  • Announced in 1996

  • An idea of variable-length blocks that belong to no class was introduced to allocate remaining IP addresses

  • The number of addresses in a block must be a power of 2

  • The whole address space (2^32 addresses) is divided into blocks of different sizes

  • The beginning address must be evenly divisible by the number of addresses; if a site needs, say, 2000 addresses it is given a block of 2048 addresses on a 2048 address boundary

  • We can still use subnetting if there is a need

  • An organization is given the beginning address of the block and a mask (in slash notation)

72
New cards

classless interdomain routing

  • New method of forwarding packets for classless addresses

  • There is now a single routing table for all networks consisting of an array of (IP address, subnet mask, outgoing line) triples

  • When a packet comes in, its destination IP address is first extracted; the routing table is then scanned entry by entry, masking the destination address and comparing it to the table entry looking for a match

  • It is possible that multiple entries (with different subnet mask lengths) match, in which case the longest mask is used

73
New cards

IPv5

  • Was an experimental real-time stream protocol that was never widely used

  • Was designed to coexist with IPv4, not a replacement

74
New cards

major goals of IPv6

  • Larger address space

  • Inefficient address space

  • Better header format

  • Better security

  • Support for resource allocation

  • Allowance for extension

  • Coexistence

75
New cards

IPv6 header

  • 8 fields (40 bytes)

    • Version (4 bits)

    • Traffic class (4 bits)

    • Flow label (24 bits)

    • Payload length (16 bits)

    • Next header (8 bits)

    • Hop limit (8 bits)

    • Source Address (16 bytes)

    • Destination Address (16 bytes)

76
New cards

IPv6 address notation

  • Hexadecimal colon notation (8 groups - 2 bytes each of four hexadecimal digits)

    • Many addresses will have many zeroe

77
New cards

IPv6 address notation abbreviation

  • Leading zeros in a group can be omitted

  • One or more groups of groups of 16 zero bits can be replaced by a pair of colons (allowed once per address)

  • IPv4 can be written as a pair of colons and an old dotted decimal number

78
New cards

categories of addresses in IPv6

  • Unicast

  • Multicast

  • Anycast

79
New cards

anycast category

  • Defines a group of computers with addresses that have the same prefix

  • Such a packet must be delivered to exactly one of the members of the group

  • The closest or the most easily accessible

80
New cards

transition from IPv4 to IPv6

  • Cannot happen suddenly, smooth transition is required

  • Three strategies designed

    • Dual stack

    • Tunneling

    • Header translation

81
New cards

mapping

  • Delivery of a packet of host or router requires two levels of addressing (IP and MAC)

  • Two types exist: static and dynamic

82
New cards

static mapping

  • Create a table that associates an IP address with a MAC address, stored in each machine on a network

  • Network performance is degraded to update the table periodically

    • A machine could change its network card

    • In some LANs such as LocalTalk of apple, the MAC address changes every time the computer is turned on

    • A mobile computer can move from one physical network to another

83
New cards

dynamic mapping

  • Each time a machine knows one of the two addresses, it can use a protocol to find the other one

  • Two protocols

    • ARP (maps an IP address to a MAC address)

    • RARP (maps a MAC address to an IP address; obsolete, replaced by DHCP- Dynamic Host Configuration Protocol)

84
New cards

address resolution protocol

  • A host or a router looking for a MAC address broadcasts an ARP query packet

    • Includes the MAC (physical) and IP addresses of the sender and the IP address of the receiver

  • Only the intended recipient sends back an ARP response packet (it contains the recipient’s IP and physical addresses)

  • Is unicast

85
New cards

dynamic host configuration protocol

  • A client-server program for assigning network addresses IP addresses, default routers)

  • Is an extension of BOOTP (that replaced RARP) that maps IP addresses to Ethernet addresses - it requires manual configuration of the table by an administrator when a new host is added - static

  • In contrast with BOOTP, it allows both manual and automatic IP address assignment

86
New cards

DHCP databases

  • One that statically binds physical addresses to IP addresses

  • The second holds a list of unassigned IP addresses that makes DHCP dynamic

87
New cards

How computers contact the DHCP server

  • The server checks its static database; if there is an entry that permanent address is returned

  • Otherwise it dynamically assigns an IP address for a fixed period of time

    • This allows sharing of address space - results in more efficient use of address space

88
New cards

DHCP relay agent

Needed on each LAN since the DHCP server may not be reachable by broadcasting

89
New cards

necessity of ICMP

  • IP has no error reporting and error correcting mechanisms; if something goes wrong

  • It lacks a mechanism for host and management queries (is a router or a host alive?

90
New cards

internet control message protocol

Is a companion to the IP designed to compensate for lack of error reporting and host/management query mechanisms

91
New cards

types of ICMP messages

  • Error-reporting

  • Query messages

92
New cards

error reporting messages

Always reports error messages to the original source (the only information included in the datagram is the source and destination addresses)

93
New cards

types of error reporting

  • Destination unreachable

  • Source quench

  • Time exceeded

  • Parameter problem

  • Redirection

94
New cards

destination unreachable

Type of error reporting message received when a router cannot locate the destination or when a packet with the DF bit cannot be delivered because a ‘‘small-packet’’ network stands in the way; the datagram is discarded

95
New cards

source quench

  • Type of error-reporting message

  • To slow down a source since IP is connectionless and lacks flow control and congestion control

  • Rarely used because when congestion occurs, these packets tend to aggravate it

    • Congestion control in the Internet is handled in the transport layer

96
New cards

time exceeded

Type of error-reporting message sent when a packet is dropped because its counter (Time to live) has reached zero (a symptom that packets are looping) or when all fragments that make up a message do not arrive at the destination host within a certain time limit

97
New cards

parameter problem

Type of error-reporting message that indicates that an illegal value has been detected in a header field

98
New cards

redirection

type of error-reporting message sent when a router notices that a packet seems to be routed wrong

99
New cards

routing protocol

A combination of rules and procedures that lets routers in the internet inform one another of changes (to share whatever they know about the internet or their neighborhood)

100
New cards

routing algorithm

  • The heart of a routing protocol

  • Determines the path for a packet

  • Constructs routing tables (mandatory for routing)