-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathNotes.txt
More file actions
6083 lines (4785 loc) · 186 KB
/
Notes.txt
File metadata and controls
6083 lines (4785 loc) · 186 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Very imp. to discuss.
Vilas to discuss
What is CI/CD
Why it is imp.?
Why imp. for freshers?
IaC
tools
What differentiates us from others?
Deliver in an agile way
Separate agile module.
Observe agile
do it for a month.
1st week
version control
Evening huddle
Summarize what happened that day
Sprints
Retro.
Planning?
Include the structure on TOC.
include agile methodology of doing
Entry level certification
DevOps
tools
process
Best practices
1. Fundamentals of Networking
-----------------------------
1.1 Client-Server Architecture
In this architecture,
"client"
device requests resources or services,
"server"
provides them.
commonly used
accessing web content
web browser (client) requests pages from a web server.
1.2 OSI Model
The OSI (Open Systems Interconnection) model organizes network communication into 7 layers:
Layer 1: Physical (transmits raw data)
physical infrastructure (e.g., roads, delivery trucks)
actual transmission of raw bits over a physical medium (like cables, radio waves, etc.)
Layer 2: Data Link (ensures data accuracy)
Handling the physical transfer of the package from one post office to another
manages node-to-node data transfer and error detection
Layer 3: Network (routing, IP addressing)
Determining the best route for delivery
handles the routing of packets across networks
windowing
Layer 4: Transport (data delivery, error handling)
Choosing the right delivery method (e.g., regular mail, express delivery).
End-to-end communication, ensuring data is sent accurately and in order
Layer 5: Session (manages connections)
Establishing a conversation or interaction
(e.g., initiating a call with the post office).
manages sessions and controls dialogues
Layer 6: Presentation (data format translation)
Formatting the letter/package (e.g., handwriting, using specific language).
Formatting the letter/package
Layer 7: Application (end-user services like web browsing)
Writing a letter or filling out a package label.
interacts with software applications
Reference: https://www.geeksforgeeks.org/open-systems-interconnection-model-osi/
What is OSI Model? – Layers of OSI Model
The OSI (Open Systems Interconnection) Model
set of rules
explains how different computer systems communicate over a network.
OSI Model
developed by the International Organization for Standardization (ISO).
consists of 7 layers and
each layer
has specific functions and responsibilities.
This layered approach
easier for different
devices and
technologies
to work together.
OSI Model
clear structure for
data transmission and
managing network issues.
The OSI Model is widely used as a reference to understand how network systems function.
OSI-Model
OSI Model
Layers of the OSI Model
Physical Layer
Data Link Layer
Network Layer
Transport Layer
Session Layer
Presentation Layer
Application Layer
Layer 1 – Physical Layer
------------------------
The lowest layer of the OSI reference model
Responsible for the actual physical connection between the devices.
contains information in the form of bits.
transmit individual bits from one node to the next.
When receiving data
this layer will
get the signal received
convert it into 0s and 1s
send them to the Data Link layer
put the frame back together.
Common physical layer devices are
Hub,
Repeater,
Modem, and
Cables.
Functions of the Physical Layer
Bit Synchronization:
synchronization of the bits by providing a clock.
This clock
controls both
sender and
receiver
thus providing synchronization at the bit level.
Bit Rate Control:
Defines the transmission rate
i.e. the
number of bits sent per second.
Physical Topologies:
how the different, devices/nodes are arranged in a network i.e.
bus topology ,
star topology , or
mesh topology .
Transmission Mode:
how the data flows between the two connected devices.
various transmission modes possible are
Simplex,
half-duplex and
full-duplex .
Layer 2 – Data Link Layer (DLL)
-------------------------------
The data link layer
responsible for the
node-to-node delivery of the message.
The main function of this layer
ensure data transfer is error-free
over the physical layer.
When a packet arrives in a network,
DLL should transmit it to the Host
using its MAC address.
Packet in the Data Link layer is referred to as Frame.
Switches and Bridges are common Data Link Layer devices.
The Data Link Layer is divided into two sublayers:
Logical Link Control (LLC)
Media Access Control (MAC)
The packet received from the Network layer is further divided into frames depending on the frame size of the NIC(Network Interface Card). DLL also encapsulates Sender and Receiver’s MAC address in the header.
The Receiver’s MAC address is obtained by placing an ARP(Address Resolution Protocol) request onto the wire asking “Who has that IP address?” and the destination host will reply with its MAC address.
Functions of the Data Link Layer
Framing: Framing is a function of the data link layer. It provides a way for a sender to transmit a set of bits that are meaningful to the receiver. This can be accomplished by attaching special bit patterns to the beginning and end of the frame.
Physical Addressing: After creating frames, the Data link layer adds physical addresses ( MAC addresses ) of the sender and/or receiver in the header of each frame.
Error Control: The data link layer provides the mechanism of error control in which it detects and retransmits damaged or lost frames.
Flow Control: The data rate must be constant on both sides else the data may get corrupted thus, flow control coordinates the amount of data that can be sent before receiving an acknowledgment.
Access Control: When a single communication channel is shared by multiple devices, the MAC sub-layer of the data link layer helps to determine which device has control over the channel at a given time.
Layer 3 – Network Layer
The network layer works for the transmission of data from one host to the other located in different networks.
It also takes care of packet routing
i.e. selection of the shortest path to transmit the packet, from the number of routes available.
The sender and receiver’s IP address are placed in the header by the network layer. Segment in the Network layer is referred to as Packet. Network layer is implemented by networking devices such as routers and switches.
Functions of the Network Layer
Routing: The network layer protocols determine which route is suitable from source to destination. This function of the network layer is known as routing.
Logical Addressing: To identify each device inter-network uniquely, the network layer defines an addressing scheme. The sender and receiver’s IP addresses are placed in the header by the network layer. Such an address distinguishes each device uniquely and universally.
Layer 4 – Transport Layer
The transport layer provides services to the application layer and takes services from the network layer.
The data in the transport layer is referred to as Segments.
It is responsible for the
end-to-end delivery of the complete message.
The transport layer
provides the acknowledgment of the successful data transmission and re-transmits the data
if an error is found.
Protocols used in Transport Layer are
TCP,
UDP
NetBIOS,
PPTP.
At the sender’s side,
the transport layer
receives the formatted data from the upper layers,
performs Segmentation
implements
Flow and
error control to
ensure proper data transmission.
It also adds
Source and
Destination port number
in its header and
forwards the segmented data to the Network Layer.
Generally,
destination port number is configured,
either by default or manually.
For example,
when a web application requests a web server,
it typically uses port number 80,
because this is the default port assigned to web applications.
Many applications have default ports assigned.
At the Receiver’s side,
Transport Layer
reads the port number from its header and
forwards the Data which it has received to the respective application.
It also performs sequencing and reassembling of the segmented data.
Functions of the Transport Layer
Segmentation and Reassembly:
This layer
accepts the message from the (session) layer,
breaks the message into smaller units.
Each of the segments produced
has a header associated with it.
The transport layer at the destination station reassembles the message.
Service Point Addressing:
To deliver the message to the correct process, the transport layer header includes a type of address called service point address or port address. Thus by specifying this address, the transport layer makes sure that the message is delivered to the correct process.
Services Provided by Transport Layer
Connection-Oriented Service
Connectionless Service
Layer 5 – Session Layer
Session Layer in the OSI Model is responsible for the
establishment of connections,
management of connections,
terminations of sessions between two devices.
It also provides
authentication and security.
Protocols used in the Session Layer are
NetBIOS,
PPTP.
Functions of the Session Layer
Session Establishment, Maintenance, and Termination:
The layer allows the two processes to establish, use, and terminate a connection.
Synchronization:
This layer allows a process to add checkpoints that are considered synchronization points in the data. These synchronization points help to identify the error so that the data is re-synchronized properly, and ends of the messages are not cut prematurely and data loss is avoided.
Dialog Controller: The session layer allows two systems to start communication with each other in half-duplex or full-duplex.
Example
Let us consider a scenario where a user wants to send a message through some Messenger application running in their browser. The “Messenger” here acts as the application layer which provides the user with an interface to create the data. This message or so-called Data is compressed, optionally encrypted (if the data is sensitive), and converted into bits (0’s and 1’s) so that it can be transmitted.
Communication in Session Layer
Communication in Session Layer
Layer 6 – Presentation Layer
The presentation layer is also called the Translation layer.
The data from the application layer is extracted here and manipulated as per the required format to transmit over the network.
Protocols used in the Presentation Layer are JPEG, MPEG, GIF, TLS/SSL, etc.
Functions of the Presentation Layer
Translation: For example, ASCII to EBCDIC .
Encryption/ Decryption: Data encryption translates the data into another form or code. The encrypted data is known as the ciphertext and the decrypted data is known as plain text. A key value is used for encrypting as well as decrypting data.
Compression: Reduces the number of bits that need to be transmitted on the network.
Layer 7 – Application Layer
At the very top of the OSI Reference Model stack of layers,
we find the Application layer which
is implemented by the network applications.
These applications produce the data to be transferred over the network.
This layer also serves as a
window for the application services to access the network and
for displaying the received information to the user.
Protocols used in the Application layer are
SMTP,
FTP,
DNS,
etc.
application-layer-in-OSI
Application Layer
Functions of the Application Layer
The main functions of the application layer are given below.
Network Virtual Terminal(NVT): It allows a user to log on to a remote host.
File Transfer Access and Management(FTAM): This application allows a user to access files in a remote host, retrieve files in a remote host, and manage or control files from a remote computer.
Mail Services: Provide email service.
Directory Services: This application provides distributed database sources and access for global information about various objects and services.
How Data Flows in the OSI Model?
When we transfer information from one device to another, it travels through 7 layers of OSI model. First data travels down through 7 layers from the sender’s end and then climbs back 7 layers on the receiver’s end.
Data flows through the OSI model in a step-by-step process:
Application Layer:
Applications create the data.
Presentation Layer:
Data is formatted and encrypted.
Session Layer:
Connections are established and managed.
Transport Layer:
Data is broken into segments for reliable delivery.
Network Layer :
Segments are packaged into packets and routed.
Data Link Layer:
Packets are framed and sent to the next device.
Physical Layer:
Frames are converted into bits and transmitted physically.
Each layer adds specific information to ensure the data reaches its destination correctly, and these steps are reversed upon arrival.
Data Flow in OSI model
We can understand how data flows through OSI Model with the help of an example mentioned below.
Let us suppose, Person A sends an e-mail to his friend Person B.
Step 1: (This happens at Application Layer)
Person A interacts with e-mail application like Gmail, outlook, etc.
Writes his email to send. .
Step 2:
At Presentation Layer,
Mail application prepares for data transmission like
encrypting data and
formatting it for transmission.
Step 3:
At Session Layer,
There is a connection established between the sender and receiver on the internet.
Step 4:
At Transport Layer,
Email data is broken into smaller segments.
It adds
sequence number and
error-checking information
to maintain the reliability of the information.
Step 5:
At Network Layer,
Addressing of packets is done in order to find the best route for transfer.
Step 6:
At Data Link Layer,
data packets are encapsulated into frames,
then MAC address is added for local devices and
then it checks for error using error detection.
Step 7:
At Physical Layer,
Frames are transmitted in the form of electrical/ optical signals
over a physical network medium like ethernet cable or WiFi.
After the email reaches the receiver i.e. Person B, the process will reverse and decrypt the e-mail content. At last, the email will be shown on Person B email client.
Protocols Used in the OSI Layers
---------------------------------------------------------------------------------------------------------------------
Layer Working Protocol Data Unit Protocols
---------------------------------------------------------------------------------------------------------------------
Physical Layer Establishing Physical Connections between Devices. Bits USB, SONET/SDH, etc.
---------------------------------------------------------------------------------------------------------------------
Data Link Layer Node to Node Delivery of Message. Frames Ethernet, PPP, etc.
---------------------------------------------------------------------------------------------------------------------
Network Layer Transmission of data from one host to another, Packets IP, ICMP, IGMP, OSPF, etc.
located in different networks.
---------------------------------------------------------------------------------------------------------------------
TransportLayer Take Service from Network Layer and Segments (for TCP) TCP, UDP, SCTP, etc.
provide it to the Application Layer or Datagrams
(for UDP)
---------------------------------------------------------------------------------------------------------------------
Session Layer Establishes Connection, Maintenance, Ensures Data NetBIOS, RPC, PPTP, etc.
Authentication and Ensures security.
---------------------------------------------------------------------------------------------------------------------
Presentation Data from the application layer is extracted and Data TLS/SSL, MIME, JPEG, PNG, ASCII, etc.
manipulated in the required format for transmission.
---------------------------------------------------------------------------------------------------------------------
Application Helps in identifying the client and Data FTP, SMTP, DNS, DHCP, etc.
synchronizing communication.
---------------------------------------------------------------------------------------------------------------------
Why Does The OSI Model Matter?
clear structure of
“how the data moves in the network?”.
Difference Between OSI and TCP/IP Model
-----------------------------------------------------------------------------------------------------------------------
OSI Model TCP/IP Model
-----------------------------------------------------------------------------------------------------------------------
OSI stands for Open Systems Interconnection. TCP/IP stands for Transmission Control Protocol/Internet Protocol.
OSI model has 7 layers. TCP/IP model consists of 4 layers.
Package delivery is guaranteed in OSI Model. Package delivery is not guaranteed in the TCP/IP Model.
Layers 1,2 and 3 All layers of the TCP/IP model are needed for data transmission.
are necessary for data transmission.
Protocols at each layer is Layers are integrated, some layers are required by other layers
independent of the other layer.
Conceptual framework, Widely used in actual networks like Internet and Communication Systems.
less used in practical applications.
-----------------------------------------------------------------------------------------------------------------------
OSI-vs-TCP/IP
OSI vs TCP/IP
Advantages of OSI Model
The OSI Model defines the communication of a computing system into 7 different layers. Its advantages include:
It divides network communication into 7 layers
which makes it easier to understand and troubleshoot.
It standardizes network communications,
as each layer has fixed functions and protocols.
Diagnosing network problems
is easier with the OSI model.
It is easier to improve with advancements
as each layer can get updates separately.
Disadvantages of OSI Model
The OSI Model has seven layers,
which can be complicated and hard to understand for beginners.
In real-life networking,
most systems use a simpler model called the
Internet protocol suite (TCP/IP),
so the OSI Model is not always directly applicable.
Each layer in the OSI Model
adds its own set of rules and operations,
which can make the process more time-consuming and less efficient.
1.3 Host-to-Host Communication
Process of data traveling
from one device to another.
It involves
packet creation,
addressing, and
routing through network devices.
Key Components of TCP/IP
------------------------
TCP (Transmission Control Protocol):
reliable data transmission between devices.
Divides large data sets
into smaller packets,
numbers them, and
ensures
sent and
received in order.
packets lost?
TCP requests their retransmission.
IP (Internet Protocol):
addressing and routing packets across networks
to ensure they reach their correct destination.
Each device
has a unique IP address,
allow routers to direct packets to the intended location.
ICMP (Internet Control Message Protocol):
Used for
error messages and
diagnostics (e.g., the ping command).
ARP (Address Resolution Protocol):
Resolves
IP addresses to
MAC addresses for
data link layer communication.
IGMP (Internet Group Management Protocol):
Manages
group memberships for multicast communications.
1.4 Protocols Overview
Protocols define communication rules.
Common ones include
HTTP (web browsing),
FTP (file transfer), and
SMTP (email),
each providing a structured way to transmit data.
1.5 NIC (Network Interface Cards) / Port Numbers
NICs connect computers to networks,
often using
unique MAC addresses.
Ports identify services,
like 80 for HTTP and
443 for HTTPS.
1.6 Submarine Cables Map (Optical Fibre Cables)
Submarine cables are
fiber-optic cables
under oceans that
enable global internet connectivity
by carrying data at high speeds.
1.7 Networking Terms and Devices
Nodes:
Any connected device.
Hosts:
Computers that
store and
process data.
Clients/Servers:
Clients request data;
servers provide it.
Protocols:
Set of rules governing data transmission.
1.8 LAN, MAN, WAN
LAN (Local Area Network):
Small network,
e.g.,
within a
home or
office.
MAN (Metropolitan Area Network):
City-wide network.
WAN (Wide Area Network):
Larger networks,
like the internet.
2. Basic Terminology
2.1 What is a MODEM and a ROUTER?
Modem:
Converts signals
for internet access.
Router:
Directs
data between
networks,
managing devices on a local network.
---------------------------------------------------------------------------------
Feature Modem Router
---------------------------------------------------------------------------------
Function Converts digital signals Routes data packets between
to analog and vice versa devices in a network
Connection to Internet
Connects directly to ISP Connects to the modem and distributes the internet
IP Address Assignment
Receives public IP address Assigns local IP addresses to devices in the network
from ISP
Network Type Operates on a wide area Operates on a local area network (LAN)
network (WAN)
Security Minimal security features Typically includes firewall and security features
Devices Supported
provides internet access to a network
Connects multiple devices simultaneously
---------------------------------------------------------------------------------
2.2 Network Topologies
Bus:
Devices share a single communication line.
Ring:
Data travels in a circular path.
Star:
Devices connect to a central hub.
Tree:
A hierarchy of star networks.
Mesh:
Every device connects to others.
5:
Creating network topologies,
such as
star and ring, to
see data flow and
understand their
pros and
cons.
2.3 Peer-to-Peer Architecture
Devices communicate directly,
without a central server.
Used in applications like file sharing.
2.4 Sockets and Ports
Socket:
Combination of an
IP address and
port.
Port:
Identifies specific processes or services
(e.g., HTTP on port 80).
2.5 HTTP Overview
Methods:
GET:
Retrieve data.
POST:
Send/ Create data.
PUT:
Update data.
DELETE:
Remove data.
6: Building a simple HTTP server and client to practice sending requests.
2.6 HTTP Error/Status Codes
Common codes like
404 (Not Found) and
200 (OK) indicate the status of web requests.
2.7 Cookies
Small data files websites
store on your computer to
remember information across sessions.
Cookies
small text files that websites store on
your computer or
mobile device
when you visit them.
They help the website remember information about your visit,
which can both make it easier to visit the site again and make the site more useful to you.
Here are some of the ways cookies are used:
To personalize your browsing experience.
Cookies can be used to remember your preferences,
such as your
language,
currency, and
location.
This can help to make your browsing experience more enjoyable and efficient.
To track your activity on a website.
Cookies can be used to track which pages you visit,
how long you spend on each page, and
what links you click on.
This information can be used to improve the website's content and design.
To deliver targeted advertising.
Cookies can be used to track your interests and browsing history.
This information can be used to deliver ads that are more relevant to you.
To remember your login information.
Cookies can be used to remember your username and password, so you don't have to enter them each time you visit a website.
To keep track of items in your shopping cart.
Cookies can be used to remember the items you have added to your shopping cart, so you don't lose them if you leave the website.
2.8 DNS (Domain Name System)
DNS translates domain names (like google.com) into
IP addresses,
enabling users to use
readable addresses to
access websites.
2.9 Types of VPNs
VPNs create secure connections. Types include:
Types of VPNs
VPNs, or Virtual Private Networks, come in several varieties, each designed for specific purposes and offering unique advantages. Here's a breakdown of the most common types:
1. Remote Access VPNs
Purpose:
Allows remote users to
securely connect to a private network,
typically a company's internal network, from
anywhere with an internet connection.
How it works:
A user installs VPN client software
on their device (computer, smartphone, etc.).
When they initiate a connection,
the software establishes an
encrypted tunnel
between their device and the
company's VPN server.
This tunnel
protects their data as it travels over the public internet.
Use cases:
Employees working from home,
traveling, or
accessing company resources remotely.
2. Site-to-Site VPNs
Purpose:
Connects two or more separate private networks,
like
company's
headquarters and a
branch office,
over the internet.
How it works:
VPN devices
(often routers or firewalls) are
installed at each location.
These devices
establish a
secure,
encrypted connection
between the networks,
allowing them to function as a single, unified network.
Use cases:
Businesses with
multiple offices,
organizations
needing to connect to partner networks, or
cloud service providers connecting their data centers.
3. Cloud VPNs
Purpose:
Provides
secure access to cloud-based resources, such as
cloud storage,
applications, or
virtual machines.
How it works:
Cloud providers offer
VPN services
as part of their infrastructure.
Users connect to the cloud provider's VPN gateway,
which then allows them to
access their cloud resources securely.
Use cases:
Businesses utilizing cloud computing services,
individuals needing to access cloud storage or applications remotely.
4. Mobile VPNs
Purpose:
Enables secure access to a
private network from
mobile devices (smartphones, tablets).
How it works:
Similar to remote access VPNs,
but specifically designed for mobile devices.
Often integrated into
mobile device management (MDM) solutions.
Use cases:
Employees using mobile devices to access
company resources,
individuals needing to connect to public Wi-Fi hotspots securely.
5. SSL VPNs
Purpose:
Uses the Secure Sockets Layer (SSL) protocol to
establish a secure connection between a
user and a
private network.
How it works:
SSL VPNs
often rely on web browsers
to establish the connection,
making them
easier to
use and
deploy than traditional VPNs.
Use cases:
Organizations that want to provide secure access to
internal resources
without requiring users to install VPN client software.
6. Double VPNs
Purpose:
Enhances security by routing traffic through two VPN servers instead of one.
How it works:
Data is encrypted and sent to the first VPN server, then encrypted again and sent to the second server before reaching its final destination.
Use cases:
Users concerned about advanced
privacy and
security, those
seeking to bypass geo-restrictions more effectively.
Choosing the Right VPN:
The best type of VPN depends on your specific needs and use case. Consider factors like:
Security requirements:
How much security do you need?
Ease of use:
How easy should the VPN be to set up and use?
Compatibility:
Does the VPN work with your devices and operating systems?
Cost:
What is your budget for a VPN service?
2.10 Checksum
A value used to verify
data integrity,
ensuring it hasn’t been altered during transmission.
Imagine you're sending a package through the mail.
To ensure it arrives intact,
you might include a simple check,
like the total weight of the items inside.
If the recipient weighs the package and finds a different weight,
they know something is amiss.
Checksums work similarly in networking.
Simple yet effective way to detect errors in data transmitted over a network.
How Checksums Work:
Data Segmentation:
Data to be transmitted is
divided into smaller chunks or blocks.
Checksum Calculation:
A mathematical function is applied to these blocks
to generate a single value,
the checksum.
This value is a summary of the data's contents.
Transmission:
Original data and the calculated checksum
are transmitted together.
Checksum Verification:
At the receiving end
same mathematical function is applied to the
received data to calculate a new checksum.
Comparison:
The calculated checksum
is compared with the received checksum.
If they match,
it's highly likely that the data was transmitted correctly.
If they don't match,
an error is detected, and the
data may be retransmitted.
A Simple Example:
Let's say we want to send the following data: 10101100 11110000
Divide:
Divide the data into two blocks: 10101100 and 11110000
Add:
Add the blocks together (using binary addition with carry): 10101100 + 11110000 = 11001100
Complement:
Invert all the bits in the result: 11001100 -> 00110011
Transmit:
Send the original data (10101100 11110000) along with the checksum (00110011).
Receive:
The receiver receives the data and checksum.
Verify:
The receiver adds the received data blocks and the received checksum: 10101100 + 11110000 + 00110011 = 100000000 (discard the carry bit)
Complement:
Invert the result: 10000000 -> 01111111
Check:
If the result is all zeros (00000000), the data is likely error-free. In this case, it's not, indicating an error during transmission.
Key Points:
Checksums are a simple and fast method for error detection.
They can detect some, but not all, errors. More sophisticated methods like Cyclic Redundancy Check (CRC) offer better error detection capabilities.
Checksums are used in various networking protocols, including TCP/IP.
3. Internet Protocol (IP)
3.1 IP Building Blocks
IP addresses identify devices on networks.
Subnet masks divide networks into subnetworks.
3.2 IP Packet Structure
Contains a header
(metadata like
source and
destination) and
payload (actual data).
3.3 ICMP, PING, TraceRoute
1. Internet Control Message Protocol (ICMP)
Definition
ICMP
network layer protocol
used by network devices to
communicate
error messages and
operational information.
Integral part of the
Internet Protocol (IP) suite
used primarily for
diagnostic and
management purposes.
Functions
Error Reporting:
ICMP communicates errors in network communications.
For example
inform you when a destination is unreachable or
when a time-to-live (TTL) has expired.
Operational Information:
Provides information about
network conditions,
helping with routing decisions.
Common ICMP Messages
Destination Unreachable:
Indicates that a packet could not reach its destination.
Echo Request / Echo Reply: Used in the Ping command to check the reachability of a host.
Time Exceeded: Indicates that a packet has taken too long to reach its destination and has been discarded.
2. Ping
Definition
Ping
utility that uses
ICMP Echo Request and
Echo Reply messages to
test the reachability of a host on a network.
It measures
round-trip time for
messages sent from
originating host to
destination computer.
How Ping Works
Send an ICMP Echo Request:
The ping command
sends an ICMP Echo Request message
to the specified IP address.
Receive an Echo Reply:
If the host is reachable,
it responds with an
ICMP Echo Reply message.
Measure Response Time:
The time it takes for the reply to return is
measured and
displayed to the user.
Example Command
To use Ping, open a terminal or command prompt and enter:
ping <hostname_or_IP_address>
For example:
ping google.com
Interpreting Ping Results
Reply from <IP Address>:
Indicates that the host is reachable.
Request timed out:
Indicates that the host is not reachable.
Round-trip time:
Shows the time taken for the packet to travel to the destination and back.
3. TraceRoute
Definition
TraceRoute (or traceroute)
network diagnostic tool
used to track the path that packets take
from the source to the destination.
It identifies all the
intermediate hops
along the route.
How TraceRoute Works
Send Packets:
TraceRoute
sends a series of ICMP Echo Request packets
with increasing TTL values.
TTL Expiry:
Each router
processes the packet decreases the TTL by one.