Edgard Jamhour
Introduction to Computer Networks
Network devices and protocols
Edgard Jamhour
Edgard Jamhour
A B C
B A DATA
frame
CRC .
Shared medium – bus topology
Ethernet is a technology for implementing local area networks
(LANs), and it is based on the principle of physical broadcast.
Edgard Jamhour
A frame is the smallest structure of information transmitted over a
local network.
B A DADOS CRC
Tail Header
Destination Physical Address
Source Physical Address
Type
Quadro Ethernet II
Edgard Jamhour
A B C
Listening Listening
Frames in a waiting queue
In non-switched Ethernet, only one computer can transmit at a
time.
Edgard Jamhour
The propagation time between hosts affects the maximum
performance of the network.
A
B
A Transmits
B Transmits B Receives
Propagation time from A to B
A Receives
t T
L = distância
to to+ t to+ T+ t
Edgard Jamhour
The maximum occupancy of the medium decreases with both: the
distance between computers and the transmission rate.
• Minimum Ethernet frame size defined by the standard
– 64 bytes
• Propagation speed of the electrical signal in a copper wire:
– 200 000 Km / s
efficiency = T/(T+t)
efficiency : 10Mbps X 200m = 98%
efficiency : 100Mbps X 200m = 83,6%
efficiency : 100Mbits X 800 m = 56,1%
…
efficiency : 100Mbits X 2000 m = 33,9%
distance
efficiency
1
0
Edgard Jamhour
Even with computers listening before transmitting medium, there is a
possibility of collision.
A
B
A Transmits
B Transmits
B Receives t
A Receives
Collision detected by A
Collision detected by B
t= to t= t1 t= to+t
t
t= t1+t
Edgard Jamhour
The distance between computers increases the collision probability
• Minimum Ethernet frame size defined by the standard
– 64 bytes
• Propagation speed of the electrical signal in a copper wire:
– 200 000 Km / s
efficiency = 1/(1 + 6,44 t/T)
efficiency : 10Mbps X 200m = 88,8%
efficiency : 100Mbps X 200m = 44,3%
efficiency : 100Mbits X 800 m = 16,6%
distance
efficiency
1
0
Edgard Jamhour
Hubs or concentrators are devices which internally simulate the
construction of a physical bus.
C A C A
A
1 2 3
hub
B C
C A
A
Edgard Jamhour
The introduction of swiches changes the operation of the Ethernet to
the “swiched” mode.
PORT
1
ADDRESSES
A
A
1 2 3
C A ... (1)
C A ... C A ... (2) (2)
switch
B C
Initial State
PORT
ADDRESSES
After A transmission
PORT
1
3
ADDRESSES
A
C
After C transmission
A
1 2 3
A C ... (3) A C ... (4)
switch
B C
Edgard Jamhour
Each switch port defines a collision domain. This is only possible
collision between computers connected to the same port.
A
1 2 3
switch
hub
B C D
hub
E F G
Forwarding Table
PORT
1
2
3
COMPUTER
A,B,C
D,E,F
G
Edgard Jamhour
Although significantly improve network performance, Switches still have
limited scalability.
Switch 1
PORT
1
2
3
4
ADDRESS
D,E,F,G,H,I
A
B
C
A B C
switch 1
2 4 3
D E F
G H I
5
switch 1
2 4 3 5
switch 1
2 4 3 5
Switch 2
PORT
1
2
3
4
5
ADDRESS
A,B,C
D
E
F
G,H,I
Switch 3
PORT
2
3
4
5
ADDRESS
G
H
I
A,B,C,D,E,F
Edgard Jamhour
The WAN (Wide Area Networks) uses a different address scheme that
allows you to connect an unlimited number of switches in arbitrarily
large distances.
Router
1
Router
3
LAN
LAN
switch switch
switch
WAN
Router
2
LAN
LAN
Net 1 Net 2
Net 3
1 2
3
1 2
3
1
3 2
Tabela de Roteamento
Port
1
2
3
Network
Net 3
Net 1
Net 2
Other
Info.
.....
Edgard Jamhour
IP addresses have 32 bits, i.e. 4 bytes, represented in dotted decimal
notation.
10000000 00001010 00000010 00011110
2726252423222120 2726252423222120 2726252423222120 2726252423222120
27=128 23+21=10 21=2 24+23+22+21=30
128.10.2.30
Dot-decimal
notation
Binary
notation
Edgard Jamhour
Packets are transported in the payload of frames
CRC Data Destination Source Destination Soruce
Packet
Frame
Physical Addresses: defined by Ethernet
Network Adresses: defined by IP
Edgard Jamhour
Grouping computers into networks allows to reduce the amount of
information in the router's table.
SWITCH
SWITCH
A c
NET 200.0.0.0/8
NET 210.0.0.0/8
X
Y
200.0.0.1 200.0.0.2 200.0.0.3 Z M
210.0.0.1
Z
If 200... Send to x
If 210 ... Send to y
M 66.1.2.3 210.0.0.2
E Y 66.1.2.3 210.0.0.2
B
D
210.0.0.3
E
210.0.0.4
F
Edgard Jamhour
Packets are independent of the physical medium. Frames, however,
must change to adapt to the data-link technology.
1 2
200.17.176.x
Ethernet
Technology
PPP over
phone line
Token-Ring
Technology
Packet is always the same
Frame is dependent on the data link technology
LAN 1
200.0.0.0/8
LAN 2
210.0.0.0/8
Edgard Jamhour
Transport protocols, such as TCP and UDP, are responsible to deliver
the payload of packets to the process.
Computador 2
Computador 1
TCP
IP
Ethernet
Physical Address
IP Address
Port
1024
Process
A
Process
bus
UDP
Port Port
Process
TCP
IP
Ethernet
Physical Address
IP Address
Port
Process Process
B
UDP
Port
80 Port
Process
1024 80 Payload
Edgard Jamhour
Port numbers are addresses used by TCP and UDP. Well-known ports
are mapped to the standard applications defined by IANA (Internet
Assigned Number Authority)
0
1023
1024
49151
Well-known port (requires root privileges)
Registered ports
49152
65535
Dynamic or private ports
Edgard Jamhour
Protocol Data Unit (PDU): Frame, Packet, Segment
(TCP)/Datagram(UDP)
crc src dst src dst src
Packet
Frame
Physical
Addresses
IP Addresses
dst payload
Port Numbers
Segment or Datagram
protocol
Edgard Jamhour
Application protocols define a set of standard messages that permit
clients and servers from different vendors to communicate.
crc src dst src dst src dst Application Protocol protocol
mail from: <...>
rcpt to: <...>
data
250 ok
250 ok
354 End data with <CR><LF>.<CR><LF>
dados <CR><LF>.<CR><LF>
SMTP
Client
SMTP
Server
Edgard Jamhour
Ethernet is not considered part of the TCP/IP protocol stack
Packing
sequence
Data
application
segment/
datagram
packet
frame
Application Application
Layer
HTTP, FTP,
SMTP, etc
Operating
System
Transport
Layer
TCP, UDP
Network Layer
IP
N.I.C.
Ethernet
Edgard Jamhour
Open Systems Interconnection Model (OSI) is a conceptual model that
permits to classify network equipments and protocols.
Layer
7
Application Application dependent protocols Proxy, Layer 7 Firewall,
Hosts
Layer
6
Presentation Data transformation, compression and
encryption
Hosts
Layer
5
Session Session establishment, maintenance and
termination
Hosts
Layer
4
Transport Inter-process communication Layer 4 Firewalls, Proxy
Socks
Layer
3
Network Inter-LAN communication (routing) Router
Layer
2
Data Link Intra-LAN communication (forwarding) Switches, Bridges
Layer
1
Physical Physical representation of bits (electrical,
wireless or optical) and medium transportation
(cable, modulation, etc.)
Hubs, Repeaters
Edgard Jamhour
2
11
3
4
5
6
7
Send process
7
payload
7 6
payload
7 6 5
payload
7 6 5 4
payload
7 6 5 3
payload
7 6 5 4
4
3 2
payload
7 6 5 4 3 2 1
2
E 1
2
11
3
4
5
6
7
Receive Process
payload
7
payload
7 6
payload
7 6 5
payload
7 6 5 4
payload
7 6 5 3
payload
7 6 5 4
4
3 2
payload
7 6 5 4 3 2 1
2
E 1
data data
PPDU
SPDU
TPDU
NPDU
DL-PDU
APDU payload
0 1 0 0 1 0 0 ...
packet
frame
segment/data
gram
Each protocol transports the PDU of the protocol of the above layer.
Headers are added during transmission and removed during reception.
Edgard Jamhour
Protocols can be classified according to the OSI model. Only one
protocol of each layer can be used at a time.
Application
Presentation
Session
Transport
Network
Data Link
Physical
Ethernet, WiFi, PPP, HDLC, Token-
Ring, Frame-Relay, etc.
IP, IPX, ARP
TCP, UDP, SPX, NetBEUI
HTTP, FTP, SMB, SMTP, POP3,
IMAP4, DNS,
DHCP, EDI, BitTorrent, etc
ATM, MPLS
1
6
5
4
3
2
7
2.5
USB, RS-232, BlueTooth, Modem, etc.
NetBIOS, Sockets, RPC
SSL, MIME
Edgard Jamhour
Conclusion
• Protocols and Network Equipments
• Differences between LAN and WAN
• TCP/IP Protocol Stack
• Network Layer Model