0% found this document useful (0 votes)
74 views69 pages

1234 Merged

The document is a chapter from a textbook on basic computer networks. It discusses network components including hosts, servers, clients, peer-to-peer networks, and intermediary devices. It defines hosts as end devices on a network like computers. Servers provide information to clients, which are computers that request information from servers. Peer-to-peer networks have client and server software running on separate computers. Intermediary devices connect individual networks and ensure data flows across the network by performing functions like regenerating signals and routing data. The chapter also covers network media, which provides the physical channel for data transmission using various technologies like cables, fibers, and wireless transmission.

Uploaded by

trkhang91000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views69 pages

1234 Merged

The document is a chapter from a textbook on basic computer networks. It discusses network components including hosts, servers, clients, peer-to-peer networks, and intermediary devices. It defines hosts as end devices on a network like computers. Servers provide information to clients, which are computers that request information from servers. Peer-to-peer networks have client and server software running on separate computers. Intermediary devices connect individual networks and ensure data flows across the network by performing functions like regenerating signals and routing data. The chapter also covers network media, which provides the physical channel for data transmission using various technologies like cables, fibers, and wireless transmission.

Uploaded by

trkhang91000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

UNIVERSITY OF SCIENCE, VNU-HCM

FACULTY OF ELECTRONICS AND TELECOMMUNICATIONS


DEPARTMENT OF TELECOMMUNICATIONS AND NETWORKS

COURSE
BASIC COMPUTER NETWORK

Chapter 1 Network Components


OVERVIEW OF NETWORK
01
Editor: Nguyen Viet Ha, Ph.D.

Reference: Peter L Dordal


Cisco Academy, CCNAv7: Introduction to Networks [Online], available at: www.netacad.com

January 05, 2024

Lecturer: Nguyen Minh Tri, Ph.D. Email: [email protected] 2

1. Network Components 1. Network Components


Host Roles
Peer-to-Peer
Every computer on a network is
Client and server software usually run on separate computers, but it
called a host or end device. is also possible for one computer to be used for both roles at the
Servers are computers that same time.
provide information to end This type of network design is
devices:
Server only recommended for very
Email servers Description
Type small networks.
Web servers Email Email server runs email server software.
Clients use client software to access
File server email.
Clients are computers that Web Web server runs web server software. Advantage Disadvantage
send requests to the servers to Clients use browser software to access Easy to set up No centralized administration
web pages.
retrieve information: Less complex Not as secure
File File server stores corporate and user files.
Web page from a web server The client devices access these files. Lower cost Not scalable
Email from an email server Used for simple tasks, e.g., transferring files and sharing printers Slower performance
33/104
/50 44/104
/50
1. Network Components 1. Network Components
End Devices Intermediary device
is where a message originates from or where it is received. Connect the individual end devices to the network.
Connect multiple individual networks to form an internetwork.

Provide connectivity and ensure that data flows across the network

55/104
/50 6

1. Network Components 1. Network Components


Intermediary device Intermediary device
Connect the individual end devices to the network. Perform some or all of these functions:
Connect multiple individual networks to form an internetwork. o Regenerate and retransmit communication signals
Provide connectivity and ensure that data flows across the network
o Maintain information about what pathways exist through the
network and internetwork.
o Notify other devices of errors and communication failures.
o Direct data along alternate pathways when there is a link failure.
o Classify and direct messages according to priorities.
o Permit or deny the flow of data, based on security settings.

7 88/104
/50
1. Network Components 1. Network Components
Network Media Network Media
provides the channel over which the message travels from source provides the channel over which the message travels from source
to destination. to destination.
Media Types Description
Metal wires within Uses electrical
cables impulses
Glass or plastic Uses pulses of
fibers within cables light.
(fiber-optic cable)
Wireless Uses modulation
transmission of specific
frequencies of
electromagnetic
waves.

99/104
/50 10
10/104
/50

1. Network Components
Network Interface Card (NIC)
A NIC physically connects the end device to the network.

Physical Port
A connector or outlet on a networking device where
the media connects to an end device or another networking device.
2 Topology
Interface
Specialized ports on a networking device that connect to individual
networks. Because routers connect networks, the ports on a router
are referred to as network interfaces.

11
11/104
/50 12
2. Topology (network analysis) 2. Topology (network design)
Network graph is acyclic, or is a tree Physical Topology Diagrams: physical location of intermediary
devices and cable installation.
cable installation Room

Rack
Shelf

How data transmit in the network


Network presentation
13
13/104
/50 14
14/104
/50

2. Topology (network design)


Logical Topology Diagrams: devices, ports, and the addressing
scheme of the network.
Device port address

3 Common Types of Networks

Network presentation
15
15/104
/50 16
3. Common Types of Networks 3. Common Types of Networks
Small home networks: connect a few computers to each other and The Small Office/Home Office (SOHO) network: enables
the Internet. computers within a home office or a remote office to connect to a
corporate network or access to centralized, shared resources.

17
17/104
/50 18
18/104
/50

3. Common Types of Networks 3. Common Types of Networks


Medium to large networks: World Wide Network (The Internet): a network of networks that
used by corporations and connects hundreds of millions of computers world-wide.
schools, can have many
locations with hundreds or
thousands of interconnected
computers.

19
19/104
/50 20
20/104
/50
3. Common Types of Networks 3. Common Types of Networks
LANs and WANs LANs and WANs
Two most common types of networks: A LAN is a network A WAN is a network
o Local Area Network (LAN) and Wide Area Network (WAN) infrastructure that spans a infrastructure that spans a wide
small geographical area. geographical area.

LAN WAN
Interconnect end devices in a limited area. Interconnect LANs over wide geographical areas.
Administered by a single organization or Typically administered by one or more service
individual. providers.
Provide high-speed bandwidth to internal Typically provide slower speed links between
21 devices. LANs. 22

3. Common Types of Networks


Internet
is a worldwide collection of interconnected LANs and WANs.

Internet Service Providers (ISPs) connect their customers to the


Internet through their network infrastructure.

The Internet, then, is a


collection of ISPs co-
operating with each
other to form one large
converged internetwork.

23
23/104
/50 24
3. Common Types of Networks
Intranet and Extranet
Intranet: a private connection of LANs and WANs that belongs to
an organization.

Extranet: to provide secure 4 Protocol


and safe access to individuals
who work for a different
organizations.

25
25/104
/50 26

4. Protocol 4. Protocol
People communicate in many different ways. Devices communicate in exactly the same way.
Vocal a look a hand signal body language

All of the methods have three things in common.


There is source for the message or a sender.
There is a destination for the message or a receiver.
There is a channel that consists of the media that provides the
pathway for the message.
27
27/104
/50 28
28/104
/50
4. Protocol 4. Protocol
Rule Establishment: Rule Establishment:

An identified sender and receiver.

Agreed upon method of communicating (face-to-face, telephone,


letter, photograph).
Untranslated
Common language and grammar.

Speed and timing of delivery.

Confirmation or acknowledgement requirements .

Translate

29
29/104
/50 30
30/104
/50

4. Protocol 4. Protocol
Protocols: Message Encoding
are the rules that communications will follow. Encoding is the process of converting information into another,
These rules will vary depending on the protocol. acceptable form, for transmission.
Decoding reverses this process.

Destination
Decoded
31
31/104
/50 32
32/104
/50
4. Protocol 4. Protocol
Message Formatting and Encapsulation Message Formatting and Encapsulation

Source Destination
Encoded Decoded

33
33/104
/50 34
34/104
/50

4. Protocol 4. Protocol
Message Size Message Size

? ?
? ?
?
?

I cannot understand you


Ohhh, I seeeeeeee

35
35/104
/50 36
36/104
/50
4. Protocol 4. Protocol
Message Size Message Size The source host breaks a long message
into individual pieces that meet both the
minimum and maximum size
requirements.
This is known as SEGMENTING.

Each segment is encapsulated in a


? ? separate frame.
? ? At the receiving host, the messages are
? ?
de-encapsulated and put back together
to be processed and interpreted.
37
37/104
/50 38
38/104
/50

4. Protocol 4. Protocol
Message Timing Message Delivery Options
People use timing to determine: Unicast
o When to speak.
o How fast or slow to talk.
o How long to wait for a response.

Access Method: determines when someone is able to send a


message. These timing rules are based on the environment.
Flow Control: how much information can be sent and the speed
that it can be delivered.
Response Timeout: specify how long to wait for responses and
what action to take if a response timeout occurs.
39
39/104
/50 40
40/104
/50
4. Protocol 4. Protocol
Message Delivery Options Message Delivery Options
Multicast Broadcast

41
41/104
/50 42
42/104
/50

