You are on page 1of 30

Gjeni IP e network dhe IP e Broadcast per IP me poshte:

1. 20.120.47.225 /13
32-13=19 -> 2^19 IP ne total per rrjetin

20.01111000.00101111.11100001

20.01111000.000 00000.00000000 -> 20.120.0.0


20.01111111.11111111. 11111111-> 20.127.255.255

IP network: 20.120.0.0
IP Broadcast: 20.127.255.255

2. 220.20.17.5 /27
32-27=5 -> 2^5=32 IP ne Total (30 hoste)

220.20.17.00000101

220.20.17.00000000 -> 220.20.17.0


220.20.17.00011111 -> 220.20.17.31

IP network: 220.20.17.0
IP Broadcast: 220.20.17.31

3. 10.10.7.17 /19
32-19=13 ->2^13 IP ne total

10.10.00000111.00010001

10.10.00000000.00000000 -> 10.10.0.0


10.10.00011111.11111111 -> 10.10.31.255

IP network: 10.10.0.0
IP Broadcast: 10.10.31.255

4. 192.8.3.1 /18
32-18=14 -> 2^14 IP ne total per rrjetin

192.8.00000011.00000001

192.8.00000000.00000000 -> 192.8.0.0


192.8.00111111. 11111111 -> 192.8.63.255

IP network: 192.8.0.0
IP Broadcast: 192.8.63.255

5. 172.1.4.5 /20
32-20=12 -> 2^12 IP ne total per rrjetin

172.1.00000100. 00000101

172.1.00000000. 00000000 -> 172.1.0.0


172.1.00001111. 11111111 -> 172.1.15.255

IP network: 172.1.0.0
IP Broadcast: 172.1.15.255

1. (Ch. 7/1) Many business computers have three distinct and worldwide unique
identifiers. What are they?
1 – MAC address -> adrese unike nga prodhuesi
2 – IP address -> adrese unike logjike
3 – DNS name -> Domain Name System

DNS Server:
Perputhje midis DNS Name dhe IP address

2. (Ch. 7/3) Consider a situation in which a cyberterrorist makes all the DNS servers in the
world crash simultaneously. How does this change one’s ability to use the Internet?

Situata do te bente thuajse te pamundur perdorimin e internetit duke qene se duhet te


referohemi me adrese IP per te aksesuar sherbimet e nje server te caktuar dhe nuk
perdoret dot DNS name.

3. (Ch. 7/5) John wants to have an original domain name and uses a randomized program
to generate a secondary domain name for him. He wants to register this domain name
in the com generic domain. The domain name that was generated is 253 characters
long. Will the com registrar allow this domain name to be registered?

Domain name:
1- Unik
2- Te lejohet nga ana sintaksore
3- < 256 = 2^8 karaktere ne total

Emri_i_gjeneruar_i_domain.com

253 + 4 = 257karaktere ne total -> nuk mund te te lejohet regjistrimi ne .com


4. (Ch. 7/6) Can a machine with a single DNS name have multiple IP addresses? How could
this occur?
PO – serverit / makines mund tí konfigurohen me teper se nje adrese IP – rasti kur
server/makina ka me teper se nje NIC

1 – NIC (Network Interface Card) -> i konfigurohet ne menyre unike vetem nje IP

Portat e protokolleve ne rrjet –

1- Menyre identifikimi per nje process specific ne server ne te cilin do te dergohet nje
mesazh internet apo mesazh tjeter, kur vjen ne nje server
2- Vend logjik lidhjeje, kur perdoret protokolli ne Intenernet (TCP/IP) - > menyra se si nje
program klient specifikon nje program perkates ne server ne nje rrjet kompjuterash.

Range: 0 – 65,535 porta ne total


Range: 0 – 1024 (sherbime te paracaktuara)

HTTP: 80
HTTPS: 443
FTP: 21
SFTP: 22
IMAP: 143 /SLL/TLS: 993
POP: 110 / SSL/TLS: 995
SMTP: 25 /SSL/TLS: 465

5. (ch.7 / 23) Although it was not mentioned in the text, an alternative form for a URL is to
use the IP address instead of its DNS name. Use this information to explain why a DNS
name cannot end with a digit.

Google.com
88.kkk

URL: http://www.google.com

Nuk mund te perdoret numer ne fund te nje Domain name sepse do te mund te
“ngaterrohej” DNS server per te kuptuar nese kemi te bejme me IP apo me DNS name.
Mos-perdorimi i numrave ne DNS name ben te qarte dallimin midis URL qe perdor IP
dhe URL qe perdor DNS name.

6. (ch.7 / 24) Imagine that someone in the math department at Stanford has just written a
new document including a proof that he wants to distribute by FTP for his colleagues to
review. He puts the program in the FTP directory ftp/pub/forReview/newProof.pdf.
What is the URL for this program likely to be?

standford.edu
ftp/pub/forReview/newProof.pdf

ftp://www. standford.edu/ftp/pub/forReview/newProof.pdf

7. (ch.7 / 31) For each of the following applications, tell whether it would be (1) possible
and (2)
better to use a PHP script or JavaScript, and why:
(a) Displaying a calendar for any requested month since September 1752. –
JavaScript/PHP
(b) Displaying the schedule of flights from Amsterdam to New York. – PHP
(c) Graphing a polynomial from user-supplied coefficients. – JavaScript

PHP – ekzekutohet ne server (+ DB)


JavaScript – ekzekutohet ne klient

D.SH – punim i nje prej rasteve a/b/c

8. D.SH. (ch.7 / 37) Assume that compression is not used for audio CDs. How many MB of
data must the compact disc contain in order to be able to play two hours of music?
9. D.SH. (ch.7 / 42) What is the bit rate for transmitting uncompressed 1200 × 800 pixel
color frames with 16 bits/pixel at 50 frames/sec?

Klasat e IP: okteta e pare dhe maska

A: 1 - 126

B: 128 - 191

C: 192 - 223

D: 224 – 239 -> Multicast

E: 240 – 255 -> Qellime Experimentale

