• Tidak ada hasil yang ditemukan

Internet dan Jaringan Komputer Singgih Jatmiko

N/A
N/A
Protected

Academic year: 2018

Membagikan "Internet dan Jaringan Komputer Singgih Jatmiko"

Copied!
34
0
0

Teks penuh

(1)

Layer Link

Internet dan Jaringan Komputer

(2)

Outline

5.1 Introduction

5.2 Error detection and correction

5.3 Multiple access protocols

5.4 Link-layer Addressing

5.5 Ethernet

5.6 Link-layer switches

5.7 PPP

(3)

Link Layer: Introduction

Some terminology:

Nodes: hosts and routers

Links: communication channels that connect adjacent nodes along communication path

– wired links

– wireless links

– LANs

Frame: layer-2 packet, which encapsulates a datagram

data-link layer is responsible for

(4)

Link layer: context

• datagram transferred by different link protocols over different links:

• e.g., Ethernet on first link, frame relay on intermediate links,

802.11 on last link

• each link protocol provides different services

• e.g., may or may not provide rdt over link

tourist transportation analogy

• trip from Eindhoven to Ankara

• train: Eindhoven to Schiphol

• plane: Schiphol to Istanbul

• bus: Istanbul to Ankara

• tourist = datagram

• transport segment = communication link

• transportation mode = link layer protocol

(5)

Link Layer Services

framing, link access:

encapsulate datagram into frame, adding header, trailer

channel access if shared medium

“MAC” addresses used in frame headers to identify

source, dest

• different from IP address!

reliable delivery between adjacent nodes

Q: why both link-level and end-to-end reliability?

rarely used on low bit-error link (fiber, some twisted

pair)

(6)

Link Layer Services (more)

flow control:

– pacing between adjacent sending and receiving nodes

error detection:

– errors due to signal attenuation, noise.

– receiver detects errors:

• signals sender for retransmission or drops frame

• error correction:

– receiver identifies and corrects bit error(s) without retransmission

half-duplex and full-duplex

– full-duplex: nodes at both ends of link can transmit simultaneously

(7)

Where is the link layer implemented?

Link layer implemented in

NW adaptor

” (aka

network interface card

NIC) of each and every

host, router

– Ethernet card, wireless network (802.11) card – implements link, physical

layer

attaches to the system

buses of the host

(8)

Error Detection

• EDC = Error Detection and Correction bits (redundancy)

• D = Data protected by error checking, may include link layer header fields

• Error detection not 100% reliable!

• protocol may miss some errors, but rarely

(9)

Multiple Access Links and Protocols

Two types of “links”:

point-to-point

– Point-to-Point Protocol (PPP) for dial-up access

– point-to-point link between Ethernet switch and host

broadcast (shared wire or medium)

– old-fashioned Ethernet

(10)

Multiple Access Protocols

single shared broadcast channel

two or more simultaneous transmissions: signal

interference

– collision if node receives two or more signals at the same time

multiple access protocol

distributed algorithm that determines how nodes share

channel,

– i.e. determine when a node can transmit

communication about channel sharing must use

channel itself!

(11)

Ideal Multiple Access Protocol

Broadcast channel of rate R bps

1. when one node wants to transmit, it can send at

a rate of R.

2. when M nodes want to transmit, each can send

at average rate R/M

3. fully decentralized:

no special node to coordinate transmissions

no synchronization of clocks, slots

(12)

MAC Protocols: a taxonomy

Three broad classes:

Channel Partitioning

– divide channel into smaller “pieces” (time slots, frequency, code)

– allocate piece to node for exclusive use (no collisions)

Random Access

– channel is not divided, – collisions allowed

– “recover” from collisions

“Taking turns”

(13)

Channel Partitioning MAC protocols: TDMA

TDMA: time division multiple access

access to channel in "rounds"

each station gets fixed length slot (length = pkt trans

time) in each round (fair)

unused slots go idle

(14)

Channel Partitioning MAC protocols: TDMA

FDMA: frequency division multiple access

• channel spectrum divided into frequency bands

• each station assigned fixed frequency band

• unused transmission time in frequency bands go idle

(15)

Channel Partitioning MAC protocols: CDMA

CDMA: code division multiple

access

assigns a different code to

each node

– each code orthogonal to every other code

– i.e. multiply and take the integral of any two

different codes and you will find zero.

all nodes can broadcast at

the same time

– receivers will know how to distinguish

(16)
(17)

Random Access Protocols

• When node has packet to send

– transmit at full channel data rate R.

– no a priori coordination among nodes

• two or more transmitting nodes simultaneously heard =

“collision”,

• random access MAC protocol specifies:

– how to detect collisions

– how to recover from collisions (e.g., via delayed retransmissions)

• Examples of random access MAC protocols:

– slotted ALOHA

– ALOHA

(18)

Slotted ALOHA

Assumptions:

all frames same size

time divided into equal

size slots (time to

transmit 1 frame)

nodes start to transmit

only at the slot

beginning

– nodes are synchronized

if 2 or more nodes

transmit in slot, all

nodes detect collision

Operation:

when node obtains

fresh frame, transmits

in next slot

if no collision:

node

can send new frame in

next slot