4. Protocol 4. Protocol
Network protocols: define a common set of rules. Network protocols:
Can be implemented on devices in: Devices use agreed-upon
o Software Protocol Description protocols to communicate.
o Hardware Type Protocols may have may
o Both Network enable two or more devices to have one or functions.
Communi communicate over one or more
cations networks
Protocols have their own: Network secure data to provide Function Description
o Function Security authentication, data integrity, and
Addressing Identifies sender and receiver
o Format data encryption
Reliability Provides guaranteed delivery
o Rules Routing enable routers to exchange route
information, compare path Flow Control Ensures data flows at an efficient rate
information, and select best path Sequencing Uniquely labels each transmitted segment of data
Service used for the automatic detection of Error Detection Determines if data became corrupted during transmission
Discovery devices or services Application Interface Process-to-process communications between network applications
43
43/104
/50 44
44/104
/50
4. Protocol
Network protocols:
Networks require the use of several
protocols.
Each protocol has its own function
and format.

Protocol Function 5 Layers


Hypertext Transfer Governs the way a web server and a web client interact
Protocol (HTTP) Defines content and format
Transmission Control Manages the individual conversations
Protocol (TCP) Provides guaranteed delivery
Manages flow control
Internet Protocol (IP) Delivers messages globally from the sender to the receiver
Ethernet Delivers messages from one NIC to another NIC on the same
Ethernet Local Area Network (LAN)
45
45/104
/50 46

5. Layers 5. Layers
Application: software you use. Application:

Application layer
LANs (Local Area Networks): LANs (Local
networks that provide Area Networks):
Transport layer
the connection between machines
within a home, school or
corporation. IP layer

Logical LAN layer


IP (Internet Protocol): provides an abstraction for connecting (digital)
IP (Internet Protocol):
multiple LANs (e.g., into the Internet). Physical LAN layer
(analog electrical, optical or
radio signaling mechanisms)

TCP (Transport Control Protocol): deals with transport and TCP (Transport Control
connections and actually sending user data. Protocol):
47
47/104
/50 48
48/104
/50
5. Layers 5. Layers
A layer: corresponds to the idea of a programming interface (or These are the benefits of using a layered model:
library), with the understanding that a given layer communicates
directly only with the two layers immediately above and below it.
Assist in protocol design because protocols that operate at a
specific layer have defined information that they act upon and a
Application NO interact defined interface to the layers above and below.
library directly with the
IP and LAN Foster competition because products from different vendors can
Hands off a layers .
chunk of data
TCP work together.
library
Prevent technology or capability changes in one layer from
Makes calls IP library affecting other layers above and below

Provide a common language to describe networking functions


Turn calls LAN and capabilities.
library Actual delivery

49
49/104
/50 50
50/104
/50

6. Packet
Packets: modest-sized buffers of data, transmitted as a unit through
some shared set of links.

Header: containing delivery information, e.g., destination address.

6 Packet

51 52
52/104
/50
6. Packet 6. Packet
? byte

100 Kg

500 Kg

3 Ton

25 Tons [2] Google image search. [Online]

53
53/104
/50 54
54/104
/50

6. Packet
The maximum packet size.
Ethernet packets: 1500 bytes of data.
TCP/IP packets: (originally) 512 bytes of data,
Token Ring packets: up to 4 kB of data.
ATM (Asynchronous Transfer Mode) packets 48 bytes of data.

7 Congestion

Header size (original):


Ethernet headers: 14 bytes.
IP headers: 20 bytes.
TCP headers: 20 bytes.

55
55/104
/50 56
7. Congestion 7. Congestion
Packets arriving faster than they can be sent out. On the Internet, most packet losses are due to congestion.
Inbound interface has a higher bandwidth than the outbound This is not because congestion is especially bad (though it can be, at
interface. times), but rather that other types of losses (e.g., due to packet
corruption) are insignificant by comparison.
Queue
(buffer)
Dropped Full

100 Mbps 10 Mbps

Inbound outbound
interface interface

(?) On the Internet, is the congestion loss good?

57
57/104
/50 58
58/104
/50

8. Data Rate, Throughput, Bandwidth, and Delay


Data rate (or bandwidth): the rate at which bits are transmitted.

Throughput: overall effective transmission rate, taking into account


things like transmission overhead, protocol inefficiencies and perhaps
even competing traffic.
Data Rate, Throughput,
8 Bandwidth, and Delay Goodput: application-layer throughput - the amount of usable data
delivered to the receiving application.

59 60
60/104
/50
8. Data Rate, Throughput, Bandwidth, and Delay 8. Data Rate, Throughput, Bandwidth, and Delay

> >
Packets are the key to supporting shared transmission lines; that is,
Bandwidth Throughput Goodput they support the multiplexing of multiple communications channels
over a single cable.
Theoretical Transmission overhead Application
e.g., header data only
Bit by bit
without Protocol inefficiencies
delay e.g., synchronous,
retransmission

Competing traffic
e.g., network collision

61
61/104
/50 62
62/104
/50

8. Data Rate, Throughput, Bandwidth, and Delay 8. Data Rate, Throughput, Bandwidth, and Delay
When a router or switch receives a packet, it decides to what next node Forwarding delay equal to the time needed to read the entire/a part
to forward it. of packet.

Need to read in the packet:


Bandwidth delay: a per-link delay.
o Store-and-forward: reads in the entire packet before forward a E.g., sending 1000 at 20 will take 50
packet.
Propagation delay: on-link-transmission delay.
o Cut-through: read header and forward a packet before it has
fully arrived. E.g., sending a packet on a 5000 cable with a propagation speed
of 200 (= 200 , about 2/3 the speed of light), the
o Need queue (buffer). first bit will not arrive at the destination until 25 later.

63
63/104
/50 64
64/104
/50
8. Data Rate, Throughput, Bandwidth, and Delay
Store-and-forward delay: equal to the sum of the bandwidth delays
out of each router along the path.

Queuing delay: waiting time in line at busy routers.


At bad moments this can exceed 1
Generally it is less than 10
, though that is rare.
and often is less than 1 .
9 LANs and Ethernet
Queuing delay is the only delay component amenable to reduction
through careful engineering.

65
65/104
/50 66

9. LANs and Ethernet 9. LANs and Ethernet


LAN (local-area network): a system consisting of: Many early Ethernet installations were unswitched.
Physical links that are, ultimately, serial lines.
Common interfacing hardware connecting the hosts to the links. Collision: two stations could
Protocols to make everything work together. then transmit at the same time.
o Reduce throughput

The most common type of (wired) LAN is Ethernet.


10 ; 100 ; 1000 (1 ).
Every packet is received by every
host:
The most common type of (wireless) LAN is Wi-Fi.
o Security threat, e.g., password
802.11a/b/g/ac/ax.
sniffers.

67
67/104
/50 68
68/104
/50
9. LANs and Ethernet 9. LANs and Ethernet
Almost Ethernets today are fully switched. Ethernet address:
No collision. physical address or hardware address or MAC (Media
Each packet is delivered only to the host to which it is addressed. Access Control) address.
Prevents host-based eavesdropping. o Burned into the ROM.
o Six bytes long
However: Queuing issue. The first three bytes of the physical address have been
o So seldom fill up that assigned to the manufacturer.
they are almost invisible. The subsequent three bytes are a serial number assigned
by that manufacturer.

(?) Check your


MAC address
69
69/104
/50 70
70/104
/50

10. Datagram Forwarding


Header will contain the address of the destination and perhaps other
delivery information.
Internal nodes of the network called routers or switches will forward
the packet to the correct destination.

10 Datagram Forwarding Forwarding table: <destination,next_hop> pairs.


The entries do not have to correspond exactly with the
packet destination addresses.
o Ex: For IP routing, the table entries will correspond
to prefixes of IP addresses.
=> Savings in space.

71 72
72/104
/50
10. Datagram Forwarding

<destination,next_hop> pairs

Destination
S1

Interface ID Destination
S2

Interface ID
11 IP - Internet Protocol
A A

B B

C C

D D

E E

next_hop sometime is the


73
73/104
/50 74

11. IP - Internet Protocol 11. IP - Internet Protocol


Network address: Network address:
IP addresses is the primary means of enabling devices to locate An IP Version 4 address has two parts:
one another and establish end-to-end communication on the internet. o Network number
o Host number
Unlike Ethernet addresses (Burned into the ROM), IP
addresses are administratively assigned.

IP version 4 (IPv4), IP version 6 (IPv6).

o The network portion of the address is the same for all hosts on
the same network.

o Each device is identified by a unique host portion.