127.0.0.1 – localhost – adrese e projektuar per loopback te nje makine. Nderfaqja loopback nuk
ka HW dhe nuk lidhet fizikisht ne network. Perdoret per testime SW pa u shqetesuar per
perobleme HW apo driver-a te korruptuar

127 – loopback address


Klasa C: 192 – 223 /24 – LAN -> (shtepi/zyre etj.)

Ex. 192.168.100.255 / 24

255.255.255.0

Klasa B: 128 – 191 /16

Ex. 172.123.100.255

255.255.0.0

Klasa A: 1 – 126 /8

Ex. 100.101.123.1

255.0.0.0

Ushtrim 1

Jepet IP 94.77.52.29 /28

1- Klasa?
Nese do kishte maske /8 do ishte klasa A, por ne kete rast IP eshte pa
Por eshte Subnet i rrjetit te klases A 94.77.52.29 /8

2- IP e rrjetit?
94.77.52.29 /28

32-28 = 4 bitet e fundit jane per rrjetin

Binar(!): 94.77.52.00011101

IP e pare: 94.77.52.00010000
IP e rrjetit: 94.77.52.16 /28

3- IP e broadcast?
IP e fundit: 94.77.52.00011111
IP e broadcast: 94.77.52.31 /28

4- Sa hoste mund te ngrihen?


32 – 28 = 4
2^4 = 16
16 – 2 = 14 hoste
5- IP e hosteve
Host 1: 94.77.52.17 /28

Host 14: 94.77.52.30 /28

6- IP: 94.77.52.15 /28 a eshte kjo IP ne rrjetin e ketij subneti?


JO, ndodhet ne Subnet tjeter

1. Ch.6/9
Imagine that a two-way handshake rather than a three-way handshake
were used to set up connections. In other words, the third message was
not required. Are deadlocks now possible? Give an example or show that
none exist.

3 – way 2 – way
A B A B

 Syn  Syn

 Ack Syn  Ack Syn

 Ack

Deadlock -> ngecje ne transmetim midis 2 hosteve per shkak se te 2 host-et presin nga
njeri-tjetri.

Po, ka deadlock. ACK e fundit qe duhet te dergohet nga A dhe ne rastin e 2-way
handshake mungon, le hapesire per deadlock sepse B nuk e kupton nese A e ka marre
mesazhin e sinkronizimit ACK-SYN apo jo. Dhe te 2 hostet qendrojne ne pritje dhe nuk
nis komunikimi – deadlock.

2. Ch.6/15
Why does UDP exist? Would it not have been enough to just let user processes send raw
IP packets?
Porta burim Porta destinacion Header i UDP-se
Madhesia Checksum
DATA

IP – adresa e hostit

Nuk do te mjaftonte vetem adresa e hostit sepse duhet edhe adresa logjike brenda
hostit, pra nepermjet portes (info. te cilin e ka UDP) percaktohet sherbimi/procesi qe do
i jepet hostit per komunikim.

3. Ch.6/17
A client sends a 128-byte request to a server located 100 km away over a 1-gigabit optical fiber.
What is the efficiency of the line during the remote procedure call?

128B = 1024b = 10kb


L = 100km
Bw =1Gb

4
10 kb 10 −5
t= = =10 =10 µs
1Gb 109

V drites ne OF = 200 km/ms

l 100 km
t= = =0.5 ms -> 0.5ms vajtje + 0.5ms ardhje = 1 ms
v 200 km/ms

1ms 1
Eficenca ¿ =1 Mbps= =1 %
10000b 10

4. (Ch.6/18) D.SH.
Consider the situation of the previous problem again. Compute the minimum possible response
time both for the given 1-Gbps line and for a 1-Mbps line. What conclusion
can you draw?

5. Ch.6/22
What is the total size of the minimum TCP MTU, including TCP and IP overhead but not
including data link layer overhead?

MTU – Maximum Transmission Unit

Segmenti = 536 B

TCP overhead = 20 B
IP overhead = 20 B
total size of the minimum TCP MTU = 576 B

6. Ch.6/28
The maximum payload of a TCP segment is 65,495 bytes. Why was such a strange number
chosen?

maximum payload of a TCP segment = DATA + TCP Header -> 20 B

DATA = 65,475 B

7. Ch.6/30
Consider the effect of using slow start on a line with a 10-msec round-trip time and no
congestion. The receive window is 24 KB and the maximum segment size is 2 KB. How long
does it take before the first full window can be sent?

2KB, 4KB, 8KB, 16KB, 24KB

RTT = 10ms

4 transmetime * 10ms = 40ms ne total perpara se te dergohet dritarja e


plote

8. Ch.6/31
Suppose that the TCP congestion window is set to 18 KB and a timeout occurs. How big will the
window be if the next four transmission bursts are all successful? Assume that the maximum
segment size is 1 KB.

1KB, 2KB, 4KB, 8KB – suksesshme

Dritarja minimale mund te ishte 8KB per 4 transmetime te suksesshme

9. D.SH Ch.6/38
A CPU executes instructions at the rate of 1000 MIPS. Data can be copied 64 bits at a time, with
each word copied costing 10 instructions. If an coming packet has to be copied four times, can this
system handle a 1-Gbps line? For simplicity, assume that all instructions, even those instructions
that read or write memory, run at the full 1000-MIPS rate.

10. Ch.6/42
Calculate the bandwidth-delay product for the following networks:
(1) T1 (1.5 Mbps),
(2) Ethernet (10 Mbps),
(3) T3 (45 Mbps), and
(4) STS-3 (155 Mbps).
Assume an RTT of 100 msec. Recall that a TCP header has 16 bits reserved for Window Size.
What are its implications in light of your calculations?
(1) T1 (1.5 Mbps)
1.5Mbps * 100 ms = 150 kb = 150kb/8b = 18.75 kB

(2) T1 (1.5 Mbps)


10Mbps * 100 ms = 1 Mb = 0.125 MB = 125 kB

(3) T3 (45 Mbps)


45Mbps * 100 ms = 4500 kb = 562.5 kB

