SlideShare uma empresa Scribd logo
1 de 41
1
2
• C/Embedded Base Camp
• Networking essentials.
• Lecture 1
Petro Shevchenko
Maksym Vysochinenko
September 2021
3
1. Network overview
2. Reference models
3. Standards organisations
4. Protocol suites
5. Addressing
6. Ethernet frames
7. Ethernet MAC addresses
8. Address resolution protocol (ARP)
• Agenda
4
• Network overview
5
There are different types of networks:
● PAN (Personal Area Network)
● LAN (Local Area Network)
● WLAN (Wireless Local Area Network)
● MAN (Metropolitan Area Network)
● WAN (Wide Area Network)
6
What is MAC
● Network assumption: Broadcast channel
○ One channel, many stations
○ Competition, interference among
stations
● MAC: Medium Access Control
○ Also known as Multiple-Access
Control
○ The protocol used to determine
who goes next on a shared
physical media
● Classification of MAC protocols
○ Channel allocation (centralized)
○ Contention based protocols
(distributed)
○ Contention-free protocols
(distributed)
7
CSMA/CD (Carrier Sense Multiple Access with Collision Detection)
● Collisions detected within short time
● Colliding transmissions aborted, reducing channel wastage
● Easy in wired LANs: measure signal strengths, compare transmitted, received
signals
● Difficult in wireless LANs: receiver shut off while transmitting
CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance)
● Listens to determine how busy the shared media is
● Sends out a message telling all other nodes it is sending data
● All other nodes “back off” from sending data for a predetermined period of time
● Used in 802.11 WLANs
8
CSMA/CD Algorithm
JAM Signal
● As soon as a collision is detected, the
sending devices transmit a 32-bit “Jam”
signal - simply a repeating 1, 0, 1, 0
pattern
● Less than 64 bytes (a runt frame)
● Avoids detection of the jam signal as a
frame
When a host has a packet to transmit:
1. Carrier sense: check that the line is quiet before
transmitting
2. Collision detection: detect collision as soon as
possible. If a collision is detected, stop transmitting;
wait a random time, than return to step 1
9
CSMA/CA with RTS/CTS (Request To Send/Clear To Send)
● Station can send RTS with reservation parameter after waiting for DIFS (reservation
declares amount of time the data packet needs the medium)
● acknowledgement via CTS after SIFS by receiver (if ready to receive)
● sender can send data at once, acknowledgement via ACK
● other stations store medium reservations distributed via RTS and CTS
10
Types of network devices:
● Hub
● Switch
● Router
● Bridge
● Gateway
● Modem
● Repeater
● Access Point
● Hubs do not perform packet filtering or addressing functions; they
just send data packets to all connected devices.
● Generally, switches can read the hardware addresses of incoming
packets to transmit them to the appropriate destination.
● Routers help transmit packets to their destinations by charting a
path through the sea of interconnected networking devices using
different network topologies.
● Bridges are used to connect two or more hosts or network
segments together.
● Gateways connect two or more autonomous networks, each with
its own routing algorithms, protocols, topology, domain name
service, and network administration procedures and policies.
● Modems (modulators-demodulators) are used to transmit digital
signals over analog telephone lines.
● A repeater is an electronic device that amplifies the signal it
receives.
● Access points use the wireless infrastructure network mode to
provide a connection point between WLANs and a wired Ethernet
LAN.
11
• Reference models
12
The OSI Reference Model
▪ Application - contains protocols used for process-to-process
communications.
▪ Presentation - provides for common representation of the data.
▪ Session - provides services to the presentation layer to
organize its dialogue and to manage data exchange.
▪ Transport - defines services to segment, transfer, and
reassemble the data.
▪ Network - provides services to exchange the individual pieces
of data over the network between identified end devices.
▪ Data Link - provides methods for exchanging data frames
between devices over a common media.
▪ Physical - describes the mechanical, electrical, functional, and
procedural means to transmit bits across physical connections.
13
The TCP/IP vs OSI reference model
● The TCP/IP model does not define additional layers
between the application and transport layers as in the
OSI model. According to the TCP/IP model, such
functions are the realm of libraries and application
programming interfaces. The application layer in the
TCP/IP model is often compared to a combination of the
session, presentation, and application layers of the OSI
model.
● The TCP/IP model transport layer corresponds roughly to
the transport layer in the OSI model. The protocols in this
layer may provide error control, segmentation, flow
control, congestion control, and application addressing
(port numbers).
● The internet layer provides an unreliable datagram
transmission facility between hosts located on potentially
different IP networks by forwarding datagrams to an
appropriate next-hop router for further relaying to its
destination.
● The network access layer in the TCP/IP model has
corresponding functions in Layer 2 of the OSI model. The
network access layer is used to move packets between
the Internet layer interfaces of two different hosts on the
same link.
14
Standards organizations
Standards organizations are:
● vendor-neutral
● non-profit organizations
● established to develop and promote the concept of open standards
15
Standards organizations
• Institute of Electrical and Electronics Engineers (IEEE, pronounced “I-
triple-E”) - dedicated to creating standards in power and energy,
healthcare, telecommunications, and networking
○ IEEE 802.3 - working group defining layers 1,2 of Ethernet
○ IEEE 802.11 - working group defining layers 1,2 of WLAN
● Internet Engineering Task Force is an open standards organization,
which develops and promotes voluntary Internet standards.
○ RFC 791 - Internet Protocol (IP) specification
○ RFC 793 - Transmission Control Protocol (TCP) specification
• Internet Assigned Addresses Authority is the organization that
oversees the allocation of IP addresses to internet service providers
16
• Protocol suites
17
TCP/IP Protocol Suite
● TCP/IP is the protocol suite used by the
internet and includes many protocols
● TCP/IP is:
○ An open standard protocol
suite that is freely
available to the public and
can be used by any vendor
○ A standards-based
protocol suite that is
endorsed by the
networking industry and
approved by a standards
organization to ensure
interoperability
18
TCP/IP Protocol Example
● TCP/IP protocols operate at the
application, transport, and
internet layers.
● The most common network access
layer LAN protocols are Ethernet
and WLAN (wireless LAN).
19
TCP/IP Communication Process
● A web server encapsulating and sending
a web page to a client.
• A client de-encapsulating the web page for
the web browser
20
IoT Messaging Protocols
● Common IoT application layer protocols
in use today:
○ MQTT - Message Queueing
Telemetry Transport uses TCP and
requires a message broker
○ CoAP - Constrained Application
Protocol is a document transfer
protocol that uses UDP
● Important characteristics for IoT
protocols:
○ Power consumption
○ Speed
○ Latency
○ Security
21
Protocol Data Units
● Encapsulation is the process where protocols
add their information to the data.
● At each stage of the process, a PDU has a
different name to reflect its new functions.
● There is no universal naming convention for
PDUs, in this course, the PDUs are named
according to the protocols of the TCP/IP suite.
● PDUs passing down the stack are as follows:
○ Data (Data Stream)
○ Segment
○ Packet
○ Frame
○ Bits (Bit Stream
22
• Addressing
23
Addresses
● Both the data link and network layers use addressing to deliver data from source to destination.
● Network layer source and destination addresses - Responsible for delivering the IP packet from
original source to the final destination.
● Data link layer source and destination addresses – Responsible for delivering the data link frame
from one network interface card (NIC) to another NIC on the same network.
24
IP Address and Subnet Mask
● An Internet Protocol address (IP address) is a numerical label such as 192.0.2.1 that is connected to a
computer network that uses the Internet Protocol for communication
● An IP address serves two main functions: host or network interface identification and location
addressing.
● Internet Protocol version 4 (IPv4) defines an IP address as a 32-bit number.
● Internet Protocol version 6(IPv6) defines an IP address as a 128-bit number.
● A subnet mask is a 32- or 128-bit number that segments an existing IP address in a TCP/IP network.
● Subnet mask divides the IP address into a network address and host address
● Subnet mask can be represented in the dotted decimal format, such as 255.255.255.0
● The binary number 1 reflects the network part of the IP address
● Subnet mask can be written as the number of bits set to 1, for example : 192.168.1.34/24
2001:1234:5678:1234:5678:ABCD:EF12:1234/64
25
Role of the Data Link Layer Addresses: Different IP Networks
● When the final destination is remote, Layer 3
will provide Layer 2 with the local default
gateway IP address, also known as the router
address.
● The default gateway (DGW) is the router
interface IP address that is part of this LAN
and will be the “door” or “gateway” to all
other remote locations.
● All devices on the LAN must be told about this
address or their traffic will be confined to the
LAN only.
● Once Layer 2 on PC1 forwards to the default
gateway (Router), the router then can start the
routing process of getting the information to
actual destination.
26
• Ethernet Frames
27
Ethernet Encapsulation
• Ethernet operates in the data
link layer and the physical
layer.
• It is a family of networking
technologies defined in the
IEEE 802.2 and 802.3
standards.
28
Data Link Sublayers
The 802 LAN/MAN standards, including Ethernet,
use two separate sublayers of the data link layer
to operate:
• LLC Sublayer: (IEEE 802.2) Places information
in the frame to identify which network layer
protocol is used for the frame.
• MAC Sublayer: (IEEE 802.3, 802.11, or 802.15)
Responsible for data encapsulation and media
access control, and provides data link layer
addressing.
29
Frame Fields
Field Description
Frame Start and Stop Identifies beginning and end of frame
Addressing Indicates source and destination nodes
Type Identifies encapsulated Layer 3 protocol
Control Identifies flow control services
Data Contains the frame payload
Error Detection Used for determine transmission errors
30
Ethernet Frame Fields
• The minimum Ethernet frame size is 64 bytes and the maximum is 1518 bytes. The preamble
field is not included when describing the size of the frame.
• Any frame less than 64 bytes in length is considered a “collision fragment” or “runt frame”
and is automatically discarded. Frames with more than 1500 bytes of data are considered
“jumbo” or “baby giant frames”.
• If the size of a transmitted frame is less than the minimum, or greater than the maximum, the
receiving device drops the frame. Dropped frames are likely to be the result of collisions or
other unwanted signals. They are considered invalid. Jumbo frames are usually supported by
most Fast Ethernet and Gigabit Ethernet switches and NICs.
31
• Ethernet MAC Addresses
32
Ethernet MAC Address
• In an Ethernet LAN, every network device is connected to the same, shared media. MAC
addressing provides a method for device identification at the data link layer of the OSI model.
• An Ethernet MAC address is a 48-bit address expressed using 12 hexadecimal digits. Because a
byte equals 8 bits, we can also say that a MAC address is 6 bytes in length.
• All MAC addresses must be unique to the Ethernet device or Ethernet interface. To ensure this,
all vendors that sell Ethernet devices must register with the IEEE to obtain a unique 6
hexadecimal (i.e., 24-bit or 3-byte) code called the organizationally unique identifier (OUI).
• An Ethernet MAC address consists of a 6 hexadecimal vendor OUI code followed by a 6
hexadecimal vendor-assigned value.
33
Unicast MAC Address
In Ethernet, different MAC addresses are used for
Layer 2 unicast, broadcast, and multicast
communications.
• A unicast MAC address is the unique address that
is used when a frame is sent from a single
transmitting device to a single destination device.
• The process that a source host uses to determine
the destination MAC address associated with an
IPv4 address is known as Address Resolution
Protocol (ARP). The process that a source host
uses to determine the destination MAC address
associated with an IPv6 address is known as
Neighbor Discovery (ND).
Note: The source MAC address must always be a
unicast.
34
Broadcast MAC Address
An Ethernet broadcast frame is received and
processed by every device on the Ethernet LAN.
The features of an Ethernet broadcast are as
follows:
• It has a destination MAC address of FF-FF-FF-
FF-FF-FF in hexadecimal (48 ones in binary).
• It is flooded out all Ethernet switch ports
except the incoming port. It is not forwarded
by a router.
• If the encapsulated data is an IPv4 broadcast
packet, this means the packet contains a
destination IPv4 address that has all ones (1s)
in the host portion. This numbering in the
address means that all hosts on that local
network (broadcast domain) will receive and
process the packet.
35
Multicast MAC Address
An Ethernet multicast frame is received and processed by a
group of devices that belong to the same multicast group.
• There is a destination MAC address of 01-00-5E when the
encapsulated data is an IPv4 multicast packet and a
destination MAC address of 33-33 when the encapsulated
data is an IPv6 multicast packet.
• There are other reserved multicast destination MAC
addresses for when the encapsulated data is not IP, such as
Spanning Tree Protocol (STP).
• It is flooded out all Ethernet switch ports except the
incoming port, unless the switch is configured for multicast
snooping. It is not forwarded by a router, unless the router
is configured to route multicast packets.
• Because multicast addresses represent a group of
addresses (sometimes called a host group), they can only
be used as the destination of a packet. The source will
always be a unicast address.
• As with the unicast and broadcast addresses, the multicast
IP address requires a corresponding multicast MAC
address.
36
• Address Resolution Protocol (ARP)
37
Address Resolution Protocol
● The Address Resolution Protocol (ARP) is a
communication protocol used for discovering
the link layer address, such as a MAC address,
associated with a given internet layer address,
typically an IPv4 address.
● In Internet Protocol Version 6 (IPv6) networks,
the functionality of ARP is provided by the
Neighbor Discovery Protocol (NDP).
● The Address Resolution Protocol is a request-
response protocol whose messages are
encapsulated by a link layer protocol. It is
communicated within the boundaries of a single
network, never routed across internetworking
nodes. This property places ARP into the link
layer of the Internet protocol suite.
38
ARP packet format
Hardware type
● This field specifies the network link protocol
type.
Protocol type
● This field specifies the internetwork protocol for
which the ARP request is intended
Hardware length
● Length of a hardware address.
Protocol length
● Length of internetwork addresses.
Operation Code
● Specifies the operation that the sender is
performing: 1 for request, 2 for reply.
Source MAC
● Media address of the sender
Source protocol address
● Internetwork address of the sender.
Target MAC
● Media address of the intended receiver.
Target protocol address
● Internetwork address of the intended receiver.
39
ARP Tables on Networking Devices
• The show ip arp command displays the ARP table on a Cisco router.
• The arp –a command displays the ARP table on a Windows 10 PC.
• The arp -i enp0s31f6 command displays the ARP entries for a specific interface on a Ubuntu 20.04
LTS PC.
R1# show ip arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.10.1 - a0e0.af0d.e140 ARPA GigabitEthernet0/0/0
C:UsersPC> arp -a
Interface: 192.168.1.124 --- 0x10
Internet Address Physical Address Type
192.168.1.1 c8-d7-19-cc-a0-86 dynamic
user@host ~ $ arp -i enp0s31f6
Address HWtype HWaddress Flags Mask
Iface
192.168.0.104 ether 4c:eb:bd:24:7a:29 C
enp0s31f6
_gateway ether 00:26:5a:c3:45:df C
40
Homework #1
Install Wireshark, ifconfig, nmap utilities first:
sudo apt install wireshark-qt net-tools nmap -y
Add yourself to the wireshark group to run Wireshark as a non-root user:
Run nmap to show all available computers on your local network, for example:
nmap -sP 192.168.0.0/24
Launch ifconfig utility to discover network interfaces available on your PC. Run Wireshark, select one of the
available interfaces(Ethernet or WLAN) to capture network traffic.
Run arp -a to show ARP table then perform ping command with one of the available IP addresses on your
network. Run arp -a again
Enter ‘arp’ filter in Wireshark to see captured ARP packets, analyze them and find difference between the
Ethernet frame format and the captured frame.
sudo usermod -a -G wireshark $USER
sudo reboot
41
• Thank You

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Network Layer by-adeel
Network Layer by-adeelNetwork Layer by-adeel
Network Layer by-adeel
 
Ethernet, Point-to-Point Protocol, ARP
Ethernet, Point-to-Point Protocol, ARP Ethernet, Point-to-Point Protocol, ARP
Ethernet, Point-to-Point Protocol, ARP
 
Final Presentation on the Network layer
Final Presentation on the Network layerFinal Presentation on the Network layer
Final Presentation on the Network layer
 
Networking essentials lect2
Networking essentials lect2Networking essentials lect2
Networking essentials lect2
 
OSI Layers
OSI LayersOSI Layers
OSI Layers
 
Gl embedded starterkit_ethernet
Gl embedded starterkit_ethernetGl embedded starterkit_ethernet
Gl embedded starterkit_ethernet
 
02 network models
02  network models02  network models
02 network models
 
Chapter 4 internetworking [compatibility mode]
Chapter 4   internetworking [compatibility mode]Chapter 4   internetworking [compatibility mode]
Chapter 4 internetworking [compatibility mode]
 
The Theoretical Network
The Theoretical NetworkThe Theoretical Network
The Theoretical Network
 
TCP/ IP
TCP/ IP TCP/ IP
TCP/ IP
 
TCP/IP model
TCP/IP modelTCP/IP model
TCP/IP model
 
Basic networking course
Basic networking courseBasic networking course
Basic networking course
 
Internetworking Overview
Internetworking OverviewInternetworking Overview
Internetworking Overview
 
Introduction for internet connectivity (IoT)
 Introduction for internet connectivity (IoT) Introduction for internet connectivity (IoT)
Introduction for internet connectivity (IoT)
 
Ns lecture1: Introduction to Routing Protocol
Ns lecture1: Introduction to Routing ProtocolNs lecture1: Introduction to Routing Protocol
Ns lecture1: Introduction to Routing Protocol
 
Link state routing protocol
Link state routing protocolLink state routing protocol
Link state routing protocol
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Ns lecture3: Introduction to Multi Protocol Label Switching(MPLS)
Ns lecture3: Introduction to Multi Protocol Label Switching(MPLS) Ns lecture3: Introduction to Multi Protocol Label Switching(MPLS)
Ns lecture3: Introduction to Multi Protocol Label Switching(MPLS)
 
OSI layers
OSI layersOSI layers
OSI layers
 
Module 1 slides
Module 1 slidesModule 1 slides
Module 1 slides
 

Semelhante a Networking essentials lect1

Лекц 7
Лекц 7Лекц 7
Лекц 7
Muuluu
 
Networking- OSI Layer Protocol Functions
Networking- OSI Layer Protocol FunctionsNetworking- OSI Layer Protocol Functions
Networking- OSI Layer Protocol Functions
Gayathri Kesavan
 
Web technologies: recap on TCP-IP
Web technologies: recap on TCP-IPWeb technologies: recap on TCP-IP
Web technologies: recap on TCP-IP
Piero Fraternali
 
Introduction to Networks_v0.2
Introduction to Networks_v0.2Introduction to Networks_v0.2
Introduction to Networks_v0.2
Sohail Gohir
 

Semelhante a Networking essentials lect1 (20)

Лекц 7
Лекц 7Лекц 7
Лекц 7
 
1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf
1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf
1.NggggggggggghhhhhhhhhhS UNIT - 1.pptx.pdf
 
MVA slides lesson 2
MVA slides lesson 2MVA slides lesson 2
MVA slides lesson 2
 
Networking- OSI Layer Protocol Functions
Networking- OSI Layer Protocol FunctionsNetworking- OSI Layer Protocol Functions
Networking- OSI Layer Protocol Functions
 
Web technologies: recap on TCP-IP
Web technologies: recap on TCP-IPWeb technologies: recap on TCP-IP
Web technologies: recap on TCP-IP
 
Bhargava Presentation.ppt
Bhargava Presentation.pptBhargava Presentation.ppt
Bhargava Presentation.ppt
 
Bhargava Presentation.ppt
Bhargava Presentation.pptBhargava Presentation.ppt
Bhargava Presentation.ppt
 
lecture 2.pptx
lecture 2.pptxlecture 2.pptx
lecture 2.pptx
 
presentation on TCP/IP protocols data comunications
presentation on TCP/IP protocols data comunicationspresentation on TCP/IP protocols data comunications
presentation on TCP/IP protocols data comunications
 
Unit 2 ppt-idc
Unit 2 ppt-idcUnit 2 ppt-idc
Unit 2 ppt-idc
 
CCNA question and answer
CCNA question and answer   CCNA question and answer
CCNA question and answer
 
COMPUTER NETWORKING
COMPUTER NETWORKINGCOMPUTER NETWORKING
COMPUTER NETWORKING
 
Lecture 1 Network Reference Models Final.pptx
Lecture 1 Network Reference Models Final.pptxLecture 1 Network Reference Models Final.pptx
Lecture 1 Network Reference Models Final.pptx
 
unit2-210710110327.pptx
unit2-210710110327.pptxunit2-210710110327.pptx
unit2-210710110327.pptx
 
Module 1.pptx
Module 1.pptxModule 1.pptx
Module 1.pptx
 
Introduction to Networks_v0.2
Introduction to Networks_v0.2Introduction to Networks_v0.2
Introduction to Networks_v0.2
 
CCNA project-report
CCNA project-reportCCNA project-report
CCNA project-report
 
Computer Networks Notes Complete Syllabus
Computer Networks Notes Complete SyllabusComputer Networks Notes Complete Syllabus
Computer Networks Notes Complete Syllabus
 
CN Unit-1 PPT.pptx
CN Unit-1 PPT.pptxCN Unit-1 PPT.pptx
CN Unit-1 PPT.pptx
 
Network Topologies, L1-L2 Basics, Networking Devices
Network Topologies, L1-L2 Basics, Networking DevicesNetwork Topologies, L1-L2 Basics, Networking Devices
Network Topologies, L1-L2 Basics, Networking Devices
 

Mais de Roman Brovko

Bare metal training_06_I2C
Bare metal training_06_I2CBare metal training_06_I2C
Bare metal training_06_I2C
Roman Brovko
 
Bare metal training_05_uart
Bare metal training_05_uartBare metal training_05_uart
Bare metal training_05_uart
Roman Brovko
 
подготовка рабочего окружения
подготовка рабочего окруженияподготовка рабочего окружения
подготовка рабочего окружения
Roman Brovko
 

Mais de Roman Brovko (20)

Individual task Networking
Individual task NetworkingIndividual task Networking
Individual task Networking
 
Networking essentials lect3
Networking essentials lect3Networking essentials lect3
Networking essentials lect3
 
Bare metal training_07_spi_flash
Bare metal training_07_spi_flashBare metal training_07_spi_flash
Bare metal training_07_spi_flash
 
Bare metal training_06_I2C
Bare metal training_06_I2CBare metal training_06_I2C
Bare metal training_06_I2C
 
Glesk worshop
Glesk worshopGlesk worshop
Glesk worshop
 
Bare metal training_05_uart
Bare metal training_05_uartBare metal training_05_uart
Bare metal training_05_uart
 
Bare metal training_04_adc_temp_sensor
Bare metal training_04_adc_temp_sensorBare metal training_04_adc_temp_sensor
Bare metal training_04_adc_temp_sensor
 
Bare metal training_03_timers_pwm
Bare metal training_03_timers_pwmBare metal training_03_timers_pwm
Bare metal training_03_timers_pwm
 
Bare metal training_02_le_ds_and_buttons
Bare metal training_02_le_ds_and_buttonsBare metal training_02_le_ds_and_buttons
Bare metal training_02_le_ds_and_buttons
 
Bare metal training_01_hello_world
Bare metal training_01_hello_worldBare metal training_01_hello_world
Bare metal training_01_hello_world
 
Bare metal training_00_prerequisites
Bare metal training_00_prerequisitesBare metal training_00_prerequisites
Bare metal training_00_prerequisites
 
C language lect_23_advanced
C language lect_23_advancedC language lect_23_advanced
C language lect_23_advanced
 
C language lect_22_advanced
C language lect_22_advancedC language lect_22_advanced
C language lect_22_advanced
 
C language lect_21_advanced
C language lect_21_advancedC language lect_21_advanced
C language lect_21_advanced
 
подготовка рабочего окружения
подготовка рабочего окруженияподготовка рабочего окружения
подготовка рабочего окружения
 
C language lect_20_advanced
C language lect_20_advancedC language lect_20_advanced
C language lect_20_advanced
 
C language lect_19_basics
C language lect_19_basicsC language lect_19_basics
C language lect_19_basics
 
C language lect_18_basics
C language lect_18_basicsC language lect_18_basics
C language lect_18_basics
 
C language lect_17_basics
C language lect_17_basicsC language lect_17_basics
C language lect_17_basics
 
C language lect_16_basics
C language lect_16_basicsC language lect_16_basics
C language lect_16_basics
 

Último

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Último (20)

Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 

Networking essentials lect1

  • 1. 1
  • 2. 2 • C/Embedded Base Camp • Networking essentials. • Lecture 1 Petro Shevchenko Maksym Vysochinenko September 2021
  • 3. 3 1. Network overview 2. Reference models 3. Standards organisations 4. Protocol suites 5. Addressing 6. Ethernet frames 7. Ethernet MAC addresses 8. Address resolution protocol (ARP) • Agenda
  • 5. 5 There are different types of networks: ● PAN (Personal Area Network) ● LAN (Local Area Network) ● WLAN (Wireless Local Area Network) ● MAN (Metropolitan Area Network) ● WAN (Wide Area Network)
  • 6. 6 What is MAC ● Network assumption: Broadcast channel ○ One channel, many stations ○ Competition, interference among stations ● MAC: Medium Access Control ○ Also known as Multiple-Access Control ○ The protocol used to determine who goes next on a shared physical media ● Classification of MAC protocols ○ Channel allocation (centralized) ○ Contention based protocols (distributed) ○ Contention-free protocols (distributed)
  • 7. 7 CSMA/CD (Carrier Sense Multiple Access with Collision Detection) ● Collisions detected within short time ● Colliding transmissions aborted, reducing channel wastage ● Easy in wired LANs: measure signal strengths, compare transmitted, received signals ● Difficult in wireless LANs: receiver shut off while transmitting CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) ● Listens to determine how busy the shared media is ● Sends out a message telling all other nodes it is sending data ● All other nodes “back off” from sending data for a predetermined period of time ● Used in 802.11 WLANs
  • 8. 8 CSMA/CD Algorithm JAM Signal ● As soon as a collision is detected, the sending devices transmit a 32-bit “Jam” signal - simply a repeating 1, 0, 1, 0 pattern ● Less than 64 bytes (a runt frame) ● Avoids detection of the jam signal as a frame When a host has a packet to transmit: 1. Carrier sense: check that the line is quiet before transmitting 2. Collision detection: detect collision as soon as possible. If a collision is detected, stop transmitting; wait a random time, than return to step 1
  • 9. 9 CSMA/CA with RTS/CTS (Request To Send/Clear To Send) ● Station can send RTS with reservation parameter after waiting for DIFS (reservation declares amount of time the data packet needs the medium) ● acknowledgement via CTS after SIFS by receiver (if ready to receive) ● sender can send data at once, acknowledgement via ACK ● other stations store medium reservations distributed via RTS and CTS
  • 10. 10 Types of network devices: ● Hub ● Switch ● Router ● Bridge ● Gateway ● Modem ● Repeater ● Access Point ● Hubs do not perform packet filtering or addressing functions; they just send data packets to all connected devices. ● Generally, switches can read the hardware addresses of incoming packets to transmit them to the appropriate destination. ● Routers help transmit packets to their destinations by charting a path through the sea of interconnected networking devices using different network topologies. ● Bridges are used to connect two or more hosts or network segments together. ● Gateways connect two or more autonomous networks, each with its own routing algorithms, protocols, topology, domain name service, and network administration procedures and policies. ● Modems (modulators-demodulators) are used to transmit digital signals over analog telephone lines. ● A repeater is an electronic device that amplifies the signal it receives. ● Access points use the wireless infrastructure network mode to provide a connection point between WLANs and a wired Ethernet LAN.
  • 12. 12 The OSI Reference Model ▪ Application - contains protocols used for process-to-process communications. ▪ Presentation - provides for common representation of the data. ▪ Session - provides services to the presentation layer to organize its dialogue and to manage data exchange. ▪ Transport - defines services to segment, transfer, and reassemble the data. ▪ Network - provides services to exchange the individual pieces of data over the network between identified end devices. ▪ Data Link - provides methods for exchanging data frames between devices over a common media. ▪ Physical - describes the mechanical, electrical, functional, and procedural means to transmit bits across physical connections.
  • 13. 13 The TCP/IP vs OSI reference model ● The TCP/IP model does not define additional layers between the application and transport layers as in the OSI model. According to the TCP/IP model, such functions are the realm of libraries and application programming interfaces. The application layer in the TCP/IP model is often compared to a combination of the session, presentation, and application layers of the OSI model. ● The TCP/IP model transport layer corresponds roughly to the transport layer in the OSI model. The protocols in this layer may provide error control, segmentation, flow control, congestion control, and application addressing (port numbers). ● The internet layer provides an unreliable datagram transmission facility between hosts located on potentially different IP networks by forwarding datagrams to an appropriate next-hop router for further relaying to its destination. ● The network access layer in the TCP/IP model has corresponding functions in Layer 2 of the OSI model. The network access layer is used to move packets between the Internet layer interfaces of two different hosts on the same link.
  • 14. 14 Standards organizations Standards organizations are: ● vendor-neutral ● non-profit organizations ● established to develop and promote the concept of open standards
  • 15. 15 Standards organizations • Institute of Electrical and Electronics Engineers (IEEE, pronounced “I- triple-E”) - dedicated to creating standards in power and energy, healthcare, telecommunications, and networking ○ IEEE 802.3 - working group defining layers 1,2 of Ethernet ○ IEEE 802.11 - working group defining layers 1,2 of WLAN ● Internet Engineering Task Force is an open standards organization, which develops and promotes voluntary Internet standards. ○ RFC 791 - Internet Protocol (IP) specification ○ RFC 793 - Transmission Control Protocol (TCP) specification • Internet Assigned Addresses Authority is the organization that oversees the allocation of IP addresses to internet service providers
  • 17. 17 TCP/IP Protocol Suite ● TCP/IP is the protocol suite used by the internet and includes many protocols ● TCP/IP is: ○ An open standard protocol suite that is freely available to the public and can be used by any vendor ○ A standards-based protocol suite that is endorsed by the networking industry and approved by a standards organization to ensure interoperability
  • 18. 18 TCP/IP Protocol Example ● TCP/IP protocols operate at the application, transport, and internet layers. ● The most common network access layer LAN protocols are Ethernet and WLAN (wireless LAN).
  • 19. 19 TCP/IP Communication Process ● A web server encapsulating and sending a web page to a client. • A client de-encapsulating the web page for the web browser
  • 20. 20 IoT Messaging Protocols ● Common IoT application layer protocols in use today: ○ MQTT - Message Queueing Telemetry Transport uses TCP and requires a message broker ○ CoAP - Constrained Application Protocol is a document transfer protocol that uses UDP ● Important characteristics for IoT protocols: ○ Power consumption ○ Speed ○ Latency ○ Security
  • 21. 21 Protocol Data Units ● Encapsulation is the process where protocols add their information to the data. ● At each stage of the process, a PDU has a different name to reflect its new functions. ● There is no universal naming convention for PDUs, in this course, the PDUs are named according to the protocols of the TCP/IP suite. ● PDUs passing down the stack are as follows: ○ Data (Data Stream) ○ Segment ○ Packet ○ Frame ○ Bits (Bit Stream
  • 23. 23 Addresses ● Both the data link and network layers use addressing to deliver data from source to destination. ● Network layer source and destination addresses - Responsible for delivering the IP packet from original source to the final destination. ● Data link layer source and destination addresses – Responsible for delivering the data link frame from one network interface card (NIC) to another NIC on the same network.
  • 24. 24 IP Address and Subnet Mask ● An Internet Protocol address (IP address) is a numerical label such as 192.0.2.1 that is connected to a computer network that uses the Internet Protocol for communication ● An IP address serves two main functions: host or network interface identification and location addressing. ● Internet Protocol version 4 (IPv4) defines an IP address as a 32-bit number. ● Internet Protocol version 6(IPv6) defines an IP address as a 128-bit number. ● A subnet mask is a 32- or 128-bit number that segments an existing IP address in a TCP/IP network. ● Subnet mask divides the IP address into a network address and host address ● Subnet mask can be represented in the dotted decimal format, such as 255.255.255.0 ● The binary number 1 reflects the network part of the IP address ● Subnet mask can be written as the number of bits set to 1, for example : 192.168.1.34/24 2001:1234:5678:1234:5678:ABCD:EF12:1234/64
  • 25. 25 Role of the Data Link Layer Addresses: Different IP Networks ● When the final destination is remote, Layer 3 will provide Layer 2 with the local default gateway IP address, also known as the router address. ● The default gateway (DGW) is the router interface IP address that is part of this LAN and will be the “door” or “gateway” to all other remote locations. ● All devices on the LAN must be told about this address or their traffic will be confined to the LAN only. ● Once Layer 2 on PC1 forwards to the default gateway (Router), the router then can start the routing process of getting the information to actual destination.
  • 27. 27 Ethernet Encapsulation • Ethernet operates in the data link layer and the physical layer. • It is a family of networking technologies defined in the IEEE 802.2 and 802.3 standards.
  • 28. 28 Data Link Sublayers The 802 LAN/MAN standards, including Ethernet, use two separate sublayers of the data link layer to operate: • LLC Sublayer: (IEEE 802.2) Places information in the frame to identify which network layer protocol is used for the frame. • MAC Sublayer: (IEEE 802.3, 802.11, or 802.15) Responsible for data encapsulation and media access control, and provides data link layer addressing.
  • 29. 29 Frame Fields Field Description Frame Start and Stop Identifies beginning and end of frame Addressing Indicates source and destination nodes Type Identifies encapsulated Layer 3 protocol Control Identifies flow control services Data Contains the frame payload Error Detection Used for determine transmission errors
  • 30. 30 Ethernet Frame Fields • The minimum Ethernet frame size is 64 bytes and the maximum is 1518 bytes. The preamble field is not included when describing the size of the frame. • Any frame less than 64 bytes in length is considered a “collision fragment” or “runt frame” and is automatically discarded. Frames with more than 1500 bytes of data are considered “jumbo” or “baby giant frames”. • If the size of a transmitted frame is less than the minimum, or greater than the maximum, the receiving device drops the frame. Dropped frames are likely to be the result of collisions or other unwanted signals. They are considered invalid. Jumbo frames are usually supported by most Fast Ethernet and Gigabit Ethernet switches and NICs.
  • 31. 31 • Ethernet MAC Addresses
  • 32. 32 Ethernet MAC Address • In an Ethernet LAN, every network device is connected to the same, shared media. MAC addressing provides a method for device identification at the data link layer of the OSI model. • An Ethernet MAC address is a 48-bit address expressed using 12 hexadecimal digits. Because a byte equals 8 bits, we can also say that a MAC address is 6 bytes in length. • All MAC addresses must be unique to the Ethernet device or Ethernet interface. To ensure this, all vendors that sell Ethernet devices must register with the IEEE to obtain a unique 6 hexadecimal (i.e., 24-bit or 3-byte) code called the organizationally unique identifier (OUI). • An Ethernet MAC address consists of a 6 hexadecimal vendor OUI code followed by a 6 hexadecimal vendor-assigned value.
  • 33. 33 Unicast MAC Address In Ethernet, different MAC addresses are used for Layer 2 unicast, broadcast, and multicast communications. • A unicast MAC address is the unique address that is used when a frame is sent from a single transmitting device to a single destination device. • The process that a source host uses to determine the destination MAC address associated with an IPv4 address is known as Address Resolution Protocol (ARP). The process that a source host uses to determine the destination MAC address associated with an IPv6 address is known as Neighbor Discovery (ND). Note: The source MAC address must always be a unicast.
  • 34. 34 Broadcast MAC Address An Ethernet broadcast frame is received and processed by every device on the Ethernet LAN. The features of an Ethernet broadcast are as follows: • It has a destination MAC address of FF-FF-FF- FF-FF-FF in hexadecimal (48 ones in binary). • It is flooded out all Ethernet switch ports except the incoming port. It is not forwarded by a router. • If the encapsulated data is an IPv4 broadcast packet, this means the packet contains a destination IPv4 address that has all ones (1s) in the host portion. This numbering in the address means that all hosts on that local network (broadcast domain) will receive and process the packet.
  • 35. 35 Multicast MAC Address An Ethernet multicast frame is received and processed by a group of devices that belong to the same multicast group. • There is a destination MAC address of 01-00-5E when the encapsulated data is an IPv4 multicast packet and a destination MAC address of 33-33 when the encapsulated data is an IPv6 multicast packet. • There are other reserved multicast destination MAC addresses for when the encapsulated data is not IP, such as Spanning Tree Protocol (STP). • It is flooded out all Ethernet switch ports except the incoming port, unless the switch is configured for multicast snooping. It is not forwarded by a router, unless the router is configured to route multicast packets. • Because multicast addresses represent a group of addresses (sometimes called a host group), they can only be used as the destination of a packet. The source will always be a unicast address. • As with the unicast and broadcast addresses, the multicast IP address requires a corresponding multicast MAC address.
  • 36. 36 • Address Resolution Protocol (ARP)
  • 37. 37 Address Resolution Protocol ● The Address Resolution Protocol (ARP) is a communication protocol used for discovering the link layer address, such as a MAC address, associated with a given internet layer address, typically an IPv4 address. ● In Internet Protocol Version 6 (IPv6) networks, the functionality of ARP is provided by the Neighbor Discovery Protocol (NDP). ● The Address Resolution Protocol is a request- response protocol whose messages are encapsulated by a link layer protocol. It is communicated within the boundaries of a single network, never routed across internetworking nodes. This property places ARP into the link layer of the Internet protocol suite.
  • 38. 38 ARP packet format Hardware type ● This field specifies the network link protocol type. Protocol type ● This field specifies the internetwork protocol for which the ARP request is intended Hardware length ● Length of a hardware address. Protocol length ● Length of internetwork addresses. Operation Code ● Specifies the operation that the sender is performing: 1 for request, 2 for reply. Source MAC ● Media address of the sender Source protocol address ● Internetwork address of the sender. Target MAC ● Media address of the intended receiver. Target protocol address ● Internetwork address of the intended receiver.
  • 39. 39 ARP Tables on Networking Devices • The show ip arp command displays the ARP table on a Cisco router. • The arp –a command displays the ARP table on a Windows 10 PC. • The arp -i enp0s31f6 command displays the ARP entries for a specific interface on a Ubuntu 20.04 LTS PC. R1# show ip arp Protocol Address Age (min) Hardware Addr Type Interface Internet 192.168.10.1 - a0e0.af0d.e140 ARPA GigabitEthernet0/0/0 C:UsersPC> arp -a Interface: 192.168.1.124 --- 0x10 Internet Address Physical Address Type 192.168.1.1 c8-d7-19-cc-a0-86 dynamic user@host ~ $ arp -i enp0s31f6 Address HWtype HWaddress Flags Mask Iface 192.168.0.104 ether 4c:eb:bd:24:7a:29 C enp0s31f6 _gateway ether 00:26:5a:c3:45:df C
  • 40. 40 Homework #1 Install Wireshark, ifconfig, nmap utilities first: sudo apt install wireshark-qt net-tools nmap -y Add yourself to the wireshark group to run Wireshark as a non-root user: Run nmap to show all available computers on your local network, for example: nmap -sP 192.168.0.0/24 Launch ifconfig utility to discover network interfaces available on your PC. Run Wireshark, select one of the available interfaces(Ethernet or WLAN) to capture network traffic. Run arp -a to show ARP table then perform ping command with one of the available IP addresses on your network. Run arp -a again Enter ‘arp’ filter in Wireshark to see captured ARP packets, analyze them and find difference between the Ethernet frame format and the captured frame. sudo usermod -a -G wireshark $USER sudo reboot