75
75/104
/50 76
76/104
/50
11. IP - Internet Protocol 11. IP - Internet Protocol
To define the network and host portions of an address, a devices The IP layer does not maintain information about endpoint-to-endpoint
use a separate 32-bit pattern called a subnet mask connections, and simply forwards packets.
Called CONNECTIONLESS

FYI: Connectionless vs. CONNECTION-ORIENTED (in TCP layer).

The most common form of IP packet loss is router queue overflows,


representing network congestion.

(?) Check your IP


77
77/104
/50 78
78/104
/50

11. IP - Internet Protocol 11. IP - Internet Protocol


IP Forwarding IP Forwarding Net2 Net3
Net1
IP routers use datagram forwarding.
o But the values listed in the forwarding tables are (Int: Exit interface)
network prefixes (network address). R1 R2

Means care Host number. Network address Int Network address Int

E.g., 192.168.10.0/24

Net4 Net5

R3 R4 R5
Network address Int Network address Int Network address Int

79
79/104
/50 80
12. Routing Loops
Loop vs. Loop-free network.

REDUNDANCY
12 Routing Loops

81 82
82/104
/50

12. Routing Loops 12. Routing Loops


A potential drawback to datagram forwarding is the possibility of a Some solutions (mechanism or algorithm):
routing loop (cause some packets to circulate endlessly). Ethernet:
Consume a large majority of the bandwidth. o Nonlinear routing loop: disallowing loops in the underlying
network topology. E.g., Spanning Tree algorithm.
Routing loops can also occur in networks where the underlying link
topology is loop-free.
E.g., misconfiguration.

A R1 R2 C o Linear routing loop: not having switches forward a packet back


out the interface by which it arrived. (default)

83
83/104
/50 84
84/104
/50
12. Routing Loops
Some solutions (mechanism or algorithm):
IP:
o Using to (TTL) field in the IP header.
Set by the sender (e.g., 64 internal, 128 external).
Decremented by 1 at each router.
A packet is discarded if its TTL reaches 0.
13 Transport
Infinite (endlessly) loop finite loop

Consume a large majority of the bandwidth.

85
85/104
/50 86

13. Transport 13. Transport


IP issues: Solution: Transport layer
- (connectionless) mechanism, which means packets can E.g., Transmission Control Protocol (TCP)
and do get lost sometimes. o Reliability:
TCP numbers each packet and keeps track of which are lost
Data can arrive out of order. and retransmits them after a timeout.

IP only supports sending to a specific host. TCP holds early-arriving out-of-order packets for delivery at
o No method to access multiple applications in one host (e.g., Email the correct time.
and web).
Every arriving data packet is acknowledged by the receiver.
Timeout and retransmission occurs when an
acknowledgment packet received by the sender
within a given time.
87
87/104
/50 88
88/104
/50
13. Transport 13. Transport
Solution: Transport layer Solution: Transport layer
E.g., Transmission Control Protocol (TCP) E.g., Transmission Control Protocol (TCP)
o Connection-orientation: o Stream-orientation: An application using TCP can write 1 byte
Once a TCP connection is made, an application sends data at a time, or 100 kB at a time; TCP will buffer and/or divide up
simply by writing to that connection. the data into appropriately sized packets. (Segmentation)

No further application-level addressing is needed. Segmenting messages has two primary benefits:
Increases speed - Large amounts of data can be sent
TCP connections are managed by the operating-system kernel, over the network without tying up a communications link.
not by the application. Increases efficiency - Only segments which fail to reach
the destination need to be retransmitted, not the entire
data stream.

89
89/104
/50 90
90/104
/50

13. Transport 13. Transport


Solution: Transport layer Solution: Transport layer
E.g., Transmission Control Protocol (TCP) E.g., Transmission Control Protocol (TCP)
o Stream-orientation: An application using TCP can write 1 byte
at a time, or 100 kB at a time; TCP will buffer and/or divide up o Port numbers: these provide a way to specify the receiving
the data into appropriately sized packets. (Segmentation) application for the data, and also to identify the sending
application.
Sequencing messages is the
process of numbering the
segments so that the message o Throughput management: TCP attempts to maximize
may be reassembled at the throughput, while at the same time not contributing unnecessarily
destination. to network congestion.

91
91/104
/50 92
92/104
/50
13. Transport 13. Transport
Socket addresses: User Datagram Protocol (UDP):
TCP endpoints are of the form <host,port> Like TCP, provides port numbers to support delivery to multiple
o Servers for connections to sockets they have opened. endpoints within the receiving host, in effect to a specific process on
o Client a connection to a server. the host.
Also use socket addresses.
NO:
o Connection setup,
o Lost-packet detection,
o Automatic timeout/retransmission
o Segmentation/Reassemble (application must manage its own
packetization)
o Ordered Delivery.
o BUT data transmission can get started faster.
93
93/104
/50 94
94/104
/50

14. Network Protocol Suites


Internet Protocol Suite or TCP/IP - This is the most common and
relevant protocol suite used today. The TCP/IP protocol suite is an open
standard protocol suite maintained by the Internet Engineering Task
Force (IETF) (1983).

14 Network Protocol Suites

95 96
96/104
/50
14. Network Protocol Suites 14. Network Protocol Suites
Open Systems Interconnection (OSI) protocols - This is a family
of protocols developed jointly in 1977 by the International Organization
for Standardization (ISO) and the International Telecommunications
Union (ITU).
The OSI protocol included a seven-layer model called the OSI
reference model.
o The OSI reference model categorizes the functions of its protocols.

Today OSI is mainly known for its layered model.

The OSI protocols have largely been replaced by TCP/IP.

97
97/104
/50 98
98/104
/50

14. Network Protocol Suites 14. Network Protocol Suites

99
99/104
/50 100
100/104
/50
14. Network Protocol Suites 14. Network Protocol Suites

101
101/104
/50 102
102/104
/50

14. Network Protocol Suites


THANK YOU FOR YOUR ATTENTION
A web server encapsulates A web client receives and de-
and sends a web page to a encapsulates the web page for
client. the web browser

Nguyen Minh Tri, Ph.D.


Department of Telecommunications and Networks
Faculty of Electronics and Communications
University of Science, Vietnam National University, Ho Chi Minh City
Email: [email protected]
103
103/104
/50
UNIVERSITY OF SCIENCE, VNU-HCM
FACULTY OF ELECTRONICS AND TELECOMMUNICATIONS
DEPARTMENT OF TELECOMMUNICATIONS AND NETWORKS

COURSE
BASIC COMPUTER NETWORK

Chapter 1 10- Classic Ethernet


Ethernet
02
Editor: Nguyen Viet Ha, Ph.D.

Reference: Peter L Dordal


Cisco Academy, CCNAv7: Enterprise Networking, Security, and Automation [Online], available at: www.netacad.com

January 19, 2024

Lecturer: Nguyen Minh Tri, Ph.D. Email: [email protected] 2

1. 10- Classic Ethernet 1. 10- Classic Ethernet


Ethernet: IEEE 802.3 (FYI: WiFi: 802.11, WiMAX: 802.16) There were three physical formats for 10 Mbps Ethernet cable.
Broadcast bus Thick coax (10BASE-5)
Consisted of a long piece of cable (possibly spliced by repeaters). (max: 500 meters)
Data went everywhere along that cable.

Thin coax (10BASE-2)


10BASE-5 vs 10BASE-2
Network
(max: 500 meters)
Interface: take
care of the details
of transmitting and Twisted pair (10BASE-T)
receiving.
(max: 100 meters)

3/66
/50 4/66
/50
1. 10- Classic Ethernet 1. 10- Classic Ethernet
There were three physical formats for 10 Mbps Ethernet cable. Repeaters
thick-coax cabling, connections were made via taps, often literally Signal amplifier (might attempt to clean up a noisy signal).
drilled into the coax central conductor. Process each bit individually and did no buffering.
Thin coax allowed the use of T-connectors to attach hosts.
Twisted-pair does not allow mid-cable attachment; it is only used
for point-to-point links.
Hub
A repeater with more than two ports.
Star topologies in which each host
connects directly to the hub rather than to
one long run of coax.
Twisted-pair cable.
Tap, T-connector, and RJ-45
5/66
/50 6/66
/50

1. 10- Classic Ethernet 1. 10- Classic Ethernet


Bridge later known as Switch Two stations transmitted at the same time, the signals would collide.
Not bit. Reads in and forwards an entire packet.

Can determine to where the packet is forwarded. (Using MAC


CSMA/CD (Carrier Sense, Multiple Access, Collision Detection)
address)
Before transmission, wait for the line to become quiet.

While transmitting, continually monitor the line for signs that a


Note:
collision has occurred; if a collision is detected, cease transmitting.
o Hubs propagate collisions;
o Switches do not.
If a collision occurs, use a backoff-and-retransmit strategy.