(4) STS-3 (155 Mbps)


155Mbps * 100 ms = 15500 kb = 1.9375 MB

bandwidth-delay product < winows size (te dhenat do dergoheshin vetem me nje transmetim – 1
RTT)

SUBNETTING – ndarja e rrjetit ne rrjete me te vogla

Maksa -> madhesine e rrjetit – sa hoste mund te kete ne rrjet


/24
2^8 = 256 IP per rrjetin, 254 per hostet

S1 – S2 (ndarje – pra nuk komunikohe dot ne menyre te drejtperdrejte midis hosteve te S1 dhe
hosteve te S2)

#
SN0:10.10.10.0/24 te ndahet ne 2 rrjete me te vogla:
256 IP => 128 IP + 128 IP

SN1: 10.10.10.0 /25


SN2: 10.10.10.128 /25

64 IP -> 2^6

SN11: 10.10.10.0 /26


SN12: 10.10.10.64/26

SN21: 10.10.10.128 /26


SN22: 10.10.10.192 /26

255.255.255.255 /32
255.255.255.254 /31
255.255.255.252 /30
255.255.255.248 /29
255.255.255.240 /28
255.255.255.224 /27
255.255.255.192 /26
255.255.255.128 /25
255.255.255.0 /24

Ushtrim:
SN0: 192.168.1.0 /27, te ndahet ne 2 rrjete:

/27 - 255.255.255.224

32 – 27 = 5 -> 2^5 = 32 IP – 30 hoste

16 IP per secilin SN0 dhe SN1.

SN1: 192.168.1.0 /28 – 14 hoste

Rrjeti 192.168.1.0 /28

Broadcast: 192.168.1.15 /28

SN2: 192.168.1.16 /28 – 14 hoste

Rrjeti 192.168.1.16 /28

Broadcast: 192.168.1.31 /28

1. Jepen 4 router-a R1, R2, R3, R4


a. R1: 72.110.23.32 /27
b. R2: 70.2.5.0 /24
c. R3: 240.100.24.248 /29
d. R4: default

Ne cilin router do te vendosen paketat e meposhtme:


1- IP: 70.2.5.48 - > R2
2- IP: 72.110.23.64 - > R4
3- IP: 240.100.24.255 - > R3
4- IP: 70.2.5.254 - > R2
5- IP: 72.110.23.46 - > R1

 R1: 72.110.23.32 /27


32-27=5
2^5=32

R1: 72.110.23.32 deri ne 72.11.23.63

 R2: 70.2.5.0 /24


32-24=8
2^8=256

R2: 70.2.5.0 deri ne 70.2.5.255

 R3: 240.100.24.248 /29


32-29 = 3
2^3=8

R3: 240.100.24.248 deri ne 240.100.24.255

2. Sa duhet te jete numri maksimal i subneteve te cilet mund te agregohen paketat e


meposhtme?
Ne cfare menyre agregohen?

1- SN0: 190.68.1.0 /25


a. Network IP: 190.68.1.0 /25
b. Hostet: 190.68.1.1 deri ne 190.68.1.126
c. Broadcast IP: 190.68.1.127 /25
2- SN1: 190.68.1.128 /25
a. Network IP: 190.68.1.128 /25
b. Hostet: 190.68.1.129 deri ne 190.68.1.254
c. Broadcast IP: 190.68.1.255 /25
3- SN2: 190.68.2.0 /25
a. Network IP: 190.68.2.0 /25
b. Hostet: 190.68.1.129 deri ne 190.68.2.126
c. Broadcast IP: 190.68.2.127 /25

Qe rrjetet te agregohen duhet te:


1. Numri total i IP te jete fuqi e 2shit
2. Te kete vijueshmeri midis rrjeteve me njeri-tjetrin

Per secilin nga rrjetet kemi nga 128 IP ne total.


Nese agregohen:
2 rrjete – 256 IP – maska /24
3 rrjete – 384 IP -> jo fuqi e 2shit XX

Nr. Maksimal nga agregimi i rrjeteve SN0, SN1, SN2: 2 subnete:

SN01: 190.68.1.0 /24


SN2: 190.68.2.0 /25
3. Jepet IP: 85.32.100.96 /27, kjo do te sherbeje si IP fillestare. Nderkohe qe nga ky subnet
do te shperndahen IP per 3 kompani:
A – 4 IP -> 2 hoste
B – 8 IP -> 6 hoste
C – 16 IP -> 14 hoste

Te shperndahen keto IP ne menyre sa me eficente. Ne fund tregoni sa IP mbeten pa


shfrytezuar nga rrjeti fillestar.

IP: 85.32.100.96 /27

C: nga 85.32.100.96 /28 deri ne 85.32.100.111 /28


B: nga 85.32.100.112 /29 deri ne 85.32.100.119 /29
A: nga 85.32.100.120 /30 deri ne 85.32.100.123 /30

28 IP ne total per A/B/C

IP: 85.32.100.96 /27 ->32-27=5, 2^5=32 IP per rrjetin fillestar

32-28 = 4 IP pa shfrytezuar nga rrjeti fillestar

4. Ch.5/31
A router has just received the following new IP addresses: 57.6.96.0/21, 57.6.104.0/21,
57.6.112.0/21, and 57.6.120.0/21. If all of them use the same outgoing line, can they be
aggregated? If so, to what? If not, why not?

IP addresses:

A - 57.6.96.0/21

B - 57.6.104.0/21

C - 57.6.112.0/21

D - 57.6.120.0/21

Okteta e 3-te:

A: 01100000

B: 01101000

C: 01110000

D: 01111000
Maska: /19

Rrjeti i agreguar: 57.6.96.0 /19

D.SH. – Llogaritja e agregimeve sipas metodes ne ushtrimin nr. 2

5. Ch.5 / 33
A router has the following (CIDR) entries in its routing table:
Address/mask Next hop
135.46.56.0/22 Interface 0
135.46.60.0/22 Interface 1
192.53.40.0/23 Router 1
default Router 2

