You are on page 1of 270

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Mc ch hnh thnh mng my tnh Cc dch v truyn thng ng dng Qu trnh pht trin kin trc mng truyn thng Cc kin trc vt l ca mng M hnh tham chiu v cc giao thc trn mng Mt s th d v mng Internet

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Mc ch hnh thnh mng my tnh (MMT)


Nhc im trong phng thc trao i thng tin c

D tha ti nguyn thit b Hiu sut trao i thng tin thp Kh qun l mng
Mng my tnh ra i cung cp cc chun m cho phn cng, phn mm v cc thit b mng

Nhu cu chia s ti nguyn, thng tin v dch v

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Cc dch v truyn thng


Cho php trao i thng tin gia cc user cc v tr a l khc nhau

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

ng dng
c xy dng trn cc dch v truyn thng E mail c xy dng trn dich v Internet (realiable stream) E-mail

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Web browser c xy dng trn dich v Internet (realiable stream)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Web browser c xy dng trn dich v Internet (realiable stream) v CPTM (cellular phone text mesaging)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Cc v d khc
Peer-to-peer: Chia s file ca Napster, Gnuitella, Kazza Audio video streaming Network games Online purchasing Voice-over-Internet Video on demand IP TV

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Mng truyn thng l g?

L tp hp cc thit b (hardware v software) v tin nghi c th cung cp cc dch v truyn thng c bn + Thit b: Routers, servers, switches, i h multiplexers, hubs, modems, + Tin nghi: cp ng, cp ng trc, cp quang, ng dn,

V d: Mng in thoi, mng di ng, mng my tnh, Internet,

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Kin trc mng: Ch ra phng thc xy dng v hot ng ca mng Kin trc mng ph thuc dch v mng g qu y g g g Kin trc mng chia cc q trnh truyn thng trn mng thnh cc vng chc nng gi l phn lp (layers)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Qu trnh pht trin kin trc mng truyn thng


Telegraph networks Message switching and digital transmission Telephone networks Circuit switching Analog transmission -> digital transmission Mobile communications Internet Packet switching and computer applications Next-generation internet Multi-service packet switching networks

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Telegraph networks v message switching


Electric telegraph - Trng in t uc to ra t ming li st qun dy ng khi c dng in chy qua Samuel Morse (1835): Xung v dng lm cong ming nam chm to ra chm v gch.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Electric Telegraph Networks Chuyn mch thng bo v c ch Store-and-Forward a ch ha, nh tuyn, chuyn tip

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Telephone networks v circuit switching


Signaling Cn thit thit lp cuc gi Bells telephone (1875)

N2 problem Kt ni trc tip N users, cn N(N-1)/2 lin kt Lng ph, kch thc cp ln Gii quyt bng switch

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Circuit switching Pht minh nm 1877 Ngi iu hnh kt ni khi c yu cu cuc goi: cung cp dng in Ch c N kt ni ti tng i trung tm

Manual switching

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

iu khin kt ni bng my tnh Yu cu c h thng bo hiu ring My tnh iu khin kt ni trong b chuyn mch Cc my tnh trao i thng bo bo hiu : Thit lp kt ni cuc gi Thit lp cc dch v: Caller ID, voice mail,

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh S ha mng in thoi Tn hiu thoi PCM (Pulse Code Modulation) Voice: 8bit/sample x 8000 samples/sec = 64 kbps Time Division Multiplexing (TDM) cho tn hiu thoi

Chng 1

Ghp knh T-1 (1961): 24 voice signal = 1.544 Mbps Chuyn mch s (1980s) in thoi s t bo (1990s) Truyn s liu quang (1990s) Chuyn mch s, iu khin s, truyn s liu, y , , y ,

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Computer network v packet switching


Khi qut qu trnh pht trin MMT 1950s: Cng ngh in bo thch ng vi my tnh 1960s: Cc thit b u cui c th truy nhp cc my ch 1970s: Cc my tnh kt ni trc tip vi nhau: ARPANET, TCP/IP, Ethernet LAN 1980s & 1990s: Cc ng dng khc v mng Internet ra i Mt s giao thc trong mng Internet Protocol (IP) Transmission Control Protocol (TCP) Hyper Text Transfer Protocol (HTTP) Simple Mail Transfer Protocol (SMTP)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh Mng Internet

Chng 1

Cc kiu MMT khc nhau c kt ni vi nhau trao i d liu gia MT Mi MMT c th c kin trc v c xy dng trn cc cng ngh khc nhau Cc giao thc lin mng cn thit cho trao i tin gia cc mng Internet: mng ca cc mng

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh Internet Protocol (IP) Routers hoc gateway lin kt cc mng khc nhau Cc my tram truyn cc gi IP trong mng kt ni Routers chuyn cc gi tin qua lin mng Best-effort IP services, no re-transmission

Chng 1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

10

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Cc cu trc (topology) ca mng

- Topology mng nh ngha cu trc mng - Topology vt l (physical), c xem l kt ni thc ca dy dn hay phng gy ( y ) y y g tin truyn dn - Topology logic (logical) , c xem l cch thc truy nhp mi trng truyn dn ca cc my tnh khi truyn d liu - Logical topology th hin cch thc cc my tnh trao i thng tin qua mi trng truyn dn - Hai loi logical topologies chnh l broadcast v token passing.
Hanoi University of Technology Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

1. Mng hnh sao (star topology) Thit b trung tm: switch, router, hub hoc thit b tch hp P Passive h b B t trung cc my t h thnh mng h segment i hub: tp t tnh th h n hay t Active hub: B tp trung c kh nng khuch i tn hiu

Hanoi University of Technology

Faculty of Electronics and Telecommunications

11

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

2. Mng hnh bus (bus topology) S dng mt ng truyn chung cho tt c cc my tnh M tnh kt ni vo mng s d My t h i dng T C T-Connector t Terminator: ngn chn kh nng di tn hiu

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

3. Mng hnh vng (ring topology) Cc my tnh lin kt vi nhau thnh vng trn theo nguyn tc im-im M tnh trao i d liu theo mt chiu My t h t li th t hi D liu truyn dng gi

Hanoi University of Technology

Faculty of Electronics and Telecommunications

12

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

4. Mng kt hp (star bus, star-ring topology) T hp cc topology c bn ty theo a hnh ni thit k mng

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

5. Mng Mesh Full - Mesh hoc Partial - Mesh

Hanoi University of Technology

Faculty of Electronics and Telecommunications

13

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Phn loi mng


Theo kh nng cung cp ti nguyn

Client/Server Peer-to-peer
Theo M hnh mng

Mng LAN Mng WAN Mng MAN


Theo k thut chuyn mch Theo phng thc kt ni
hng kt ni) (connectionless - khng kt ni hoc oriented-connection

Theo dng kt ni (n cng, song cng, bn song cng)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Local-area networks (LANs)

Mt s cng ngh mng LAN: - Ethernet - Token Ring - FDDI (Fiber Data Distributed Interface)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

14

1/2009

Chng 1. Tng quan v mng my tnh Wide-area networks (WANs)

Chng 1

Mt s cng ngh mng WAN: - Modems - Integrated Services Digital Network (ISDN) - Digital Subscriber Line (DSL) - Frame Relay - US (T) and Europe (E) Carrier Series T1, E1, T3, E3 - Synchronous Optical Network (SONET)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Metropolitan-area networks (MANs)

MAN thng m rng trong phm vi 1 thnh ph v c th cha nhiu mng LAN

Hanoi University of Technology

Faculty of Electronics and Telecommunications

15

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

M hnh tham chiu v giao thc trn mng


Giao thc, dch v v phn tng Layers, Service & Protocols o Qu trnh giao tip truyn thng trn mng rt phc tp o Phn tng chia qu trnh giao tip thnh cc nhm chc nng tin qun l (layer) o Tng di cung cp dch v (service) cho tng trn o Mi tng lm vic theo giao thc (protocol) ca tng V d: Web browsing application ( ) php g g y p o World Wide Web (WWW) cho p p ngi s dng truy nhp cc ti nguyn ca mng di dng vn bn HTML o Browser l chng trnh truy nhp web (IE, Netscape, Firefox ) o Trong vn bn HTML c link ti cc ti nguyn khc o Mi link tham chiu ti Uniform Resource Locator (URL) cung cp ti nguyn yu cu
Hanoi University of Technology Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh V d: Access to a web 1. Domain Name Server (DNS) DNS server

Chng 1

A: 209.191.93.52 HTTP server Q: www.yahoo.com ? User

Hanoi University of Technology

Faculty of Electronics and Telecommunications

16

1/2009

Chng 1. Tng quan v mng my tnh 2. Transport Control Protocol (TCP)

Chng 1

DNS server

ACK
ACK, TCP connection request From: 209.191.93.52 Port 80 To: 192.168.1.2 Port 2070 TCP connection request From: 192.168.1.2 P t 2070 F 192 168 1 2 Port To: 209.191.93.52 Port 80

HTTP server

User

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh 3. Hyper Text Transport Protocol (HTTP)

Chng 1

DNS server

Content 200 OK

HTTP server

User

GET / HTTP/1.1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

17

1/2009

Chng 1. Tng quan v mng my tnh M hnh tham chiu OSI Open system for interconnection

Chng 1

o Kin trc mng nh ngha da vo cc tng vi giao thc mi tng o 1970 Nhi hng thit k ki t phn t ring 1970s: Nhiu h kin trc h tng i kh kh khn trong kt ni mng gia cc my tnh ca cc hng khc nhau o ISO a ra m hnh OSI cho php kt ni cc my tnh t nhiu hng M hnh tham chiu OSI o M hnh 7 tng cho kin trc mng o S dng pht trin cc giao thc o TCP/IP c xy dng da trn m hnh tham chiu OSI

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

M hnh tham chiu OSI - Open Systems Interconnection) M hnh tham chiu lin kt cc h thng m c t chc tiu chun ho quc t ISO (International Standard Organization) a ra vo nm 1984.

H thng m l g ? ngha ca n ? Inputs Phn tng v chun ha Open System Outputs Open System

Hanoi University of Technology

Faculty of Electronics and Telecommunications

18

1/2009

Chng 1. Tng quan v mng my tnh ngha phn tng

Chng 1

7 6 5 4 3 2 1

Application Presentation Session Transport Network Data Link Physical

Gim phc tp khi phn tch v thit k. D tiu chun ha cc giao din To kh nng mdul ha cao m bo kh nng lm vic gia cc cng ngh khc nhau Gia tc cho nhng hng pht g g trin mi D hc v ging dy

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

H thng ES v IS

7. Application 6. Presentation 5. Session 4. Transport 3. Network 2. Data Link 1. Physical Transmission Media Data Link Physical

7. Application 6. Presentation 5. Session 4. Transport 4. Transport 3. Network 2. Data Link 1. Physical Transmission Media

Hanoi University of Technology

Faculty of Electronics and Telecommunications

19

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Cc nguyn tc phn tng

- n gin ha (hn ch s lng cc tng). - Cc tng tch bit bi cc chc nng c lp. - Cc chc nng ging nhau c t cng mt tng. - Cc chc nng c nh v sao cho c th thit k li tng m khng nh hng ti cc tng khc. - To ranh gii gia cc tng sao cho c th chun ho giao din tng ng. - To mt tng khi d liu c x l mt cch tch bit. - Mi tng s dng dch v ca tng di n, cung cp dch v cho cc tng trn.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

7 6 5 4 3 2 1

Application Presentation Session Transport Network Data Link Physical

Network processes to applications Data representation Interhost communication End-to-end connections Addresses and best path Access to media Binary transmission

Hanoi University of Technology

Faculty of Electronics and Telecommunications

20

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Application End-to-end Protocols Application Layer Presentation P t ti Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Network Layer Data Link Layer Physical Layer Network Layer Data Link Layer Physical Layer

Application Application Layer Presentation P t ti Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer

One or more network nodes

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh Tng vt l physical o C ch truyn bit o Cc giao thc lin quan n in p v c kh

Chng 1

o truyn vt l: T i t d i cable, coaxial cable, optical fib ng t t l Twisted-pair bl i l bl ti l fiber, radio, infrared,

Tng lin kt d liu data link o Truyn frame qua ng kt ni trc tip o C ch chia s mi trng truyn dn o Pht hin li bit, truyn li frame o MAC cho mng LAN, a ch phn cng o iu khin lung (flow control)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

21

1/2009

Chng 1. Tng quan v mng my tnh Tng mng network o Truyn packet gia cc mng o C ch a ch ha (a ch logic)

Chng 1

o Ch ti u. C nt mng ( d ) s dng thut ton nh Chon ng Cc t (node) d th t t h tuyn xc nh ng i ca packet o Kim sot, ct/hp d liu khi cn thit

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh Tng giao vn transport

Chng 1

o Truyn d liu theo phng thc end-to-end gia 2 trm o Truyn dn tin cy o C ch MUX t i cc ch cng ( t number) C h ti a h (port b ) o Thit lp v hy b lin kt

Tng phin session o iu khin phng thc trao i d liu, cung cp phng tin qun l truyn thng gia cc ng dng o Thit lp, duy tr, ng b ho v hu b cc phin truyn thng gia cc ng dng.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

22

1/2009

Chng 1. Tng quan v mng my tnh Tng trnh din presentation o Chuyn i c php d liu.

Chng 1

o Cung cp biu din dng chung trong truyn thng (m ho, nn, g, , ) nh dng, xc thc, mt m ho) Tng ng dng application o Cung cp cc dch v ca ngi s dng trc tip o Cung cp giao din tng tc vo cc h thng u cui (end system) o Giao din lp trnh ng dng API (application programming interface) o V d: WWW, e-mail, FTP, telnet,

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh Headers v Trailers

Chng 1

