Professional Documents
Culture Documents
NETWORKS
Lecture №1
Student Civility
2/
133
3
4/
133
Homework recommends
One point will be deducted for each class day late, with a possible maximum
of 10 points being deducted.
Home works will not be accepted after the third class following its due date.
For each assignment that you do not hand in within the time limit, your final
grade will be lowered by one grade
Submit the program via website(more on this later)
Back up your work. Computer crashes or lost programs are not valid
excuses for not handing in an assignment.
5/
133
Course Web Site
Course web site is available at: estud.rai.lv
6/
133
Class list
First assignment is to join it. Do it today!
• Go to: end of my slides
7/
133
8
9/
133
Introduction
• The purpose of this course is to teach you about
computing, but particularly, programming in R (a
powerful, widely-used programming language).
• Why care about computers and programming?
▫ Enabling technology
▫ Growing field with great opportunity (read: $)
▫ Creative outlet
10/
133
Course Description
Official Description:
Elementary introduction to Computer Science.
The characteristics of computers are discussed
and students design, construct data and debug
programs using a high level programming
language.
11/
133
What Is a Computer?
• Computer
▫ Performs computations and makes logical decisions
▫ Millions / billions times faster than human beings
• Computer programs
▫ Sets of instructions by which a computer processes
data
• Hardware
▫ Physical devices of computer system
• Software
▫ Programs that run on computers
12/
133
Computer Organization
13/
133
Evolution of Operating Systems
• Batch processing
▫ One job (task) at a time
▫ Operating systems developed
Programs to make computers more convenient to
use
Switch jobs easier
• Multiprogramming
▫ “Simultaneous” jobs
▫ Timesharing operating systems
14/
133
Personal Computing, Distributed
Computing, and Client/Server Computing
• Personal computers
▫ Economical enough for individual
▫ Popularized by Steve Jobs and Steve Wozniak
with the introduction of the Apple in 1977.
▫ In 1981 IBM introduced the IBM personal
computer using “off the shelf” components.
15/
133
The boot process
16/
133
The boot process (continued)
17/
133
Why Computer Networks are needed?
Application Type
18
Communications Tasks
Transmission system Addressing
utilization
Interfacing Routing
19
Protocol Layering and Routing
Host A Host B
Application Layer Application Layer
HTTP Message
Router
Internet Layer Internet Layer Internet Layer
IP Datagram IP Datagram
20
Four-Layer Model
Distributed data communications involves three
primary components:
▫ Applications
▫ Computers
▫ Networks
Four corresponding layers
▫ Application layer
▫ Transport layer
▫ Internet layer
▫ Network Interface
21
Net+OS Provides…
Transport Session
Application
22
Types of Communication Networks
Classification according to the way the
“information flows” are transported to the
users
• Switching Networks
• Broadcast Networks
23
Switching Networks
Data are transferred from source to destination
through a series of intermediate nodes. Its meant
workstations that connected by the use of cables
or another interfaces.
24
Broadcast Networks
--There are no intermediate switching nodes
--All users are connected on the same medium
Satellite
25
Classification According to Coverage Area
Local Area Networks (0-2 Km; campus)
• Ethernet (10/100/1000 Mbps), Token ring (4, 16 Mbps),
IEEE 802.11(b, g, a, n)
26
Local Area Networks (LANs)
• It expands over small geographic areas (within
a building or close-by buildings)
• It is usually owned by the same organization
• The internal data rates are typically much
greater than those of WANs
• Typically, they make use of broadcast rather
than switching
• Devices interconnected by the LAN
should include Computers and
terminals, mass storage device Bridges
and gateways
27
Local Area Networks (LANs)
Backbone
28
Metropolitan Area Networks (MAN)
29
Wide Area Networks
(WAN)
30
Wide Area Networks (WAN)
• Traditionally, WANs have been
implemented using one of two
technologies
• Circuit Switching
• Packet Switching
▫ Datagram
▫ Virtual Circuit
31
Circuit Switching
• Uses a dedicated path between two stations
• Process consists of three phases
▫ establish
▫ transfer
▫ disconnect
• Bandwidth inefficient
▫ channel capacity dedicated for duration of connection
▫ if no data, capacity wasted
• Set up (connection) takes time
• Once connected, transfer is transparent
• Can provide deterministic performance guarantees
32
Circuit Switching Network
Example: Public Service Telephone Network (PSTN)
33
Event Timing for Circuit Switching
34
Packet Switching
• circuit switching was designed for voice
• packet switching was designed for data
• transmitted in “small” packets
• packet contains user data and control info
▫ user data may be part of a larger message
▫ control info includes routing (addressing) info
• packets are received, stored briefly (buffered) and passed on to the
next node
35
Packet Switching
• Source breaks long message into “information
transporting segments” (packets).
• Packets are sent one at a time to the network.
• Packets contain user data and control/signaling information.
▫ user data may be part of a larger message
▫ control information includes routing/addressing
information
• Packets are received, stored “briefly” (buffered) and are passed onto
the next node.
36
Characteristics
• Line efficiency
▫ single link shared by many packets over time
▫ packets queued and transmitted as fast as possible
• Data rate conversion
▫ stations connect to local nodes at their own speed
▫ nodes buffer data if required to equalize rates
• Packets are accepted even when the “line” is busy
• Priorities can be used to support users’ needs, instead
of dedicating resources regardless if they are used or
not (becoming wasted if they are not)
37
What is a protocol ?
38
Layer Associations
Application
• SNMP (Simple Network Management Protocol)
• DHCP (Dynamic Host Configuration Protocol)
• FTP (File Transfer Protocol)
• POP3 (Post Office Protocol)
• SMTP (Simple Mail Transfer Protocol)
• HTTP (HyperText Transfer Protocol)
• Telnet
39
Network
• IP (Internet Protocol)
• IPv6 (IP Version 6)
• ICMP/ICMPv6 (Internet Control Message Protocol – e.g., “ping”)
• RIPv6 (Routing Information Protocol)
• OSPF (Open Shortest Path First)
Datalink
• ARP (Address Resolution Protocol)
• RARP (Reverse ARP)
• IARP (Inverse ARP)
40
Transport
• TCP (Transmission Control Protocol) – Reliable, in-sequence
delivery of data, connection oriented
• UDP (User Datagram Protocol) – Connectionless, delivery and
sequence not guaranteed
• RUDP (Reliable UDP)
• BGP (Border Gateway Protocol)
Session
• DNS (Domain Name Service)
• LDAP (Lightweight Directory Access Protocol)
Presentation
• LPP (Lightweight Presentation Protocol)
41
Protocols
• Simple Network Management Protocol (SNMP)
is an Internet Standard protocol for collecting
and organizing information about managed
devices on IP networks.
42
ICMP
Internet Control Message Protocol
• ICMP is a protocol used for exchanging control
messages.
TCP/IP
43
ICMP Message Types
• Echo Request
• Echo Response
• Destination Unreachable
• Redirect
• Time Exceeded
• Redirect (route change)
• there are more ...
TCP/IP
44
Datagram
Packet
Switching
45
Event Timing for Datagram
46
Virtual
Circuit
Packet
Switching
47
Event Timing for the 3 switching methods
48
Virtual Circuits versus Datagram
• Virtual circuits
▫ network can provide sequencing
▫ traffic engineering can be applied, enabling more practical provision of
quality of service (QoS) support
▫ less reliable in cases of switching node failures
• Datagram
▫ no call setup phase
▫ more flexible
▫ more reliable in cases of switching node failures
▫ difficult to control network’s state and provide quality of service
49
Circuit versus Packet Switching:
Comparison
• Circuit Switching • Packet Switching
▫ Dedicated channels/resources ▫ Shared channels
▫ Constant delay ▫ Variable delay
▫ Blocking ▫ Store-and-forward point-to-
▫ Continuous flow point & multipoint
▫ Point-to-Point
50
forms of Packet Switching Services
• Frame Relay based Networks
▫ requires high level of network reliability.
▫ took away a lot of overhead, improved
efficiency.
• Asynchronous Transfer Mode (ATM)
▫ based on the use of fixed size packets (53 bytes,
called ATM cells).
▫ first Broadband Integrated Services (ISDN)
network .
▫ offered quality of service (QoS) choices.
51
Transmission Mode
Simplex
Half-duplex
Full-duplex
52
Architectural structure of a
protocol layer
user of protocol user of protocol
55
Internetwork (Internet)
56
OSI Reference Model
and
the Link layer – as an example
protocol layer
57
Open System Interconnection (OSI) Reference Model
• Developed by the International Organization for
Standardization (ISO).
• Has become the standard model for classifying
communication functions.
• Has seven layers.
• It is a “theoretical” system delivered too late!
• It has NOT dominated. TCP/IP is the de facto
standard.
• Several reasons:
– TCP/IP appeared earlier
– Internet “won” the game
– OSI has a “complex” structure that could result in “heavy
processing”
58
Figure Example
59
THE OSI MODEL
60
Summary of OSI Layers
61
Addresses in the TCP/IP protocol suite
62
Frame Relay
Frame Relay is a high-performance WAN protocol
that operates at the physical and data link layers of
the OSI reference model.
Frame Relay originally was designed for use across
Integrated Services Digital Network (ISDN)
interfaces
63
63
Packet Switching
Frame Relay is based on packet-switched technology.
The following two techniques are used in packet-switching
technology:
▫ Variable-length packets
▫ Statistical multiplexing
FRAME RELAY 64
64
Frame Relay Devices
Devices attached to a Frame Relay WAN fall into the following two general
categories:
▫ Data terminal equipment (DTE)
▫ Data circuit-terminating equipment (DCE)
Examples of DTE devices are terminals, personal computers, routers, and
bridges.
FRAME RELAY 65
65
Packet Switching
DCEs are carrier-owned internetworking devices.
The purpose of DCE equipment is to provide clocking
and switching services in a network, which are the
devices that actually transmit data through the WAN.
In most cases, these are packet switches
FRAME RELAY 66
66
Frame Relay Devices
FRAME RELAY 67
67
Connection Devices
68
Connecting Devices and the OSI Model
69
Repeater
A Repeater
70
Function of Repeater
71
Bridge
A Bridge
72
Function of Bridge
73
Multiport Bridge
74
Router
75
Routers in an Internet
76
Gateway
77
UDP User Datagram Protocol
• UDP is a transport protocol
▫ communication between processes
Process Process
Process Process
TCP/IP
79
UDP
• Datagram Delivery
• Connectionless
• Unreliable
• Minimal UDP Datagram Format
Data
TCP/IP
80
TCP
Transmission Control Protocol
• TCP is an alternative transport layer protocol
supported by TCP/IP.
• TCP provides:
▫ Connection-oriented
▫ Reliable
▫ Full-duplex timing
▫ Byte-Stream
TCP/IP
81
Connection-Oriented
• Connection oriented means that a virtual
connection is established before any user data
is transferred.
TCP/IP
82
Reliable
• Reliable means that every transmission of data is
acknowledged by the receiver.
TCP/IP
83
Byte Stream
• Stream means that the connection is treated as a
stream of bytes.
TCP/IP
84
Buffering
TCP/IP
85
Full Duplex
• TCP provides transfer in both directions (over a
single virtual connection).
TCP/IP
86
TCP Ports
• Interprocess communication via TCP is achieved
with the use of ports (just like UDP).
TCP/IP
87
Addressing in TCP/IP
• Each TCP/IP address includes:
▫ Internet Address
▫ Protocol (UDP or TCP)
▫ Port Number
NOTE: TCP/IP is a protocol suite that includes IP, TCP and UDP
TCP/IP
88
IP datagram format
• Vers (4 bits): version of IP protocol (IPv4=4)
• Hlen (4 bits): Header length in 32 bit words, without
options (usual case) = 20
• Type of Service – TOS (8 bits): little used in past, now
being used for QoS
• Total length (16 bits): length of datagram in bytes,
includes header and data
• Time to live – TTL (8bits): specifies how long
datagram is allowed to remain in internet
▫ Routers decrement by 1
▫ When TTL = 0 router discards datagram
▫ Prevents infinite loops
• Protocol (8 bits): specifies the format of the data area
▫ Protocol numbers administered by central authority to
guarantee agreement, e.g. TCP=6, UDP=17 …
89
IP Datagram format (cont.)
• Source & destination IP address (32 bits
each): contain IP address of sender and intended
recipient
• Options (variable length): Mainly used to
record a route, or timestamps, or specify routing
90
IP Fragmentation
• How do we send a datagram of say 1400 bytes through a link that
has a Maximum Transfer Unit (MTU) of say 620 bytes?
• Answer the datagram is broken into fragments
Net 1 Net 3
Net 2
MTU=1500 MTU=1500
MTU=620
91
Fragmentation Control
• Identification: copied into fragment, allows destination to
know which fragments belong to which datagram
• Fragment Offset (12 bits): specifies the offset in the original
datagram of the data being carried in the fragment
▫ Measured in units of 8 bytes starting at 0
• Flags (3 bits): control fragmentation
▫ Reserved (0-th bit)
▫ Don’t Fragment – DF (1st bit):
useful for simple (computer bootstrap) application that can’t handle
also used for MTU discovery (see later)
if need to fragment and can’t router discards & sends error to source
▫ More Fragments (least sig bit): tells receiver it has got last
fragment
• TCP traffic is hardly ever fragmented (due to use of MTU
discovery). About 0.5% - 0.1% of TCP packets are fragmented
.
92
Internet Addressing
• IP address is a 32 bit integer
▫ Refers to interface rather than host
▫ Consists of network and host portions
Enables routers to keep 1 entry/network instead of
1/host
▫ Class A, B, C for unicast
▫ Class D for multicast
▫ Class E reserved
▫ Classless addresses
• Written as 4 octets/bytes in decimal format
▫ E.g. 134.79.16.1, 127.0.0.1
93
Internet Class-based addresses
• Class A: large number of hosts, few networks
▫ 0nnnnnnn hhhhhhhh hhhhhhhh hhhhhhhh
7 network bits (0 and 127 reserved, so 126 networks), 24 host
bits (> 16M hosts/net)
Initial byte 1-127 (decimal)
• Class B: medium number of hosts and networks
▫ 10nnnnnn nnnnnnnn hhhhhhhh hhhhhhhh
16,384 class B networks, 65,534 hosts/network
Initial byte 128-191 (decimal)
• Class C: large number of small networks
▫ 110nnnnn nnnnnnnn nnnnnnnn hhhhhhhh
2,097,152 networks, 254 hosts/network
Initial byte 192-223 (decimal)
• Class D: 224-239 (decimal) Multicast [RFC1112]
• Class E: 240-255 (decimal) Reserved
94
Subnets
• A subnet mask is applied to the host bits to
determine how the network is subnetted, e.g. if
the host is: 137.138.28.228, and the subnet mask
is 255.255.255.0 then the right hand 8 bits are
for the host (255 is decimal for all bits set in an
octet)
• Host addresses of all bits set or no bits set,
indicate a broadcast, i.e. the packet is sent to all
hosts.
95
Prefix Subnet Mask Prefix
Subnet Mask
Length Length
100
CIDR Supernetting
• Since assigned contiguously, class C CIDR has same most
significant bits & so only needs one routing table entry
• CIDR block represented by a prefix and prefix length
▫ Prefix = single address representing block of nets, e.g
192.32.136.0 = 11000000 00100000 10001000 00000000 while
192.32.143.0 = 11000000 00100000 10001111 00000000
101
Address Recognition Protocol (ARP)
• IP address is at network layer, need to map it to
the MAC (Ethernet address) link layer address
• Use ARP to map 48 bit Ethernet address to 32
bit IP
▫ IP requests MAC address for IP address from local
ARP table
▫ If not there, then an ARP request packet for IP
address is sent using physical broadcast address
(all FFFs)
▫ Host with requested IP address responds with its
MAC address as a unicast packet
▫ On return, host updates ARP table and returns
MAC address
▫ ARP cache times out 102
ARP cont.
• ARP requests are local only, do not cross routers
Subnet 1 Subnet 2
134.79.10.17 134.79.10.1 134.79.15.1 134.79.15.3
User A User B
• Compare local IP and subnet mask => local
subnet
• Compare local subnet to destination IP
▫ if local, ARP for MAC address
▫ else remote so
if ROUTE entry, ARP for router to subnet
if default route, ARP for default gateway
otherwise, drop packet & return error
103
Routing
• Routers must select next hop for packet
• Get route information from other routers via a
routing protocol (RIP, OSPF, EIGRP etc.)
• Note the following are non-routable:
▫ private networks: 10.0.0.0/8, 172.16.0.0/12,
192.168.0.0/16
▫ Loopback 127.0.0.0/24
104
105
106
107
Command line tool
• Route print
108
Ipconfig
109
Ping elephant packets
110
tracert
111
Homework assignment
112
Abstract on the selected topic:
1. Peer-to-peer networks, customization options. Transfer of information
through a peer-to-peer network.
2. Software Defined Networking (SDN) OpenFlow Protocol is a fundamental for
building SDN Solutions.
3. Multi Cloud Technology. Multi-Cloud Technology is a heterogeneous architecture
of multiple cloud computing and storage devices. A Multi-Cloud Technology utilizes two or
more public clouds along with n number of private clouds. hence it is also known as Multi-
Cloud Environment.
4. Edge Computing. Edge Computing is a distributed open architecture which enables
Internet of Things and Mobile Computing. The device processes by itself or by a local server.
Edge Computing enables data, applications, and computing power to be closer to the users
and away from centralized points.
5G Network Technologies
5G is The Next Generation Mobile Internet Connectivity which offers fast speed and decent
connections on smartphones and other devices. You will now carry vast amounts of data,
which will allow for a smart and connected world. Combining the networks and technology
are the latest research will let 5G Network Technology to be the superficial technology in the
world.
113
Continuation of the list:
6. Intent Based Networking Network Administration is a new form of
Intent-Based Networking (IBN). It is a combination of Artificial
Intelligence (AI), Machine Learning, and Network Orchestration to
automate administrative tasks. Intent-Based Networking reduces the
complexity to create, manage, and enforce network policies for reducing
labor associated with traditional configuration management.
7. Wireless Data Links for Drones
Wireless Networking Technology is mainly applied by the aviation industry. For example,
when we are flying, we can access our e-mail in the flight. Though the bandwidth is limited
but we can check it. Unmanned Aerial Vehicles (UAVs) or Drones are now all set to change the
trend.
8. eXpressive Intent Architecture (XIA)
The eXpressive Internet Architecture (XIA) addresses the growing diversity of network use
models, the need for reliable communication, and the increasing set of stakeholders who
coordinate their activities to provide Internet services.
114
Continuation of the list:
9. Quantum Computing
Quantum Computing is the use of Quantum Mechanics (includes quantum theory)
phenomenon like entanglement and superposition. Quantum network is a part of
quantum communication and quantum computing. Quantum networks help in the
transmission of information in the form of quantum bits called qubits. A quantum
processor performs quantum logic gates on some qubits. Quantum Networks work
in a similar way to classical networks.
10. Machine Learning
Machine Learning is an application of Artificial Intelligence (AI) which helps the
systems/machines to automatically adapt and learn from experiences. These
experiences are not officially recorded. This process of learning starts with
observations or learning about data.
115
And finally:
11. Internet of Things (IoT) Internet of Things is used in physical
and everyday devices or appliances. Devices consist of Internet
Connectivity and Sensors. These devices can interact with each
other and with others all over the internet.
12. Serverless Computing Serverless Computing is a cloud-computing
execution model in which the cloud provider runs the server and dynamically
manages the allocation of machine resources. A Serverless Provider allows the users
to write codes and deploy them without worrying about the infrastructure.
13. Digital Twin The digital representation provides both the elements and the
dynamics of how an Internet of things device operates and lives throughout its life
cycle.
14. Nano Network Technology
Nano Network Technology works in the Biomedical Field (Immune System
Support, Bio Hybrid Implants, Health Monitoring, Genetic Engineering), Military
Technology (Nuclear, Biological, and Chemical Defeses), Environmental Research
(Biodegradation, Animal and Biodiversity Control, and Air Pollution Control), and
Industrial Technology and Consumer Goods Application (Food and Water Quality
Control, and Functionalized Fabrics and Materials).
116
117