For each of the following IP addresses, what does the router do if a packet with that address
arrives?
(a) 135.46.63.10 – I1
(b) 135.46.57.14 – I0
(c) 135.46.52.2 – R2
(d) 192.53.40.7 – R1
(e) 192.53.56.7 – R2

135.46.56.0/22 Interface 0
1024 IP
Network IP: 135.46.56.0 /22
Broadcast IP: 135.46.59.255 /22

135.46.60.0/22 Interface 1
1024 IP
Network IP: 135.46.60.0 /22
Broadcast IP: 135.46.63.255/22

192.53.40.0/23 Router 1
512 IP
Network IP: 192.53.40.0 /23
Broadcast IP: 192.53.41.255 /23

1. IP: 88.55.66.35 /29


32-29=3 -> 2^3 =8 IP ne total –> 6 hoste
35 ne binar: 00100011 - > 00100000
a. IP e rrjetit?

88.55.66.32 /29

b. IP e broadcast?
88.55.66.39 /29

c. IP e hosteve?

88.55.66.33 /29 – 88.55.66.38 /29

d. Klasa e IP
Nese do kishte maske /8 do te ishte klasa A ne kete rast eshte pa klase

2. Te krijohen 4 rrjete me numer te barabarte te IP-ve:


a. Perdor IP e klases C si IP fillestare: 192.168.1.0

Klasa C -> maska /24 -> 2^8=256 IP ne total

256/4 = 64 IP per secilin rrjet => 64 = 2^6 -> 6 bite per rrjtin dhe 32-6=26 bite per
masken

SN0: 192.168.1.0 /26 – 192.168.1.63 /26


SN1: 192.168.1.64 /26 – 192.168.1.127 /26
SN2: 192.168.1.128 /26 – 192.168.1.191 /26
SN3: 192.168.1.192 /26 – 192.168.1.255 /26

3. Te gjendet IP e rrjetit dhe IP e broadcast per 192.168.255.212 /27?

32-27=5 ->2^5=32 IP ne total

212 ne binar: 11010100 -> IP e pare: 11000000 & IP e fundit: 11011111

IP rrjetit: 192.168.255.192 /27


IP broadcast: 192.168.255.223 / 27

4. Te krijohen 3 rrjete perkatesish per departamentet:


a. Marketing
b. Sales
c. Management

Ku secili kerkon:

a. Marketing - 60 IP
b. Sales – 100 IP
c. Management – 34 IP

IP fillestare te merret 192.168.1.0 /24


a. Sales – 100 IP
128 IP -> 2^7; 32 -7=25
Network: 192.168.1.0 /25
Broadcast: 192.168.1.127 /25

b. Marketing - 60 IP
64 IP -> 2^6; 32-6=26
Network: 192.168.1.128 /26
Broadcast: 192.168.1.191 /26

c. Management – 34 IP
64 IP -> 2^6; 32-6=26

Network: 192.168.1.192 .26

Broadcast: 192.168.1.255 /26

OSI

7. Aplikacioni

6. Prezantimi

5. Sesioni

4. Transport

3. Network

2. Datalink

1. Fizike

TCP/IP

4. Aplikacioni

3. Transporti

2. Interneti

1. Network Access
Hibrid

5. Aplikacioni

4. Transporti

3. Network

2. Datalink

1. Fizike

-===========================/.......;;;;

Derguesi Marresi

7. Aplikacioni

6. Prezantimi

5. Sesioni

4. Transport – Segmenti

TCP

UDP

3. Network – paketa

IP – adresim logjik – 32 bit – konfigurohet – unike per pajisjen ne nje rrjet te caktuar

M1- 192.168.2.4

M2 - 192.168.2.10 /24

Router

2. Datalink – frame

Header

Burimi/destinacioni (adresa MAC)

48 bit – 6 byte – unike nga prodhuesi / adrese fizike / hex/nuk mund te rikonfigurohet

8 bit 8 bit 8 bit 8 bit 8 bit 8 bit

OUI – Organizational Unique Identifier

00-0E-08 – CISCO
Switch

1. Fizike

Copper – 100 m/fiber (multimode (500 m)/singlemode > 500m)/wireless (01…)

Rrjeti kompjuterik – pajisje fizike te lidhura sebashku me ane te mediave (sipas standartit
Ethernet) dhe qe shkembejne informacion

Endpoint – end devices – telefoni/pc/tableta/kamera/ATM

Switch / router – datalink / network

Server

e-mail

file

video

Protokolli – bashksi rregullash I ngritur si standard per te percaktuar menyren e komunikimit


midis pajisjeve ne te njejtin rrjet.

1. Cila eshte shtresa pergjegjese per konvertimin e paketave te te dhenave nga shtresa e
Datalink ne sinjale elektrike?
a. Fizike

2. Ne cilen shtrese implementohet routing (rrugezimi) duke mundesuar lidhjet & zgjdhjen e
rruges midis 2 sistemeve fundore?
a. Network

3. Cila shtrese percakton formatin e te dhenave, prezantimin, enkodimin & konvertimin


per perdorim ne rrjet?
a. Prezantimi

4. Cila shtrese eshte pergjegjese per krijimin, menaxhimin & perfundimin e hapesires se
komunikimit midis aplikacioneve?
a. Sesioni

5. Cila shtrese perdoret per komunikimin e besueshem midis nyjeve fundore ne rrjet &
siguron mekanizma per krijimin, mirembajtjen & recovery & terminimin e qarqeve
virtuale; detektimin e transport-fault-eve & flow control te informacionit?
a. Transporti

6. Cila shtrese siguron adresim logjik qe router-at e perdorin per percaktimin e rruges?
a. Network

7. Cila shtrese eshte pergjegjese per segmentimin?


a. Transporti

8. Cila eshte pergjegjese per frame-en?


a. Datalink

9. Per paketa?
a. Network

10. Radha e enkapsulimit?


a. Segementi
b. Paketa
c. Frama
d. Bitet

11. Cila shtrese ben transmetimin fizik te te dhenave & mban njoftim te gabimeve,
topologjine e rrjetit & flow control?
a. Datalink