if collision:

node

retransmits frame in

each subsequent slot

with prob. p until

(19)

Slotted ALOHA

Pros

• single active node can

continuously transmit at full rate of channel

• highly decentralized: only slots in nodes need to be in sync

• simple

Cons

• collisions, wasting slots

• idle slots

• nodes have to detect collision in less time than the time to

transmit a packet

(20)

Pure (unslotted) ALOHA

• unslotted Aloha: simpler, no synchronization

• when frame first arrives

– transmit immediately

• collision probability increases:

(21)

CSMA (Carrier Sense Multiple Access)

CSMA

: listen before transmit:

If channel sensed idle: transmit entire frame

If channel sensed busy, defer transmission

(22)

CSMA/CD (Collision Detection)

CSMA/CD: carrier sensing, deferral as in CSMA

collisions

detected

within short time

colliding transmissions aborted, reducing channel

wastage

collision detection:

easy in wired LANs: measure signal strengths,

compare transmitted, received signals

difficult in wireless LANs: received signal strength

overwhelmed by local transmission strength

(23)

“Taking Turns” MAC protocols

Polling:

master

node “invites”

slave nodes to

transmit in turns

typically used with

“dumb” slave

devices

disadvantages:

– polling overhead – latency

(24)

“Taking Turns” MAC protocols

Token passing:

control

token message

passed from one node

to next sequentially.

disadvantages:

token overhead

latency

(25)

Summary of MAC protocols

channel partitioning,

by time, frequency or code

– Time Division, Frequency Division

random access

(dynamic),

– ALOHA, S-ALOHA, CSMA, CSMA/CD, CSMA/CA

– carrier sensing: easy in some technologies (wire), hard in others (wireless)

– CSMA/CD used in Ethernet (collision detection)

– CSMA/CA used in 802.11 (collision avoidance) will cover in detail

taking turns

(26)

Ethernet

“dominant” wired LAN technology:

• first widely used LAN technology

• network interface cards (NIC) cheap

• simpler, cheaper than token LANs and ATM

• kept up with speed race: 10 Gbps

Metcalfe’s Ethernet

(27)

Topology

• bus topology popular through mid 90s

– all nodes in same collision domain (can collide with each other)

– now it’s more dominant in embedded networks

• today: star topology prevails

– active hub or switch in center

(28)

Hubs

… physical-layer (“dumb”) repeaters:

– bits coming in a link go out to all other links at the same rate

– all nodes connected to hub can collide with one another

– no frame buffering

(29)

Switch

smarter than hubs, takes

active

role

stores, forwards Ethernet frames

• Ethernet protocol used on each link

examines

incoming frame’s

dest MAC address,

selectively forwards frame to one-or-more

outgoing links

uses CSMA/CD to access segment

transparent

hosts are unaware of presence of switches

plug-and-play, self-learning

(30)

Switch: allows

multiple

simultaneous

transmissions

hosts have dedicated,

direct connection to

switch

switches buffer packets

no Ethernet collisions; full

duplex

– each link has its own collision domain

Switching A-to-A’ and B-to-B’ simultaneously is possible, without

collisions

(31)

Switch Table

Q:

how does switch know

that A’

is reachable via

interface 4, B’

is reachable

via interface 5?

A:

each switch has a

switch table,

– entries: MAC address of host, interface to reach host, time stamp

• like a routing table!

Q:

how are entries

(32)

Switch: self-learning

• switch learns which hosts can be reached through which interfaces

– when frame received, switch

“learns” location of sender: • incoming LAN segment

• – records sender/location pair in switch table

Switch table (initially empty)

(33)
(34)

Switches vs. Routers

• both store-and-forward devices

– routers: network layer

– switches: link layer

• routers maintain routing tables, implement routing algorithms

Referensi

Dokumen terkait

800/317/P2PL-Dinkes/VI/2012, yang dituangkan dalam Berita Acara Rapat Koordinasi Evaluasi Proses Pelelangan untuk Paket Pekerjaan Belanja Perlengkapan Pelayanan Medis

[r]

terdapat dua dimensi kualitas pelayanan SMKN studi kasus yaitu reliability dan empathy. Dengan demikian, dimensi-dimensi reliability dan empathy merupakan prioritas

creates I call the interpretant of the first sign. The sign stands for something, its object. Tanda mengarah kepada seseorang, yakni menciptakan dalam pikiran orang itu

REAKS I BRITISH TERHADAP KEGIATAN MAJLIS AGAMA TERTINGGI (MATA) DAN HIZBULMUSLIMTN DI TANAH MELAYU. British juga melaporkan bahawa {Jtusan Melayu keluaran 2 Jun 1948

Tujuan dari penelitian ini adalah untuk mengetahui dan menganalisa pendapatan dan pemanfaatan serta sejauh mana sebuah perilaku akuntansi pengelolaan keuangan pada sebuah rumah

Sumber: Structural Integrity and Life[6] Dari gambar 3 diketahui bahwa kekuatan impact tertinggi dari hasil pengelasan dengan gas pelindung ArCO 2 pada kuat arus 100A dan

Menurutmu, apa yang akan terjadi bila Siti dan Lani tidak membagi balok susun untuk Beni