Mang May Tinh

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

x

ling ding aia many Internet


-
ng dung trugen file media -

file ,
gg drive , ...

-
Email -
mail

-Thing mai
-
dien t -

shopee ,
lazada ,
amazon ,
...

hau edu
--

- Dich un ten mien . . un ...

Chong 1 :
Coban vemang mich

1 .
Lich Si Internet .

- 1911963 ,
2
phing tho ca
Ltrg At not tieng Cali a Stanford
ket no : hier
truyen tin .

+12/1969 MMT mo
rong him th d nut -> 4 nut
-
,
many
us tic do li 56 kps
x
per secon

do rat whanh (mo thang ptrien 1 nul


-
1971 ,
to
-
ting mang/ &

no,
-
1974 , cerf &
kahn-ngly' ket cas he thing mi

Turing Awards /
- 1980 , TCP/IP de phohoa va chan bien'

-
Truyen file : Gmail ,
Media file ,...

Dick m
:
FPT ,
Mail ,
DNS , ...

-
Dai 90 :
Web- HTML ,
HTTP ,
Berners-Lee
Coi 90 hoa
-
:
Thong mai Internet .

servero
*

Ve so do ket ni

-
ket no : 2mt .
-
ket no : 3 mt .

# keptop
Switch O

a keptop
keptop
2 .
Cas kno co ban

Many it l gi ?
-
Tap hop -
cac not kit noi us nhan dia tren 1 ktnic no do co'the traw

do di Lien -
.

I Mt :

may tram , may


chi ,
bo dink tuyen
I ket no! =

1 pen trugen
+
Theo 1 ktruc
mang
Dvong truyen at ly'
-
La cac pien rat
S ly' co' knang trugen dan tin hier
-Phan loai :
+
thin tuyer :

cap xoan ,
cap doing truc , cap quang ,
...

tuyensong radio
-
Vo ,
viba , song hing ngoai ...

Mot thing so'dac thing Bang


-

-
so : +
tar

t Tile lo bit khi trugen (BER- Bit Error Rate/Ratio


/

+
As my how : muc
sy giam tin hie khi truyen"
kien tric
mang
Cas nut ket not voi than nth ? (Hinh trang-topology)
-

many
+
topology rat ly' :
hinh trang dia tren cap ket
not

bus ring
Cring) star (saol mesh (loi)
+
topology logic hinh
trang dia tren cach thu truyen in hier diein
:
:

die -
a den
- ... a trao doi di bin vo; than ntr ! (gian this -

protocol
Mot vi vi du :

-
Mang internet -
He -
thing Aim via
ngan hany
-

Mang noi bo cquan , trg hos - Mang ot


-

Mang gia dink - ---

Mang internet

-
Tren 8, 4 t thi -
kit no,

rg dung, Stage aa
-
3 9 ,

Dvong . ding ,
Wimax , 34 ...

-
Truyer tai ~NXO GB
mongay
- Dich m :
Web , email , mang , xhi , skype ...
Internet of
things (IOT)

Chugen mach go
-
Du lieu As Chia thanh cas goi tin (packet'
-
Phan dien de headers :

dia chi ,
stt

-
Phan di lien (payload)
-

-
Thiet bi chuyen mach tiep goi in dia tren tier de
/

Chuyen tiep goi tin


*
pich dia var "Dier de"

Truen thing trong ktm< phan ting


-
De ktra giam' sat' ,
de
~
suc loi (muc atich) /
+ Ben gui
+
Ben nhan .

Mo hink 03I/ISO

Application ->
Tangung dung
Presentation
Tani trinh dien
->

Session ->
Tang phien
Transport
Tang giar van
->

Network ->
Tang mang
link
Data
kit di Lien
-
->

Tang hien
Physical
-

->
Thing at by' .
Mo hinh OSI a TCP/IP

Application layer
Presiontation

Session layer
layer
3 ->
Application
CHTTP ,
FTP
.

,
SMTP ,
... (

Transport layer
Network layer
Data link
layer
Physical layer

Mo hinh OSI va TCP/IP

-
No hinh OSI :

Mo hinh than chien dc nang .


Ca mr hinh khac phai than chien t

mo hinh 081 .

Coy nghia lon ve mat co so ly thay it!


K
sdung tren the re"

-No hinh TCP/IP :


me hinh Internet .

Trien Khai ktric


phan tang .

Application Application Application


Transport Transport Transport
Network Network Network

Data link Data link Data link

Physical Physical Physical


Chong giao
thic TCP/IP

Application DNS DHCP SNMP HTTP SMTP FTP ...

- >

Transport UDP RP

Network ICMP >IP RIP OS PF ...

Data link Ethernet FDDI PPP DSL ARP ...

Copper Optical Radio PSTN ...

si Dura Duy Nitai not Gao uc LIEN Mana (a IP .

* a thing dachi thing (Sdung ving dung


Itpice git IP , cal chuyen file tring
I may qua qua nut
trung gian .
th

Dinh danh tren TCP/IP

ten mien , dia chi


cong dia chi
,
IP , dia chi at ly'.

Domain (ten mien(


Application
-
name

Transport
-> port number (so'hien Cong D)

Network
-
Ip address

Data link
-
Physical address/MAL address

Physical

Switch O
Bai tap

keptop a


modern a
mobile

laptop
a keptop

Switch O vide :
nam edu un .

keptop
.

-
-
&
+

+I
ten

dia
/
min

chicing
:

:
com ,

TCP 20
net ,

:
Un

FTP(Data)
, org

,
,

TCP21
...

:
FTP /0
wit
mobile (Control) MP 22 :
SSH M 23 : ...
, ,

-
dia chi IP :
0 0
. .
0 0
.
+

255 .
255 .
255 .
255 .

+ dia chi ratly' :


1
day 28 48bit 91-35-5B-5F-42-D7
keptop 00 :
11 : 24 :
79 : 80 : 82
*
Bai Hap servero

IP address :
192 168 1
. .
.
1

IP :
192 168
. .
1 2 .

Switch O

P
IP :
192 168 1 3
. . . :
192 . 180 . .

# keptop1 kaptop 2
IP :
192 168 . .
1 3
. IP :

192 168 1 4
.
.
.

Dia chi IP : 192 .


168 .
1 .
I

Subnet mask : 255 . 255 .


255 0 .

*
Nhap dia Chi IP hiding shap subnet mass

-
Phong an ktra phiong an' ktra kit not givia cac mt :

ktra lenh ping


kit not si
dung

ping 192 .
168 .
1 .
1

-
Dich on HTTP . (bat on

Dia
-
chi IP (IPv4)

-
Dia chi IP :

Mot so'32-bit de dinh danh cong giau le mang tren nut' da

wii(PC ,
server ,
smart phone ,
by dinh tugen's
-
Mi dia chi IP A: gan' cho mot
long day That'
- Dia chi IP co tiah day what trong mang

Bien dien dia chi IPv4 ⑧ ⑧ *

8 bits
sdung 4 p'Obits Inta' 1 dia chi 32 bits .

0-255
integer
Dia chi IP ~4 .

- Dia chi co
Sphan
+
Most ID p'Atchi
-

may tram
-

-
Network ID -

p Achi many

- Lain the rato de biet At? phan na ki do may fram ,

i nat do many ?

- plop A chi
- ↑phan lp-CIDR

- Thap phan co'chain 255 .


255 .
255 .
244 .

-Prefix :

127 .

-
Hexa :
OxFFFFFF eO .

Phan lop dia chi IP (classful addressing)

Bai tap .

129 168 1 2..

1, IP address : 11000000 10110010 00000001 00000010

Net mask : 11111111111111111111111100000000


dem sy so 't
24 bits .

Network address :

129 ,
168 .
1 .
0 124 .

- Co'24 bit danh cho d many ,


8 bit danh du it

Alc 192 168 1 0124


-

many :
. . .

Ak may :

co
/
20 =
25 may ;
thuc te' , Koding t dai va otla
&

a, hin chi con 254 dia chi .

203 178 144 128 .

2, Nw address :

11001011 101 100 10 10010000 10000000

i
Netmosk :

111111AA 11111111 1111111111100000

285 255 255 224


*
-Co2 =

32 A danh cho may ,


tren thic te ta ki
sdung
A dai va wi nin con 30 ok

-
Al dan : 203 . 178 .
142 .
129 ( +

1)
* vi bo di ot'dan-arti
-
Ak (usi :

203 .
178 .
142 .
158 1 +
301

Bai tap .

Cho IP :

203 .
178 .
142 .
129

Mat na
:

255 . 255 . 255 .


224

203 178 142 129

IP :
11001011 10110010 10001110 1000000 1

MNa :

11111111 1 111111111111111 1100000 -> 27 bit


AND
11001011 10110010 10001110 1000000

dia chi address)


many (Network 128/24
-> :
203 .
178 . 142 .

5
thic ti ta ok dai
% may : 2 =
32 Irin ko
sdung
va ot a -> 30 may
dant & 25-2=
~
5 bit cho ot nin danh 30 (
Giao thc IPv6

-
Xuat phat in nhu can this te :

dia chi IPv4 can kiet ,


Kodi de cap phat'
Caitien trin IP 16 :

- Moring ko gian dia chi

sdung ot co' di dai 128 bit

Phan ving dia chi (scope)


8

Kgian dice -
chi IPv4 Kgian Achi IPv6

1cm 84 .
000 lan d kink thien ha

Cach th bdien :

-
128 bit ,
bien dien so he 16 -

-
Phan tach" : "Giaca's nhom 485' hexa

·
3tfe :
501 :
1002 :
e320 : 200 :

181 :
+eg8
:

936d

-
B: qua chus ! lien diep cas so O .

·
Ste :
501 :
1002 :

2320 : 0 : 0 :

0 : 1-> 3tfe :

501 : 1002
:

e320 : 1

sdung by hie mat In


-
no
many

Lain the nat de cap' phat'o IP ?

-Cap' phatco'dinh (static IPI

-windows :

control panel -> network ->


configuration
-> TCP/IP ->
properties .

- Linux :
/etc/ network / interfaces
-Lap phal ding :

DHCP-Dynamic Host Configuration Protocol .

BT :

Hay trinh bay ca cach cap' phat dia chi IP va cho vdu ?

-
Go da chi IP tink
-

ICMP vo cas
sing u debug
ICMP luon hot / try suot rig so
Piraceroute
- is

- NSD othe sdung ICMP thing qua


can
long us
debug .
4 .
1- Khai niem co ban ve dinh trjen

-
Tim drong o tot that dech' tiep du lien to nut dich.

-
Trg mang IP ch mach goi :

t
Cas goi in ac chi tiep' dic lap -

Ainh Moi Kochi be cas


+ tuyen tren tring chang :
nut ra train
chang
duong di to dich .

X con
no tim do -> tinh
not i dien-ding ,

Phan cap try dinh tuyen'


-Internet Mang via cas
many
=

Cas Ac gly' bo: cas to chuc nham chink sach rat


mang so
I
-
,

I nham , trug doco' dink tuyen'


Mo: the he ii
why ray go: la mot systems (AS)
o

mang tri-Autonomous

btap :
We' 5mt1 tim di di .

A ANN =
1 -
2 -
5

> AS2 7 ASI nei 2


hing 1345
:

1
-

As
- ASA
> AS3
-

La
2Abi

gengnhau
S

drt
net
-

Route 1 Routers
1 -
switch
1

Selitch t
>7
<
-

Router 2 ↑
-
1 N
↑ -
M
1 N

'
>

- lap top 2
0 server PC2
lap top1
Pc1

* Viel' lich ba dirg di .

Bang dinh tuyen'

-
Destination :
a mang
dich
-
Dinh tuyen' classless :

sdung ok Kophan khop


Dinh try en
- classful :

sdung oth phan lo


-Outgoing Port Ling :
ra cho goi in de To mang
dich
-Next hop :
ok cing than go in via nut' ke tep
-cost :
chi phi go in Hi mul dang xet' to dich .
Mang ac bo
-
/LAN)
1 Can +b : kef not try LAN swith o
.
mang -
to cao him hub

-Repeater (b8 lap) ,


,
Hub) bo chial
-
-

Lunany - than thi deng


Dam nhiem chuc rang
+

ting 1 router

ting many n hier. No long


-
pri ket i nee

-
Bridge (can) ,
Switch (b! ch' machi
Dai whic chuc
- / rang tang 12

+
Cho plep kef noicac loai
-
d tr rat ly'F nham .

+
Chia who min dung do -

t
Ch mach cho khung in dia tren /c MAC

Router (b8 dirk tryen


-I

Router us Switch

-
Xi ly goi tin : win S ch' tiep (store-and-forward)

Router b tans -
-
man di i a
-
Ch' tiep go" in :

I Router sching that


:
-
/
wan' dinh tuyen tinh toan' bang ch' tiep
(Forwarding Tables , ch'tiep theo de IP dich
I Switch sching co :
che i how tink toan MAC Table ,
ch' Lie
theo Ic MAC dich

Cas hink ban via


trang LAN

Tat ca cas nut sing chung driong truyen-truc (backbone)


-

many
-
Mo; nut
many
ket not was true bing dai not chi T

-
Pt
truyen
:
It -dad' (point -

to-multipoint
I
Du lien to theo & ha
I
Nut rhan :
ktra ok du lie
-

-
Terminator

-
vin ot :

chi phi thap


-
Nhc It' :
Hinh sa hub
en Not nut
many doing vai tro thi trung tain .
switch
router

-
Cac not mang I kit not truc kep is thi trung tai

d d Switch-router
Pt

trugen -
:

T
-

I'-dad' :
hub

-
it' :
tre o tot hon ,
din khien tof her
S

-Nh: It :
Chi phi caw hon .

Hink vorg
-
Cas nut
many
C
hung di trugen khep kin

&.
&' spoint
to to point
Pt -

-
d
- Di phong
-
in It'

- Nh? &' :

-> rh ot :
hay say ra loi , qua' Phente ,

Non kea ↑

- whe o :

duphong cao .
sever O
Sever

Router O

-switch2
switch t
-
-
-

-
1 N
↑ -
M
1 N
oo I
·
-


> I
'
>
-
④ PC 19
> I > I · I (IP 192
00
PC 11 :

PC 10 (IP
168
2
192 168 2 2)
t
0 ⑪ ⑰ . . .
.
i0)
:

P2 1
po 3)
(IP 192 160 1 G
:
. . .
Pc 9 (IP 142 168
:

.
2 .
17
.

(TP
-
:
192 168
.
. 1 1)
. (IP 192
:
. 160 1 10)
. .

tracert
quing di di
:

f
pert :

Bing /Frg mas


Bring dink tujen :
(router)
Chrong 6
:

Tang rat ly'


1 .
Tong quan
-
Dain nhan ve trugen dong bit tren cac di trugen
- Mot so'van de :

+ Ptien truyen :

day dana 1 day


Ma hou' kenh
~

t trugen
+ Dici che

I Don kinh /phan kerh

MANG-
LAN Go-VLAN

-Y thic te : +
Chia se tai
nguyen (file , may in , ... ) givia cas tram" yo wham"

-
Bat mat thing in no, be try mot phony bar .

- Gial
phap Mang LAN do :
+ Nhoin cas tram thank I
many LAN
logic
bi
+

Mang LAN logic ↳


rang bu ve mat

dia ly' cia cac tram


+ Mang LAN logic dic lap is
cac ring dung .

VLAN

- Mot VLAN I mot board cast domain at? two ra tren mot hoas n'switch
the
-

- Not switch o cha mot hoa n VLAN .

VLAN IP aing wham .


(giongs So dais

switch t switch
-

-
-
- -
↑ - ↑
VLAN2
M
M
1 S
1
VLAN2 VLAN 1
VLAN1 MAN1 VLANG
> I

> I > I
> I > I > I
④ PC6
t
0 ⑪ 0
-

⑰ (IP 192 168 2 3)


pc 8 . . .

Pc
:

PC1 (IP 192 160 1 2)


:
. .
.
pc3 Pc4 (IP :
192 168
. .
1 .
3)

(IP :
192 168 .
. 1 .
1) (IP 192
:
. 160 . 2 .
1) (IP 142 168
:

.
. 2 .
2)
Bai tap

VLAN 1 switch t switch


-

> I

pc 1
VLAN
(IP :
192 168
. .
1 11
.

VLANS VLAN4 VLANS VLAN4 VLAN 1


ooo
> I
VLAN2 ⑰
100 I
.

> I >
> I > > I > I
④ PC 20
t
0 ⑪ 0
-

⑰ ④ (IP 192 168 2 5)


Pc S
pc 11
PC13 :
. . .

PC2 (IP 192 160 3 11 :


. .
& PC 10
(IP :
192 168 3 31
. . .
PC12 (IP :
192 168 . .
1 . 4)

(IP :
192 168 2 1)
.
.
.
(IP 192 :
. 160 .
4 .
3) (IP 192 168 4 37
:

.
. .

PC4 (VLAN 4) 192 . 168 .


4 .
I
192 160 1 2
pc5/VLAN1 . . .

Pc6(VLANC) 192 .
168 .
2 .
2

pc = ( VLANS) 192 .
168 . 3 .
2

192 168 4
pc8/ VLAN4) .
. .
2

Pc 9 (VLAN 11 192 . 168 .


1 .
3
(VLAN 21 192 2 4
PC 14 ,
168 .
.

pc 15 (VLAN31 19 2 .
.
168 .
3 .
4

p
> 16 (VLAN4) 192 . 168 .
4 .
4
/A ( VLAN1 192 168 1 5
Pc .
. .

p
C 10 ( VLAN2S 192 . 168 .
2 .
5
5
Pc 19) VLAN 3) 192 . 168 . 3 .

VLAN 1 VLAN4

switch t switch
-
dia -

PC 12
(IP 192 160 4 31
(IP
:

192 168 1 11
. .
.

. . .

VLAN S

VLAN2

'
>
t
-
PC 11
PC2 (IP 192 160 33 (
:
. .
·

VLAN 2
(IP :
192 168 2 1).
.
.

VLAN4 VLAN 1
VLAN3
VLAN4 1
'
VLAN >
VLANS VLANL

>
↳ a
- PC 10
-
- -

⑪ ⑰
P25
- Pc
18 PCO (IP
Pc 9
(IP 192 168 23 (

192 168 13
:

(
. . ·

(IP
.I!!
PC 3
P26 192 . .

4
PC
:
.
:

(IP 192 160 3 1) (IP 192 160


·

1222
.

(IP 192 160 I


192 160 2)
.

4
: ·
:
. .
. .
. .

CIP : 192 168


. .

11
.

. .
4 .
-
Danh dia chi IP was Router

192 168 1 0
.
.
.
va 192 . 168 . 2 O
.

Routers
-
Their dia che IP var RIP
via router .

Cap what Defaut Gateway

A
switch 2

witch
-

ca
may irh .

la 192 . 168 2 100 . . .

I I I
Ba tap on tap -

VLAN 1 VLAN4

switch t switch
-
1
, dia -

PC 12
(IP 192 160 4 31
(IP
:

192 168 1 11
. .
.

. . .

VLAN S

VLAN2

'
>
t
-
PC 11
PC2 (IP 192 160 33 (
:
. .
·

VLAN 2
(IP :
192 168 2 1)
.
.
.

VLAN4 VLAN 1
VLAN3
VLAN4 1
'
VLAN >
VLANS VLANL

>
↳ a
- Pc10
-
- > I

- % 192160 !*1
,
168.23
..

⑪ ⑰ Pc 7

PC 3 P25 (IP 192 168 3 21 PC0 (1p


P26
PC 4
. . .
:

(IP 192 160 3 1) (IP 192 160


:
1 2)
.

(IP 192 160 22 ( (IP 142 168 2)


.

4
: .
:
. .
. .
. . :

CIP : 192 168


. .

11
.

. .
4 .

+2 +
3
So sank switch a router .

*
Xi ly goi tin :
him a
chuyen tiep (store-and-forward
-Router :

thief bi
-
ting many
-Switch :
thief bi tang lif di
lien lien .

*
Chuyen tiep goi tin :

-Router :

sdung that toan' dinh tryen tinh toan bang chuyen tiep'
(Forwarding Table 1 ,
ch tiep theo dia che IP dich
-Switch sdung :
co che i hos tinh tran bang MAC Table ,

chen tiep theo dia MAC dich .

2, * Cas bron can hinh Router tim ding di giva mangf nham .

-
Buoc 1 :
Dann dia Chi IP vio Router 192 168 . .
1 O . va

192 168. .
10. O.

- Brc2 : Thei diachi IP vas RIP ca Router

-
Busc 3 :

Cap what Default Gateway aia may hich

inh la
-
Bro 4 :

Cap that Defaul Gatway via may 192 168 10 100


. . .

-
B1 : Ve so do hoan which .
3 ,
* So sant :

Cap dong truc :


I
-

+
Can tao ->
-
-

185m -500m

Phan
-
loai cap gai : sm
- Bang thing +
baseband :

Mbps
Broadband :

400Mbps
-
cap xon doi

+ Cai Two :

Phan Unshielded Twisted


loat
+ UTP :
Pair

I STP :
Shielded Twisted Pair
-

Categories
A late MBPMbps
Cat 6 :
1Gps
-kei noi-dan
I thing
dan chio
·

Cap quang
-Es
-
:

+
Can
~ /

two :
E
&

- Bang thing :

hang chic Gbps


-> Han che
Phan
loai
:

gia think
single Mode
cas din not
& Multi
phic tap
Mode -Tot do
E da
- - -

Indoor x Our door


f ·

die cap doing tra


xoan
Dac L
cap gai Cap be Cap Cap quang
Fait not BNC N-series R5 45-
ST

so'dan no i to ,

da trin I dran 30 100 L 2

choing nhin Tof Tot Tof to in to an

A tin day B Ca las Rat cao .

You might also like