12. Media Access Control (MAC):


a. Perdoret ne datalink (ne header te frames)
b. Adrese fizike nga prodhuesi
c. Nuk ndryshon
d. 48 bite – 6 byte
e. 3 byte e para jane unike dhe perfaqesojne OUI per prodhuesin

1. Cila shtrese zgjedh & percakton disponueshmerine e komunikimit te partnereve


sebashku me burimet e nevojshme per te bere komunikimin, koordinimin e aplikimeve
partnere & te formoje konsensus ne procedura per te kontrolluar integritetin e te
dhenave & error recovery?
a. Aplikacioni
2. Cila shtrese siguron transmetimin e besueshem te te dhenave ne nje link fizik & bazohet
ne adresen fizike, topologjine e rrjetit, njoftimin e error-eve, radhitjen e shperndarjes se
frame-ve & flow control?
a. Datalink
3. Cila shtrese percakton tensionin, shpejtesine e linjes & levizjen e biteve midis pajisjeve?
a. Fizike
4. Cila shtrese kombinon bitet ne Byte & Byte ne frama, perdor MAC address & ben error
detection?
a. Datalink
5. Cila shtrese eshte pergjegjese per te mbajtur te dhenat nga aplikime te ndryshme te
ndara?
a. Sesioni
6. Cila shtrese segmenton & grumbullon te dhenat ne data stream?
a. Transporti
7. Cila shtrese menaxhon adresimin logjik te pajisjeve, gjurmon vendndodhjen e pajisjeve
ne rrjet & percakton menyren me te mire per levizjen e te dhenave?
a. Network
8. Five routers are to be connected in a point-to-point subnet. Between each pair of routers, the
designers may put a high-speed line, a medium-speed line, a low-speed line, or no line. If it takes
100 ms of computer time to generate and inspect each topology, how long will it take to inspect all
of them?

1- high-speed line
2- medium-speed line
3- low-speed line
4- no line

4^10 = 1,048,576 topologji x 100 ms > 29 ore

A B C

D E

9. 3 (ch. 1) The performance of a client-server system is strongly influenced by two major network
characteristics: the bandwidth of the network (that is, how many bits/sec it can transport) and the
latency (that is, how many seconds it takes for the first bit to get from the client to the server).
Give an example of a network that exhibits high bandwidth but also high latency. Then give an
example of one that has both low bandwidth and low latency.
1 – komunikimi me satelit; komunikimi me fiber
2 – Bloetooth; modem 56-kbps;
10. 12 (ch. 1) Two networks each provide reliable connection-oriented service. One of them offers a
reliable byte stream and the other offers a reliable message stream. Are these identical? If so, why is
the distinction made? If not, give an example of how they differ.

Identike – po, sepse eshte connection-oriented (TCP), caktohet nje setup komunikimi (3 way
handshake)

 Reliable byte stream ofron garanci ne nivel pakete ndersa


 reliable message stream ofron garanci ne nivel mesazhi
 Message stream mban te dhena per boundaries e mesazhit ndersa bytestream jo

11. 13 (ch. 1) What does ‘‘negotiation’’ mean when discussing network protocols? Give an
example.
negotiation - kompromis midis hosteve per parametrat e network-ut qe do te perdoren
gjate komunikimit.

12. 20 (ch. 1) When a file is transferred between two computers, two acknowledgement strategies are
possible. In the first one, the file is chopped up into packets, which are individually acknowledged by
the receiver, but the file transfer as a whole is not acknowledged. In the second one, the packets are not
acknowledged individually, but the entire file is acknowledged when it arrives. Discuss these two
approaches.

1- File -> paketa -> cdo paket ka ACK e saj nga marresi, por per file ne total nuk dergohet
ACK
a. Me eficente
2- File -> paketa -> file ne total dergohet ACK
a. Me pak eficente
b. Besueshmeri me e larte

13. An image is 1600 × 1200 pixels with 3 bytes/pixel. Assume the image is uncompressed. How long does
it take to transmit it over a 56-kbps modem channel? Over a 1-Mbps cable modem? Over a 10-Mbps
Ethernet? Over 100-Mbps Ethernet? Over gigabit Ethernet?

Madhesia ne Byte * 8 = madhesia ne bit

56-kbps modem channel => 337 s


1-Mbps cable modem
10-Mbps Ethernet
100-Mbps Ethernet => 0.19 s

14. Cila shtrese ne modeli TCP/IP eshte ekuivalente me shtresen e Transportit ne modelin OSI?
a. Aplikacioni
b. Host-to-host
c. Internet
d. Network

15. Cila shtrese ne modeli TCP/IP eshte ekuivalente me shtresen e Network-ut ne modelin OSI?
a. Aplikacion
b. Transport
c. Internet
d. Network

16. Nese perdoret Telnet ose FTP, cila eshte shtresa me e larte qe perdoret per transmetimin e
te dhenave?
a. Aplikacion
b. Prezantim
c. Sesion
d. Transport
17. Cilat nga te meposhtmet jane protokolle TCP/IP qe perdoren ne shtresen e Aplikacionit ne
OSI?
a. IP
b. TCP
c. Telnet
d. FTP
e. TFTP
18. Cili nga protokollet e meposhtme perdor edhe TCP & UDP?
a. FTP
b. SMTP
c. Telnet
d. DNS
i. TCP – e perdor per shkembimin e zonave midis serverave
ii. UDP – e perdor kur nje klient kerkon te marre hostname per nje adrese
IP

19. (ch 1) Suppose there is a change in the service (set of operations) provided by layer k. How does this
impact services at layers k-1 and k+1?

K + 1 -> duhet te behen ndryshime duke implementuar veprime te reja ne kete shtrese
K
K-1

Wireless – Access Point


Firewall – pajisje sigurie ne Network
Access List / Black list
LAN

TCP

Windows size – sa mund te dergohen perpara se te merret nje ACK


Ritransmetim
Sekunce Number – identifikon ne menyre unike cdo pakete

UDP – connectionless (nuk krijohet nje setup komunikimi)