7/66
/50 8/66
/50
1. 10- Classic Ethernet 1. 10- Classic Ethernet
CSMA/CD (Carrier Sense, Multiple Access, Collision Detect) CSMA/CD (Carrier Sense, Multiple Access, Collision Detect)
To transmit, each host will listen on the media. To transmit, each host will listen on the media.
o If a signal from another device is present, it will wait for a o If a signal from another device is present, it will wait for a
specific amount of time (e.g., 9.6 for 10-Mbps Ethernet) and specific amount of time (e.g., 9.6 for 10-Mbps Ethernet) and
listen again. listen again.
o If no signal is present, it will transmit. o If no signal is present, it will transmit.

9/66
/50 10/66
/50

1. 10- Classic Ethernet 1. 10- Classic Ethernet


Interpacket gap (IPG) CSMA/CD (Carrier Sense, Multiple Access, Collision Detect)
Also known as interframe spacing, or interframe gap. It can happen that two devices will determine that it is safe to
transmit at exactly the same time.
A delay or time gap between CSMA/CD packets intended to provide o In that case, both will transmit their frame.
interframe recovery time for other CSMA/CD sublayers and for the
Physical Medium.

The standard minimum interpacket gap for Ethernet variant


Minimum
transmitted
transmission is 96 bit. IPG
10 Mbit/s Ethernet 9.6
100 Mbit/s (Fast) Ethernet 0.96
Gigabit Ethernet 96 ns
Packet Packet Packet Packet
2.5 Gigabit Ethernet 38.4 ns
5 Gigabit Ethernet 19.2 ns
gap gap gap
10 Gigabit Ethernet 9.6 ns

11/66
/50 12/66
/50
1. 10- Classic Ethernet 1. 10- Classic Ethernet
CSMA/CD (Carrier Sense, Multiple Access, Collision Detect) CSMA/CD (Carrier Sense, Multiple Access, Collision Detect)
It can happen that two devices will determine that it is safe to Both devices detect the collision and send out a jamming signal.
transmit at exactly the same time. o The jamming signal is detected by all devices and all devices now
o In that case, both will transmit their frame. know that a collision has occurred on the network.

13/66
/50 14/66
/50

1. 10- Classic Ethernet 1. 10- Classic Ethernet


CSMA/CD (Carrier Sense, Multiple Access, Collision Detect) The Slot Time and Collisions
Each device to invoke a backoff algorithm. The diameter of an Ethernet is the maximum distance between any
o Devices wait a random amount of time before returning to listening pair of stations.
mode. o Measured in bits.
o The random time ensures that the original devices that caused the o Maximum: 232 bits.
collision repeat it.
Jam signal: 32 bits (up to 48 bits)
o Bring the total above to 512 bits, or 64 bytes
Also, be the minimum of the frame size.
A slot time = 512 bits
o The time to send 512 bits of Jam signal.
Time intervals are often described in bit times but in conventional
time units the slot time is 51.2 µsec.
15/66
/50 16/66
/50
1. 10- Classic Ethernet 1. 10- Classic Ethernet
The Slot Time and Collisions The Slot Time and Collisions
One slot time is enough time for any other station to have realized
that the first station has started transmitting and wait for the first
station to finish.

Ethernet has a minimum packet size = a slot time.


o If a collision were to occur, the sender would detect it.
o If we need to send less than 46 bytes of data, the Ethernet
packet must be padded out to the minimum length.
All protocols running on top of Ethernet need to provide some
way to specify the actual data length, as it cannot be inferred
from the received packet size.

17/66
/50 18/66
/50

1. 10- Classic Ethernet 1. 10- Classic Ethernet


Exponential Backoff Algorithm Exponential Backoff Algorithm
Range from which the backoff value is chosen is doubled after every A maximum of 1024 hosts is allowed on an Ethernet.
successive collision involving the same packet. o ( <1024).

If a collision does occur, send the jam signal, choose a backoff time o If there are 1024 hosts simultaneously trying to send.
as follows: Once the backoff range has reached <1024 ( =10),
o For transmission ( represents the original attempt): It is a good chance that one station will succeed in seizing the
If , choose randomly with . channel,
If , choose randomly with . That is; the minimum value of all the random chosen
will be unique.
o Wait slot times ( µsec).
o If reach (16 transmission attempts), give up.

19/66
/50 20/66
/50
1. 10- Classic Ethernet 1. 10- Classic Ethernet
? A2 will occupy the
Exponential Backoff Algorithm entire bandwidth There are two styles of Ethernet framing:
IEEE 802.3 Ethernet standard which has been updated several
times to include new technologies

The DIX Ethernet standard which is now referred to Ethernet II

Ethernet II is the
Ethernet frame
format used in TCP/IP
networks.

21/66
/50 22/66
/50

1. 10- Classic Ethernet 1. 10- Classic Ethernet


The address is often referred to as a burned-in address (BIA) The address is often referred to as a burned-in address (BIA)
Burned in ROM. Burned in ROM.
Unique. Unique.

Preamble: for synchronization: a block of 1 bits followed by a 0.


o The first three bytes of the physical address have been
assigned to the manufacturer.
o The subsequent three bytes are a serial number assigned by Type: Identifies the Layer 3 protocol in the data field.
that manufacturer. E.g., 0x0800=IP, 0x8137=IPX, 0x0806=ARP

Maximum Ethernet length: 1500 bytes

23/66
/50 24/66
/50
1. 10- Classic Ethernet 1. 10- Classic Ethernet
Broadcast address. (FF-FF-FF-FF-FF-FF) Ethernet Multicast
If a switch receives a broadcast packet on one port, it forwards the Transmit to a set of stations; streaming video to multiple
packet out every other port. simultaneous viewers.

IPv4 multicast MAC address: 01-00-5E-??-??-??


IPv6 multicast MAC address: 33-33-??-??-??-??
Unicast address.
Traffic addressed to a particular host. It is flooded out all Ethernet switch ports except the incoming port,
unless the switch is configured for multicast snooping.

25/66
/50 26/66
/50

1. 10- Classic Ethernet 1. 10- Classic Ethernet


Ethernet Multicast

27/66
/50 28/66
/50
1. 10- Classic Ethernet 1. 10- Classic Ethernet

29/66
/50 30/66
/50

1. 10- Classic Ethernet 1. 10- Classic Ethernet


LLC and MAC Sublayers LLC and MAC Sublayers
In IEEE protocols, the LAN layer is divided into the media access LLC
control, or MAC, sublayer and a higher logical link control. o Takes the network protocol data and adds control information to
help deliver the packet to the destination.
o Implemented in software.

MAC
o Data encapsulation
o Media access control
o Implemented by hardware, typically in the computer NIC.

31/66
/50 32/66
/50
2. 100 Mbps (Fast) Ethernet
100 Mbps Ethernet is officially known as 100BASE-TX.
Operates over twisted-pair cable.

The problem of scaling Ethernet to handle collision detection


gets harder as the transmission rate increases.

2 100 Mbps (Fast) Ethernet o Instead of increasing the minimum packet size, the decision was
made to ensure collision detectability by reducing the network
diameter (in meters).

33 34/66
/50

2. 100 Mbps (Fast) Ethernet 2. 100 Mbps (Fast) Ethernet


100 Mbps Ethernet is officially known as 100BASE-TX. Switch partition an Ethernet into separate .
Operates over twisted-pair cable. Each collision domain is simply a single twisted-pair link, subject to
the 100-meter maximum length.
The problem of scaling Ethernet to handle collision detection
gets harder as the transmission rate increases.
Full-duplex Ethernet:
o The network diameter: 400 meters (10 Mbps Ethernet: up to Two twisted pairs could be used, one for each direction.
2500 meters). o Collision-free.
Using optical-fiber-based 100BASE-FX in half-duplex mode, but
this is not common.
100BASE-FX with full-duplex can up to 2,000 meters.
o The network diameter: 200 meters
o Links between buildings
Using 100BASE-TX network diameter with hubs.
maximum cable length 100 meters.
35/66
/50 36/66
/50
2. Gigabit Ethernet
Problem:
If maintain the 51.2 µsec slot time but raise the transmission rate to
1000 Mbps, the maximum network diameter would be 20-40 meters.

3
Gigabit Ethernet moved to a 4096-bit (512-byte, or 4.096 µsec)
Gigabit Ethernet slot time for the twisted-pair versions.
o Increase the minimum frame size to 512 bytes.
o Short frames need to be padded, but this padding is done by the
hardware.

37 38/66
/50

2. Gigabit Ethernet 2. Gigabit Ethernet


