Network Layer Routing & Transport Layer Flashcards
goal of the network layer
deliver a datagram from its source to its
destination
the way a packet is delivered to the next station
Forwarding
process of selecting a path for traffic in a network or across multiple
networks
Routing
if a datagram is destined for only one destination
Unicast Routing
if a datagram is destined for several destinations
Multicast Routing
A packet is routed, hop by hop, from its source to its destination by the help of
forwarding tables
The source router chooses a route to the destination router in such a way that the total cost for the route is the least cost among all possible routes
Least Cost Routing
Routing Algorithms
Distance-Vector Routing
Link-State Routing
Path-Vector Routing
Each node maintains a vector (table) of minimum distances to every node
Distance-Vector Routing
This method uses the term link-state to define the characteristic of a link (edge) that
represents a network in the internet
Link-State Routing
The collection of states for all links is called the
link-state database (LSDB)
To create a least-cost tree, each node needs a complete map of the network (using
Dijkstra’s Algorithm)
The best path is determined by the source using the policy it imposes on the route, i.e.
the source controls the path
Path-Vector Routing
In Path-Vector Routing, the path is also determined by the
best spanning tree.
responsible for the delivery of a message from one process
to another
transport layer
An application program on the local host,
client,
an application program on the remote host (provides services)
server
16-bit integers between 0 and 65,535
Port Number
Client program defines itself with a port number chosen randomly by the transport layer software running in the client host
(ephemeral port number),
Servers use universal port numbers
(well-known port number)
Well-known ports ranging from
0 to 1023
Well-known ports are assigned and controlled
by the (ICANN)
Internet Corporation for Assigned Names and Numbers
Registered ports – ports ranging from:
They can only be registered to prevent duplication. (not assigned by ICANN)
1024 to 49,151
ports ranging from 49,152 to 65,535 and are neither controlled nor registered. They can be used by any process
Dynamic (or private) ports
In UNIX, the well-known ports are stored in a file called
/etc/services
IP address + port number
Socket address
Connectionless, unreliable transport protocol
User Datagram Protocol (UDP)
Does not add anything to IP except provide process-to-process
communication
User Datagram Protocol (UDP)
Simple protocol using minimum overhead
User Datagram Protocol (UDP)
UDP Datagram (composed of?)
header - 8 bytes
Source port number - 16 bits
Dest port number - 16 bits
Length - 16 bits (total length, header + data)
Checksum -16 bits
used to detect errors over the entire user datagram
Checksum
In a UDP header, source port number is the
1st 4 hexadecimal digits
In a UDP header, dest port number is the
2nd 4 hexadecimal digits
In a UDP header, total length is the
3rd 4 hexadecimal digits
In a UDP header, how to get the length of data?
Length of whole packet - length of header (8 bits)
If destination port number is a well-known port, the packet is from the…
client to a server
port 7
echo
port 9
discard
port 11
users
port 13
daytime
Suitable for a process that requires simple request-response communication
UDP
Connection-oriented, reliable transport protocol
Transmission Control Protocol (TCP)
allows the sending process to deliver data as a stream of bytes
and allows the receiving process to obtain data as stream of bytes
Transmission Control Protocol (TCP)
RFC 768
User Datagram Protocol (UDP)
RFC 793
Transmission Control Protocol (TCP)
TCP numbers all data bytes that are transmitted in a
connection.
Byte number
TCP assigns a ________ to each segment that is being sent.
sequence number
When a connection is established, both parties can send and receive data
at the same time. Each party uses an __________ to
confirm the bytes it has received
acknowledgment number
receiver of data controls the amount of data that are to be sent
by the sender
Flow control
to provide reliable service, TCP implements an error control
mechanism
Error control
amount of data sent by the sender is not only controlled by the receiver, but is also determined by the level of congestion in the
network
Congestion control
32-bit field that defines the number assigned to the first byte of data contained in the segment.
Sequence number
During connection establishment,
each party uses a random number generator to create an…
initial sequence
number (ISN)
32-bit field that defines the byte number that the receiver of the segment is expecting to receive from the other party
Acknowledgment number
4-bit field indicates the number of the 4-byte word in the TCP header
Header length
6-bit field for future use
Reserved
6 different control bits or flags
Control
16-bit field that defines the size of the window, in bytes, that
the other party must maintain. Normally referred to as the receiving window
Window size
Inclusion of the checksum in TCP is mandatory while it is optional in UDP
Checksum
16-bit field that defines the number that must be added to the sequence number to obtain the number of the last urgent byte in the data
section of the segment
Urgent pointer
establishes a virtual path between the source and destination
TCP
TCP requires 3 phases:
Connection establishment
Data transfer
Connection termination
Process starts with the server where it tells its TCP that it is ready to start a
connection
passive open
A client that wishes to connect to an open server tells it TCP that it needs to
be connected to that particular server
(active open)
both process issue an
active open. Both TCP transmit a SYN + ACK segment to each other, and one
single connection is established between them
(simultaneous open)
The sending TCP must not wait for the window to be filled, it
must create a segment and send it immediately
Pushing Data
Malicious attacker sends a large number of SYN segments to a server,
pretending that each of them is coming from different clients by faking the
source IP address in the datagrams
SYN flooding attack
the sending application program wants a piece of data to be
read out of order by the receiving application program
Urgent Data
segment cannot carry data, but it does consume one sequence number
SYN+ACK
segment, if carrying no data, consumes no sequence number
ACK
segment consumes one sequence number if it does not carry data
FIN
New reliable, message-oriented transport layer protocol
It has also congestion control and flow control mechanisms
Stream Control Transmission Protocol
Preserves the message boundaries and at the same time detects lost data,
duplicate data and out-of-order data
Stream Control Transmission Protocol
RFC 4960
Stream Control Transmission Protocol
SCTP Services: (2)
Multiple Streams
Multihoming
In TCP, each connection between client and server involves a single
stream, a loss at any point in the stream blocks the delivery of the rest of
the data
Multiple Streams
A TCP connection involves 1 source and 1 destination IP address, even if the sender
or receiver is multihomed (connected to more than 1 physical address with multiple IP
address), only one of these IP addresses per end can be used
Multihoming
unit of data in SCTP is a data chunk.
Data transfer is controlled by numbering the data chunk using TSN
Transmission Sequence Number (TSN):
each stream in SCTP needs to be identified
Stream Identifier (SI)
SCTP defines each data chunk in each
stream. When a data chunk arrives at the destination, it is delivered to the
appropriate stream and in the proper order
Stream Sequence Number (SSN)
data are carried as data chunks, control information is carried as
control chunks. Several control chunks and data chunks can be packed together
in a packet
Packets
number that matches a packet to an association. It serves as
an identifier for the association and is repeated in every packet during the
association
Verification tag
32-bit field contains a CRC-32 checksum
Checksum