Jo ACK, nuk ka radhitje, Kontroll per dublikim,
Transmetim te shpejte
Rrjete te largeta kerkohet me teper throughput
(Shpjetsi – jo siguri -> video)

IP
End user
Server
Firewall
Router

32 bit – 4 okteta
Decimal: XXX.XXX.XXX.XXX
11111111.
255

Pozicioni 8 7 6 5 4 3 2 1
binar
Decimal 128 64 32 16 8 4 2 1
1 0 0 0 1 0 1 1 139

Ushtrim 1:
Te gjendet adresa IP ne binar per 10.1.2.200

00001010.00000001.00000010.11001000

Maska e subnet / Network subnet mask – identifikon se cila pjese e adresave eshte rrjeti
dhe cila pjese eshte host

/16 /24

/16 - 11111111.11111111.00000000.000000 => 65,354 hoste = 2^16 – 2

/24 11111111. 11111111. 11111111. 000000 => 2^8 – 2 = 254 hoste

Adresa e pare e rrjetit – adresa e rrjetit


Adresa e fundit e rrjetit – per komunikim broadcast

Subnetting – ndarja e rrjetit ne rrjete me te vegjel

Ushtrim 2:
Te gjenden hostet dhe adresat e rrjetit dhe broadcast per rrjetin 10.10.10.0 /24

/ 24 – 255.255.255.0
Sa hoste: 2^8 – 2 = 254 hoste
Adresa e pare: 10.10.10.0
Hoste IP: 10.10.10.1 – 10.10.10.254
Adresa e fundit: 10.10.10.255

1.Shtresat e OSI:

shtresa e networkut e modelit TCP/IP, i korrespondon shtrese se data linkut dhe asaj fizike te
modelit OSI.

 Shtresa fizike e modelit OSI është pergjegjese për

kthimin e framit te te dhenave ne një varg bitesh te afte për transmetimin në mjedisin e

transmetimit. Me fjalë të tjera, shtresa fizike e modelit OSI menaxhon dhe sinkronizon pulset

elektrike dhe analoge që formojnë transmetimin aktual. Në marrës, shtresa fizike riasemblon
këto

pulse në frame të dhënash. Shtresa fizike ka të bëjë me transmetimin e bitëve të papërpunuar


mbi një kanal komunikimi.

 Shtresa e Data Linkut të modelit OSI performon dy funksione të ndara dhe prandaj
është ndarë
respektivisht në dy nënshtresa si më poshtë:
• Media Access Control (MAC) - kjo nënshtresë siguron një ndërfaqe me përshtatesin e
rrjetit. Driveri i përshtatësit të rrjetit, ne fakt, quhet shpesh MAC driver, dhe adresa e
hardwarit e shkruajtur në kart në fabrikë shpesh i referohet adresës MAC.
• Logical Link Control (LLC) – kjo nënshtresë ekzekuton funksionet e kontrollit të
gabimeve
për arritjen e framit në subnet dhe menaxhon linqet midis paisjeve të komunikimit në
subnet.
 Shtresa e network kontrollon funksionimin e nënrrjetit. Një çështje kryesore e dizajnit
është përcaktimi se si paketat drejtohen nga burimi në destinacion. Rrugët mund të jenë
bazuar në tabelat statike që janë '' të lidhura në rrjet '' dhe rrallë ndryshojnë, ose më
shpesh ato mund të updatohen automatikisht për të shmangur përbërësit e dështuar.
Nëse shumë pako janë të pranishme në nënrrjet në të njëjtën kohë, ato do të futen
brenda njëri-tjetrit, duke formuar pengesa. Trajtimi i bllokimeve është gjithashtu një
përgjegjesi e shtresës së rrjetit, së bashku me shtresat më të larta që përshtatin
ngarkesën.
 Shtresa e transportit funksioni themelor i shtresës së transportit është të pranojë të
dhëna nga sipër saj, ti ndaje në njësi më të vogla nëse është e nevojshme, ti kaloje këto
në shtresën e rrjetit dhe te sigurohet të gjitha pjeset te arrijnë saktë në skajin tjetër. Për
më tepër, e gjithë kjo duhet të bëhet në mënyrë efikase dhe në një mënyrë që izolon
shtresat e sipërme nga ndryshimet e pashmangshme në teknologjinë hardware me
kalimin e kohës. Shtresa e transportit gjithashtu përcakton se çfarë lloji të shërbimit
duhet të ofrojë për shtresen e sesionit dhe për përdoruesit e rrjetit. Shtresa e
transportit është një shtresë e vërtetë end-to-end; mbart të dhëna nga e gjithë rruga
nga burimi për në destinacion. Me fjalë të tjera, një program në makinerinë burimore
zhvillon një bisedë me një program të ngjashëm në makinerinë e destinacionit, duke
përdorur
kokat e mesazheve dhe mesazhet e kontrollit.

Shtresa e sessionit shtresa e sesionit lejon përdoruesit në makina të ndryshme të


krijojnë sessione midis tyre. Sessionet ofrojnë shërbime të ndryshme, përfshirë
kontrollin e dialogut (mbajtjen pista se radha e kujt është të transmetojë), menaxhimi i
shenjës token (duke parandaluar dy palë nga përpjekja për të njëjtën veprim kritik
njëkohësisht), dhe sinkronizimi (duke kontrolluar transmetimet e gjata për t'i lejuar ata
të marrin nga aty ku u larguan në rast të një përplasje dhe rimëkëmbjen pasuese).

Shtresa e prezantimit ndryshe nga shtresat e ulëta, të cilat kanë të bëjnë kryesisht me
lëvizjen e biteve përreth, shtresa e prezantimit ka të bëjë me sintaksën dhe semantikën
e informacionit te transmetuar. Në mënyrë që të bëhet i mundur komunikimi për
kompjuterë me paraqitje te të dhënave të brendshme te ndryshme , strukturat e të
dhënave që do të shkëmbehen mund të përcaktohet në një mënyrë abstrakte, së
bashku me një kodim standard për t'u përdorur ‘ on the wire ”. Shtresa e prezantimit
menaxhon këto struktura abstrakte të të dhënave dhe ul strukturat e nivelit më të lartë
të të dhënave (për shembull, regjistrat bankarë) për t'u përcaktuar dhe shkëmbyer.