Gigabit Ethernet mostly works with full-duplex. The most common gigabit Ethernet over copper wire is 1000BASE-T.
Collision-free. For 1000BASE-T, all four twisted pairs in the cable are used.
Each pair transmits at 250 Mbps, and each pair is bidirectional, thus
10 Gigabit Ethernet has officially abandoned any pretense of supporting full-duplex communication.
supporting collisions; everything must be full-duplex.

On any one cable pair, there are


five signaling levels. These are
used to transmit two-bit symbols
Gigabit Ethernet 1000Base-T uses PAM-5 encoding (vs. 4B/5B encoding at a rate of 125 symbols/µsec, for
of 100Base-TX) a data rate of 250 bits/µsec.

The target bit error rate (BER) for


1000BASE-T is 10-10
39/66
/50 40/66
/50
4. Ethernet Switches
TP-Link switch (Home/Small office)

Cisco Catalyst 9200 Series Switches (LAN access)

4 Ethernet Switches

Cisco Catalyst 9600 Series Switches Cisco Nexus 9000 Series Switches
(LAN core and distribution) (Data center)
41 42/66
/50

4. Ethernet Switches 4. Ethernet Switches

Switches join separate physical Ethernets. Ethernet Learning Algorithm


Example Step 1:
A switch has two or more Ethernet interfaces. The switch receives a frame from PC 1 on Port 1 to PC2.
When a packet is received on one interface it is retransmitted on one
or more other interfaces.

Only valid packets are forwarded; collisions are not propagated.

Ethernet also offers much more resistance to eavesdropping than a


non-switched (e.g., hub-based) Ethernet.

43/66
/50 44/66
/50
4. Ethernet Switches 4. Ethernet Switches

Ethernet Learning Algorithm Ethernet Learning Algorithm


Example Step 2: (learning) Example Step 3: (lookup and flooding)
The switch enters the source MAC address and the switch port Because the destination address is not in the MAC Table, the
that received the frame into the address table. switch floods the frame to all ports, except the port on which it
received the frame.

45/66
/50 46/66
/50

4. Ethernet Switches 4. Ethernet Switches

Ethernet Learning Algorithm Ethernet Learning Algorithm


Example Step 4: Example Step 5: (learning)
The destination device replies with a unicast frame addressed to The switch enters the source MAC address of PC 2 and the port
PC 1. number of the switch port that received the frame into the
address table.

47/66
/50 48/66
/50
4. Ethernet Switches

Ethernet Learning Algorithm


Example Step 6: (lookup and forwarding)
The switch can now forward frames between source and
destination devices because it has entries in the address table
that identify the associated ports.

5 Switch Hardware

49/66
/50 50

5. Switch Hardware 5. Switch Hardware

One of the differences between an Shared-memory.


inexpensive Ethernet switch and a pricier Consists of a single CPU, single memory, peripheral busses, and
one is the degree of internal parallelism it multiple Ethernet cards.
can support.
When a packet arrives:
o The CPU must copy the packet from the arrival interface into RAM
o Determine the forwarding
o Copy the packet to the output interface.
The worst-case load, for a switch with ports, is for
packets to arrive continuously on ports, and depart on
a different ports. To keep up with one-at-a-time 100 Mbps transmission, the internal
transfer rate must therefore be at least 200 Mbps.

51/66
/50 52/66
/50
5. Switch Hardware 5. Switch Hardware

Shared-memory. Switch fabrics.


The maximum speed of such a device depends on the speed of the In datacenters: 10 Gbps, 40 Gbps Ethernet is now common.
peripheral-to-RAM bus. Switch 24 ports is a bare minimum.
o Shared-memory not a suitable.
Ex: USB 3.0 bus operates at 5 Gbps. At an Ethernet speed of 100
Mbps
o USB 3.0 bus can transfer 25 packets in and out in the time Crossbar switch fabric:
supporting up to 50 ports total.
o Consisting of a grid of normally open switch nodes that can
o BUT. Gigabit Ethernet, only two packets can be handled. be closed under CPU control.
o Packets travel, via a connected path through the crossbar, directly
from one Ethernet interface to another.
In datacenters: 10 Gbps, 40 Gbps Ethernet is now common.

53/66
/50 54/66
/50

5. Switch Hardware 5. Switch Hardware

Switch fabrics. Content-Addressable Memory (CAM)


Allows for the search of the forwarding table in a single memory
load.
o vs. several tens of memory loads in shared-memory switch.

CAM memory consists of a large number of memory registers all


attached to a common data-input bus.
o For Ethernet switching, the data width of the bus and registers
needs to be at least as large as the 48-bit address size.

55/66
/50 56/66
/50
5. Switch Hardware

Content-Addressable Memory (CAM)

6 Hierarchical Networks

57/66
/50 58

6. Hierarchical Networks 6. Hierarchical Networks

Hierarchy in the Borderless Switched Network Hierarchy in the Borderless Switched Network
Creating a borderless switched network requires network design are
used to ensure maximum availability, flexibility, security, and Three-Tier Model Two-Tier Model
manageability.

Following principles: Core Layer


o Hierarchical determines the role of each device at every tier. Distribution
o Modularity - Allows seamless network expansion and integrated Layer
service enablement on an on-demand basis.
o Resiliency - keeping the network always on. Access
o Flexibility - Allows intelligent traffic load sharing by using all Layer
network resources.
59/66
/50 60/66
/50
6. Hierarchical Networks 6. Hierarchical Networks

Access, Distribution, and Core Layer Functions Access, Distribution, and Core Layer Functions

Access layer
Distribution layer
o The access layer represents
o Aggregating large-scale wiring
the network edge, where
closet networks.
traffic enters or exits the
campus network o Aggregating Layer 2 broadcast
domains and Layer 3 routing
o The primary function of an boundaries.
access layer switch is to o Providing intelligent switching,
provide network access to routing, and network access
the user. policy functions to access the
rest of the network.

61/66
/50 62/66
/50

6. Hierarchical Networks 6. Hierarchical Networks

Access, Distribution, and Core Layer Functions Access, Distribution, and Core Layer Functions

Core layer
Distribution layer
o o High speed backbone of
the network.
o Providing high availability o Interconnect between
through redundant distribution distribution layer devices
layer switches and equal cost o Must be capable of
paths to the core quickly forwarding large
o Providing differentiated services amounts of data.
to various classes of service
applications at the edge of o Must be highly available
network and redundant.
63/66
/50 64/66
/50
6. Hierarchical Networks
THANK YOU FOR YOUR ATTENTION
Three-Tier and Two-Tier Examples

Three-Tier Model Two-Tier Model

Nguyen Minh Tri, Ph.D.


Department of Telecommunications and Networks
Faculty of Electronics and Communications
University of Science, Vietnam National University, Ho Chi Minh City
Email: [email protected]
65/66
/50
UNIVERSITY OF SCIENCE, VNU-HCM
FACULTY OF ELECTRONICS AND TELECOMMUNICATIONS
DEPARTMENT OF TELECOMMUNICATIONS AND NETWORKS

COURSE
BASIC COMPUTER NETWORK

Chapter 1 Packet Delay


Packet
03
Editor: Nguyen Viet Ha, Ph.D.

Reference: Peter L Dordal

January 26, 2024

Lecturer: Nguyen Minh Tri, Ph.D. Email: [email protected] 2

1. Packet Delay 1. Packet Delay


Bandwidth delay
Medium Propagation speed
The time needed for a sender to get the packet onto the wire.
Thick Coax 0.77c (231,000 km/sec)
Ex: 1500-byte packet on 100 Mbps Ethernet,
Thin Coax 0.65c (195,000 km/sec)
o Bandwidth delay = .
Twisted Pair 0.59c (177,000 km/sec)
Fiber 0.66c (198,000 km/sec)

Propagation delay Propagation delay


The time it takes for the head of the signal to travel from the sender Ex: 100 of Ethernet using twisted pair
to the receiver.
The distance divided by the speed of light. o Propagation delay = .

3/23
/50 4/23
/50
1. Packet Delay 1. Packet Delay
Assume:
Store-and-forward delay Delay examples. Queuing delay = 0
The time spent reading in the entire packet before any of it can be Case 1: A------------------B Store-and-forward delay = 0
retransmitted. o Propagation delay is 40 µsec
o Bandwidth is 1 byte/µsec (1 MB/sec, 8 Mbit/sec)
o Packet size is 200 bytes (200 µsec bandwidth delay)
One-way transmit time = µsec
Queuing delay A B

Depend on competing traffic and/or the system specifications.


o Other words, is a delay based on how long the packet has to stay
around in the intermediate device (e.g., router).

5/23
/50 6/23
/50