o Mi giao thc s dng header mang thng tin v a ch, s th t, c, di thng tin g g pht hin li (Cyclic Redundancy ( y y o Trailer thng cha thng tin p Check - CRC)
Application Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer App. Data Application Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer

AH App. Data PH AH App. Data SH PH AH App. Data TH SH PH AH App. Data NH TH SH PH AH App. Data DH NH TH SH PH AH App. Data DT Bits

Hanoi University of Technology

Faculty of Electronics and Telecommunications

23

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Giao thc trong mng my tnh

Hi Hi
Got the time?

TCP connection req. TCP connection reply.


Get http://www.hut.edu.vn/index.htm

2:00 time

<file>

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Giao thc iu khin ton b qu trnh trao i thng tin bao gm:

Kt ni vt l c xy dng th no Cc my tnh kt ni ti mng ra sao D liu c h d li nh dng th no khi t truyn Cch thc truyn d liu X l li khi truyn th no

V d v mt s t chc a ra giao thc mng: - Institute of Electrical and Electronic Engineers (IEEE), - American National Standards Institute (ANSI), - Telecommunications Industry Association (TIA), y ( ), - Electronic Industries Alliance (EIA) - International Telecommunications Union (ITU), formerly known as the Comit Consultati International Tlphonique et Tlgraphique (CCITT).

Hanoi University of Technology

Faculty of Electronics and Telecommunications

24

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

nh ngha giao thc (Protocol) Giao thc (protocol) l tp quy tc quy nh phng thc truyn nhn/thng tin gia cc my tnh trn mng.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

n+1 n-SDU n-SDU

n+1

n-SAP

n-SAP

n-SDU n
H

n n-SDU

n-PDU

Hanoi University of Technology

Faculty of Electronics and Telecommunications

25

1/2009

Chng 1. Tng quan v mng my tnh Tng tc gia cc phn lp


Layer

Chng 1

N+1 user

n provider

n provider

n+1 user

System A

System B

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh Segmentation v Reassembly

Chng 1

o Mi layer quy nh kch thc khi d liu SDU m n c th truyn c y y o Mt SDU ca layer n c th ln hn SDU ca layer n-1 o Pha truyn: SDU phn on thnh nhiu PDUs o Pha nhn: cc PDUs c kt hp li thnh SDU Segmentation n-SDU Reassembly n-SDU

n-PDU

n-PDU

n-PDU

n-PDU

n-PDU

n-PDU

Hanoi University of Technology

Faculty of Electronics and Telecommunications

26

1/2009

Chng 1. Tng quan v mng my tnh Multiplexing

Chng 1

o Multiple users tng n+1 chia s dch v ca tng n o Cn c multiplexing ID cho mi PDU xc nh SDU cho mi user
n+1 n+1

n+1

n+1

n-SDU n-SDU n
H

n-SDU
H

n n-SDU

n-PDU

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Gii thiu h giao thc TCP/IP


Vo cui nhng nm 1960, Trung tm nghin cu cp cao (Advanced Research Projects Agency - ARPA) thuc b quc phng M (Department of Defense - DoD) c giao trch nhim pht trin mng ARPANET bao gm mng ca nhng t chc qun i, cc trng i hc v cc t chc nghin cu v c dng h tr cho nhng d n nghin cu khoa hc v qun i u nhng nm 1980, mt h giao thc mi c a ra lm giao thc chun cho mng ARPANET v cc mng ca DoD mang tn DARPA Internet protocol suit, thng c gi l h giao thc TCP/IP hay cn gi tt l TCP/IP (Transmission Control Protocol/Internet Protocol).

Hanoi University of Technology

Faculty of Electronics and Telecommunications

27

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Kin trc h giao thc TCP/IP

OSI Reference Model R f M d l 7 6 5 4 3 2 1 Application Presentation Session Transport Network Data Link Physical

TCP/IP Conceptual Layers C lL

Application

6 5

Transport Internet Network Interface

4 3
Ethernet, 802.3, 802.5, FDDI, and so on.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Truyn tin trn m hnh TCP/IP

Hanoi University of Technology

Faculty of Electronics and Telecommunications

28

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

ng gi tin trong TCP/IP

E-mail message
Data Segment Data Header Network Segment Data Header Header Frame Network Segment Data Header Header Header Frame Trailer

Data Stream Segment Datagram


( p ) Frame (medium dependent) Bits

0111111010101100010101101010110001

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

V d v data encapsulation
Application Header + data Application Layer Layer 4: Transport Layer Layer 3: Network Layer Layer 2: Network Layer

010010100100100100111010010001101000

Layer 1: Physical Layer

Hanoi University of Technology

Faculty of Electronics and Telecommunications

29

1/2009

Chng 1. Tng quan v mng my tnh Internet protocol o

Chng 1

Cc gi tin IP truyn thng tin qua mng Internet qua cc giao din ca mng: Host A IP router router router host B IP

o Layer IP trong mi router s xc nh chng tip theo (router tip theo)


Host A Application Transport Internet Network Interface
Net 2 Hanoi University of Technology

Router

Router Internet Network Interface


Net 1

Host B Application Transport Internet

Internet Network Interface

Router
Net 4

Internet Network Interface


Net 3

Network Interface

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh Cc giao thc trong b giao thc TCP/IP

Chng 1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

30

1/2009

Chng 1. Tng quan v mng my tnh Tn v a ch Internet o Tn Internet o a Internet

Chng 1

Mi host c tn duy nht o a ch IP ring cho mi kt ni vt l trong mng Khng ph thuc vo a ch vt l o nh tuyn thc hin thng qua a ch IP ch D nh o a ch IP gm Domain name Netid v hostid Host name v user name Netid l duy nht Netid d N tid s dng trong nh t h tuyn o Dotted Decimal Notation Octet V d: 128.100.10.3
Hanoi University of Technology Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh V d v mng Internet


Server Router (2, 1) (1, 3) W Ethernet Netid = 1 (1, 2) Workstation R PPP Netid = 2

Chng 1

PC

(1, 1)

(2, 2)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

31

1/2009

Chng 1. Tng quan v mng my tnh Gi IP t W


Server

Chng 1

S
Router (2, 1) PPP (1, 3) R PC

(1, 1) Ethernet

(2, 2)

W, S

(1, 2), (1, 1)


(1, 2) Workstation

1. Goi IP ca W c a ch IP ngun (1, 2) v a ch IP ch (1, 1) g ( ) ( ) 2. T bng IP W v my c a ch ch cng mng. ng gi IP trong khung Ethernet vi cc a ch (W, S) 3. Khung Ethernet c truyn ln mng nh NIC ca W v NIC ca server s nhn c gi tin 4. NIC phn tch trng TYPE v truyn gi tin ti lp IP
Hanoi University of Technology Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh S, R Gi IP t S PC (1, 1), (2, 2)


Server Router PC

Chng 1

(1, 1), (2, 2)


(2, 1) PPP R

(1, 1)

(1, (1 3) W

(2, 2)

Ethernet

(1, 2)

Workstation

1. Goi IP ca W c a ch IP ngun (1, 1) v a ch IP ch (2, 2) 2. T bng IP ch (S, R) gi tin phi gi n R, ng gi IP trong khung Ethernet vi cc a

3. NIC ca R s nhn gi tin IP, phn tch TYPE v gi ti lp IP 4. Lp IP phn tch IP ch v nh tuyn n (2, 2) 5. Bng IP ca R ch ra (2, 2) c kt ni trc tip vi R qua PPP 6. ng gi gi IP vo khung PPP v gi ti PC 7. PPP ti PC phn tch TYPE v truyn gi IP ti lp IP ca PC
Hanoi University of Technology Faculty of Electronics and Telecommunications

32

1/2009

Chng 1. Tng quan v mng my tnh So snh m hnh OSI v Internet

Chng 1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Mt s v d v mng
Mng cc b (Local Area Network LAN) Mi trng truyn dn Network Interface Card (NIC) Mi NIC c a ch vt l duy nht

Hanoi University of Technology

Faculty of Electronics and Telecommunications

33

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

IEEE 802 Network Layer LLC MAC Physical Layer 802.2 Logical Link Control

OSI Network Layer

Data Link Layer 802.3 802.5 CSMA-CD Token Ring 802.11 WLAN Other LAN

Various Physical Layer

Physical Layer

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh


lp t b nh tuyn+Modem ADSL

Chng 1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

34

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Ethernet 1970: radio network ALOHA in Hawaii gg pht minh Ethernet, random access, wired net , , 1973: Metcaff v Boggs p 1979: DIX (Digital, Intel v Xerox ) Ethernet II standard 10 Mbps 1985: IEEE 802.3 LAN 10 Mbps 1995: Fast Ethernet 100 Mbps 1998: Gigabit Ethernet 2002: 10 Gigabit Ethernet

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

35

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Internet Mng ca lin mng y y g g Host v End-System: chy cc ng dng Giao thc: TCP, IP, HTTP, FTP, PPP Lin kt truyn thng: Cp, v tinh, v tuyn Router: nh tuyn cho cc gi tin Chun Internet: RFC (Request for Comments), IETF (Internet Engineering Task Force) C s h tng truyn thng cho php trin khai cc dch v phn tn: Web, E-mail, online Game, v.v Kh nng cung cp cc dich v lin kt v khng lin kt

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

36

1/2009

Chng 1. Tng quan v mng my tnh

Chng 1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh Mng WAN Integrated Services Digital Network (ISDN) o Khi nim

Chng 1

Tch hp in thoi s v dch v truyn d liu S ha mng in thoi cho php truyn voice, data, text, graphics, music, video qua mng in thoi sn c Cung cp dch v ISDN tc cao: image, file transmission, video conferencing o Thit b ISDN Terminal: ISDN (TE1) kt ni vi ISDN bng cp xun i, non-ISDN (D t T ISDN (Data Terminal E i i l Equipment - DTE) h TE2 kt ni t hay TE2, i vi mng ISDN qua TA theo chun vt l (RS-232C, V24) Data Circuit Terminating Equipment (DCE): Modem, MUX Terminal adapter (TA): stand-alone hoc on-board ca DTE2 Network_termination: NT1, NT2, kt hp
Hanoi University of Technology Faculty of Electronics and Telecommunications

37

1/2009

Chng 1. Tng quan v mng my tnh Asychronous Transfer Mode (ATM) o Khi nim

Chng 1

Thng tin ca cc loi dich v khc nhau (voice, image, video) video ) c ti vo t bo vi kch thc nh xc nh Mng ATM l loi connection-oriented

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh o Thit b ATM v mi trng mng

Chng 1

Asychnorous transmission: Time slot c cp theo yu cu cn c vo ATM header xc nh source (khc synch.TDM) ( y ) y y payload ATM format: 53 octet (byte) vi 5 byte header+48 byte p y Thit b ATM Mng ATM da vo ATM switch v ATM endpoint ATM switch nhn cell t ATM switch v ATM endpoint, cp nht header v chuyn tip ti ch

Hanoi University of Technology

Faculty of Electronics and Telecommunications

38

1/2009

Chng 1. Tng quan v mng my tnh Frame relay o Khi nim

Chng 1

Giao thc mng WAN tc cao lm vic tng vt l v lin kt d liu trong m hnh OSI Cho php cc trm u cui chia s mi trng v bng thng linh hot da vo: gi tin vi kch thc thay i v dn knh da trn m hnh thng k L mt phin bn ca X25 nhng khng c chc nng windowing v re-transmission o Thit b Frame relay DTE (PC, router, bridge) v DCE to xung nhp v cung cp dch v chuyn mch (packet switch) Kt ni gia DTE v DCE thc hin c 2 tng: Vt l (ch yu l RS-232) v tng lin kt cung cp giao thc kt ni gia DTE (router) v DCE (switch)
Hanoi University of Technology Faculty of Electronics and Telecommunications

1/2009

Chng 1. Tng quan v mng my tnh o Trin khai thit k mng frame relay

Chng 1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

39

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

Gii thiu V tr, chc nng ca LAN trong m hnh OSI Giao thc tng lin kt d liu Vn chung ca mng LAN Cc c ch truy cp ngu nhin ALOHA CSMA CSMA-CD WLAN: WLAN LAN kh khng d v chun 802.11 a, b g dy h 802 11 b,

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2.1

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

Gii thiu
Cu trc c bn ca LAN Mi trng truyn dn Network Interface Card (NIC) Mi NIC c a ch vt l duy nht

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Cu trc transceiver v magnetic

Chng 2

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Open System for Interconnection (OSI)

Chng 2

M hnh 7 tng ca International Standard Organization (ISO) Institute of Electrical and Electronics Engineers (IEEE)

IEEE 802.x Network Layer LLC MAC Physical Layer 802.2 Logical Link Control

OSI Network Layer

Data Link Layer 802.3 802 3 802.5 802 5 CSMA-CD Token Ring 802.11 802 11 WLAN Other LAN

Various Physical Layer

Physical Layer

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


MAC sublayer IEEE 802.1: Data Link Layer (DLL) c chia thnh: o MAC sublayer iu khin truy nhp mi t i khi t h i trng Cung cp dch v truyn khung khng lin kt Cc trm c phn bit qua a ch vt l MAC Broadcast cc khung vi a ch MAC o Logical Link Control (LLC) sublayer

Chng 2

Cung cp giao din gia tng Network v MAC sublayer (OSI)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


LLC sublayer IEEE 802.2: LLC nng cp cc dch v do MAC cung cp

Chng 2

Reliable Datagram Service A Unreliable Datagram Service LLC MAC PHY LLC MAC PHY LLC MAC PHY B

MAC PHY

MAC PHY

MAC PHY

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


LLC Services Type 1: Unacknowledged connectionless service

Chng 2

o Unnumbered frame mode of HDLC (High-level Datalink Link ) Control) Type 2: Reliable connection-oriented service o Asynchronous balanced mode of HDLC Type 3: Acknowledged connectionless service Additional addressing o Mt trm c a ch vt l MAC duy nht o Cung cp cc lin kt logic, c phn bit bi SAP (Service Access Point)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Cu trc ca LLC Protocol Data Unit (PDU) 1 byte 1 byte 1 hoc 2 byte
Information

Chng 2

Destination Source Control SAP Address SAP Address

I/G

C/R

1 bit

7 bit

1 bit

7 bit

I/G: Individual or group address C/R: Command or response frame

SAP address: 06: IP packet E0: Novel IPX FE: OSI packet AA: Subnetwork Access Protocol (SNAP)
Faculty of Electronics and Telecommunications

Hanoi University of Technology

Chng 2. Mng LAN v vn lp 1 v 2


ng gi MAC frame

Chng 2

IP Packet

IP

LLC Header

Data

MAC Header

FCS

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Vn chung ca mng LAN Vn c bn: Lm sao chia s c mi trng ?

Chng 2

Cc phng php chia s mi trng

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Channelization: satellite

Chng 2

Channelization: cellular

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

Random access: transmit when ready, need re-transmission

Scheduling: polling

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Scheduling: token passing

Chng 2

Wireless LAN: ad hoc network, random access and polling

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Channel capture v delay-bandwidth product (a) tprop = d/v A truyn ti A t=0 A A pht hin A xung t ti t = 2tprop B B B

Chng 2

B truyn trc t = tprop v pht hin xung t

o t = 2tprop : Thi gian cn thit capture channel o X = L/R: Thi gian truyn khung c di L vi tc truyn R g y g y o Thng lng ti a: R Eff =
L = L/R + 2t prop t prop 1 1 R= R ,a = 2t prop R 1 + 2a X 1+ L

o Thng lng chun ha: max =

R Eff 1 = R 1 + 2a

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2.2

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

Cc c ch truy cp ngu nhin


ALOHA Gii thiu o Xut pht t H Hawaii kt ni cc khu vc trng nm trn cc Hawaii, hn o vo my ch t ti khu vc trung tm o S dng re-transmission nu xy ra xung t (coi nh li truyn tin) o Nu cc trm gi li frame vi cng c ch v tham s, kh nng xung t vn c th xy ra Backoff algorithm o My trm gi li frame sau tBackoff (xc nh ngu nhin)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


ALOHA model o X - Transmission time ( X= L/R)

Chng 2

o S Throughput (s frame truyn thnh cng trong X sec.) o G Load (s yu cu truyn trung bnh trong X sec.) o Psuccess: xc sut truyn khung thnh cng o S = GPsuccess o Bt u truyn khung trong X sec. s c kh nng b xung t, ngc li s thnh cng nu bt u truyn sau 2X sec.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Thng lng ca ALOHA o S = GPsuccess = G e
2 G

Chng 2

o Thng lng ti a: max = 1 /(2e) (~ 18.4%) o Nu G nh, S G; nu G ln, S 0 o Xung t c th gim thng lng v 0 Slotted ALOHA o M hnh ALOHA c th gim xc sut xung t khung o To cc khe thi gian rng X sec. o Cc trm ch c php gi khung khi bt u mt khe thi gian o Backoff time l s nguyn ln khe thi gian

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Thng lng ca slotted ALOHA o S = GPsuccess = GP[0 khung xut hin trong X sec.] = GP[0 khung xut hin trong n khong]

Chng 2

G n = G (1 p ) = G1 Ge G n
o Thng lng ti a: V d o BW = 9600 bps o 1 Frame = 120 bit o H thng truyn 9600 x 1frame/120 = 80 frames/sec. o Thng lng ca ALOHA: 80 x 18.4% = 15 frames/sec. o Thng lng ca slotted ALOHA: 80 x 36.8% = 30 frames/sec.

max = 1 / e (~ 36.8%)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Carrier Sense Multiple Access (CSMA)

Chng 2

My trm nghe trng thi ng truyn gian ngu nhin hoc tbackoff trc khi truyn o Nu bn: i trong khong thi o Nu ri: Bt u truyn o tprop: Thi gian truyn dn (do hiu ng capture channel) o Nu tprop > X (a>1), hiu qu nh ALOHA v slotted ALOHA c thit lp

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


1-persistent CSMA throghput o Bt u truyn mi khi nghe thy ng truyn ri

Chng 2

o Thng lng cao hn ALOHA v slotted ALOHA nu a nh v ngc li o Tr nh, hiu qu thp

Hanoi University of Technology

Faculty of Electronics and Telecommunications

10

Chng 2. Mng LAN v vn lp 1 v 2


Non-persistent CSMA throghput o Nghe ng truyn sau tng khong tbackoff o Thng lng cao hn 1-persistent CSMA khi a nh o Tr ln, hiu qu cao

Chng 2

p-persistent CSMA throghput (adjustable greedy) o i n khi ng truyn ri, truyn vi xc sut p, hoc ch 1 khong bng mini-slot v truyn li vi xc sut 1-p
Hanoi University of Technology Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


CSMA with Carrier Detect (CSMA-CD) Kim sot xung t v hy b qu trnh truyn dn o My trm khi cn truyn s nghe ng truyn

Chng 2

o Trc khi bt u truyn, my trm tip tc nghe pht hin xung t o Nu c xung t, my trm dng qu trnh truyn dn v thay i tbackoff CSMA gy lng ph X giy thi gian truyn mt khung CSMA-CD gim lng ph xung bng ng thi gian pht hin xung t v hy b q trnh truyn dn y qu y

Hanoi University of Technology

Faculty of Electronics and Telecommunications

11

Chng 2. Mng LAN v vn lp 1 v 2


CSMA-CD model o Xung t c th pht hin v gii quyt sau 2tprop

Chng 2

o To cc khe thi gian vi di 2tprop trong khong thi gian tranh chp ca cc trm cng c yu cu truyn o Xc sut truyn thnh cng ca 1 trong n trm: Psuccess= np(1-p)n-1
max o Ly o hm 2 v: Psuccess = n 1 1 1 n n n 1

1 = 1 n

n 1

1/e khi n = 1/p

max o 1/Psuccess = e = 2.718 :s khe thi gian trung bnh gii quyt tranh chp

o Thi gian tranh chp trung bnh: 2tprope

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


CSMA-CD throughput

Chng 2

o Thng lng cc i: H thng ch lun phin gia thi gian tranh chp v truyn khung o Thng lng cc i:
max = X 1 1 = = X + t prop + 2et prop 1+ (2e + 1) a 1+ (2e + 1) Rd/vL

v: vn tc truyn lan ca tn hiu in trong mi trng d: khong cch truyn dn

Hanoi University of Technology

Faculty of Electronics and Telecommunications

12

Chng 2. Mng LAN v vn lp 1 v 2


ng dng ca CSMA-CD trong Ethernet LAN o 1-persistent CSMA o R = 10 Mbps o 2tprop = 51.2 microsec. Mt khe thi gian: 512 bits = 64 byte

Chng 2

Cung cp trong khong cch 2.5 km s dng 4 repeater o Truncated Binary Exponential Backoff (TBEB) Sau xung t th n, chn tbackoff trong khong {0, 1, , 2k 1} trong k = min(n 10) min(n, Mc u tin khi thm d ng truyn o Cung cp cc mc u tin khc nhau khi nghe ng truyn o Thit lp khong thi gian interframe theo cc lp u tin o ng dng trong WLAN 802.11
Hanoi University of Technology Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


IEEE 802.3 v Ethernet o o 1-persistent CSMA-CD Thut ton

Chng 2

1. Nu t 1 N ng truyn trng thi idl bt u truyn tin, Nu t idle, t ti N khng, sang bc 2 2. Nu ng truyn busy, tip tc nghe cho n trng thi idle s bt u truyn tin 3. Nu pht hin xung t khi truyn tin, dng ngay qu trnh truyn tin v truyn tn hiu jamming (random bit sequence) 4. Sau khi truyn jamming, i mt khong thi gian ngu nhin (tbackoff), v tip tc th truyn tin o S dng TBEB (truncated binary exponential backoff) Backoff time = (0, 2min(k, 10)-1) khe thi gian

Hanoi University of Technology

Faculty of Electronics and Telecommunications

13

Chng 2. Mng LAN v vn lp 1 v 2


o Lu

Chng 2

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


o IEEE 802.3 Ethernet v thng s hot ng Slot time: 512 bits times InterFrameGap: 96 sec Gii h s l t l i 16 hn ln truyn li: Gii hn gi tr Backoff: 10 Kch thc tn hiu jam: 32 bits Kch thc khung ti a: 1518 bytes Kch thc khung ti thiu: 512 bits (64 bytes) o IEEE 802.3 MAC Frame

Chng 2

Preamble: ng b, 7 bytes of 10101010 Start of Frame Delimiter (SFD): 10101011


Hanoi University of Technology Faculty of Electronics and Telecommunications

14

Chng 2. Mng LAN v vn lp 1 v 2


o Khung IEEE 802.3 MAC

Chng 2

o a ch ch n (Single) Group (Nhm) Qung b (Broadcast)

o a ch Cc b (local) hoc ton cc (global) o a ch ton cc (i a 246 ) 24 bit u gn cho nh sn xut (OUI) 24 bit tip theo c gn nh sn xut CISCO: 00-00-0C 3COM: 02-60-8C
Hanoi University of Technology Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


o Khung IEEE 802.3 MAC

Chng 2

di: S lng byte trong trng Thng tin (Information) - Khung cc i: 1518 khng bao gm Preamble + SFD - S byte thng tin cc i: 1500 (Hexa: 05DC) Pad: m bo khung ti thiu l 64 byte FCS: CCITT-32 CRC, c tnh ton da trn trng a ch, di thng tin v trng p g g pad - NIC hu cc khung vi di sai hoc FCS sai

Hanoi University of Technology

Faculty of Electronics and Telecommunications

15

Chng 2. Mng LAN v vn lp 1 v 2


o Original Ethernet v thng s Tc truyn: 10 Mbps Khung ti thiu: 512 bits = 64 bytes Slot time: 512 bit / 10 Mbps = 51 2 sec Sl t ti bits Mb 51.2

Chng 2

- 51.2 sec x 2 x 105 km/sec = 10.24 km, 1 chiu - 5.12 km khong cch 1 vng (round trip) di cc i: 2500 meters + 4 repeaters Mi khi tc truyn tng 10 ln th khong cch truyn cc i gim i 10 ln.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


o nh dng khung DIX Ethernet

Chng 2

DIX: Digital, Intel, Xerox: chun chung ca 3 hng Loi (Type): Xc nh giao thc ca PDU trong trng thng tin, v d: IP, ARP 0x0800: IP 0x0806: ARP 0x8137: Netware IPX 0x8160: NetBIOS

Hanoi University of Technology

Faculty of Electronics and Telecommunications

16

Chng 2. Mng LAN v vn lp 1 v 2


o Lp vt l IEEE 802.3

Chng 2

Cp dy: cng, kh lp t
Hanoi University of Technology

T-connection
Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


o Ethernet hub & switch

Chng 2

Twisted Pair: r, d lp t vi tin cy cao Star-topology CSMA-CD

Twisted Pair: r S dng switch tng kh nng m rng Chia thnh nhiu vng xung t (Colision domain) Hot ng c ch song cng (Full duplex)
Faculty of Electronics and Telecommunications

Hanoi University of Technology

17

Chng 2. Mng LAN v vn lp 1 v 2


o Bus & hub Cu hnh bus

Chng 2

Tt c cc trm chia s dung lng bus (v du: 10 Mbps) Ch 1 trm thc hin phin truyn dn ti mt thi im Hub kt ni cc trm theo hnh sao Mi phin truyn dn u i qua hub Ch 1 trm c truyn ti mt thi im o C ch song cng (full duplex - FDX) Ethernet truyn thng s dng Half Duplex (HDX) S dng FDX, mt trm c th ng thi nhn v gi tin 100 Mbps Ethernet FDX thuyt) Phi c switching hub
Hanoi University of Technology Faculty of Electronics and Telecommunications

tc truyn 200 Mbps (l

Cc trm kt ni phi c FDX adapter cards

Chng 2. Mng LAN v vn lp 1 v 2


o Fast Ethernet c tnh lp vt l ca IEEE 802.3 100 Mbps

Chng 2

m bo tnh tng thch vi 10 Mbps Ethernet: Cng nh dng khung, giao din, giao thc (cng tham s) S dng topo HUB vi cp i xon v cp quang Mode hot ng: HDX hoc FDX

Hanoi University of Technology

Faculty of Electronics and Telecommunications

18

Chng 2. Mng LAN v vn lp 1 v 2


o Gigabit Ethernet c tnh lp vt l ca IEEE 802.3 1 Gbps

Chng 2

Slot time = 512 bytes (4096 bits) Carrier t C i extension: kh i khung k h th nh c m rng thnh kch thc h th h 512 bytes Frame bursting: cm cc khung ngn hp l (gii hn burst : 216 bits) Cu trc khung gi nguyn
Hanoi University of Technology Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


o 10 Gigabit Ethernet c tnh lp vt l ca IEEE 802.3 10 Gbps

Chng 2

Ch hot ng mode FDX Cu t kh C trc khung gi nguyn i LAN PHY cho cc ng dng mng cc b WAN PHY cho cc lin kt ni Tc cao, kt ni ng trc s dng cc Chuyn mch c ln
Hanoi University of Technology Faculty of Electronics and Telecommunications

19

Chng 2. Mng LAN v vn lp 1 v 2


o M trnh trin khai mng Ethernet in hnh

Chng 2

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2.3

Chng 2. Mng LAN v vn lp 1 v 2


Phng php truy nhp Scheduling trong MAC H thng t ch (Reservation system)

Chng 2

o H thng tp trung: B iu khin trung tm nhn yu cu t cc my trm v qun l vic cp php truyn Frequency Division Duplex (FDD): Di tn s khc nhau cho uplink v downlink Time Division Duplex (TDD): uplink v downlink chia s 1 di tn s nhng khong thi gian khc nhau o H thng phn tn: Cc trm s dng cc thut ton phn quyn xc nh trt t truyn dn ca cc trm

Hanoi University of Technology

Faculty of Electronics and Telecommunications

20

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

- Qu trnh truyn dn t cc trm c thc hin trong cc chu trnh ( di chu trnh c th thay i) - Mi chu trnh bt u bng thi gian t ch v cc cng on truyn khung - Thi gian t ch c chia thnh M khe thi gian ng vi M trm - Mi trm thng bo yu cu truyn khung bng cch gi qung b cc bit t ch trong khe thi gian tng ng
Hanoi University of Technology Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Tu chn trong h thng t ch o H thng tp trung v phn tn

Chng 2

H thng tp trung : B iu khin nghe thng tin t ch, quy nh trt t truyn H thng phn tn: Mi mt trm xc nh khe thi gian t thng tin t ch trc khi truyn o n khung v a khung t ch n khung: Ch mt phin truyn c th c ng k trong khong thi gian t ch t ch a khung: C th nhiu phin truyn c ng k o t ch truy nhp ngu nhin v t ch phn knh t ch phn knh (v d TDMA): S dng MUX cho thng tin t ch t tt c cc trm m khng c xung t t ch truy nhp ngu nhin: Mi trm gi thng tin ngu nhin
Hanoi University of Technology Faculty of Electronics and Telecommunications

21

Chng 2. Mng LAN v vn lp 1 v 2


H thng hi vng (Polling system)

Chng 2

o H thng hi vng tp trung: B iu khin trung tm truyn thng bo hi vng ti cc trm theo th t no o H thng hi vng phn tn: Quyn truyn khung c chuyn t trm ny sang trm khc theo trt t no (token) o Cn c qu trnh bo hiu c th thit lp th t

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Tu chn trong h thng hi vng

Chng 2

o Gii hn dch v: quy nh phng thc truyn trong 1 ln hi vng Exhaustive: Truyn cho n khi b m rng (k c khung mi n) Gated: Truyn ton b d liu trong b m khi trm nhn c hi Frame-limited: Ch c truyn 1 khung /1 vng Time-limited: Truyn trong khong thi gian cho php o C ch u tin: Cp bng thng v thit lp tr b hn cho cc trm xut hin thng xuyn hn trong danh sch hi vng (polling list) Cp th u tin cho cc trm vi thng bo v mc u tin tng ng

Hanoi University of Technology

Faculty of Electronics and Telecommunications

22

Chng 2. Mng LAN v vn lp 1 v 2


Token Frame Format Data Frame Format 1 1 1 SD AC FC 2 or 6 Destination Address SD 2 or 6 Source Address 0 0 AC ED 4 Information FCS 1 ED

Chng 2

1 FS

Starting delimiter Access control Frame control Ending delimiter Frame status

J K 0 J K 0

J, K non-data symbols (line code)

PPP

RRR

PPP Priority; T Token bit M Monitor bit; RRR Reservation FF frame type ZZZZZZ control bit l bi I E intermediate-frame bit error-detection bit

FF

Z Z Z Z Z Z I E

J K 1 J K 1

xx

x x

A address-recognized bit xx undefined C frame-copied bit


Fi 6 61

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


ng dng: Token-passing rings o Poll = Free token (th bi) o Frame delimiter chnh l token Free = 01111110 Busy = 01111111

Chng 2

Token bit trong header ca khung

Mode lng nghe (listen) Input Delay Output

Mode truyn Delay To device From device Bt u truyn cc khung Thit lp token bit v rng sau khi kt thc

Mt trm tm c th bi rng Chuyn token bit sang trng thi bn

Hanoi University of Technology

Faculty of Electronics and Telecommunications

23

Chng 2. Mng LAN v vn lp 1 v 2


Cc phng php chn token o Multi-token Free token c truyn ngay sau data bit cui cng ca frame o Single-token

Chng 2

Free token c chn vo sau bit cui cng ca busy token v bt cui cng ca khung c truyn Thi gian truyn dn ti a phi nh hn ring latency o Single-frame Free token c chn vo khi trm pht nhn c bit cui cng trong frame

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


oSingle-token A A A

Chng 2

t=0, A begins frame oSingle-frame A

t=90, return of first bit A

t=210, return of header A

t=400, last bit enters ring, reinsert token


A

t=0, A begins frame


Hanoi University of Technology

t=90, return of first bit

t=400, transmit last bit

t=490, reinsert token

Faculty of Electronics and Telecommunications

24

Chng 2. Mng LAN v vn lp 1 v 2


Thng lng ca token ring o nh ngha

Chng 2

': Ring latency o Multi-token operation

thi gian bit i qua 1 vng ca ring

X: thi gian truyn khung ti a cho php trn 1 trm Gi s tt c M trm trong mng u truyn trong X sec. khi nhn c free token y l h thng hi vng vi thi gian phc v hn ch

max =

MX 1 1 = = ' + MX 1+ ' /MX 1+ a' /M


: Ring latency chun ha

a' =

'
X

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


o Single-token operation Thi gian truyn khung hiu qu = max (X, ' )

Chng 2

max =

MX 1 = ' + Mmax X ' X, max 1 a' + a' /M 1,

o Single-frame operation Thi gian truyn khung hiu qu = X + '

max =

MX 1 = ' + M X + ' 1 + a ' (1+ 1/M)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

25

Chng 2. Mng LAN v vn lp 1 v 2


V d o Single-frame IEEE 802.5 Token Ring LAN - 4 Mbps o Single-token IBM Token Ring - 4 Mbps o Multi-token IEEE 802.5 and IBM Ring LANs - 16 Mbps

Chng 2

FDDI Ring - 50 Mbps (Fiber Distributed Data Interface) o Tt c cc mng LAN ny u s dng c ch token priority g y g p y

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2.4

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

802.11 wireless LAN Wireless communication c nhiu trin vng o D trin khai, gi thnh thp o C kh nng truy nhp thng tin mng mi ni o H tr cc thit b c nhn o Cng sut tn hiu thay i theo khng gian v thi gian o Tn hiu c th b truy nhp tri php o Ph tn hiu b gii hn v thng c iu chnh

Hanoi University of Technology

Faculty of Electronics and Telecommunications

26

Chng 2. Mng LAN v vn lp 1 v 2


Cc kiu kt ni trong mng Wireless LAN

Chng 2

o Peer to peer hay ad-hoc - Cc thit b trong mng c kt ni trc tip vi nhau(nu trong 1 phm vi nht nh) m khng cn qua AP (Access Point). - Nhc im: nu A mun kt ni vi B m trong mng c 1 my C c cng tn hiu mnh hn th s gy nh hng. o Access Point hay Infrastructure Wireless LAN - L kiu kt ni ph bin trong WLAN. Thng qua AP cho php cc Wireless Client c th truy cp vo mng

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

WLAN topo
- Independent Basic Service Set (IBSS): cc thit b trong BSS c th kt ni vi nhau khng cn qua AP. - Basic Service Set (BSS): Bao gm cc station c th kt ni vi nhau thng qua AP. Mi 1 BSS c 1 BSSID, l a ch MAC ca AP trong BSS . - Extended Service Set L t h ca nhiu BSS kt ni vi nhau. Mi 1 ESS c 1 SSID tp hp hi i i h SSID.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

27

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

Mt s tiu chun 802.11


Protocol IEEE 802.11 Release Date 1997 Frequency 2.4 GHz ~30 meters (~100 feet) IEEE 802.11a IEEE 802.11b IEEE 802.11g IEEE 802.11n 1999 1999 2003 2007 5 GHz 2.4 GHz 2.4 GHz 2.4 GHz Range (Indoor) Bandwidth 1, 2 Mbps 6, 9, 12, 18, 24, 36, 48, 54 Mbps

~30 meters (~100 feet) 5.5, 11 Mbps ~30 meters (~100 feet) 6, 9 12, 18 24 6 9, 12 18, 24, 36, 48, 54 Mbps

~50 meters (~160 feet) 540 Mbps

Hanoi University of Technology

Faculty of Electronics and Telecommunications

28

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

Ti sao CSMA-CD khng th p dng cho WLAN? o Kh pht hin xung t trong mi trng v tuyn o T Transmitted power c kh nng l t received power nn itt d ln i d khng th hu b phin truyn dn khi c xung t o Can nhiu gia cc trm trong cc mng LAN khc nhau cng s dng CSMA-CD o Hidden-station problem 2 trm mun trao i tin vi cng 1 trm nm gia chng h 2 trm khong cch tng i xa, khng nghe c tn hiu

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

S 1

S 2

- A ang truyn d liu sang B - C nm ngoi tm sng ca trm A - C cng mun t d li sang B truyn liu - C a ra kt lun sai v trm B - C vn truyn d liu sang trm B

- B ang truyn d liu sang A - C nm trong tm sng ca trm B - C mun t d li sang D truyn liu - C a ra kt lun sai v mi trng truyn thng - C khng truyn d liu sang D

Hanoi University of Technology

Faculty of Electronics and Telecommunications

29

Chng 2. Mng LAN v vn lp 1 v 2


K thut truy nhp ng truyn c bn:

Chng 2

Thm d ng truyn (carrier sense): Kim tra lp PHY v NAV (Network Allocation Vector) Distributed Coordination Function (DCF) ACK RTS/CTS

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


So snh k thut truy nhp ng dng trong WLAN DCF - Tn ti mt khe thi gian gia cc khung truyn lin tip. - 2-way handshaking: truyn DATA ACK. - Data c truyn khi c th vn xy ra collision. - Cha gii quyt c vn n node (hidden node problem).

Chng 2

RTS/CTS - Tn ti khe thi gian gia cc khung truyn lin tip. - 4- way handshaking: truyn RTSCTS- DATA- ACK. - Data c truyn khi hon ton khng c collision. - Gii quyt c vn n node

Hanoi University of Technology

Faculty of Electronics and Telecommunications

30

Chng 2. Mng LAN v vn lp 1 v 2


Physical layers

Chng 2

PLCP: Physical Layer Convergence Procedure thc hin chc nng Carrier sense/clear channel assessment (CS/CCA)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

Phng thc tri ph trong Wireless LAN


- Trong WLAN ngi ta dng k thut tri ph (Spread Spectrum) truyn tn hiu trong khng gian t do. - Tri ph l mt k thut s dng mt m gi nhiu tc ng ln tn hiu trc khi iu ch tri ph nng lng ca tn hiu ra mt di tn ln hn nhiu di tn ca tn hiu cn truyn.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

31

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

Mc ch
- Chng nhiu - Chng nghe trm - To ra kh nng a truy nhp mnh m

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

FHSS (Frequency Hopping )


- Bng tn knh truyn c chia lm N bng tn con.Tn hiu c iu ch ln mi mt bng tn con trong mt thi gian ngn sau li h l i nhy sang mt bng t con kh t b tn khc. - Qu trnh din ra lin tc vi tn s nhy c nh ngha sn . Th t nhy c bn thu v bn pht u bit.

V d vi chun 802.11 2,4GHz. Phm vi tn s s dng 2,402GHz ->2480 GHz g , Dy tn s c chia lm 79 bng con gi l cc knh.Cc knh cch nhau 1MHz

Hanoi University of Technology

Faculty of Electronics and Telecommunications

32

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

DSSS(Direct sequence)
- Tn hiu trc khi vo iu ch s nhn vi mt m gi nhiu tri ph tn hiu trn mt bng tn ln hn nhiu so vi bng tn ca tn hiu ban u - di mt t m bng rng ca mt bt tn hiu . - T m c tc ln hn tc dng s liu N ln th ph c tri ra N ln.Tc t m c tnh theo chip/s Vi WLAN di t m l 11 chip.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

33

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2

Chng 2

Hanoi University of Technology

Faculty of Electronics and Telecommunications

34

Chng 2. Mng LAN v vn lp 1 v 2


Mt s m hnh pht trin mng WLAN

Chng 2

Hanoi University of Technology

Faculty of Electronics and Telecommunications

Chng 2. Mng LAN v vn lp 1 v 2


Mt s m hnh pht trin mng WLAN

Chng 2

1. Wireless

Ethernet Bridge 3. PVC Thinnet Cable 5. BNC T Connector 7. Cat5 UTP Cable 9. 10 Base-T Ethernet Hub

2. Outdoor Antenna 4. Thin Ethernet Network Card 6. 50 Ohm Terminator 8. Cat5 Patch Cables 10. 10 Base-T Network Card
Faculty of Electronics and Telecommunications

Hanoi University of Technology

35

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu

Chng 3

Tng lin kt d liu


Chc nng ca tng lit kt d liu (DLL) a ch MAC v tnh cht Phng php framing iu khin lung Kim sot li Cc giao thc ca tng lin kt d liu: HDLC v PPP Bridge: transparent v sourouting

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Chc nng ca tng lin kt d liu

Chng 3

Kh nng truyn khung tin cy trn ng lin kt vt l khng tin cy


Source node Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Intermediate node Packets Frames Bits Network Layer Data Link Layer Physical Layer Destination node Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu a ch MAC v tnh cht: IEEE 802.3 MAC Frame

Chng 3

o Destination address Single Group Broadcast: 1111

o Addresses Local or global o Global addresses (246 possible) First 24 bits assigned to vendors (OUI) Next 24 bits assigned by vendors CISCO: 00-00-0C 3COM: 02-60-8C
Hanoi University of Technology Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Phng php Framing DLL t chc bit stream thnh cc frame

Chng 3

Bt u v kt thc ca frame c xc nh: Character count, control character, flag, Character count o S k t c ch ra trong v tr xc nh ca header o Bn nhn m s k t xc nh ni kt thc frame o V d: DDCMP (Digital data comm. message protocol)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Control character

Chng 3

o Mi frame bt u v kt thc vi chui k t c bit V d: bt u vi DLE STX (data link escape start of text) v kt thc vi DLE ETX (end of text) o Phn d liu phi l s nguyn ln cc k t o Character stuffing: chn DLE trc mi k t DLE trong d liu, ngn chn kh nng xut hin cc k t bt u v kt thc xut hin bn trong frame V d: BISYNC

STX: 0x02, ETX: 0x03 DLE: 0x01 (non-printable)


Hanoi University of Technology Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Flagging

Chng 3

o Mi frame bt u v kt thc bng chui k t c bit flag o Flag byte: 01111110 (0x7E) o Phn d liu ca frame c th cha s bit bt k o Bit stuffing: chn bit 0 vo sau mi chui 5 bit 1 lin tip o V d: SDLC, HDLC, LAPB 01111110111101011111011110111110001111110 Frame Flag Flag

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu iu khin lung (flow control) Khi nim iu khin lung

Chng 3

o Kch thc b m lu gi cc frame nhn c bi gii hn o Trn b m c th xy ra nu tc x l ti pha thu chm hn tc truyn frame o iu khin lung ngn chn trn b m bng cch iu khin tc truyn dn t pha pht (Tx) n pha thu (Rx) o Cc phng php ph bin: X-ON/X-OFF Stop and wait Sliding window

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu X-ON/X-OFF o Rx truyn X-OFF (DC3) nu b m y o Tx dng truyn khi nhn c X-OFF o Rx truyn X-ON (DC1) khi b m c gii phng o Tx bt u truyn li khi nhn c X-ON

Chng 3

o C th s dng cc frame RR (Receive Ready) v RNR (Receive not Ready) o Nu s bit trong b m vt qu ngng 2tpropR, X-OFF c gi ti Tx o Phng php: Stop-and-wait, sliding window
Threshold

Transmitter

Receiver
X-OFF X-ON

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu o Stop-and-wait

Chng 3

Tx ngng truyn frame tip theo cho n khi nhn c ACK t Rx Rx truyn frame ACK khi sn sng nhn frame tip theo n gin, nhng khng hiu qu khi tr p ng ng truyn ln Utilization: Rx t d/ v t frame 1 , a = prop = U= = 2t prop + t frame 2a + 1 t frame L / R Data Satellite link: tprop = 270 ms, L = 500 byte R = 56 kbps tframe = 4/56 = 71 ms, a = tprop / tframe = 270/71 = 3.8, U = 0.12 = 12% ca 56 kbps Short link: tprop = 5 s, L = 500 byte R = 10 Mbps tframe = 4k/10 M = 400 s, a = tprop / tframe = 5/400 =0.012 U = 0,98 = 98% ca 10 Mbps
Faculty of Electronics and Telecommunications

Tx tframe T tprop

ACK Data

ACK Hanoi University of Technology

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu o Sliding window

Chng 3

Window WS bng kch thc b m ca bn nhn c th s dng nhn cc frame lin tip t Tx khng cn ACK C th trnh hin tng trn b m ca Rx Phi chn WS ln hn a (delay of bandwidth)
System A
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 F0 F1 F2

System B

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

ACK3 F3 F4 F5 F6

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

ACK6

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Utilization:


U= 1 Nt frame = N 2t prop + t frame 1+ 2a N 1+ 2a N < 1+ 2a

Chng 3

, a=

t prop t frame

d/ v L/R

Tx tframe T tprop Data N frames

Rx

ACK

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Kim sot li (error control) Khi nim o Li do mi trng truyn dn

Chng 3

o Qu trnh kim sot li c 2 chc nng: pht hin v sa li o 2 loi li ph bin: mt frame v li frame Cc phng php kim sot li o Forward error control: sa li ti pha Rx (Forward Error Correction) o Backward error control: truyn li frame (Automatic Repeat Request) cn backward channel

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Automatic Repeat reQuest (ARQ) o C ch Pht hin li

Chng 3

Positive acknowledgement (ACK): frame nhn OK ti Rx Truyn li sau timeout Negative acknowledgement (NACK): truyn li frame o Cc phng php ARQ Stop and Wait ARQ Continuous ARQ Go-back-N ARQ Selective-reject (or repeat) ARQ

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu o Stop and wait ARQ

Chng 3

Tx gi 1 frame v i ACK t Rx trc khi truyn next frame Tx phi gi bn copy ca frame gi n khi nhn c ACK S dng timeout cho cc frame hoc ACK b mt nh s cc frame gi v nhn nhn bit khi lp frame V d: s dng 1 bit nh s frame
Frame lost A retransmits Timeout A
ACK ACK ACK ACK ACK
m Fra e0

ACK 0 lost A retransmits Timeout

m Fra e1

m Fra

m Fra

m Fra

m Fra

m Fra

e0

e0

e1

e1

e0

B B discards duplicated frame Hanoi University of Technology Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu o Go-back-N ARQ Tx c th truyn lin tip cc frame

Chng 3

Rx gi negative acknowledgement (REJ) khi pht hin li Tx phi truyn li tt c cc frame t frame bi li Tx phi gi bn copy ca tt c cc frame gi
Frame 2, 3, 4 retransmitted Tx
4 me Fra 3 me Fra 2 me Fra 1 me Fra 0 me Fra 4 me Fra 2 me Fra 3 me Fra 5 me Fra

K2

4 ACK

ACK

ACK

ACK

Rx

Discarded by Rx

Hanoi University of Technology

NAC

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu o Selective-repeat ARQ Tx c th truyn lin tip cc frame

ACK

Chng 3

Rx gi negative acknowledge (SREJ) khi pht hin li Rx lu li tt c cc frame OK sau frame b li Tx ch gi li duy nht frame b li Rx phi sp xp li cc frame lu sau khi nhn c frame truyn li
Frame 2 retransmitted Tx
4 me Fra 5 me Fra 1 me Fra 0 me Fra 6 me Fra 2 me Fra 2 me Fra 0 me Fra 3 me Fra 7 me Fra

K2

7 ACK

ACK

ACK

ACK

ACK

Rx Error

Hanoi University of Technology

NAC

Buffered Frame 2, 3, 4 by Rx released Faculty of Electronics and Telecommunications

ACK

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Performance: Stop-and-wait ARQ


Tx tframe tprop NACK Rx

Chng 3

P: xc sut li khung Nf = s ln truyn khung trung bnh


U=
NACK

1 Uerror free Nr

Nr = i Pi1(1 P) = U=

1 1 P

ACK

1 1 1 P = Nr 1+ 2a 1+ 2a

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Performance: Go-back-N ARQ P: xc sut li khung Nf = s ln truyn khung trung bnh

Chng 3

Tx tf tp

Rx

Nr 1 (1 P) + (1+ K) P (1 P) + (1+ 2K) P 2 (1 P) + L + 1+ P(K 1) 1 P N 1+ 2a : K = 1+ 2a N < 1+ 2a : K = N =


1 P 1 P 1+ P(K 1) = 1+ 2aP , U= N N(1 P) 1 P , = 1+ P(K 1) 1+ 2a (1+ 2a)(1 P + NP) N 1+ 2a N < 1+ 2a

0 1 2 3 0 1 2 3 4 NACK

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Performance: Selective-repeat ARQ P: xc sut li khung

Chng 3

Nf = s ln truyn khung trung bnh


Tx tf tp Rx

Nr = i Pi1(1 P) =

1 1 P

0 1 2 3 0 4 5 6 NACK

N 1+ 2a 1 - P, U = N(1 P) 1+ 2a , N < 1+ 2a

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Cc giao thc ca tng lin kt d liu High Level Data Link Control (HDLC) o ISO pht trin t IBM sychronous DLC (SDLC) o C ch chn bit (bit-stuffing), data transparency o H tr truyn ng b, HDX, FDX, point-to-point o Flow control: X-ON / X-OFF o Error control: Go-back-N, Selective-repeat ARQ Point to point protocol (PPP) o To kt ni im-im

Chng 3

Router-router leased line (PPP), dial-up host-router (PPP, SLIP) o Chun chnh thc ca Internet, lm vic tng lin kt d liu o Lm vic trn dial-up tel line, SONET, ADSL, X25, ISDN, o Chc nng: error detection, IP address negotiation, authentication
Hanoi University of Technology Faculty of Electronics and Telecommunications

10

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu HDLC o H giao thc HDLC SDLC: IBM HDLC: ISO Link Access Procedure Balanced (LAPB): X25

Chng 3

Link Access Procedure for D-channel (LAPD): ISDN PPP: Internet Logical Link Control (LCC): IEEE Frame relay o Ch hot ng ca HDLC Configurations: Balanced, unbalanced link Mode: Normal Response Mode (NRM) unbalanced multipoint Asynchronous Response Mode (ARM) unbalanced PPP Asynchronous Balanced Mode (ABM) balanced PPP
Hanoi University of Technology Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu NRM: polling multidrop lines


Commands

Chng 3

Primary
Response

Secondary

Secondary

Secondary

ABM: Asynchronous Balanced Mode


Primary Secondary
Commands Responses Responses Secondary Commands

Primary

Mode c chn khi thit lp lin kt

Hanoi University of Technology

Faculty of Electronics and Telecommunications

11

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu o HDLC frame format

Chng 3

Flag (01111110): Bt u v kt thc frame, s dng trong ng b Address (c th m rng): xc nh secondary trong multidrop link Control: Xc nh dng frame FCS: CRC-16 hoc 32

Flag
8

Address
8 Extendable

Control
8/16

Information
Variable

FCS
16/32

Flag
8

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu o HDLC frame types: I-frame, U-frame, S-frame 8-bit control field format

Chng 3

I frame S frame

N(S)

P/F

N(R)

P/F

N(R)

N(S): send sequence # N(R): receive sequence # S: super functions bits M: Unnumbered functions bits P/F: Poll / Final bits

U frame

P/F

16-bit control field format I frame


0 N(S) P/F N(R)

S frame

P/F

N(R)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

12

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu I-frame: User data Mi frame c s th t N(S) C ch ACK: + N(S) = s th t ca frame ang gi

Chng 3

+ N(R) = s th t ca frame i nhn tip theo, xc nhn nhn OK cc frame c s th t n N(R)-1 S dng 3 hoc 7 nh s th t cc frame: Kch thc ca s cc i l 7 hoc 127 P/F: Trong NRM, ch hi vng ca primary (P=1), secondary thit lp F=1 khi gi p ng vi khung I cui cng

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu S-frame: error control + flow control

Chng 3

Receive Ready (RR), Receive Not Ready (RNR), Reject (REJ): Go-back-N ARQ, Selective Reject (SREJ): Selective-repeat ARQ RR: SS = 00, ACK nhn OK N(R)-1 frame REJ: SS = 01, NACK frame N(R) u tin c li, Tx phi gi li frame N(R) v cc frame sau RNR: SS = 10, ACK nhn OK frame N(R)-1, khng nhn tip cc I frame SREJ: SS = 11, NACK cho frame N(R) v yu cu truyn li frame ny

Hanoi University of Technology

Faculty of Electronics and Telecommunications

13

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu

Chng 3

U-frame: Link initialization, maintenance, disconnection Cung cp commands + response: mode settings, recovery Mode settings: thit lp ch lin kt + SABM: Set Asynchronous Balanced Mode + UA: ACK chp nhn cc lnh thit lp ch + DISC: Hy b lin kt logic thit lp Truyn tin gia cc trm s dng unnumbered info (UI) Recovery: khi error/flow control khng thc hin c + FRMR: frame c FCS ng, nhng sai c php + RSET: Tx khi to li s th t cc frame c gi
Data transfer

SABM

UA

DISC

UA

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu V d: HDLC s dng NRM (polling)


Primary A A hi vng B B, RR, 0, P
N(R) N(S) N(R)

Chng 3

Secondary B, C

B, I, 0, 0

B truyn 3 I-frame

*
A t chi frame 1 B, SREJ, 1 A hi vng C C, RR, 0, P

B, I, 1, 0 B, I, 2, 0, F

C, RR, 0, F A hi vng B yu cu truyn li frame 1 B, SREJ, 1, P B, I, 1, 0 B, I, 3, 0 B, I, 4, 0, F A truyn frame 0 ti B, ACK B, I, 0, 5 nhn OK n frame 4 Hanoi University of Technology

C khng truyn g

B truyn li frame 1, 3, 4

Faculty of Electronics and Telecommunications

14

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu V d: HDLC s dng ABM

Chng 3

Station A B truyn 5 frame B, I, 0, 0 B, I, 1, 0 B, I, 2, 1 B, I, 3, 2 B, I, 4, 3 B gi li frame 1 B, I, 1, 3 B, I, 2, 4 B, I, 3, 4

Station B A, I, 0, 0

A, I, 1, 1 A, I, 2, 1 B, REJ, 1 A, I, 3, 1 B, RR, 2 B, RR, 3

A ACK nhn OK frame 0 A t chi frame 1 A ACK frame 1 A ACK frame 2

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu PPP


Modem
TCP/IP connection using PPP or SLIP

Chng 3

Users home

Dial-up tel. line

ISPs office

Flag 01111110

Address 11111111

Control 00000011

Protocol

Information
Integer # of bytes

CRC

Flag 01111110

o Ging HDLC, nhng l giao thc hng byte Flag 01111110 c coi nh l k t 0x7E Chn byte (byte stuffing) s dng k t c bit: 0x7D o Address: lun lun l 11111111 cc trm u nhn c frame o Control: U-frame (khng c th t cc frame c truyn) o Protocol: cho bit loi packet cha trong information (IP, IPX, LCP, NCP )
Hanoi University of Technology Faculty of Electronics and Telecommunications

15

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu

Chng 3

o Link Control Protocol (LCP): Qun l kt ni, h tr multilink (kt hp nhiu kt ni vt l vo 1 ng kt ni logic), authentication (s dng ID v password: Password Authentication Protocol PAP) o Network Control Protocol (NCP): h tr IP, IPX, Decnet, Apple Talk), dynamic IP address assigment o Byte stuffing in PPP Control escape: 0x7D Khi xut hin flag hoc control escape bn trong frame, chn vo 0x7D (01111101) v d liu tng ng c XOR vi 0x20 (00100000)
D liu cn truyn 41 7D 42 7E 50 70 46

Sau khi stuffing v framing 7E 41 7D 5D 42 7E 5E 50 70 46 7E

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu o PPP phase

Chng 3

Home PC kt ni vi ISP
7. Carrier dropped Dead 1. Carrier detect

Failed Terminate 6. Done 5. Open Establish 2. Options negotiated Authentication

Failed

4. NCP configuration

Network

3. Authentication completed

1. PC calls router via modem 2. PC and router exchange LCP packets to negotiate PPP 3. Check on identities 4. NCP packets exchanged to configure the network layer TCP/IP (require IP address assignment) 5. Data transport: send/receive IP packets 6. NCP used to tear down the network layer connection (free up IP address); LCP used to shut down data link layer connection 7. Modem hangs up

Hanoi University of Technology

Faculty of Electronics and Telecommunications

16

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Bridge: transparent v source routing

Chng 3

Repeater, bridge: lm vic tng lin kt d liu lin kt nhiu phn lp mng vi MAC format khc nhau, data rate khc nhau, kch thc frame khc nhau Tng qut v bridge

Network LLC MAC PHY


802.3 802.3 802.3 802.3 802.5 802.5 802.5 802.5

Network LLC MAC PHY

802.3

802.5

CSMA/CD

Token Ring

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Transparent bridge o Kt ni IEEE LAN m bo data transparency o S dng bng tham chiu (table lookup)

Chng 3

o S dng phng php hc sau xy dng bng tham chiu Theo di a ch ngun ca mng LAN gi n Theo di s thay i cu trc mng cp nht bng tham chiu
S1 S2 S3 LAN 1 Bridge LAN 2 S4 S5 S6

Hanoi University of Technology

Faculty of Electronics and Telecommunications

17

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu o V d


S1 S2 S3 S4

Chng 3

S5

LAN 1 Port 1

B1

LAN 2 Port 2 Port 1

B2

LAN 3 Port 2

Address

Port

Address

Port

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu S1


S1

Chng 3

S5
S2 S3 S4 S5

S1

S5

LAN 1 Port 1

S1

S5

LAN 2 Port 2 Port 1

S1

S5

LAN 3 Port 2

B1

B2

Address S1

Port 1

Address S1

Port 1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

18

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu S3


S1

Chng 3

S2
S2 S3 S4 S5

S3

S2

LAN 1 Port 1

S3

S2

LAN 2 Port 2 Port 1

S3

S2

LAN 3 Port 2

B1

B2

Address S1 S3

Port 1 2

Address S1 S3

Port 1 1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu S4


S1

Chng 3

S3
S2 S3 S4 S5

S4

S3

LAN 1 Port 1

S4

S3

LAN 2 Port 2 Port 1

S4

S3

LAN 3 Port 2

B1

B2

Address S1 S3 S4

Port 1 2 2

Address S1 S3 S4

Port 1 1 2

Hanoi University of Technology

Faculty of Electronics and Telecommunications

19

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu S2


S1

Chng 3

S1
S2 S3 S4 S5

S2

S1

LAN 1 Port 1 B1 Port 2

LAN 2 Port 1 B2 Port 2

LAN 3

Address S1 S3 S4 S2

Port 1 2 2 1

Address S1 S3 S4

Port 1 1 2

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Ngn chn vng lp s dng spanning tree algorithm

Chng 3

o Chn bridge c root ID thp nht lm root bridge (RB) o Xc nh root port (R) cho tng bridge, tr RB: port c ng i ngn nht (least-cost) ti RB o Chn designated bridge (D) cho tng mng LAN: + bridge c ng i ngn nht t mng LAN ti RB + Designated port: ni mng LAN vi D o Tt c cc root port R v designated port D c thit lp trng thi chuyn tip (forwarding). Ch cc port ny c php chuyn tip frame. Cc port cn li c thit lp trng thi kha (blocking)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

20

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu o V d: Gi s cost cho mi LAN u bng nhau

Chng 3

1. B1 c chn lm root bridge


LAN1 1 1 1 1 RB ID = 1 3 LAN1 1

B1
2 LAN2 1

B2
2

B1
2 LAN2 1

B2
2

B3
2

B3
2

B4
2 LAN3 1 LAN3

B4
2 1

B5
2 LAN4 Hanoi University of Technology

B5
2 LAN4 Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu

Chng 3

2. Root port c chn cho tng bridge tr RB

3. Chn designated bridge cho mi LAN 4. Thit lp root port v designated port

LAN1 1 RB ID = 1 R 1 R 1 3 RB ID = 1 D 1

LAN1 R 1 R 1 3 D

B1
2 LAN2 R 1

B2
2

B1
D 2 LAN2 R 1

B2
2

B3
2

B3
D 2

B4
2 LAN3 R 1 LAN3

B4
2 R 1

B5
2 LAN4 Hanoi University of Technology

B5
2 LAN4 Faculty of Electronics and Telecommunications

21

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Network analyzer: Ethereal

Chng 3

o Do Gerald Combs gerald@ethereal.com , www.ethereal.com o Ethereal c th bt, hin th v phn tch cc frame qua Ethernet NIC o Chui cc frame v ni dung ca frame c th c phn tch chi tit mc byte o Rt hu hiu khi phn tch li mng, ng thi l phn mm dy hc o Chn website www.vnexpress.net lm v d

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Ethereal window Top pane Frame/packet sequence

Chng 3

Middle pane Encapsulation for a given frame

Bottom pane Gi tr Hexa & text tng ng


Hanoi University of Technology Faculty of Electronics and Telecommunications

22

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Top pane: Frame sequence DNS query

Chng 3

TCP Connection Setup

HTTP request & response

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu Middle pane: Encapsulation

Chng 3

Protocol type

Ethernet destination and source addresses

Hanoi University of Technology

Faculty of Electronics and Telecommunications

23

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu

Chng 3

IP packet Protocol type Ethernet destination and source addresses

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu

Chng 3

TCP segment

Source and destination port numbers GET

HTTP request

Hanoi University of Technology

Faculty of Electronics and Telecommunications

24

2008

Chng 3. Kt ni mng lp 2 - tng lin kt d liu

Chng 3

Tng kt
Tng lit kt d liu (DLL) Framing Flow control: Stop-and-wait control, sliding window Error control: Stop-and-wait ARQ, Go-back-N ARQ, selective-repeat ARQ Giao thc ca tng lin kt d liu HDLC: HDLC frame format, operation mode PPP: PPP frame format Kt ni v m rng mng tng lin kt d liu Transparent bridge: self-learning ca bng tham chiu Spanning tree algorithm: ngn chn vng lp trong kt ni mng

Hanoi University of Technology

Faculty of Electronics and Telecommunications

25

2010

Chng 4. Kt ni mng Internet

Chng 4

Tng quan v mng Internet v giao thc TCP/IP


Datagram v Virtual Circuits (VC) R ti t Routing trong mng chuyn mch gi h h i Shortest path routing Giao thc IP Internet protocol ARP, ICMP Internet routing protocols DHCP, NAT, mobile IP Giao thc TCP v UDP UDP TCP
Hanoi University of Technology Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet Gii thiu tng quan v kin trc mng Internet Internetworking o Network of networks Internet

Chng 4

Hot H t ng vi nhiu mng v cng ngh mng kh nhau i hi h khc h Cung cp ng kt ni truyn d liu gia cc mng
H

H Net 1 G Net 2

Net 3 G G Net 4 G Net 5 H H

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

c im
Cung cp kh nng kt ni v la chn ng i gia hai my tnh thuc hai mng khc nhau

nh dng gi tin (packet) Knh o (Virtual circuit) Tuyn (Route), bng nh tuyn (routing table), giao thc nh tuyn (routing protocol) i ch logic g Phn mnh gi tin (Fragmentation) ..

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

Phn chia thnh nhiu mng. V sao?


- S lng host ln trn cng on mng dn n tc nghn v khng s dng c - iu khin lu lng v gim broadcast - Cc mng ring bit c qun l bi cc t chc ring

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

Kt ni lp 3

Thit b lp 3 kt ni cc mng khc nhau da trn cu trc a ch phn cp.


Hanoi University of Technology Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

Router
B nh tuyn (Router) kt ni cc mng khc nhau Router la chn ng i ti u ca gi tin da trn thng tin ca lp 3. 3

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet Internet protocol: Kt ni mng thng qua router o

Chng 4

Cc gi tin IP truyn thng tin qua mng Internet qua cc giao din ca mng: Host A IP router router router host B IP

o Layer IP trong mi router s xc nh chng tip theo (router tip theo)


Host A Application Transport Internet Network Interface
Net 2 Hanoi University of Technology

Router

Router Internet Network Interface


Net 1

Host B Application Transport Internet

Internet Network Interface

Router
Net 4

Internet Network Interface


Net 3

Network Interface

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet B giao thc TCP/IP

Chng 4

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet Mng chuyn mch gi o Truyn cc gi tin gia cc user o Ch lm vic Virtual circuit Connectionless (datagram)

Chng 4

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet nh tuyn trong Virtual-circuit (VC) packet network o Tuyn c xc lp khi khi to lin kt

Chng 4

o Cc bng nh tuyn trong cc router thc hin chuyn tip packet y p theo tuyn c xc lp

1 A Host 5 VCI 2 6 1

2 3 3 4 4 3 5 5 2 1

7 6

8 5

Switch or Router 2 D

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet o


1

Chng 4

RT trong VC packet network


Node 1 Node 3 2 3
Incoming Node VCI 1 1 4 6 6 4 2 3 2 7 1 4 Outgoing Node VCI 6 4 6 1 4 1 7 4 1 2 2 3 2 3 1 5 Outgoing Node VCI 3 3 A A

A 5

Incoming Node VCI A A 3 3 1 5 2 3

7 1

Node 6
Incoming Node VCI 3 3 B B 7 1 5 8 Outgoing Node VCI B B 3 3 8 5 1 7

8 5

4
Incoming Node VCI 2 3 4 2 5

Node 4
2 5 3 4

Outgoing Node VCI 3 5 2 3

Node 2
Incoming Node VCI C 6 3 Outgoing Node VCI 4 C 3 6

3 5

Node 5 5
Incoming Node VCI 4 D 5 2 Outgoing Node VCI D 4 2 5

V d: VCI t A D T A & VCI 5 3 & VCI 3


Hanoi University of Technology

4 & VCI 4

5 & VCI 5

D & VCI 2

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet Datagram (connectionless) o Message chia thnh cc packet o a ch ngun v ch t trong packet header t k th d o Packet c th n ch khng theo trt t
P1 2

Chng 4

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet o RT trong Datagram packet network


Node 1
Destination Next node

Chng 4

Node 3
Destination Next node 1 2 4 5 6 1 4 4 6 6 1 2 3 4 5 2 3 4 2 3

2 3 4 5 6

Node 6
Destination Next node 3 5 3 3 5

Node 4
Destination Next node 1 1 2 3 5 3

Node 2
Destination Next node 1 1 1 4 5 5

2 3 5 6

Node 5
Destination Next node 1 2 3 4 6 4 2 4 4 6

3 4 5 6

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet nh tuyn trong mng chuyn mch gi

Chng 4

o C th c 3 tuyn t node 1 ti node 6: 1-3-6, 1-4-5-6, 1-2-5-6 o Tuyn no ti u nht? : Min delay, min hop, max BW, min cost o Thut ton nh tuyn Truyn h h h h T nhanh v chnh xc Thch ng vi thay i ca cu hnh mng (link & node failure) Thch ng vi s thay i lu lng mng t ngun n ch o Centralized vs distributed routing, static vs dynamic routing To bng nh tuyn (routing table - RT) o Cn c thng tin v trng thi link o S dng thut ton nh tuyn thng bo trng thi link: broadcast, flooding o Tnh ton tuyn theo thng tin: Single metric, multiple metric Single route, alternate route
Hanoi University of Technology 2 4 1 3 6

5 Node (Switch hoc Router)

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet Shortest path routing Shortest path & routing o C nhiu tuyn kt ni gia ngun v ch

Chng 4

o nh tuyn: chn tuyn kt ni ngn nht (shortest path - SP) thc hin phin truyn dn o Mi tuyn kt ni gia 2 node c gn cost hoc distance Routing metrics: Tiu ch nh gi tuyn o Path length: Tng cost hoc distance o Cc tiu ch: m s chng (hop count) Reliability, link reliability, BER Delay Bandwidth Load
Hanoi University of Technology Destination

Cij

Dj j

Nu Dj l khong cch ngn nht ti ch t node j, v nu node j lin k nm trn SP Di = Cij + Dj


Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet Cc phng n o Distance vector protocol (DVP)

Chng 4

Cc node k nhau trao i thng tin v khong cch i ti ch Xc nh chng tip theo (next hop - NH) ti a ch ch Thut ton Bellman-Ford SP (phn tn) o Link state protocol (LSP) Thng tin v link state c gi ti tt c cc router (flooding) Router c thng tin y v cu hnh mng SP v NH c tnh ton Thut ton Dijkstra SP (tp trung) Distance vector (DV): Vector khong cch o Routing table (RT) cho mi a ch ch: next-node (NN), distance o Tng hp RT: Cc node ln cn trao i RT, xc nh next hope
Hanoi University of Technology Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet Bellman-Ford algorithm 1. Initialization Khong cch t node d ti chnh n: Dd = 0

Chng 4

Khong cch t node i bt k ti d: Di = , i d g , Node tip theo cha c xc nh: ni = -1, i d 2. Send step Cp nht DV cho cc node k bn qua ng link trc tip 3. Receive step Ti node i, tm NH c khong cch ngn nht ti d Di(d) = Minj{Cij + Dj} i j Mi }, Thay cp gi tr c (ni, Di(d)) bng gi tr mi (ni*, Dj*(d)) nu tm c NN mi Quay li bc 2 cho n khi khng cn thay i thm na

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

Iteration Initial

Node 1 (-1, )

Node 2 (-1, )

Node 3 (-1, )

Node 4 (-1, )

Node 5 (-1, )

Node 2

Node 6

(n, Di) n: NN i ti ch Di: khong cch ngn nht t node i ti ch


2 5 3 1 2 4 2 4 3 5 2

2-1-3-6: 3 + 2 + 1 = 6 2-4-3-6: 1+ 2 + 1 = 4 2-5-6: 4 + 2 = 6 ng no ngn nht?


1 3

1 6

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

Iteration Initial 1 2 3 4

Node 1 (-1, ) (-1, ) (3, (3 3) (3, 3) (3, 3)

Node 2 (-1, ) (-1, ) (5, (5 6) (4, 4) (4, 4)

Node 3 (-1, ) (6, 1) (6, (6 1) (6, 1) (6, 1)

Node 4 (-1, ) (-1, ) (3, (3 3) (3, 3) (3, 3)

Node 5 (-1, ) (6, 2) (6, (6 2) (6, 2) (6, 2)

1 5 3 1 2

2 2 4

1 6

3 4 5

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet o Khi c li mng


Iteration Update 1 Update 2 Update 3 Update 4 Update 5 Node 1 (3, 3) (3, 3) (3, (3 7) (3, 7) (2, 9) (2, 9)
1 5 3 1 2 4

Chng 4

Node 2 (4, 4) (4, 4) (4, (4 4) (4, 6) (4, 6) (4, 6)


2 2 4 3

Node 3 (6, 1) (4, 5) (4, (4 5) (4, 7) (4, 7) (4, 7)

Node 4 (3, 3) (3, 3) (5, (5 5) (5, 5) (5, 5) (5, 5)

Node 5 (6, 2) (6, 2) (6, (6 2) (6, 2) (6, 2) (6, 2)

3 5

Hanoi University of Technology

Faculty of Electronics and Telecommunications

10

2010

Chng 4. Kt ni mng Internet Link-state algorithm Qu trnh 2 giai on

Chng 4

o Mi node ngun c nhn bn (map) ca tt c cc node khc g v link-state ca mng o Tm SP trn bn t node ngun ti tt c cc node ch Qung b thng tin v link-state o Mi node i trong mng gi qung b ti tng node mng: ID ca node lin k: Ni = tp hp ca cc node lin k node i Khong cch ti node lin k ca n {Cij | j Ni}

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet Dijstra algorithm: tm SP theo th t o N: tp hp cc node tm thy SP o Initialization (Bt u vi node ngun s)

Chng 4

N = {s}, Ds = 0: Khong cch t node s ti chnh n bng 0 Dj = Csj, j s: Khong cch ti node lin k kt ni trc tip o Step A (Tm node i gn nht) Tm node i N sao cho Di = min Dj vi j N Cp nht node i vo tp hp N Nu N cha tt c cc node, STOP o Step B (cp nht minimum cost) Vi mi node j N, tnh Dj = min (Dj, Di + Cij) Quay li step A

Hanoi University of Technology

Faculty of Electronics and Telecommunications

11

2010

Chng 4. Kt ni mng Internet Thc hin thut ton Dijkstra o V d: Tm SP cho Node 1
1 5 3 1 2 4 2 2 4 3 5 2 2 5 3 1 6 3 4 2 1 2 3 2 1

Chng 4

Iteration Initial ta 1 2 3 4 5

N
{ } {1} {1, 3} {1, 2, 3} {1, 2, 3, 6} {1, 2, 3, 4, 6} {1, 2, 3, 4, 5, 6}

D2 3 3 3 3 3 3

D3 2 2 2 2 2 2

D4 5 4 4 4 4 4

D5

D6


7 5 5 5

3 3 3 3 3

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet o RT ca node 1


Destination Next node 2 3 4 5 6 2 3 3 3 3 Cost 3 2 4 5 3

Chng 4

o Khi c link b hng Router thit lp khong cch ca link v v gi thng bo cp nht s dng phng php flooding Tt c cc router s tnh ton v cp nht SP o Vn thng bo cp nht link cost Gn s th t cho mi thng bo v cp nht link cost Kim tra mi thng bo n. Nu l thng bo mi, cp nht v gi qung b. Nu l thng bo c, gi li theo link n
Hanoi University of Technology Faculty of Electronics and Telecommunications

12

2010

Chng 4. Kt ni mng Internet Source routing o Source ch nh tuyn cho cc packet

Chng 4

Strict: Source ch nh tt c cc node cho packet Loose: Ch mt phn cc node c ch nh

1, 3, 6, B

3, 6, B 1 3

6, B B 6

A Source

4 2

B Destination
5

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet Internet protocol (IP)

Chng 4

IP packet header: ti a 20 byte, trng option khng qu 40 byte


0 Version 4 IHL 8 Type of Service Flags Protocol Source IP Address Destination IP Address Options Padding Identification Time To Live 16 19 24 Total Length Fragment Offset Header Checksum 31

Hanoi University of Technology

Faculty of Electronics and Telecommunications

13

2010

Chng 4. Kt ni mng Internet


4 8 IHL Type of Service Flags Protocol Source IP Address Destination IP Address Options Identification 16 19 24 Total Length

Chng 4

0 Version

31

Fragment Offset Header Checksum

Time To Live

Padding

Version: IPv4 Internet Header Length (IHL): di IP header tnh theo 32 bit/word yp (ToS): Mc u tin cho packet ti mi router. ) p Type of Service ( Total Length: S byte cc IP packet, bao gm header v data (< 65536) Identification, Flags, Fragment Offset: S dng trong fragmentation v reassembly

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet


4 8 IHL Type of Service Flags Protocol Source IP Address Destination IP Address Options Identification 16 19 24 Total Length

Chng 4

0 Version

31

Fragment Offset Header Checksum

Time To Live

Padding

Time To Live (TTL): S chng ti a cho mi packet c php i qua Qua mi router trn ng ti ch, TTL gim 1 n v Nu TTL t gi tr 0 trc khi ti ch, router hy IP packet, gi thng bo li ti ngun Protocol: Bo cho layer pha trn IP data trong packet ti ch TCP (6), UDP (17), ICMP (1) Header Checksum: Kim tra tnh chnh xc ca IP header nhn c Source IP, Destination IP address: a ch IP ca tram ngun v ch
Hanoi University of Technology Faculty of Electronics and Telecommunications

14

2010

Chng 4. Kt ni mng Internet


4 8 IHL Type of Service Flags Protocol Source IP Address Destination IP Address Options Identification 16 19 24 Total Length

Chng 4

0 Version

31

Fragment Offset Header Checksum

Time To Live

Padding

Option: c di thay i, cho php packet yu cu mt s ty chn c bit - mc bo mt, timestamp cho packet ti mi router Padding: m bo header la s nguyn ln cc t 32 bit g g y

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet X l IP header

Chng 4

o Kim tra chnh xc ca IP header thng qua tnh ton Header Checksum, ng thi kim tra tnh hp l ca cc trng trong header (IP version, length, ) o Xc nh chng tip theo s dng bng nh tuyn o Cp nht cc trng cn thit: TTL, header checksum, Phng php a ch ha IP o Mi trm c a ch IP 32 bit duy nht: NetID, hostID o NetID l duy nht, c s dng trong nh tuyn, c qun l bi American Registry for Internet Numbers (ARIN) Reseaux IP Europeens (RIPE) Asia Pacific Network Information Center (APNIC) oBiu din trong h 10 cho mi octet (VD: 128.10.1.2)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

15

2010

Chng 4. Kt ni mng Internet Phn lp a ch IP

Chng 4

Class A 0

24

NetID

HostID

Ti a 126 mng vi ti a 16 triu host / mng: 1.0.0.0 n 127.255.255.255


Class B 1 0
14 16

NetID

HostID

Ti a 16382 mng vi ti a 64000 host / mng: 128.0.0.0 : 191.255.255.255


Class C 1 1 0
21 8

NetID

HostID

Ti a 2 triu mng vi ti a 254 host / mng: 192.0.0.0 : 223.255.255.255


Class D 1 1 1 0
28

Multicast

Ti a 250 triu multicast group: 224.0.0.0 : 239.255.255.255


Hanoi University of Technology Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet Mt s a ch IP c bit


0000 0000 0000 Host

Chng 4

This host (used in booting up) A host in this network

1111 NetID

1 1 11 1111

Broadcast on a local network Broadcast on a distant network

a ch IP c bit dng trong mng ring (private IP address) o Router trong mng chung t chi packet vi cc a ch IP ny o Range 1: 10.0.0.0 10.255.255.255 o Range 2: 172.16.0.0 172.31. 255.255 o Range 3: 192.168.0.0 192.168.255.255 (Home LAN) o Network Address Translation (NAT): chuyn i IP ring v ton cu
Hanoi University of Technology Faculty of Electronics and Telecommunications

16

2010

Chng 4. Kt ni mng Internet V d: IP addressing


128.135.40.1 Interface address 128.135.10.2 Network
128.135.0.0

Chng 4

128.140.5.40 Interface address 128.140.5.35 Network


128.140.0.0

Router

128.135.10.20

128.135.10.21

128.140.5.36

o HostID = all 0: tham chiu ti mng c ch ra bi NetID o HostID = all 1: truyn qung b packet trong mng vi NetID

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet a ch ha mng con (Subnet Addressing - SA)

Chng 4

o SA s dng cu trc mng mc thp hn trong mng hin ti o Trong sut i vi mng bn ngoi o gin h vic qun l nhiu mng LAN n i ha i hi o Mt n (masking): s dng xc nh s mng con (subnet) a ch IP (lp B) a ch subnet
1 0 1 0 NetID NetID HostID SubnetID HostID

Hanoi University of Technology

Faculty of Electronics and Telecommunications

17

2010

Chng 4. Kt ni mng Internet

Chng 4

V d: 1 t chc c a ch IP lp B vi netID: 150.100.0.0 (16 bit hostID) o To cc mng con c ti a 100 host/subnet 7 bit: va cho mi subnet t s host yu cu 16 7 = 9 bit subnetID bit: b tID o p dng subnet mask cho a ch IP tm mng con tng ng o V d: Tm subnet cho a ch IP 150.100.12.176 o a ch IP: o Mask: o AND: o Subnet: 10010110 01100100 00001100 10110000 11111111 11111111 11111111 10000000 10010110 01100100 00001100 10000000 150.100.12.128

o Broadcast subnet: 150.100.12.255 o Cc host kt ni vo subnet: 150.100.12.129 150.100.12.254 o Cc router ch s dng ia ch subnet bn trong t chc ny
Hanoi University of Technology Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet V d: Gi s 9 bit subnetID v 7 bit hostID


H1 150.100.12.154 150.100.12.128 150 100 12 128 H2 150.100.12.176

Chng 4

Dest.: 150.100.15.11

150.100.0.1 Ti mng Internet

150.100.12.129 R1 150.100.12.4 H3 150.100.12.24 150.100.12.0 H4 150.100.12.55

150.100.12.1 R2 150.100.15.54 150.100.15.0 H5 150.100.15.11

IP Mask AND

10010110 01100100 00001111 00001011 11111111 11111111 11111111 10000000 10010110 01100100 00001111 00000000

Subnet 150.100.15.0

Hanoi University of Technology

Faculty of Electronics and Telecommunications

18

2010

Chng 4. Kt ni mng Internet nh tuyn vi subnetwork

Chng 4

o IP layer trong host v router lu gi routing table (RT) o Host: tham chiu RT Nu h t h N host ch cng mng, gi packet trc tip ti h t ch s i k tt ti host h dng giao din mng tng ng Nu khng cng mng, gi packet gin tip qua default router o Router: Kim tra i ch IP ca packet nhn c Nu khng bit IP ch, tham chiu RT v xc nh next hop o Routing table Mi dng trong RT cha: Dest. IP , next-hop router IP, subnet mask, phy. address, network interface, statistics, flag

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet o V d: Host 5


H1 150.100.12.154 150.100.12.128 150 100 12 128 150.100.0.1 Ti mng Internet 150.100.12.129 R1 150.100.12.4 H3 150.100.12.24 H4 150.100.12.55

Chng 4

Host 2
H2 150.100.12.176

Routing table at H5 Destination 127.0.0.1 default Next hop 127.0.0.1 150.100.15.54

150.100.12.0
Flags H G Net. Interface lo0 emd0 emd0

150.100.12.1 R2 150.100.15.54 150.100.15.0 H5 Dest.: 150.100.12.176 150.100.15.11

150.100.15.0 150.100.15.54

Hanoi University of Technology

Faculty of Electronics and Telecommunications

19

2010

Chng 4. Kt ni mng Internet o V d: Host 5


H1 150.100.12.154 150.100.12.128 150 100 12 128 150.100.0.1 Ti mng Internet 150.100.12.129 R1 150.100.12.4 H3 150.100.12.24 H4 150.100.12.55

Chng 4

Host 2
H2 150.100.12.176

Routing table at R2 Destination 127.0.0.1 default Next hop 127.0.0.1 150.100.12.4

150.100.12.0
Flags H G

150.100.12.1 H5 150.100.15.11

Net. Interface R2 Dest.: 150.100.12.176 lo0 150.100.15.54 emd0 emd1 emd0

150.100.15.0 150.100.15.54 150.100.12.0 150.100.12.4 Hanoi University of Technology

150.100.15.0

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet o V d: Host 5


H1 150.100.12.154 150.100.12.128 150 100 12 128 150.100.0.1 Ti mng Internet 150.100.12.129
Dest.: 150.100.12.176 R1

Chng 4

Host 2
H2 150.100.12.176

150.100.12.4

H3 150.100.12.24

H4 150.100.12.55

Routing table at R1 Destination 127.0.0.1 150.100.12.0 Next hop 127.0.0.1 150.100.12.4

150.100.12.0
Flags H Net. Interface lo0 emd0 emd1 G emd1

150.100.12.1 R2 150.100.15.54 150.100.15.0 H5 150.100.15.11

155.100.12.176 150.100.12.176 150.100.15.0 150.100.12.1

Hanoi University of Technology

Faculty of Electronics and Telecommunications

20

2010

Chng 4. Kt ni mng Internet Vn a ch IP o 1990: 2 vn ny sinh Ht cc di a ch IP Bng h tuyn B nh t IP pht trin cng knh ht t i k h o Gii php tm thi Subnetting Classless Interdomain Routing (CIDR) Network Address Translation (NAT) o Gii php lu di: IPv6

Chng 4

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet CIDR v supernetting o a ch IP lp A, B, C khng mm do o CIDR: NetID vi s bit bt k o V d: 205.100.0.0/22 d 205 100 0 0/22 22: s bit trong mask 255.255.252.0

Chng 4

o CIDR nh tuyn s dng prefix ca a ch IP, khng ti class Bng nh tuyn: <IP address, network mask> Do di prefix thay i, t bng nh tuyn phi xc nh prefix di nht trng nhau o Supernetting: CIDR s dng k thut supernetting, cho php 1 a ch IP i din cho 1 nhm a ch IP (lp A, B, C) o V d: CIDR s dng a ch IP 205.100.0.0/22 i din cho 4 a ch IP phn lp C (205.100.0.0, 205.100.1.0, 205.100.2.0, 205.100.3.0)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

21

2010

Chng 4. Kt ni mng Internet Fragmentation v reassembly o Identification:nhn bit kiu gi tin

Chng 4

o Flag (3 bit): Unused, MF, (more fragment), DF (dont fragment) oF Fragment offset: v t f t ff t tr fragment t t trong packet ( v 8 b t ) k t (n byte)
0 Version 4 IHL 8 Type of Service Flags
Router Fragment at router

16

19

24 Total Length Fragment Offset


Destination Reassembly at destination

31

Identification
Source Fragment at source

IP

IP

Networ k

Networ k

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

V d: Packet c truyn qua mng vi Max. Trasfer Unit (MTU) MTU = 576 byte, header = 20 byte, data = 1484 byte o Max. data length/frament: 576 20 = 556 byte g ( g y ) o Chn max. data length = 552 (s nguyn ln ca 8)

Total Length Original packet Fragment 1 Fragment 2 F t Fragment 3 1504 572 572 400

ID x x x x

MF 0 1 1 0

Fragment offset 0 0 69 138

Hanoi University of Technology

Faculty of Electronics and Telecommunications

22

2010

Chng 4. Kt ni mng Internet Address Resolution Protocol (ARP)

Chng 4

o a ch IP s dng phn bit host, nhung c truyn trn ng truyn vt l s dng a ch MAC (v d trong Ethernet) o ARP: nh x a ch IP
D: 150.100.76.22 MAC = ?

vt l

H1
150.100.76.20

H2
150.100.76.21

H3
150.100.76.22

H4
150.100.76.23

D: 150.100.76.20 MAC = 08 00 A 3B 94 08:00:5A:3B:94

H1
150.100.76.20

H2
150.100.76.21

H3
150.100.76.22

H4
150.100.76.23

o Reverse ARP (RARP): Nhn a ch IP t server (bootsttraped)


Hanoi University of Technology Faculty of Electronics and Telecommunications

2010

Interface: 0.0.0.0 --- 0x2 Internet Address Physical Address 206.38.190.192 00-01-4a-c2-40-ab Interface: 192.168.1.3 --- 0x3 Internet Address Physical Address 192.168.1.1 00-01-4a-c2-40-ab

Chng 4. Kt ni mng Internet

Chng 4 Type static

Type static

Hanoi University of Technology

Faculty of Electronics and Telecommunications

23

2010

Chng 4. Kt ni mng Internet Internet Control Message Protocol (ICMP) o c ng gi trong IP packet (protocol type = 1) o X l cc thng bo iu khin v li

Chng 4

o N router khng gi c packet, gi ICMP host unreachable Nu t kh i k t i h t h bl n sender o Nu router nhn c packet l ra cn phi gi ti mt router khc, n gi ICMP redirect ti sender thay i bng nh tuyn o ICMP router discovery cho php 1 host tm hiu v cc router trong mng, khi ng v cp nht bng nh tuyn o ICMP echo request (type = 0) v reply (type = 0): s dng trong ping

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

Hanoi University of Technology

Faculty of Electronics and Telecommunications

24

2010

Chng 4. Kt ni mng Internet Mt s giao thc ca tng IP o Routing information protocol (RIP) o Open shortest Path First (OSPF)

Chng 4

oB d G t Border Gateway Protocol (BGP) E t i G t P t l (BGP), Exterior Gateway Protocol (EGP) P t l o Dynamic Host Configuration Protocol (DHCP), Network Address Translation (NAT), Mobile IP Transport Control Protocol (TCP) v User Data Protocol (UDP) o TCP Reliable Stream Service o TCP Protocol o TCP Connection Management o TCP Error/Flow/Congestion Control o UDP

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

TCP/UDP
Thit lp 1 kt ni logic gia cc im cui trn mng p g g g To ra kt ni end-to-end gia cc ng dng:
- Phn on d liu (Segmentation) - Thit lp kt ni end-to-end - iu khin lu lng bng c ch ca s trt - Truyn dn tin cy

Hanoi University of Technology

Faculty of Electronics and Telecommunications

25

2010

Chng 4. Kt ni mng Internet

Chng 4

Thit lp kt ni

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

iu khin lu lng

Hanoi University of Technology

Faculty of Electronics and Telecommunications

26

2010

Chng 4. Kt ni mng Internet

Chng 4

TCP

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

TCP header
Source & Destination port Number of the calling, called port Sequence number N b used to ensure correct sequencing of the arriving data S b Number d i f h i i d Acknowledgment number Next expected TCP octet HLEN Number of 32-bit words in the header Reserved Set to zero Code bits Control functions, such as setup and termination of a session Window Number of octets that the sender is willing to accept Checksum Calculated checksum of the header and data fields Urgent pointer Indicates the end of the urgent data Option One option currently defined, maximum TCP segment size Data Upper-layer protocol data

Hanoi University of Technology

Faculty of Electronics and Telecommunications

27

2010

Chng 4. Kt ni mng Internet

Chng 4

C ch bt tay 3 chiu

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

Ca s trt

Hanoi University of Technology

Faculty of Electronics and Telecommunications

28

2010

Chng 4. Kt ni mng Internet

Chng 4

Qun l kt ni TCP

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

UDP

UDP l giao thc n gin, n khng c c ch m bo tin cy khi truyn dn UDP c s dng cho cc ng dng khng yu cu cao v tin cy v tnh tun t t t ca d li nhn liu h c

Hanoi University of Technology

Faculty of Electronics and Telecommunications

29

2010

Chng 4. Kt ni mng Internet

Chng 4

UDP header
Source port Number of the calling port Destination port N mber of the called port Number Length Number of bytes including header and data Checksum Calculated checksum of the header and data fields Data Upper-layer protocol data The protocols that use UDP include: - TFTP (Trivial File Transfer Protocol) - SNMP (Simple Network Management Protocol) - DHCP (Dynamic Host Control Protocol) - DNS (Domain Name System)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

CngTCP v UDP

TCP v UDP s dng khi nim s hiu cng (port number) chuyn d liu ln lp ng dng S hiu cng s dng theo di (keep track) cc phin kt ni khc nhau trn mng ti cng mt thi im

Hanoi University of Technology

Faculty of Electronics and Telecommunications

30

2010

Chng 4. Kt ni mng Internet

Chng 4

CngTCP v UDP
Cc s hiu cng c quy nh bi Internet Assigned Numbers Authority g q y g y (IANA)
http://www.iana.org/assignments/port-numbers

< 1024 dng cho cc ng dng ph bin (mail, web) > 1024 c dng cho gn ng bi cc client

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

CngTCP v UDP

Hanoi University of Technology

Faculty of Electronics and Telecommunications

31

2010

Phin http th 2 thc hin gia cng mt cp Chng 4. Kt ni mng Internet server. C cng thng tinChng 4 ch client v v cng nhng cng ngun khc nhau phn bit

http to www.cisco.com

Dest. Port = 80 Send packets to web server application

http to www.cisco.com

Dest. Port = 80 Send packets to web server application

1030

80

1031

80

Trong v d ny, hai ca s trnh duyt cng s dng mt URL. TCP/IP s dng cng ngun phn bit thng tin cn quay li ca s trnh duyt chnh xc

Hanoi University of Technology

Faculty of Electronics and Telecommunications

2010

Chng 4. Kt ni mng Internet

Chng 4

CngTCP v UDP

Phn bit gia cc kt ni nh th no? Kt ni c nh ngha bi mt cp thng tin:

a ch IP ngun, cng ngun (socket ngun) a ch IP ch, cng ch (socket ch)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

32

2010

TCP or Source Destination IP Connection State Chng 4 Chng 4. Kt ni mng Internet IP UDP Destination Port Source Port

www.google.com www.cisco.com www cisco com netstat command


Thc t vi 1 website c nhiu phin TCP c to ra

Hanoi University of Technology

Faculty of Electronics and Telecommunications

33

1/2008

Mi trng vt l

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

L thuyt c bn ca truyn d liu


Phn tch Fourier Tn hiu trong mi trng bng thng hn ch Tc truyn ti a ca knh

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Tn hiu khi bng thng hn ch

Tn hiu s v bin trung bnh bnh phng ph Fourier


Hanoi University of Technology Faculty of Electronics and Telecommunications

1/2008

Tn hiu khi bng thng hn ch

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Tn hiu khi bng thng hn ch

Quan h gia tc truyn v cc hi bc cao

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Mi trng truyn d liu


in t trng Cp i dy xon Cp ng trc Cp quang

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Cp i dy xon

(a) Category 3 UTP. (b) Category 5 UTP.


Hanoi University of Technology Faculty of Electronics and Telecommunications

1/2008

Cp ng trc

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Cp Quang

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Truyn dn nh sng trong si quang

Suy hao anh sng qua si quang


Hanoi University of Technology Faculty of Electronics and Telecommunications

1/2008

Cp quang

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Cp quang

So snh gia ngun sng it bn dn v LED

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Mng quang

Vng kt ni quang vi trm lp ch ng

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Truyn dn khng dy Ph in t trng Radio Transmission Microwave Transmission Sng hng ngoi v sng millimeter Lightwave Transmission

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Ph in t trng

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Radio Transmission

(a) (b)

Vi sng VLF, LF, v MF, sng radio i theo b mt t Vi di sng HF, chng phn x tng in ly

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Lightwave Transmission

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

The Local Loop: Modems, ADSL v Wireless

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Modems

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Modems

(a) QPSK. (b) QAM-16. (c) QAM-64.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

10

1/2008

Modems

(a) (a) V.32 for 9600 bps. (b) V32 bis for 14,400 bps.
Hanoi University of Technology

(b)

Faculty of Electronics and Telecommunications

1/2008

Digital Subscriber Lines

Quan h ca bng thng v khong cch trn cp Category 3 UTP

Hanoi University of Technology

Faculty of Electronics and Telecommunications

11

1/2008

Digital Subscriber Lines

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Wireless Local Loops

Hanoi University of Technology

Faculty of Electronics and Telecommunications

12

1/2008

Frequency Division Multiplexing

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Wavelength Division Multiplexing

Hanoi University of Technology

Faculty of Electronics and Telecommunications

13

1/2008

Time Division Multiplexing

T1 (1.544 Mbps).
Hanoi University of Technology Faculty of Electronics and Telecommunications

1/2008

Cable Television (TV cp)


Internet trn h thng TV cp Phn b tn s Cable Modems ADSL so vi Cable

Hanoi University of Technology

Faculty of Electronics and Telecommunications

14

1/2008

H thngTV cp s khai

Hanoi University of Technology

Faculty of Electronics and Telecommunications

1/2008

Internet trn h thng TV cp

Hanoi University of Technology

Faculty of Electronics and Telecommunications

15

1/2008

Internet trn h thng TV cp

Fixed telephone system.


Hanoi University of Technology Faculty of Electronics and Telecommunications

1/2008

Phn b ph

Hanoi University of Technology

Faculty of Electronics and Telecommunications

16

1/2008

Cable Modems

Hanoi University of Technology

Faculty of Electronics and Telecommunications

17

Lp t Installation

Suy hao Attenuation

Chng nhiu Noise immunity

Bng thng Bandwidth Bo mt Security

Gi thnh Cost

Phng tin truyn dn - Transmission Media -

Phng tin hu tuyn - Guided Media -

Phng tin v tuyn

- Unguided Media Radio Microwave Terrestrial Satellite Infrared Laser

Mng cng cng - Public Networks -

Copper Cable Coaxial Thinnet Thicknet Twisted Pair UTP STP Fiber Optic Cable Single Mode Multi Mode

Telephone Network ISDN X.25 ATM Frame Relay MPLS CATV Power Lines

Khoa in t - vin thng trng i hc bch khoa h ni

Cu to v phn loi cp ng trc (Coaxial cable)

Or Thick Ethernet (Yellow Ethernet) IEEE 10Base5 RG-8/U, RG-11/U Impedance 50

Or

Thin Ethernet (Black Ethernet) IEEE 10Base2 RG-58 A/U Impedance 50

Khoa in t - vin thng trng i hc bch khoa h ni

Cp ng trc dy (Thicknet) kt ni theo topo dng BUS dng b thu/pht ngoi (External Transceiver)

Khoa in t - vin thng trng i hc bch khoa h ni

Chun IEEE cho Thick ethernet (10Base5)


10BASE5 PARAMETERS AND WIRING RULES Bus topology. 10 Mbps Baseband (full-duplex not supported). Using Manchester encoding. Maximum length per segment is 500 meters. Maximum of 101 segments in a standard Ethernet (one backbone and 100 branch segments). Maximum of 1024 stations may be attached to a 10Base5 network.. Up to 100 transceivers can be attached to a single 500 meter segment. Minimum distance between transceivers is 2.5 meters. Maximum length of standard AUI transceiver drop cable is 50 meters. Maximum length of office transceiver cable is 12.5 meters. Both ends of the cable segment must be terminated with a 50 ohm terminator. Repeaters may be used to extend the signal thereby increasing overall cable segment length. Maximum of 2 repeaters may be used between devices. In fact, we can use 4 repeaters by "the 5-4-3 rule". So that maximum length of cable is 2.5 km.

1. Transceiver 2. Transceiver Cables 3. 2 Port AUI Fanout 4. Thicknet AUI Network Card 5. Thinnet Repeater

6. PVC Thinnet Cable 7. BNC T-Connector 8. Thinnet BNC Network Card 9. 50 Ohm Terminator 10. Thick Ethernet Trunk Cable

Khoa in t - vin thng trng i hc bch khoa h ni

Cp ng trc mng (Thinnet) kt ni theo topo dng BUS dng T-Connector v NIC c sn b thu pht (Built-in Transceiver)

Khoa in t - vin thng trng i hc bch khoa h ni

Chun IEEE cho Thinnet ethernet (10Base2)


10 BASE 2 PARAMETERS AND WIRING RULES Bus topology. 10 Mbps Baseband (full-duplex not supported). Using Manchester encoding. Maximum length per segment is 185 meters. Maximum of 30 stations per segment are allowed. Maximum of 1024 stations may be attached to a 10Base2 network. NIC's come with built-in transceivers so connections are made directly to NIC via T-connector. T-connectors must be plugged directly into NIC. There can not be any cable between T-connector and NIC. Minimum of 0.5 meter is allowed between Tconnectors. Both ends of the cable segment must be terminated with a 50 ohm terminator. One end of the cable must be grounded, the other end must remain ungrounded. Terminator must be attached to open jack of Tconnector at both ends of the segment. Do not attach terminator directly to cable without T-connector. Repeaters may be used to extend the signal. Maximum of 2 repeaters may be used between devices. In fact, we can use 4 repeaters by "the 5-4-3 rule". So that maximum length of cable is 925 meters.

1. 8 Port Repeater 2. Transceiver 3. 50 Ohm Terminator 4. PVC Thinnet Cable 5. Thinnet Tap Wallplate 6. Thinnet Drop Cable 7. Self-terminating Drop Cable 8. Network Card 9. No Drop Wallplate 10. No Drop Cable 11. Thinnet Tap 4 Port Expansion Box 12. BNC T-Connector 13. Thick Ethernet Trunk Coax Cable

Khoa in t - vin thng trng i hc bch khoa h ni

S i dy lut 5-4-3 dng 4 repeater

Khoa in t - vin thng trng i hc bch khoa h ni

Cu to v phn loi cp xon kp (Twisted-pair cable)

Khoa in t - vin thng trng i hc bch khoa h ni

phn hng Cp UTP (ScTP) theo chun EIA/TIA 568A


(EIA/TIA Electronic Industry Association/Telecommunication Industry Association) Category 1 2 3 MAx Data rate 1 Mbps 4 Mbps 10 Mbps Application one twisted-pairs for traditional telephone voice communication (but not data). 4 twisted-pairs for voice & data transmission (ISDN), 4 Mbps Token Ring, ARCNET. 4 twisted-pairs (3 twists per foot) for voice & data transmission, Ethernet 10Base-T. (can use for Ethernet 100Base-T4 & 100Base-T2) 4 5 20 Mbps 155 Mbps for 20 Mbps data transmission , Ethernet 10Base-T, 16 Mbps Token Ring. 4 twisted pairs (a higher number of twists per foot than previous categories and a teflon based outer coating). Higher transmission rate (100Mhz) and better noise immunity. Used for Ethernet 10Base -T, Fast Ethernet 100Base-TX, -T4 or -T2, Fast ARCNET 100Mbps, 16Mbps Token Ring, and ATM 155Mbps on UTP. 5e 1000 Mbps enhanced category 5 - more comprehensive testing is carried out on all four pairs to measure the effect of transmitting data, particularly with regard to crosstalk. This category is primarily intended for use in Gigabit Ethernet networks. 6 7 1000 Mbps 1000 Mbps a proposed standard for cable having a transmission frequency of 200 MHz. a proposed standard for cable having a transmission frequency of 600 MHz using fully shielded cables (individual foil pairs and overall braid shield - ISTP).

Khoa in t - vin thng trng i hc bch khoa h ni

10

Chun IEEE 802.3 cho cp xon kp kt ni ethernet topo dng star


Standard 10Base-T 100Base-TX 100Base-T4 100Base-T2 1000Base-T 1000Base-X IEEE Released 802.3i -1990 802.3u - 1995 802.3u -1995 802.3y - 1997 802.3ab -1999 802.3z -1999 Symbol rate 10Mbd 125Mbd 33Mbd 25Mbd 125Mbd 1250Mbd Encoding Manchester 4B/5B 8B/6T PAM5x5 PAM5x5 8B/10B Medium Two pairs of 100 UTP CAT3 or better Two pairs of 100 UTP CAT5 or 150 STP Four pairs of 100 UTP CAT3 or better Two pairs of 100 UTP CAT3 or better Four pairs of 100 UTP CAT5 or better Two pairs of 150 STP Full-duplex Supported Supported Not Supported Supported Supported

RJ-45 connector pin assignments for each of the Ethernet twisted pairs.
Pin 10Base-T Signal 1 2 3 4 5 6 7 8 TD+ (Transmit Data) TD- (Transmit Data) RD+ (Receive Data) Not used Not used RD- (Receive Data) Not Used Not Used 100Base-TX Signal TD+ (Transmit Data) TD- (Transmit Data) RD+ (Receive Data) Not used Not used RD- (Receive Data) Not Used Not Used 100Base-T4 Signal TX_D1+ (Transmit Data) TX_D1- (Transmit Data) RX_D2+ (Receive Data) BI_D3+ (Bidi Data) BI_D3- (Bidi Data) RX_D2- (Receive Data) BI_D4+ (Bidi Data) BI_D4- (Bidi Data) 100Base-T2 Signal BI_DA+ (Bidi Data) BI_DA- (Bidi Data) BI_DB+ (Bidi Data) Not used Not used BI_DB- (Bidi Data) Not used Not used 1000Base-T Signal BI_DA+ (Bidi Data) BI_DA- (Bidi Data) BI_DB+ (Bidi Data) BI_DC+ (Bidi Data) BI_DC- (Bidi Data) BI_DB- (Bidi Data) BI_DD+ (Bidi Data) BI_DD- (Bidi Data)

Khoa in t - vin thng trng i hc bch khoa h ni

11

Chun IEEE ethernet 10Base-T


10 BASE-T PARAMETERS AND WIRING RULES Star topology using HUB. 10Mbps Baseband. Using Manchester encoding. Maximum length per segment is 100 meters. (10 meters Patch cord + 90 meters horizontal cable) Maximum of 2 devices per segment; one is the station and the other is the hub. Maximum of 2 Inter-Repeater Links between devices without using bridge or switch (A hub is a repeater ). Certain hubs come with a standard BNC and/or AUI connection. Hubs can connect to fiber optic or coax networks. Unsheilded twisted pair no less than Category 2 is required for 10BaseT operation, however, Category 3 or higher is preferred. UTP cabling is not recommended for areas with electromagnetic or radio frequency interference (EMI/RFI). NIC's come with built-in transceivers so connections are made directly to the NIC. NIC's with standard AUI ports must use a 10Base-T twisted pair transceiver.

1. Transceiver 3. Cat 5 Wallplate (Outlet) 5. 10 Base-T Hub 7. Cat 5 Color Coded Patch Cables 8. 10 Base-T RJ45 Network Card 9. 50 Ohm Terminator 10. Thick Ethernet Trunk Cable 11. Equipment Rack

2. Transceiver Cable 4. Cat 5 UTP Cable 6. Cat 5 Patch Panel

Khoa in t - vin thng trng i hc bch khoa h ni

12

ethernet 100Base-T

1. 10/100 Mbps Ethernet Switch 2. Cross Pinned Cat5 UTP Cable 3. Straight Pinned Cat5 UTP Cable 4. Cat5 Wallplate Assembly 5. Cat5 Color Coded Patch Cables 6. 10 Base-T Network Card 7. 10 Base-T Ethernet Hub 8. 100 Base-T Network Card 9. 100 Base-T Fast Ethernet Hub

Khoa in t - vin thng trng i hc bch khoa h ni

13

Chun mu dy cp UTP v Jack u ni RJ-45

Khoa in t - vin thng trng i hc bch khoa h ni

14

u ni cp thng v cp cho

Khoa in t - vin thng trng i hc bch khoa h ni

15

cp STP thng dng cho mng Token Ring

Khoa in t - vin thng trng i hc bch khoa h ni

16

Cu to v phn loi cp quang (Optical fiber)

Khoa in t - vin thng trng i hc bch khoa h ni

17

Khoa in t - vin thng trng i hc bch khoa h ni

18

Multi-Mode Fiber (MMF)


Multi-mode fiber typically has a core diameter of 50 or 62.5 micron. Allows good coupling from inexpensive LEDs light sources, and the use of inexpensive couplers and connectors. Support segment lengths 2000 meters for 10 and 100 Mbps Ethernet, and 550 meters for 1 Gbps Ethernet. Two types of multi-mode fiber : 1. Graded Index Fiber 2. Stepped Index Fiber ---------> reducing modal dispersion of the signal. ---------> lower bandwidths than graded index fibers.

Single-Mode Fiber (SMF)


Core diameter that is so small (8 or 10 microns) that eliminates modal dispersion. More difficult to make coupling light into the fiber. Lasers must be used as light sources to attain high bandwidth. Supporting much longer segment lengths than multi-mode fiber. (5000 meters supported at all Ethernet). More expensive to deploy than multi-mode fiber.

Khoa in t - vin thng trng i hc bch khoa h ni

19

Chun IEEE cho cp quang kt ni ethernet


Standard 10Base-FL (Fiber Link) 10Base-FB (Fiber Backbone) 10Base-FP (Fiber Passive) 100Base-FL (Fiber Link) 100Base-FX 1000Base-LX (Long wavelength) 1000Base-SX (Short wavelength) Medium and wavelength connector and encoding Maximum segment length Application Fiber Optic Inter-Repeater Link ideal for connecting between buildings. increases the number of repeaters by reducing the amount of interframe gap shrinkage. using for "fiber optic passive star" system for connecting between buildings. essentially a "fiber" version of the 100Base-TX standard able to drive longer distances.

MMF 62.5/125 , 850 nm wavelength 2000 m ST connector, Manchester MMF 62.5/125 , 850 nm wavelength 2000 m ST connector, Manchester MMF 62.5/125 , 850 nm 500 m ST connector, Manchester MMF 62.5/125 , 850 nm wavelength 2000 m ST connector, Manchester MMF 62.5/125 , 1300 nm wavelength Half 420m EC connector, 4B/5B. Full 2000 m Half 316 m MMF 62.5/125 or 50/125 or Full MMF: 550 SMF 10/125. 1300 nm wavelength. Full SMF: 5000 duplex SC connector, 8B/10B. MMF 62.5/125 MMF 62.5/125 or 50/125 Half 275 m 850 nm wavelength. Full 275 m duplex SC connector, 8B/10B. MMF 50/125 Half 316 m Full 550 m

Short wavelength lasers have the advantage of being less expensive than long wavelength lasers.

Khoa in t - vin thng trng i hc bch khoa h ni

20

Chun IEEE ethernet 10BASE-FL


10 BASE-FL PARAMETERS AND WIRING RULES Maximum length per segment is 2 km. Maximum of 2 devices per segment; one is the station and the other is the hub. Star topology. 62.5-micron duplex multimode fiber cable is recommended. 50 and 100 micron is also available. Maximum of 2 repeaters may be used between devices. Repeaters come in pairs. A pair counts as 1 repeater. NIC's with standard AUI ports must use a fiber optic transceiver. EMI/RFI is nonexistent. Best security. 1. Fiber Optic Cable 2. Transceiver 3. Transceiver Cable 4. 10 Base T Hub 5. Thinnet Repeater 6. PVC Thinnet Cable 7. Cat 5 Color Coded Patch Cables 8. Thin Ethernet BNC Network Card 9. 10 Base-T RJ45 Network Card 10. BNC T-Connector 11. 50 Ohm Terminator

Khoa in t - vin thng trng i hc bch khoa h ni

21

Phng tin truyn dn v tuyn


Type Terrestrial microwave Characteristic Point to Point GHz link, High bandwidth. Disturbed by bad weather Satellite microwave Point to Multipoint expensive, covers large area GHz link, 250 ms delay. Radio Multipoint or Point to Point VHF & UHF radio channel Mobile units are available Infrared Point to Point short-range link High bandwidth possible Laser Point to Point Disturbed by bad weather No Short-links (Private link between buildings) FCC - Federal Communications Commission No Yes for Private WANs for Wireless LANs Long-distance data communication Wireless LANs PC to PC connection Yes One to many transmision CATV FCC license ? Yes Application Private remote links LAN repeater connections

Khoa in t - vin thng trng i hc bch khoa h ni

22

cc m hnh trin khai mng WLAN

Khoa in t - vin thng trng i hc bch khoa h ni

23

Wireless ethernet (IEEE 802.11)


IEEE 802.11 was the first of the wireless LAN technologies and provided a data throughput of 1 - 2 Mbps and used a frequency range of about 900 Mhtz. 802.11 WLAN standard allows for transmission over infrared light and two types of radio transmission within the unlicensed frequency band: frequency hopping spread spectrum (FHSS) and direct sequence spread spectrum (DSSS). FHSS is limited to a 2-Mbps data transfer For all other WLAN applications, DSSS is the better choice. IEEE 802.11b (referred to as 802.11 High Rate or Wi-Fi), provides for a data rate of 11 Mbps over DSSS with a frequency range of 2.4 Ghtz. IEEE 802.11a, which provides throughput of 54 Mbps and also uses DSSS on a frequency of 5 Ghtz. the frequency will reach 5.7 Ghtz and allow WLAN's to break the 100 Mbps threshold. IEEE 802.11g transmission over relatively short distances Operates at up to 54 megabits per second (Mbps) Basic Access Methode is CSMA/CA. Using the Wired Equivalent Privacy 64/128 bits (WEP) or the Wi-Fi Protected Access (WPA) to secure.

1. Wireless Ethernet Bridge 3. PVC Thinnet Cable 5. BNC T Connector 7. Cat5 UTP Cable 9. 10 Base-T Ethernet Hub

2. Outdoor Antenna 4. Thin Ethernet Network Card 6. 50 Ohm Terminator 8. Cat5 Patch Cables 10. 10 Base-T Network Card

Khoa in t - vin thng trng i hc bch khoa h ni

24

Nguyn l kt ni mng my tnh qua mng cng cng

PSTN PLMN N-ISDN B-ISDN

- Public Switching Telephone Network - Public Land Mobile Network - Narrowband Integrated Services Digital Network - Broadband Integrated Services Digital Network

ATM - Asynchronous Transfer Mode MPLS - Multiple Protocols Label Switching CATV - CAble TeleVision PLC - Power-Line Communication

Khoa in t - vin thng trng i hc bch khoa h ni

25

c tnh kt ni qua mng cng cng


Kt ni qua ng dy thu bao (Subscriber Line). C th truyn ng thi vi dch v ca mng cng cng. Phi tr cc ph cho ng thu bao. Dng thit b thch ng truyn i d liu thch hp vi mng cng cng. Ph thuc vo c tnh ca ng thu bao mng cng cng (l cc phng tin nh cp ng, cp quang, hoc v tuyn). Ph thuc vo tnh cht truyn dn ca mng cng cng. Thng dng kt ni mng WAN, hoc truy nhp t xa (Remote Access). Truyn tn hiu bng rng (Broadband). Lp t d dng pha khch hng.

Khoa in t - vin thng trng i hc bch khoa h ni

26

kt ni t xa qua ng thu bao tng t Mng PSTN

Khoa in t - vin thng trng i hc bch khoa h ni

27

Cc c tnh kt ni qua ng thu bao tng t (ASL)

Dng 1 i dy ng xon khng bc (UTP). Chng nhiu km. Khng c tnh di ng. Di thng s dng l 300 Hz - 3400 Hz (POTS - Plain Old Telephone Service) Dng Modem tng t. Tc truyn d liu thp (upstream < 33.6Kbps). Phi quay s thit lp kt ni (Dial-up connection). Tr cc ph theo thi gian kt ni (Tariff). Lp t d dng, nhanh chng, chi ph lp t thp. Tnh bo mt thp. an ton in km (st nh ).

Khoa in t - vin thng trng i hc bch khoa h ni

28

ng thu bao dnh ring (leased-Line)

North America and Japan Level Number of PCM Data Rate

Level

CCItt/itu and Europe Number of PCM Data Rate

DS-0 DS-1 (T1) DS-1 C DS-2 (T2) DS-3 (T3) DS-4 (T4)

1 24 48 96 672 4032

56 Kbps 1.544 Mbps 3.152 Mbps 6.312 Mbps 44.736 Mbps 274.176 Mbps

0 1 (E1) 2 3 (E3) 4 5

1 30 120 480 1920 7680

64 Kbps 2.048 Mbps 8.448 Mbps 34.368 Mbps 139.264 Mbps 565.148 Mbps

Khoa in t - vin thng trng i hc bch khoa h ni

29

Lin Kt gia DTE v DCE

Khoa in t - vin thng trng i hc bch khoa h ni

30

Cc c tnh kt ni qua ng LEASED-LINE

Dng cp UTP 2 i dy xon. C th chia s bng thng vi dch v ca mng cng cng (Drop & Insert). Dng thit b thch ng l CSU/DSU. Tc truyn d liu nhiu cp , i xng v n nh. Kt ni sn sng 24/24 (dedicated line), khng phi quay s thit lp kt ni. Tr cc ph chn gi theo thng thng kh cao. Tnh bo mt tt. D qun l v c cc dch v h tr.

Khoa in t - vin thng trng i hc bch khoa h ni

31

cng ngh xDSL (Digital Subscriber Line)

Cng ngh DSL da trn k thut iu ch s truyn trn ng thu bao cp xon kp (Local Loop), cho php truyn d liu tc cao. xDSL l 1 nhm cng ngh gm ADSL, SDSL, HDSL, HDSL-2, IDSL, VDSL (cn c Rate Adaptive DSL, G.SHDSL, Consumer DSL hay G.lite). xDSL l cng ngh cho mng truy nhp tc cao v phn tn rng m ch cn nhng thay i nh trong c s h tng truyn thng. Tin li trin khai cc dch v nh High-speed Internet access, Multimedia services v Video on Demand...) Kt ni xDSL l dng point-to-point connection v always-on gia 3 i tc l Network Service provider's (NSP), Central office (CO) v Customer.

Khoa in t - vin thng trng i hc bch khoa h ni

32

H cng ngh xDSL


DSL Technology ADSL (Asymmetric DSL) ITU-T G.992.1, G.DMT full-rate ADSL Lite or Splitterless ADSL ITU-T G.992.2, G.lie RDSL (Rate Adaptive DSL) Data rate 16Kbps - 640Kbps Up 1.544 Mbps 8.192 Mbps Down 128Kbps - 384Kbps Up 1.544Mbps 6 Mbps Down 272Kbps 1.088 Mbps Up 640 Kbps 2.2 Mbps Down SDSL (Single-line DSL) ITU-T G.992.2, G.shdsl HDSL (High-bit-rate DSL) ITU-T G.991.1, G.hdsl HDSL-2 (High-data-rate DSL 2) IDSL (ISDN DSL) VDSL (Very high data rate DSL) ITU-T G.993 series, G.vdsl 1.544Mbps Symmetric 2.048Mbps Symmetric 1.544Mbps Symmetric (2 pairs) 2.048Mbps Symmetric (3 pairs) 1.544Mbps Symmetric 144 Kbps Symmetric 1.5Mbps - 2.3 Mbps Up 12,96Mbps 51,84Mbps Down < 3.6km < 5.5 km 300 m - 1.5 km 3.6km 4,5km < 3.6 km < 5,5 km < 5,5 km Distance < 5,5 km
pair& coding Voice ?

1 pair CAP/DMT 1 pair CAP/DMT 1 pair CAP/DMT 1 pair 2B1Q 2 or 3 pairs 2B1Q 1 pair 2B1Q 1 pair 2B1Q 1 pair CAP/DMT

Yes

Yes

Yes

No

No

No No Yes

Ch : Cc chun mi nm 2002-2003 : ADSL2 (ITU G.992.3 v G.992.4) v


Khoa in t - vin thng trng i hc bch khoa h ni

ADSL2+ (ITU G.992.5)

33

M hnh cung cp dch v ADSL

POTS - Plain Old Telephone Service MDF - Main Distribution Frame. LPF, HPF - Low Pass, High Pass Filter.

ATU-R - ADSL Transmission Unit Remote ATU-C - ADSL Transmission Unit CO. DSLAM - DSL Access Multiplexer.

Khoa in t - vin thng trng i hc bch khoa h ni

34

Cc k thut lin quan n ADSL

DMT QAM CAP


Khoa in t - vin thng trng i hc bch khoa h ni

- Discrete Multi-Tone. - Quadrature Amplitude Modulation. - Carrierless Amplitude & Phase.

35

k thut iu ch CAP v DMT trong ADSL

Khoa in t - vin thng trng i hc bch khoa h ni

36

M hnh VDSL v ng dng

Khoa in t - vin thng trng i hc bch khoa h ni

37

Xu hng cng ngh truy nhp s

FTTx, FFTH (Fiber To The Curb, Fiber To The Buiding & Fiber To The Home).
Khoa in t - vin thng trng i hc bch khoa h ni

38

Kt ni qua mng CATV vi cng ngh Cable Modem

Khoa in t - vin thng trng i hc bch khoa h ni

39

Mng s tch hp a dch v (bng hp) N-ISDN

Khoa in t - vin thng trng i hc bch khoa h ni

40

Kt ni qua Mng chuyn mch ATM (B-ISDN)

Khoa in t - vin thng trng i hc bch khoa h ni

41

Mng chuyn mch gi X.25

Khoa in t - vin thng trng i hc bch khoa h ni

42

Mng chuyn tip khung Frame Relay

Khoa in t - vin thng trng i hc bch khoa h ni

43

Mng chuyn mch nhn a giao thc (MPLS)

Khoa in t - vin thng trng i hc bch khoa h ni

44

Kt ni mng qua ng truyn ti in (PLC)

Khoa in t - vin thng trng i hc bch khoa h ni

The Internet A Brief History


Presenter: kiemnk@mail.hut.edu.vn

ARPANET The Response to Sputnik


[1958] The Defense Advanced Research Projects Agency (DARPA)
was established as the first U.S. response to the Soviet Union launching of Sputnik.

www.wbglinks.net/ pages/history/
kiemnk@mail.hut.edu.vn 2

Genuity Timeline (partial) www.genuity.com

kiemnk@mail.hut.edu.vn

Circuit Switched vs. Packet Switched


From Whatis.com Circuit Switched: Circuit-switched is a type of network in which a physical path is obtained for and dedicated to a single connection between two end-points in the network for the duration of the connection.

Packet Switched: Packet-switched describes the type of network in which relatively small units of data called packets are routed through a network based on the destination address contained within each packet.

kiemnk@mail.hut.edu.vn

Circuit Switched Network

A connection is established before data is sent and received (phone system). As long as neither party hangs up, the entire circuit is available, whether or not anyone is speaking. No one else can use this circuit.
kiemnk@mail.hut.edu.vn 5

Circuit Switching

kiemnk@mail.hut.edu.vn

Packet Switched
Packet-switched describes the type of network in which relatively small units of data called packets are routed through a network based on the destination address contained within each packet.

Circuit Switched

Packet Switched

kiemnk@mail.hut.edu.vn

Packet Switched

This is a shared path, like a freeway.

kiemnk@mail.hut.edu.vn

IP (Internet Protocol) Packets


Packet = A block of data sent over a network, such as the Internet. 1 2 3 4 5 6 7 8 A file
kiemnk@mail.hut.edu.vn

Packets
9

IP Packets may arrive out of order


4 8 6 2 1 3 7 5

kiemnk@mail.hut.edu.vn

10

IP Packets can be put back in order at the other end!


1 2 3 4 5 6 7 8

kiemnk@mail.hut.edu.vn

11

IP Packets

Have you ever downloaded a web page and noticed that different parts of the text and graphics arrive at different times?

kiemnk@mail.hut.edu.vn

12

Genuity Timeline (partial) www.genuity.com

kiemnk@mail.hut.edu.vn

13

Routers Traffic Cops of the Internet

A router is a device that looks at the Destination IP address of each packet.

kiemnk@mail.hut.edu.vn

14

TCP/IP Transmission Control Protocol / Internet Protocol


Source IP Address: 172.16.10.5 Destination IP Address 192.168.1.10

TCP/IP is a suite of protocols. IP (Internet Protocol) is used for sender and receiver addressing. Every computer on the Internet or a network must have an IP address
to communicate.

This is known as an IP Packet

Part of the IP address is the network address. Example: The destination address is 192.168.1.0 which includes all
computers from 192.168.1.1 to 192.168.1.254.
kiemnk@mail.hut.edu.vn 15

Routers Traffic Cops of the Internet

Routers look at the Destination IP Address of the packet and decide where to send it next. Which next-hop router IP Packet 172.16.22.29

Destination IP Address 172.16.22.29

kiemnk@mail.hut.edu.vn

16

IMP (Interface Message Processor) The First Router

kiemnk@mail.hut.edu.vn

17

Linksys Router

kiemnk@mail.hut.edu.vn

18

DSL Router
When using NAT (Network Address Translation, the Router helps hide your network. 192.168.1.10 Private Address 204.180.205.1 Public Address

Hacker can only get to public address and not private address
kiemnk@mail.hut.edu.vn 19

kiemnk@mail.hut.edu.vn

20

10

1972 - First Email Sent

kiemnk@mail.hut.edu.vn

21

kiemnk@mail.hut.edu.vn

22

11

kiemnk@mail.hut.edu.vn

23

1988 Chatting on the Internet


[1988] Internet Relay Chat (IRC) is started from the efforts of Jarkko
Oikarinen while attending the University of Oulu, Finland.

kiemnk@mail.hut.edu.vn

24

12

kiemnk@mail.hut.edu.vn

25

1993 - The Web!

Two physics researchers, Tim Berners-Lee and Robert Cailliau, working at the European Particle Physics Laboratory (known as CERN) in Geneva, Switzerland, needed a way to exchange a wide variety of information, from many different types of computer systems, using a single user interface. They created a new transmissions protocol called Hyper Text Transmission Protocol (HTTP) and a language to create interactive documents where information can be transmitted between computers regardless of type of computer, called Hypertext Markup Language (HTML). All of this became known as the World Wide Web (WWW), or just the web.
26

kiemnk@mail.hut.edu.vn

13

The first browser


The application software used to display and transmit the HTTP
information is known as browser software.

The first browser software for the WWW was Mosaic, developed by
Marc Andreessen, at the time a programmer at the National Center for Supercomputing Applications (NCSA) in Champagne/Urbana, Illinois.

kiemnk@mail.hut.edu.vn

27

Netscape Navigator
Soon after Mosaic (the first Web
browser software) was released, Marc Andreessen left the NCSA and joined Jim Clark, the founder and former chairman of Silicon Graphics, to form Netscape Communications. Netscape developed an improved browser called Netscape Navigator, which by mid-1996 would own 93% of the Web browser software market. Netscapes only competition at this point would be Microsofts Internet Explorer browser software. It was free for schools and individuals, but businesses had kiemnk@mail.hut.edu.vn to pay a fee.

28

14

Microsoft Internet Explorer


Soon after, Microsoft joined the mix, giving their browser away for free. Netscape had to follow with giving their browser away for free.

kiemnk@mail.hut.edu.vn

29

kiemnk@mail.hut.edu.vn

30

15

Two great resources


Where Wizards Stay Up Late: The Origins of the Internet by Katie
Hafner, Matthew Lyon

Nerds 2.0.1 A Brief History of the Internet

kiemnk@mail.hut.edu.vn

31

16

07/08

Tham kho iu khin truy nhp ng truyn

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Cc giao thc a truy nhp


Gii quyt cc vn lin quan n mi

trng dng chung Mt s loi:


Contention protocols: gii quyt vn xung t sau khi n xy ra. Collision-free protocols (v d: bit-map protocol v binary countdown) m bo xung t khng bao gi xy ra

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

K thut chia s knh


Static Channelization

Channel Sharing Techniques Scheduling Dynamic Medium Access Control Random Access

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Phn loi cc giao thc a truy nhp


Multiple access protocols Contention-based Random access Collision resolution Conflict-free

ALOHA, CSMA, BTMA, ISMA, etc

TREE, WINDOW, etc

FDMA, TDMA, CDMA, Token Bus, DQDB, etc


DQDB: Distributed Queue Dual Bus Faculty of Electronics and Telecommunications

BTMA: Busy Tone Multiple Access ISMA: Internet Streaming Media Alliance
Hanoi University of Technology

07/08

Contention Protocols
Pht trin nm 1970 bi Hawaii University. Xc nhn vic truyn thnh cng qua nhn c ACK ca pha nhn

Pure ALOHA

Slotted ALOHA
Ci tin: Thi gian c chia thnh nhiu khe v khung ch c truyn ti thi im bt u ca mi khe

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Contention Protocols
Ci tin: Bt u truyn khi khng thy node no ang truyn

CSMA (Carrier Sense Multiple Access)

CSMA/CD (CSMA with Collision Detection)


Ci tin: Dng vic truyn nu xung t xy ra

CSMA/CA (CSMA with Collision Avoidance)


Ci tin: i khong thi gian ngu nhin v th li khi ng truyn khng bn (carrier is quiet). Nu vn vy th truyn d liu

CSMA/CA with ACK CSMA/CA with RTS/CTS

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Pure ALOHA

Trong pure ALOHA, khung c truyn ti cc thi im tu

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Slotted ALOHA

Khi khung sn sng truyn, my phi i n thi im bt u ca mt slot


Hanoi University of Technology Faculty of Electronics and Telecommunications

07/08

ALOHA

So snh thng lng


Hanoi University of Technology Faculty of Electronics and Telecommunications

07/08

CSMA
Thng lng ti a ca slotted ALOHA l 0.368. CSMA c nhiu ci tin so vi ALOHA bng cch lng nghe ung truyn trc khi truyn

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

C ch xung t trong CSMA


Node 1 Packet Node 2 Packet Node 3 Packet

Node 5 sense Delay

2
Delay Node 4 sense

Time

Collision

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Cc loi CSMA
Unslotted Nonpersistent CSMA

Nonpersistent CSMA
Slotted Nonpersistent CSMA

CSMA
Unslotted persistent CSMA

Persistent CSMA
Slotted persistent CSMA 1-persistent CSMA p-persistent CSMA

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Nonpersistent/x-persistent CSMA
Giao thc Nonpersistent CSMA:
Bc 1: Nu ng truyn ri, truyn ngay lp tc Bc 2: Nu ng truyn bn, i mt khong thi gian ngu nhin v lp li bc 1 Gi tr backoff ngu nhin lm gim xc xut xung t Nu backoff qu lp s lng ph thi gian ri

Giao thc1-persistent CSMA: Bc 1: Nu ng truyn ri, truyn ngay lp tc Bc 2 : Nu ng truyn bn, tip tc lng nghe n khi ng truyn ri th mi truyn S xy ra hin tng xung t nu 2 node mun truyn li (thng s dng vic truyn sau vi ln th)

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Nonpersistent/x-persistent CSMA
Giao thc p-persistent CSMA :
Bc 1: Nu ng truyn ri, truyn vi xc sut p v ch truyn trong khe thi gian tip theo (thi gian tr ng truyn ln nht cho mt gi tin) vi xc xut (1-p) Bc 2: Nu ng truyn bn, tip tc lng nghe n khi ng truyn ri th quay li bc 1 - Mt cch tho hip gia nonpersistent and 1-persistent CSMA

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

La chn gi tr p nh th no ?
Gi s N node mun gi tin v ng truyn ang bn Np c xem l s Node th truyn khi ng truyn bt u ri Nu Np > 1, xung t c th xy ra V vy phi m bo Np < 1 trnh xung t, trong N l s node hot ng ln nht ti mt thi im

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Throughput
1.0 0.9 0.8 0.7 0.6

0.01-persistent CSMA Nonpersistent CSMA

0.1-persistent CSMA 0.5-persistent CSMA 1-persistent CSMA Slotted Aloha Aloha

0.5 0.4 0.3 0.2 0.1 0 0 1 2 3 4 5 6 7 8 9

G
Hanoi University of Technology Faculty of Electronics and Telecommunications

07/08

CSMA/CD (CSMA with Collision Detection)


Trong CSMA, nu 2 node bt u gi khung ti cng thi im, mi node s vn truyn ton b khung mc d c xung t xy ra. >Lng ph thi gian cho vic truyn c khung tin.

CSMA/CD Bc 1: Nu ng truyn ri, truyn khung tin Bc 2: Nu ng truyn bn, tip tc lng nghe n khi ng truyn ri th truyn Bc 3: Nu xung t c pht hin trong qu trnh truyn, ngng ngay vic truyn Bc 4: i mt khong thi gian ngu nhin v thc hin li thut ton trn
Hanoi University of Technology Faculty of Electronics and Telecommunications

07/08

CSMA/CD
T0

A begins transmission A B

T0+-

B begins transmission A B

T0+

B detects collision A B

T0+2 -

A detects collision just before end of transmission ( is the propagation time)

Time
Hanoi University of Technology Faculty of Electronics and Telecommunications

07/08

CSMA/CA (CSMA with collision Avoidance)


Tt c cc node lng nghe ng truyn ging nh trong CSMA/CD. Node sn sng truyn s pht sng cm ng. Nu ng truyn bn, i n khi kt thc qu trnh vic truyn hin ti N s tip tc i mt khong thi gian xc nh trc DIFS (Distributed inter frame Space). Nhn ly mt gi tr ngu nhin ca khe thi gian (gi tr khi u ca b m backoff) trong mt contention window ch trc khi truyn 1 khung. Nu hin ang c mt qu trnh truyn tin bi mt node khc trong chu k thi gian ny (backoff time), node s gi nguyn gi tr b m. Tip tc m li sau khi node khc kt thc vic truyn + DIFS. Node c th bt u vic truyn khi b m n 0

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

CSMA/CA
Node Bs frame
Delay: B Delay: C
Nodes B & C sense the medium Nodes B resenses the medium and transmits its frame. Node C freezes its counter. Nodes C resenses the medium and starts decrementing its counter. Nodes C starts transmitting. Node Cs frame

Node As frame

Time

Hanoi University of Technology

Faculty of Electronics and Telecommunications

10

07/08

CSMA/CA
DIFS Contention window

DIFS Contention window

Medium Busy
Defer access

Next Frame
Slot Backoff after defer

Time

DIFS Distributed Inter Frame Spacing

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

CSMA/CA with ACK


Pha nhn s gi ACK ngay sau khi nhn c khung tin m khng cn thm d ng truyn Khung ACK c truyn sau khong thi gian SIFS (Short Inter-Frame Space) (SIFS < DIFS) Nu ACK b mt, vic truyn li s c tin hnh.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

11

07/08

CSMA/CA/ACK
DIFS

Source

Data
SIFS

Time

Destination

ACK
DIFS Contention window

Other Defer access


SIFS Short Inter Frame Spacing

Next Frame
Backoff after defer

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

CSMA/CA with RTS/CTS


Pha gi s gi bn tin RTS (request to send) sau khi ng truyn ri sau khong thi gian ln hn DIFS. Pha nhn tr li bng bn tin CTS (clear to send) sau khi ng truyn ri mt khong thi gian SIFS. Sau d liu c truyn. RTS/CTS c s dng cho vic t ch ung truyn v vy xung t ch xy ra vi cc bn tin iu khin.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

12

07/08

CSMA/CA with RTS/CTS


DIFS SIFS RTS SIFS CTS

Source

Data
SIFS ACK DIFS

Time

Destination

Contention window

Other
Defer access

Next Frame
Backoff after defer

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

RTS/CTS
Node A
Tr truyn lan

Node B
RTS

CTS
Data

ACK

Hanoi University of Technology

Faculty of Electronics and Telecommunications

13

07/08

Wireless LAN Protocols

A wireless LAN. (a) A transmitting. (b) B transmitting.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Wireless LAN Protocols

The MACA protocol. (a) A sending an RTS to B. (b) B responding with a CTS to A.
Hanoi University of Technology Faculty of Electronics and Telecommunications

14

07/08

Ethernet
Ethernet Cabling Manchester Encoding Lp con MAC Ethernet Hiu sut ca mng Ethernet Fast Ethernet Gigabit Ethernet IEEE 802.2: Logical Link Control

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Ethernet Cabling

Cc loi cp ph bin s dng trong cng ngh Ethernet

Hanoi University of Technology

Faculty of Electronics and Telecommunications

15

07/08

Ethernet Cabling

(a) 10Base5, (b) 10Base2, (c) 10Base-T.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Ethernet Cabling

(a) Binary encoding, (b) Manchester encoding, (c) Differential Manchester encoding.
Hanoi University of Technology Faculty of Electronics and Telecommunications

16

07/08

Lp con MAC

nh dng khung (a) DIX Ethernet, (b) IEEE 802.3.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Ethernet MAC con MACProtocol Lp Sublayer

Xung t c pht hin sau khong thi gian 2

Hanoi University of Technology

Faculty of Electronics and Telecommunications

17

07/08

Hiu sut mng Ethernet

Hiu sut mng Ethernet tc 10 Mbps vi 512-bit slot times.


Hanoi University of Technology Faculty of Electronics and Telecommunications

07/08

Fast Ethernet

Mt s loi cp dng trong mng Fast Ethernet

Hanoi University of Technology

Faculty of Electronics and Telecommunications

18

07/08

multi-level transmit-3 levels


100BASE-TX (like 100BASE-FX) uses 4B/5B encoding which is then scrambled and converted to multi-level transmit-3 levels or MLT-3.

Any Transition = binary 1.

No transition = binary 0.

Long strings of zeros would give a DC component but because of the 4B/5B encoding this can never happen.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Non Return to Zero, Inverted


Fiber cannot use the 3 level MLT3 because the light source has only two levels, ON and OFF.

No transition = binary 0. Any Transition = binary 1.

Long strings of zeros would give a DC component but because of the 4B/5B encoding this can never happen.

100BASE-FX (like 100BASE-TX) uses 4B/5B encoding which is then scrambled and converted to Non Return to Zero, Inverted.
Hanoi University of Technology Faculty of Electronics and Telecommunications

19

07/08

Gigabit Ethernet

(a) A two-station Ethernet. (b) A multistation Ethernet.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Gigabit Ethernet

Mt s loi cp dng trong mng Gigabit Ethernet

Hanoi University of Technology

Faculty of Electronics and Telecommunications

20

07/08

IEEE 802.2: Logical Link Control

(a) V tr lp con LLC. (b) nh dng giao thc

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Wireless LANs
Protocol Stack 802.11 Lp vt l ca 802.11 Lp con MAC Cu trc khung 802.11

Hanoi University of Technology

Faculty of Electronics and Telecommunications

21

07/08

802.11 Protocol Stack

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Lp con MAC trong 802.11

(a) Hidden station problem. (b) Exposed station problem.


Hanoi University of Technology Faculty of Electronics and Telecommunications

22

07/08

S 1

S 2

- A ang truyn d liu sang B - C nm ngoi tm sng ca trm A - C cng mun truyn d liu sang B - C a ra kt lun sai v trm B - C vn truyn d liu sang trm B

- B ang truyn d liu sang A - C nm trong tm sng ca trm B - C mun truyn d liu sang D - C a ra kt lun sai v mi trng truyn thng - C khng truyn d liu sang D

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

The 802.11 MAC Sublayer Protocol Lp con MAC trong 802.11

CSMA/CA.
Hanoi University of Technology Faculty of Electronics and Telecommunications

23

07/08

Lp con MAC trong 802.11

Mt cm mnh

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Lp con MAC trong 802.11

Khong cch lin frame trong 802.11


Hanoi University of Technology Faculty of Electronics and Telecommunications

24

07/08

Cu trc khung 802.11

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Broadband Wireless
So snh 802.11 and 802.16 802.16 Protocol Stack Lp vt l trong 802.16 Cu trc khung 802.16

Hanoi University of Technology

Faculty of Electronics and Telecommunications

25

07/08

802.16 Protocol Stack

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Lp vt l 802.16

Hanoi University of Technology

Faculty of Electronics and Telecommunications

26

07/08

Lp vt l 802.16

Khung tin v cc khe thi gian

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

Cu trc khung 802.16

(a) generic frame.

(b) bandwidth request frame.

Hanoi University of Technology

Faculty of Electronics and Telecommunications

27

07/08

Bluetooth
ng dng ca Bluetooth Bluetooth Protocol Stack Cu trc khung Bluetooth

Hanoi University of Technology

Faculty of Electronics and Telecommunications

07/08

ng dng ca Bluetooth

Hanoi University of Technology

Faculty of Electronics and Telecommunications

28

07/08

Bluetooth Protocol Stack

The 802.15 version of the Bluetooth protocol architecture.


Hanoi University of Technology Faculty of Electronics and Telecommunications

07/08

Cu trc khung Bluetooth

Khung d liu Bluetooth


Hanoi University of Technology Faculty of Electronics and Telecommunications

29

07/08

- Nguyn Vn Hong T8 - Chu c dng DT8 - Nguyn c Thnh T8

Hanoi University of Technology

Faculty of Electronics and Telecommunications

30

Transparent Bridges & Source Route Bridge

Transparent Bridges
+) Transparent bridges c pht trin bi tp on thit b s (Digital Equipment Corporation) +) S dng ch yu trong mng Ethernet +) L chun IEEE 802.1D.

c tnh

The No-Frills Bridge The Learning Bridge Spanning Tree Algorithm

The No-Frills Bridge


Lng nghe ngu nhin (listens promiscuously) mi gi tin (packet) c truyn Lu mi gi tin nhn c cho n khi n c th truyn c n cc LAN khc (tr LAN m Bridge nhn gi tin t n)

Figure

c im
Bridges khng bin i gi tin m n nhn c. No-frills bridge m rng kh nng ca mng LAN. Cho php hai trm hai bn ca Bridge truyn ng thi m khng c xung t. Nu bng thng vt qu tc LAN, gi tin s b b i trc khi c truyn n ch.

The Learning Bridge


Bridge lng nghe ngu nhin (listens promiscuously), nhn bt k gi tin no c truyn. Vi mi gi tin nhn c, bridges lu a ch trong trng a ch ngun ca gi tin vo b m (cache), cng vi cng m gi tin c nhn t .

V d
Gi s A mun truyn 1 gi tin n D. Ban u Bridges cha bit g v A hay D. Bridge s tra a ch ngun ca gi tin. N s ghi nh gi tin ny nhn t Port 1 v A thuc bn Port1
8

Hot ng
Vi mi gi tin nhn c, bridges s tra trong b m ca n tm a ch c ghi vo trng a ch ch ca gi tin. Nu a ch khng c tm thy trong b m, bridge s forwards gi tin n mi giao din tr giao din m gi tin nhn c t n. Nu a ch c tm thy trong b m, bridge s forwards gi tin n giao din c ch r trong bng. Nu giao din ny l ci m gi tin c nhn th gi tin s c 9 loi b

V d
Gi thit trong trng hp B bit thng tin v A,D. Q mun truyn tin cho A? Q mun truyn tin cho D?

10

V d trong trng hp Multiple Hops


B1 s khng phn bit c cc trm gia cc mng LAN2 v LAN3. N ch phn bit c trm no ni vi Port1 v trm no ni vi Port2. B2 b n bi B1, tr nn trong sut vi cc trm.
11

Aging time
Nu sau mt khong thi gian (aging time ) m Bridge khng nhn c lu lng no t a ch m n c vai tr l a ch ngun, th a ch s b xa khi b m.

12

What happens when station A transmits a packet?

13

Nu khng dng thut ton Spanning tree

Gi tin khng nhng lp li m cn c nhn ln rt nhiu ln. khc phc hin tng ny m vn m bo d tha, ngi ta kt hp Bridges hot ng vi mt thut ton: Thut ton Spanning Tree.

14

Source Routing Bridges


c pht trin bi IBM. Chun IEEE 802.5 l chun kt ni gia cc mng LAN. Pure Source Routing SR-TB Bridges

15

Nguyn tc chung
Phn header ca gi tin cha tuyn ng v tuyn ng ny c chn vo bi trm ngun. Trm ngun truyn mt gi tin c bit tm ng n trm ch. Khi bit ng n trm ch, n s lu tuyn ng vo b nh s dng cho nhng ln truyn sau.
16

The Routing Header

17

Bridge Algorithms
C 4 loi gi tin c iu khin bi Bridge: 1) Gi tin khng c trng RI (transparent packets) 2) Specifically routed packets 3) Gi tin All paths explorer 4) Gi tin Spanning tree explorer
18

All Paths Explorer Packets

19

All Routes Broadcast Packet

20

10

All Routes Broadcast Packet

21

All Routes Broadcast Packet

22

11

Response Frame

23

Response Frame

24

12

Response Frame

25

Loi b gi tin c route khng thch hp

26

13

SR-TB Bridges

ST-TB bridge ni gia hai phn ca mt h thng mng LAN. 1 phn ch dng SR 1 phn ch dng TB
27

Nguyn tc chung

SR-TB phi a ra quyt nh c nn chuyn gi tin i hay phi thm vo phn header ca gi tin mt cch thch hp.

28

14

Thut ton

X l gi tin nhn t TB Port X l gi tin nhn t SR Port

29

Gi tin t TB Port
Nu a ch ch ti cng m n nhn c gi tin, n s khng forward Nu tuyn ng ca a ch ch c lu trong b nh ca Bridge th n s truyn gi tin nh specifically routed packet

30

15

Gi tin t TB Port

Nu tuyn ng khng c trong b nh: Forward gi tin ging nh gi tin all paths explorer hoc Forward gi tin ging nh gi tin spanning tree explorer hoc Lu gi tin vo b nh v ch n khi c tuyn ng. Hoc Loi b gi tin, xem nh li mt gi
31

Gi tin t SR Port

32

16

Gi tin t SR Port
SR-TB bridge x l ba loi gi tin: Specifically routed Spanning tree explorer All paths explorer

33

Source Routing so snh vi Transparent Bridging

Bng thng Cu hnh Tnh ph dng Gi thnh

34

17

Spanning Tree & Rapid Spanning Tree Protocol

Module Objective
S d phng v vai tr quan trng ca n trong h thng mng. Cc thnh phn ch yu ca mt mng d phng. Trn bo qung b (broadcast storms) trong mng chuyn mch. Nguyn nhn v hu qu ca vic c s d liu a ch MAC khng n nh. STP trong mt mng chuyn mch c d phng. Qu trnh la chn bridge gc. Cc trng thi Spanning-Tree. So snh STP & RSTP (rapid spanning tree).

Redundancy

H thng mng ng tin cy :


Trang thit b ng tin cy Trnh li v t mng Phc hi nhanh chng v d dng C h thng d phng

Redundant topologies

One Bridge

Redundant Bridges

Redundant switched topologies

Mt h thng mng c Switches d phng nhng nu khng c STP th xy ra :


Trn bo qung b (broadcast storms) Truyn nhiu lt Frame Bng a ch MAC khng n nh

Broadcast Storm

ARP request

Multiple frame transmissions

Media access control database instability

Spanning tree

Lp 2 khng c trng TTL (Time to Live) Spanning tree :


Cho php to cu trc lun l khng vng lp trong vng lp vt l TREE TREE : cu trc logic hnh sao hoc hnh sao m rng Thut ton Spanning tree (chun IEEE 802.1D) Thut ton SP mt nhiu thi gian hi t (Gii php : Rapid spanning tree IEEE 802.1W)

Bridge root & STP tree


Chn ng dn ngn nht da trn chi ph kt ni tch ly Chi ph kt ni da trn tc kt ni Chn mt nt gc gi l bridge gc (root bridge) STP xy dng cu trc mng vi 1 ng dn ti tt c cc nt trong mng, to ra mt Tree t root bridge Nhng kt ni d tha khng thuc shortest path tree b kha li

BPDU

Trao i thng tin Xc nhn xem kt ni c hot ng hay khng, nu li kt ni hay mt thit b no h hng th STP s c tnh ton li

BPDU
Thng tin trong cc gi BPDU :
La chn Root bridge Tnh ton kt ni ngn nht ti Root bridge La chn switch :
Switch gn nht vi Root trong ton b segment ca Lan Thc hin cc giao tip t Lan ti Root bridge

La chn Root port cho cc Switch khng phi l Root switch :


Root port l cng giao tip vi kt ni tt nht ti Root switch

Chn cc port c ch nh (forward) v cc port khng c ch nh (blocked)

Two Key Concepts: BID and Path Cost

Bridge ID Path Cost

Topology

Spanning tree

Bridge ID (BID)

Bao gm 2 thnh phn :


2 bytes Bridge priority 6 bytes MAC address

Bridge priority : nh dng s thp phn MAC address : nh dng s hexa BridgeID thp nht l root

Path cost
L thuyt, 802.1d nh ngha cost l i lng o bng thng 100/bandwidth (Mbps) ca mt kt ni Thc t th cc switch c tc cao hn, c 10Gbps IEEE modified the most to use a non-linear scale with the new values of:
4 Mbps 250 (cost) 10 Mbps 100 (cost) 16 Mbps 62 (cost) 45 Mbps 39 (cost) 100 Mbps 19 (cost) 155 Mbps 14 (cost) 622 Mbps 6 (cost) 1 Gbps 4 (cost) 10 Gbps 2 (cost)

Four-Step STP Decision Sequence


4 bc :
Xc nh BID c gi tr nh nht Xc nh Path cost nh nht ti root bridge Xc nh BID nh nht c gi i t u Xc nh Port ID nh nht

Khi nim kha BPDU :


Bridge sao chp gi li mt gi tr BID c gi i trong gi BPDU u tin m n thy trn cc port Khi c cc gi BPDU khc ti, n s kim tra li theo bn bc nh trn, xc nhn li c gi tr BID no tt hn na khng, nu c n s ly v thay th gi tr c save trc Ch switch no c gi tr BID thp nht c chn Bridge gi i cu hnh ca cc BPDU cho ti khi c nhiu BPDU tt hn c nhn

Three Steps of Initial STP Convergence


Switches go through three steps for their initial convergence:
STP Convergence Step 1 Elect one Root Bridge Step 2 Elect Root Ports Step 3 Elect Designated Ports

All STP decisions are based on a the following predetermined sequence:


Four-Step decision Sequence Step 1 - Lowest BID Step 2 - Lowest Path Cost to Root Bridge Step 3 - Lowest Sender BID Step 4 - Lowest Port ID

Step 1 Elect one Root Bridge

Khi cc switch trong mng c bt Cc bridge trao i cc gi BPDU mt cch ln xn Ngay sau , chng thc hin qu trnh 4 bc la chn Root bridge (c BID thp nht) :
V d : Cat-A c a ch MAC thp nht nn n dnh chin thng trong vic tr thnh Root C 3 switch trn c cng mc u tin (priority), mc nh l 32,768

Step 2 Elect Root Ports

Cc Root port ca bridge l cc port gn nht ti cc Root bridge s dng Root path cost Nhng switch khng phi Root bridge s la chn cho mnh mt Root port

Step 3 Elect Designated Ports


Port c ch nh : Port bridge n gi v nhn c lu lng t segment trong Lan v Root bridge Tt c cc segment trong mng u c mt port c ch nh, port ny xc nh da trn tnh tch ly Root Path Cost ti Root Bridge Switch m cha mt port ch nh c xem nh l mt bridge ch nh trong mt segment 4 bc thc hin qu trnh :
Lowest Root BID Lowest Path Cost to Root Bridge Lowest Sender BID Lowest Port ID

10

Stages of spanning-tree port states Tn ti 4 trng thi cng (do) :


BPDU tr lan truy Mt phn no ca cu trc mng b thay i, c h thng khng th nhn bit ngay c Switch i trng thi ca mt port t trng thi ch sang trng thi hat ng ngay lp tc c th xy ra vng lp Switch s dng STP, mi port s mt trong nm trng thi

Stages of spanning-tree port states

11

STP Port States


trng thi ch, cc port ch c th nhn cc gi BPDU :
Cc gi d liu khc b hy b v khng c h c hc a ch trng thi ny Mt khong c 20s chuyn t trng thi ny sang trng thi khc

Khi port chuyn sang trng thi nghe :


Switch s xc nhn xem port ny c kt ni v root vi chi ph thp nht hay khng, c to vng lp khng ??? Nu kt ni ny khng tha mn chi ph thp nht ti root th port s tr v trng thi kha Trng thi nghe gi l qu trnh chuyn trng thi, mt khong 15s. trng thi ny port vn cha chuyn d liu cng nh hc a ch MAC, vn ch l x l cc gi BPDU

STP Port States


Sau port chuyn t trng thi nghe sang trng thi hc :
trng thi ny, port vn cha c chuyn d liu i nhng bt u hc a ch MAC t d liu nhn c Qu trnh ny mt 15s v vn tip tc x l cc gi BPDU

Khi port chuyn t trng thi hc sang trng thi truyn d liu :
trng thi ny, port bt u truyn d liu ca user, vn hc a ch MAC v x l cc gi BPDU

12

Rapid Spanning Tree Protocol (RSTP)

Giao thc Rapid spanning tree theo chun IEEE 802.1w :


Lm r hn vai tr v trng thi ca port nh ngha cc loi kt ni c th chuyn nhanh sang trng thi truyn d liu Cho php cc switch trong mng hi t t gi cc gi BPDU ca n ch khng phi chuyn tip qua BPDU ca root bridge

Rapid Spanning Tree Protocol (RSTP)


Trng thi kha (blocking) c i tn thnh trng thi loi b (discarding). Port loi b ng vai tr d phng Cc loi kt ni :
Kt ni point-to-point Kt ni bin cui (edge-type) Kt ni chia s

Point-to-point v edge-type l 2 loi kt ni c th chuyn trng thi ngay lp tc Thi gian hi t khng lu hn 15s Rapid spanning tree (IEEE 802.1w) thc s thay th spanning tree (IEEE 802.1d)

13

Rapid Spanning Tree Protocol (RSTP)

14

You might also like