Shtresa e aplikimit përmban një larmi protokollesh që janë zakonisht të nevojshme nga
përdoruesit. Një protokoll i zbatimit i përdorur gjerësisht është HTTP (HyperText)
Transfer Protocol), i cili është baza për Rrjetin world wide. Kur një browser kërkon një
wb page, ai dërgon emrin e faqes që dëshiron te serveri duke përdorur HTTP. Serveri më
pas e dërgon faqen mbrapsh. Te tjera protokolle aplikimi përdoren për transferimin e
skedarëve, postën elektronike dhe lajmet e rrjetit.

2 .TCP/IP

Eshtë bashkësia e protokolleve të komunikimit të përdorur për Internetin dhe rrjetet e


ngjashme. E ka marrë emrin nga dy protokollet më të rëndësishme në të: Transmission
Control Protocol (TCP) dhe Internet Protocol (IP), të cilat ishin dy protokollet e para të
definuara në këtë standard. 

Modeli TCP/IP përbëhet nga katër shtresa. Nga më ulëta, këto janë

 Shtresa e network, IP-Ben te mundur dergimin e paketave te ndryshme nga burimi te


destinacioni duke u bazuar vetem ne adresat e tyre

Gjeja e pare qe ben kjo shtrese kur ka paketa per te derguar eshte te kontrolloj nese ne
rrjetin e saj ka ndonje paisje me adresen IP te destinacionit, nese nuk ka ne baze te
protokollit IP percaktohet se kush prej ruterave eshte me afer me destinacionin keshtu
qe paketat i dergohen ruterit dhe ruteri i dergon tek destinacioni nese perseri
destinacioni nuk gjendet ne rrjetin e ruterit atehere ndodh e njejta gje deri sa paketat
mberrijn ne destinacion.

Shtresa e internetit, Disa nga funksionet jane: dergimi i paketave nga host ne host,
rrugetimi i paketave nga burimi ne destinacion, menaxhimi i gabimeve te paketave

Shtresa e transportit, Detyra kryesore e shtresës së transportit është rregullimi i


qarkullimit të informatave nga burimi e deri tek destinacioni në mënyrë të besueshme
dhe të saktë duke perdorur mekanizma.

Shtresa e aplikacioneve. është përgjegjëse për proceset e prezantimit, enkodimit dhe


kontrollit të dialogut dhe sesioneve në mes të hosteve komunikuese. Protokollet e kesaj
shtrese: DNS, HTTP,

3. Hibride

Ne jeten reale perdorim nje mix mes OSI dhe TCP/IP qe quhet modeli hibrid. AI ka 5
shtresa, ku shtresa e aplikacionit eshte kombinim i shtrese 7,6,5 te OSI

Aplikacion

Transport

Network

Datalink

Fizike

4. Protokollet dhe portat

Tcp është një protokoll me lidhje të orientuar. Protokollet me lidhje të orientuar

sigurojnë rrjedhje të kontrollit dhe kontroll të gabimeve më të sofistikuar sesa

protokollet pa lidhje. Tcp garanton shpërndarjen të dhënave. Tcp është më e

besueshme se udp. Por kontrolli i gabimeve dhe i rrjedhjeve shtesë nënkupton që tcp

është me i ngadaltë se udp.


Udp është një protokoll pa lidhje të orientuar. Është më i shpejtë se tcp por jo aq i

besueshëm sa tcp. Udp shkarkon përgjegjësi më të shumta të kontrollit të gabimeve

ndaj aplikimit.

2) segmenti i të dhënave kalon nga shtresa e internetit ku protokolli IP siguron


informacion të

adresimit logjik dhe fut te dhënat ne një datagram.

5. Portat e protokollit (protocol gateways)

Portat e protokollit, të njohura gjithashtu si përkthyes të protokollit, janë pajisje të vogla


jo përshkruese që funksionojnë kryesisht si përkthyes për protokolle dhe shtresa fizike
të ndryshme (d.m.th., Protokolli i Kontrollit të Transmetimit (TCP) dhe linjat serike). Kjo
lejon që makineritë, sensorët, aktuatorët dhe kompjuterët që operojnë pajisje
industriale të tilla si fabrika, diga, termocentrale dhe pajisje për përpunimin e ujit të
komunikojnë me njëri-tjetrin.

6.Switch dhe router

Switch lehtësojnë ndarjen e burimeve duke lidhur të gjitha pajisjet, përfshirë


kompjuterët, printerët dhe serverat, në një rrjet biznesi të vogël. Falë switch, këto
pajisje të lidhura mund të ndajnë informacione dhe të flasin me njëra-tjetrën,
pavarësisht se ku ndodhen në një ndërtesë apo në një kampus. Ndërtimi i small business
network nuk është i mundur pa switchet për të lidhur pajisjet së bashku.

Ashtu si një switch lidh pajisje të shumta për të krijuar një rrjet, një router lidh switch të
shumtë, dhe rrjetet e tyre përkatëse, për të formuar një rrjet edhe më të madh. Këto
rrjete mund të jenë në një vend të vetëm ose në shumë vendndodhje. Kur ndërtoni një
rrjet të biznesit të vogël, do t'ju duhet një ose më shumë router. Përveç lidhjes së shumë
rrjeteve së bashku, router-i lejon gjithashtu që pajisjet e rrjetit dhe përdoruesit e
shumtë të hyjnë në internet.

Në fund të fundit, një router punon si dispeçer, duke drejtuar trafikun dhe duke
zgjedhur rrugën më efikase për informacion, në formën e paketave të të dhënave, për të
udhëtuar nëpër një rrjet. Një router lidh biznesin tuaj me botën, mbron informacionin
nga kërcënimet e sigurisë dhe madje vendos se cilat pajisje kanë përparësi mbi të tjerat.