1. Packet Delay 1. Packet Delay


Assume: Assume:
Delay examples. Queuing delay = 0 Delay examples. Queuing delay = 0
Case 2: A --------- R ---------- B Store-and-forward delay = 0 Case 3: A --------- R ---------- B Store-and-forward delay = 0
o Two links, each with propagation delay 40 µsec; bandwidth and o The same as 2, but with data sent as two 100-byte packets.
packet size as in Case 1. o One-way transmit time = µsec
o One-way transmit time = µsec
A R B A R B

7/23
/50 8/23
/50
1. Packet Delay 1. Packet Delay
Round-trip time (RTT) Bandwidth x Delay
At most non-LAN scales, the delay is typically simplified to the RTT. Represents how much we can send before we hear anything back.
o The time between sending a packet and receiving a response. (Delay: usually involving RTT)

Different delay scenarios have implications for protocols: Ex:


o If a network is bandwidth-limited then protocols are easier to
design. Extra RTTs do not cost much, so we can build in a
considerable amount of back-and-forth exchange.

o However, if a network is delay-limited, the protocol designer must


focus on minimizing extra RTTs.
As an extreme case, consider wireless transmission to the
moon (0.3 sec RTT), or to Jupiter (1 hour RTT).
9/23
/50 10/23
/50

1. Packet Delay 1. Packet Delay


Packet Delay Variability bandwidth, too, can vary dynamically.
RTT is variable. Shared bandwidth
o On Ethernet and Wi-Fi networks there is an initial QoS (Quality of Service)
before transmission actually begins. o E.g., routers reserve a varying amount of bandwidth for
High-priority traffic
o Different packets are routed via slightly different paths. Depending on demand
Best-effort traffic
o Different packets are handled differently by different queues of a
parallel-processing switch.

o Mobile nodes are involved, then the distance and thus the
propagation delay can change. to be the time it takes to transmit a packet from A to B,
and receive an acknowledgment back, with no queuing delay.
We will usually assume that is fixed and well-defined
11/23
/50 12/23
/50
2. Packet Size
How big should packets be?
Should they be large ( 64 kB)
or small ( 48 bytes)?

2 Packet Size Large packets would not allow other senders timely access to
transmit.
Large packets waste a smaller percentage of bandwidth on headers.
In store-and-forward switches, smaller packets have much better
throughput.

13 14/23
/50

2. Packet Size 2. Packet Size


Packet Size vs. Error Rates Packet Size vs. Real-Time Traffic
For relatively high error rates, it turns out to be better to send It is common to commingle bulk traffic on the same links with real-
smaller packet, because when an error does occur then the entire time traffic.
packet containing it is lost. o Real-time traffic has higher priority than bulk traffic.
o Choose the packet size small enough that most packets do not Router does not begin forwarding a bulk-traffic packet if there
encounter errors. are any real-time packets waiting.
However, once a bulk-traffic packet has begun transmission, it
is impractical to interrupt it.

To be fair, very large packets can be sent reliably on most cable links
(e.g., TDM and SONET). Limited to the maximum Ethernet packet size.
Wireless, however, is more of a problem. o IPv4: 1500 bytes
o IPv6: 2000 bytes
15/23
/50 16/23
/50
3. Error Detection
Packet error detection is to add some extra bits (or called error-
detection code)
Allow the receiver to determine if the packet has been corrupted in
transit.
A corrupted packet will then be discarded by the receiver.

3 Error Detection
Reasons:
Low-frequency bit errors due to things like
cosmic rays.
Interference errors, typically generated by
nearby electrical equipment.

17 18/23
/50

3. Error Detection 3. Error Detection


Single parity bit: this will catch all one-bit errors. Internet checksum: used by IP, TCP and UDP
Ex: Taking the -complement sum of the 16-bit words of the
o Data: 1001 message.
parity bit = 1^0^0^1 = 0 o -complement sum:
Take the sum A+B.
o Send: 10010 If there is an overflow bit, add it back in as low-order bit.

o Receive: 10110
A weakness of any error-detecting code based on sums is that
Check: 1^0^1^1^0 = 1 0 transposing words leads to the same sum, and the error is not
Data is corrupted. detected.
o In particular, if a message is fragmented and the fragments are
reassembled in the wrong order, the ones-complement sum will
likely not detect it.
19/23
/50 20/23
/50
3. Error Detection 3. Error Detection
Cyclical Redundancy Check (CRC) Error-Correcting Codes (also called forward error correction)
Ethernet frame. That allows the receiver in many cases to figure out which bits are
corrupted, and fix them.

Mostly used in the Physical layer.

21/23
/50 22/23
/50

THANK YOU FOR YOUR ATTENTION

Nguyen Minh Tri, Ph.D.


Department of Telecommunications and Networks
Faculty of Electronics and Communications
University of Science, Vietnam National University, Ho Chi Minh City
Email: [email protected]
UNIVERSITY OF SCIENCE, VNU-HCM
FACULTY OF ELECTRONICS AND TELECOMMUNICATIONS
DEPARTMENT OF TELECOMMUNICATIONS AND NETWORKS

COURSE
BASIC COMPUTER NETWORK

Chapter 1 The IPv4 Header


IP VERSION 4
04
Editor: Nguyen Viet Ha, Ph.D.

Reference: Peter L Dordal


Cisco Academy, CCNAv7: Introduction to Networks [Online], available at: www.netacad.com

February 26, 2024

Lecturer: Nguyen Minh Tri, Ph.D. Email: [email protected] 2

1. The IPv4 Header 1. The IPv4 Header


Version: Contains a 4-bit binary value identifying
the IP packet version. For IPv4 packets, this field
is always set to 0100.

Differentiated Services (DS) (Type of Service - ToS) field: 8-bit field


used to determine the priority of each packet.
The first 6 bits identify the Differentiated Services Code Point
(DSCP) value that is used by a quality of service (QoS) mechanism.
The last 2 bits identify the Explicit Congestion Notification (ECN)
value that can be used to prevent dropped packets during times of
network congestion.

3/66
/50 4/66
/50
1. The IPv4 Header 1. The IPv4 Header
Time-to-Live (TTL): Contains an 8-bit binary Internet Header Length (IHL) - Contains a
value that is used to limit the lifetime of a packet 4-bit binary value identifying the number of 32-bit
(referred to as hop count). words in the header. The IHL value varies due to the Options and
Decreased by one each time the packet is processed by a router, or Padding fields.
hop. If the TTL field decrements to 0, the router discards the packet
and sends an Internet Control Message Protocol (ICMP) Time Minimum: 5 Maximum: 15
Exceeded message to the source IP address.
Protocol: This 8-bit binary value indicates the data payload type Total Length (Packet Length), this 16-bit field defines the entire
(upper-layer). packet (fragment) size, including header and data, in bytes.
ICMP (0x01), TCP (0x06), and UDP (0x11) . Minimum: 20 -> Maximum: 65,535 bytes.

Source IP Address - Contains a 32-bit binary value that represents


the source IP address of the packet. Header Checksum - The 16-bit field is used for error checking of the
IP header.
Destination IP Address - Contains a 32-bit binary value that If the values do not match, the packet is discarded.
represents the destination IP address of the packet.
5/66
/50 6/66
/50

1. The IPv4 Header


A router may have to fragment a packet when
forwarding it from one medium to another medium
that has a smaller MTU.

Identification - This 16-bit field uniquely identifies the fragment of an


original IP packet.

Flags - This 3-bit field identifies how the packet is fragmented. It is 2 Fragmentation
used with the Fragment Offset and Identification fields to help
reconstruct the fragment into the original packet.
DF: D Fragments flag, MF: More Fragments flag

Fragment Offset - This 13-bit field identifies the order in which to


place the packet fragment in the reconstruction of the original
unfragmented packet.
7/66
/50 8
2. Fragmentation 2. Fragmentation
Suppose A addresses a packet of 1500 bytes to B, and sends it via the
MTU is smaller than the packet that needs forwarding.
LAN to the first router R1. The packet contains 20 bytes of IPv4 header
Fragmentation (vs. reassembly) and 1480 of data.
Marks the start position of the
For different packets data portion of each fragment
A R1 FragOffset R2 R3 FragOffset
1st Fragment 1st Fragment
2nd Fragment 2nd Fragment
3rd Fragment 3rd Fragment
4th Fragment 4th Fragment
5th Fragment 5th Fragment

R1 R2 FragOffset R3 B FragOffset
1st Fragment 1st Fragment
2nd Fragment 2nd Fragment
3rd Fragment 3rd Fragment
4th Fragment 4th Fragment

9/66
5th Fragment 5th Fragment 10
/50

2. Fragmentation 2. Fragmentation
Flag (3 bits) Reassembly timer
More Fragment
If a fragment arrives, a buffer is allocated.
reserved
(DF) (MF) o Because of the field, the fragment can then be
stored in the buffer in the appropriate position.
Reassembly timer is started.
Must be 0 Must not fragment Set to 1 for all fragments except the final one.
the packet and
must drop it
Tells the receiver where the fragments stop When all fragments have arrived, the packet is sent on up as a
instead. completed IPv4 packet.

The fragments may not arrive in order.


On the other hand, if the reassembly timer expires, all the pieces
The reassembler must identify when different arriving packets are
fragments of the same original, and must figure out how to received so far are discarded.
reassemble the fragments in the correct order.

11/66
/50 12/66
/50
3. Interfaces
IP addresses are assigned not to hosts or nodes, but to interfaces.
E.g., LAN interface in PC.

3 Interfaces

13 14/66
/50

3. Interfaces 3. Interfaces
Loopback interface Multihomed hosts
Providing a way to deliver IP packets to other processes on the same A non-router host with multiple non-loopback network interfaces is
machine. often said to be multihomed.
o IPv4 loopback address: 127.0.0.1 o Interfaces are been used simultaneously, with different IP
o IPv6 loopback address: ::1 addresses assigned to each.

Client/server testing.
Check the processes in current host. o E.g., Laptops have both an Ethernet interface and a Wi-Fi
interface.

Virtual interface
VPN connections.
Virtual machine

15/66
/50 16/66
/50
4. Special Addresses
Private addresses
IPv4 addresses intended only for site internal use.
If a packet shows up at any non-private router (e.g., at an ISP
router), with a private IPv4 address as either source or destination
address, the packet should be dropped.

4 Special Addresses

o 10.0.0.0 to 10.255.255.255 (10.0.0.0/8)


o 172.16.0.0 to 172.31.255.255 (172.16.0.0/12)
o 192.168.0.0 to 192.168.255.255 (192.168.0.0/16)
17 18/66
/50

4. Special Addresses 4. Special Addresses


Broadcast addresses Multicast addresses
Used in conjunction with LAN-layer broadcast. Delivering to a specified set of addresses.
o Sending a packet from one host to all hosts in the network. o
Video and audio broadcasts
Routing information exchange Distribution of software
by routing protocols Remote gaming

The address with first byte beginning 1110.


o 224.0.0.0 to 239.255.255.255.
Link local - 224.0.0.0 to 224.0.0.255 (E.g., routing
information exchanged by routing protocols)
Globally scoped addresses - 224.0.1.0 to 238.255.255.255
(E.g., 224.0.1.1 has been reserved for Network Time Protocol)
19/66
/50 20/66
/50
4. Special Addresses 4. Special Addresses
Link Local Addresses: Public Addresses:
A network address that is valid only for communications within the These addresses are designed to be used in the hosts that are
network segment or the broadcast domain that the host is connected publicly accessible from the Internet.
to.
Address Range: 169.254.0.0 to 169.254.255.255
Can be automatically assigned by the operating system where no IP
configuration is available.

Only used when no external, stateful mechanism of address


configuration exists, such as the Dynamic Host Configuration
Protocol (DHCP), or when another primary configuration method has
failed.
21/66
/50 22/66
/50

5. The Classless IP Delivery Algorithm


Binary Game:
https://learningnetwork.cisco.com/s/binary-game

5 The Classless IP Delivery Algorithm

23 24/66
/50
5. The Classless IP Delivery Algorithm 5. The Classless IP Delivery Algorithm
Classful (discontinuation) Classless
Fixed the network portion and host portion Dynamic network portion and host portion
o Have to use Subnet Mask

High Number of Number Number of


First Octet Number of
Class Order Network of Host Hosts per
Range Networks
Bits Bits Bits Network

A 0 0-127 8 24 128 16,777,216


B 10 128-191 16 16 16,384 65,536
C 110 192-223 24 8 2,097,152 256
D 1110 224-239 Used for Multicasting to multiple hosts.
E 1111 240-255 Reserved for research and development.

25/66
/50 26/66
/50

5. The Classless IP Delivery Algorithm 5. The Classless IP Delivery Algorithm


Classless IP Destination
Dynamic network portion and host portion Local
o The host delivers the packet to its final destination via the LAN
connected to the corresponding interface.
Non-Local
o The host lookup the forwarding table and sends the packet to
the associated next_hop.

The forwarding table may also


contain a
, which it may
return in cases when the
destination does not match any
prefix length = 24 192.168.10.0/24 known network. (0.0.0.0/0)
27/66
/50 28/66
/50
6. IPv4 Subnets
Subnet
Idea: A site to appear to the outside world as a single IP network,
but for further IP-layer routing to be supported inside the site.

Hierarchical routing:
6 IPv4 Subnets first we route to the
primary network, then
inside that site we
route to the subnet,
and finally the last hop
delivers to the host.

29 30/66
/50

6. IPv4 Subnets 6. IPv4 Subnets


Borrowing Bits (of Host portion) to create Subnets

Network: 192.168.1.0/25
Mask: 255.255.255.128

Network: 192.168.1.128/25
Mask: 255.255.255.128

31/66
/50 32/66
/50
6. IPv4 Subnets 6. IPv4 Subnets

Address Range of 192.168.1.0/25 subnet Address Range of 192.168.1.128/25 subnet

33/66
/50 34/66
/50

6. IPv4 Subnets
Need 4 Subnets?
Borrowing 2 bits to create 4 subnets. 22 = 4 subnets

7 VLSM (Variable Length Subnet Masking)

35/66
/50 36
7. VLSM 7. VLSM
Traditional subnetting - same number of addresses is allocated for each Variable Length Subnet Mask (VLSM) or subnetting a subnet
subnet. provides more efficient use of addresses.

VLSM enables a network number to


be configured with different subnet
masks on different interfaces.

Network is first subnetted, and then


the subnets are subnetted again.

Subnets that require fewer addresses have unused (wasted) addresses. Process repeated as necessary to
For example, WAN links only need 2 addresses. create subnets of various sizes.

37/66
/50 38/66
/50

7. VLSM 7. VLSM

192.168.20.64/27 192.168.20.128/27
10.0.0.0/8 Subnet using /16
192.168.20.0/27 192.168.20.128/27
Subnet 1st Host Last Host Broadcast
10.0.0.0/16 10.0.0.1 10.0.255.254 10.0.255.255
10.1.0.0/16 10.1.0.1 10.1.255.254 10.1.255.255
10.2.0.0/16 Subnet
10.2.0.1 1st Host
10.2.255.254 Last Host
10.2.255.255 Broadcast
192.168.20.32/27 192.168.20.96/27 192.168.20.64/27
10.3.0.0/16 10.2.0.0/24
10.3.0.1 10.2.0.1
10.3.255.254 10.2.0.254
10.3.255.255 10.2.0.255
Sub-subnet
Etc. 10.2.1.0/24 10.2.1.1 10.2.1.254 10.2.1.255 7 Networks with 30 usable
Using /24
10.255.0.0/16 10.2.2.0/24 10.2.2.1
10.255.0.1 10.255.255.254 10.2.2.254
10.255.255.255 10.2.2.255 addresses for each network
Etc.
10.2.255.0/24 10.2.255.1 10.2.255.254 10.2.255.255
Wasted 28 addresses on each
WAN link

39/66
/50 40/66
/50
7. VLSM 7. VLSM

192.168.20.32/27 192.168.20.96/27 Steps for VLSM:


1. List the number of hosts required per network beginning with the
192.168.20.0/27 192.168.20.64/27
largest to the smallest.
2. Convert the subnet mask to binary.
3. Draw a line where the network portion ends.
4. Ask yourself the question
192.168.20.192/30 192.168.20.196/30 192.168.20.200/30

5. Move the line to show your new network portion.


6. Determine your new magic number.
7. Finish subnetting using the new magic number.

The starting address is always the first network.


You cannot go past the network of the .

41/66
/50 42/66
/50

8. Address Resolution Protocol: ARP


If a host finds that the destination IP address matches the network
address of one of its interfaces, it is to deliver the packet via the LAN.
Looking up the LAN address (MAC address).
ARP

8 Address Resolution Protocol: ARP


ARP cache: Storing of <IPv4,LAN> address pairs for other hosts on
the network.
ARP-cache entries eventually expire. The timeout interval used to be
on the order of 10 minutes, but Linux systems now use a much
smaller timeout (~30 seconds observed in 2012).

43 44/66
/50
8. Address Resolution Protocol: ARP

Dynamic Host Configuration Protocol


9 (DHCP)

45/66
/50 46