7.TCP handshake

TCP (Transmission Control Protocol) is a Transport Layer host-to-host protocol for connection-
oriented communication between two computers on an IP network. TCP uses a three-way
handshake (aka TCP-handshake, three message handshake, and/or SYN-SYN-ACK) to set up a
TCP/IP connection over an IP based network. The three messages transmitted by TCP to
negotiate and start a TCP session are nicknamed SYN, SYN-ACK, and ACK
for SYNchronize, SYNchronize-ACKnowledgement, and ACKnowledge respectively. The three
message mechanism is designed so that two computers that want to pass information back and
forth to each other can negotiate the parameters of the connection before transmitting data
such as HTTP browser requests.

The host, generally the browser, sends a TCP SYNchronize packet to the server. The server
receives the SYN and sends back a SYNchronize-ACKnowledgement. The host receives the
server's SYN-ACK and sends an ACKnowledge. The server receives ACK and the TCP socket
connection is established.

This handshake step happens after a DNS lookup and before the TLS handshake, when creating a
secure connection. The connection can be terminated independently by each side of the
connection via a four-way handshake.

8 Server

A server is a device with a particular set of programs or protocols that provide various services,
which other machines or clients request, to perform certain tasks. Together, a server and its
clients form a client/server network, which provides routing systems and centralized access to
information, resources, stored data, etc. At the most ground level, one can consider it as a
technology solution that serves files, data, print, fax resources, and multiple computers.

There are many types of servers we can build on a server platform. A server platform is
fundamental hardware or software for a system that acts as an engine that drives the server. It
is often used synonymously with an operating system. Here are the different types of servers
being used these days.

1. Application Server
Also known as a type of middleware, it occupies a substantial amount of computing region
between database servers and the end-user and is commonly used to connect the two.

2. Audio/Video Server
It provides multimedia capabilities to websites by helping the user to broadcast streaming
multimedia content.

3. Chat Server
It serves users to exchange data in an environment similar to an Internet newsgroup which
provides real-time discussion capabilities.

4. Fax Server
It is one of the best options for organizations that seek minimum incoming and outgoing
telephone resources but require to fax actual documents.

5. FTP Server
It works on one of the oldest Internet services, the file transfer protocol. It provides a secure file
transfer between computers while ensuring file security and transfer control.
6. Groupware Server
It is a software designed that enables the users to work together, irrespective of the location,
through the Internet or a corporate intranet and to function together in a virtual atmosphere.

7. IRC Server
It is an ideal option for those looking for real-time discussion capabilities. Internet Relay Chat
comprises different network servers that enable the users to connect to each other to an IRC
network.

8. List Server
It provides a better way of managing mailing lists. The server can be either open interactive
discussion for the people or a one-way list that provides announcements, newsletters, or
advertising.

9. Mail Server
It transfers and stores emails over corporate networks through LANs, WANs, and across the
Internet.

10. News Server


It serves as a distribution and delivery source for many public newsgroups, approachable over
the USENET news network.

11. Proxy Server


It acts as a mediator between a client program and an external server to filter requests,
improves performance, and share connections.

12. Telnet Server


It enables the users to log on to a host computer and execute tasks as if they are working on a
remote computer.

13. Virtual Servers


A virtual server is just like a physical computer because it is committed to an individual
customer’s demands, can be individually booted, and maintains the privacy of a separate
computer. Basically, the distance among shared and dedicated (hosting) servers is reduced
providing freedom to other customers, at less cost. Now, it has become omnipresent in the data
center.

14. Web Server


It provides static content to a web browser by loading a file from a disc and transferring it across
the network to the user’s web browser. A web server intermediate exchange by the browser
and the server, communicating using HTTP.

Other types of servers include Open source servers, Gopher server (like a plain document,
similar to WWW and the hypertext being absent), and Nameserver (applies name-service
protocol). The various servers can be categorized according to their applications. Servers along
with managing network resources are also dedicated, i.e., they perform no other task other than
their server tasks.

9. End devices

Këto pajisje formojnë ndërfaqen midis rrjetit njerëzor dhe rrjetit themelor të komunikimit. Disa
shembuj të pajisjeve fundore janë:

 Computers ,laptops, file servers, web servers.


 Network printers
 VoIP phones
 Security cameras
 Mobile handheld devices.

10 Ceshte protokolli

In networking, a protocol is a set of rules for formatting and processing data. Network protocols
are like a common language for computers. The computers within a network may use vastly
different software and hardware; however, the use of protocols enables them to communicate
with each other regardless.

Standardized protocols are like a common language that computers can use, similar to how two
people from different parts of the world may not understand each other's native languages, but
they can communicate using a shared third language .

11 Subnet

A subnetwork or subnet is a logical subdivision of an IP network. The practice of


dividing a network into two or more networks is called subnetting. Computers that belong to the
same subnet are addressed with an identical most-significant bit -group in their IP addresses.

12 ARP cfare eshte dhe cfare funksioni ka

ARP (Address Resolution Protocol) is a network protocol used to find out the hardware (MAC)
address of a device from an IP address. It is used when a device wants to communicate with
some other device on a local network (for example on an Ethernet network that requires
physical addresses to be known before sending packets). The sending device uses ARP to
translate IP addresses to MAC addresses. The device sends an ARP request message containing
the IP address of the receiving device. All devices on a local network segment see the message,
but only the device that has that IP address responds with the ARP reply message containing its
MAC address. The sending device now has enough information to send the packet to the
receiving device.

13 Rrugezimi statik dhe dinamik

Static Routing
Static Routing or Non-Adaptive Routing, follows user defined routing and routing table is not
changed until network administrator changes it. Static Routing uses simple routing algorithms
and provides more security than dynamic routing.
Dynamic Routing
Dynamic Routing or Adaptive Routing, as name suggests changes the routing table once any
changes to network occurs or network topology changes. During network change, dynamic
routing sends a signal to router, recalculates the routes and send the updated routing
information.
Following are some of the important differences between Static Routing and Dynamic Routing.

You might also like