9. Dynamic Host Configuration Protocol (DHCP) 9. Dynamic Host Configuration Protocol (DHCP)
DHCP works in a client/server mode. Lease Origination: 4 Step Process.
When the client connects, the server assigns or leases an IP address
to the device.
The device connects to the network with that leased IP address until
the lease period expires.
The host must contact the DHCP server periodically to extend the
lease.
The leasing of addresses assures that addresses that are no longer
used are returned to the address pool for use by other devices.

47/66
/50 48/66
/50
9. Dynamic Host Configuration Protocol (DHCP)
Lease Renewal: 2 Step Process

Internet Control Message Protocol


10 (ICMP)

49/66
/50 50

10. Internet Control Message Protocol 10. Internet Control Message Protocol
ICMP is a protocol for sending IP-layer error and status messages. The Destination Unreachable type has a large number of subtypes:
ICMP messages are identified by an 8-bit type field. Network unreachable: some router had no entry for forwarding
the packet, and no default route.
Queries
sent by one host
to another

Error

sent by
a
router
to the
sender

,
51/66
/50
192.168.4.1 52
10. Internet Control Message Protocol 10. Internet Control Message Protocol
The Destination Unreachable type has a large number of subtypes: The Destination Unreachable type has a large number of subtypes:
Network unreachable: some router had no entry for forwarding Host unreachable: the packet reached a router that was on the
the packet, and no default route. same LAN as the host, but the host failed to respond to ARP queries
192.168.1.0/24 F0/0 192.168.1.0/24 F0/0
192.168.2.0/24 F0/1 192.168.2.0/24 F0/1
192.168.4.0/24 ???
192.168.3.0/24 S0/0/0 192.168.3.0/24 S0/0/0
192.168.4.0/24 S0/0/0
ICMP Request

192.168.4.1 53 192.168.4.100 54

10. Internet Control Message Protocol 10. Internet Control Message Protocol
The Destination Unreachable type has a large number of subtypes: The Destination Unreachable type has a large number of subtypes:
Host unreachable: the packet reached a router that was on the Port unreachable:
same LAN as the host, but the host failed to respond to ARP queries o The packet was sent to a UDP port on a given host, but that port
was not open.
192.168.4.100 ??? TCP, on the other hand, deals with this situation by replying to
ICMP: Host Unreachable the connecting endpoint with a reset packet.

o FYI: the UDP Port Unreachable message is sent to the host, not
to the application on that host that sent the undeliverable packet,
and so is close to useless as a practical way for applications to be
informed when packets cannot be delivered.

192.168.4.100 55 56/66
/50
10. Internet Control Message Protocol 10. Internet Control Message Protocol
The Destination Unreachable type has a large number of subtypes: The Destination Unreachable type has a large number of subtypes:
Port unreachable: Port unreachable:
o The packet was sent to a UDP port on a given host, but that port o The packet was sent to a UDP port on a given host, but that port
was not open. was not open.

ICMP: Port Unreachable

HTTP
server
not
DNS
server

192.168.4.1:53 (DNS) 57
192.168.4.1:53 (DNS) 58

10. Internet Control Message Protocol 10. Internet Control Message Protocol
The Destination Unreachable type has a large number of subtypes: The Destination Unreachable type has a large number of subtypes:
Fragmentation required but DF flag set: a packet arrived at a Fragmentation required but DF flag set: a packet arrived at a
router and was too big to be forwarded without fragmentation. router and was too big to be forwarded without fragmentation.
However, the Fragment bit in the IPv4 header was set, However, the Fragment bit in the IPv4 header was set,
forbidding fragmentation. forbidding fragmentation. Packet size is too big, must fragment.

Cannot fragment. Drop packet

MTU = 500 Bytes MTU = 500 Bytes

192.168.4.1 59
192.168.4.1 60
10. Internet Control Message Protocol 10. Internet Control Message Protocol
The Destination Unreachable type has a large number of subtypes: The Destination Unreachable type has a large number of subtypes:
Administratively Prohibited: this is sent by a router that knows it Administratively Prohibited: this is sent by a router that knows it
can reach the network in question, but has configure intro to drop can reach the network in question, but has configure intro to drop
the packet and send back Administratively Prohibited messages. A the packet and send back Administratively Prohibited messages. A
router can also be configured to blackhole messages: to drop the router can also be configured to blackhole messages: to drop the
packet and send back nothing. packet and send back nothing.
access to Server 1. Drop the packet.

192.168.4.1 61
192.168.4.1 62

10. Internet Control Message Protocol 10. Internet Control Message Protocol
Traceroute and Time Exceeded Redirects
The traceroute program uses ICMP Time Exceeded messages. Most non-router hosts start up with an IPv4 forwarding table
consisting of a single (default) router.

A packet is sent to the


ICMP Redirect messages help hosts learn of other useful routers.
destination with the TTL
set from 1 until the
ICMP query reaches to
the destination.

o Router drops packet


having TTL=0 and
returns ICMP Time
Exceeded.
63/66
/50 64/66
/50
10. Internet Control Message Protocol
THANK YOU FOR YOUR ATTENTION
Router Solicitation
These ICMP messages are used by some router protocols to identify
immediate neighbors.

Nguyen Minh Tri, Ph.D.


Department of Telecommunications and Networks
Faculty of Electronics and Communications
University of Science, Vietnam National University, Ho Chi Minh City
Email: [email protected]
65/66
/50
Chapter 1
How to connect 2 HCMUS campus's networks (Nguyen Van Cu Headquarters
and Thu Duc Branch)? Using WAN
End device" is: The device where a message originates from or where it is
received
Firewall appliance is the: Intermediary device.
[Multiple answers] A "Host" can be: End device Client Server
What network type of HCMUS campus? Medium to large.
Can the Application layer communicate the IP layer directly? NO
What is the advantage of the Layered model?
Foster competition.
Prevent technology or capability changes too much.
Provide a common networking language.
Assist in protocol design.
What is the Network protocol? A common set of rules letting the devices able to
communicate with each other.
What do Physical Topology Diagrams describe? Physical location of
intermediary devices.
What assign the packet size? Network Technology (e.g., ATM, Ethernet, WiFi).
What does "802.11" mention? Wi-Fi standard
How many layers does the OSI model have? 7
Which company produced the connection card, which has the MAC address of
"18-60-24-85-0F-22"? =Hewlett Packard
In the OSI model, can the Network layer interact directly with the Data Link
layer? (e.g., sending data, getting data) Yes
From the bottom, what is the fourth layer of the OSI model? Transportation
The basic of "Forwarding table" is the pair of: Destination and Next-hop.
From the bottom, what is the first layer of the TCP/IP model? network access
How many layers does the TCP/IP model have? 4
What does this sentence describe?
"It is the overall effective transmission rate, taking into account things like
transmission overhead, protocol inefficiencies, and perhaps even competing for
traffic." Throughput
The IP layer handles the packet as: Connectionless
What is the maximum size of a TCP/IP packet in default? 512 Bytes
About the Propagation delay, when the interface sends a packet on a 2000 km
cable with a propagation speed of 200 m/µsec (= 200 km/ms, about 2/3 the speed
of light), the first bit will not arrive at the destination until X ms later. 10

1: TCP header; 2: IP header; 3: Frame header; 4: Frame trailer


Internet Engineering Task Force.
The transport layer handles the packet as: Connection-Oriented
What does this sentence describe? "It is the amount of usable data delivered to
the receiving application." Goodput
Chapter2
What does full-duplex mean? Send and receive signals at the same time in one
cable

At the initial state, when the switch receives a frame, how can it forward that
frame? Send the frame out all the ports.
How long is the 10-Mbps-Ethernet diameter? 232 bits
What is the primary collision control mechanism of Ethernet? CSMA/CD
What is the correct answer mentioned in the Preamble? 11111111 11111111
11111111 11111111 11111111 11111111 11111111 11111110
In 10-Mbps-Ethernet, how many bits does the Jam signal? 512
In Gigabit-Ethernet, how many bits does the Jam signal? 4096
A physical (or MAC) address has 6 bytes.
Typically, what does the switch do when it receives a multicast frame? Forward
the frame to all devices on the networks.
The Bridge can be referred to as: Switch
What is the protocol standard of Ethernet? IEEE 802.3
How many concurrent devices are there on an Ethernet network which uses only
Hub as an intermediary device? 1024
How long is the 100-Mbps-Ethernet diameter? 232 bits
What is the maximum Ethernet packet size of the IPv6 packet? 2000 bytes
What class of IPv4 address: 172.16.172.16/22 – B
How many hosts are available in the subnetwork containing an IPv4 address of
10.10.10.10/14? 262142

You might also like