شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های...

26

Upload: karly-ingmire

Post on 29-Mar-2015

240 views

Category:

Documents


3 download

TRANSCRIPT

Page 2: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

کامپیوتری های شبکهپیشرفته

Page 3: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

درس مطالب

اینترنت و کامپیوتری های شبکه بر مروری

( گسترده های (WANشبکه ATM MPLS

سیم بی های شبکه

سیم بی انتقال

سیم بی های شبکه

های MANET, WSN, WMNشبکه

( ای چندرسانه های (Multimediaشبکه( نظیر به نظیر های (Peer-to-Peerشبکه

Page 4: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

اینترنت و کامپیوتری های شبکه بر مروری

millions of connected

computing devices: hosts = end systems

running network apps

4

Home network

Institutional network

Mobile network

Global ISP

Regional ISP

router

PC

server

wirelesslaptop

cellular handheld

wiredlinks

access points

communication linksfiber, copper, radio,

satellitetransmission rate =

bandwidth

routers: forward packets (chunks of data)

Page 5: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

A closer look at network structure: network edge: applications

and hosts

5

access networks, physical media: wired, wireless

communication links network core:

interconnected routersnetwork of networks

Page 6: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

The network edge:end systems (hosts):

run application programs

e.g. Web, email

at “edge of network”

6

client/server

peer-peer

client/server modelclient host requests,

receives service from always-on server

e.g. Web browser/server; email client/server peer-peer model:

minimal (or no) use of dedicated servers

e.g. Skype, BitTorrent

Page 7: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

Access networks and physical media

Q: How to connect end systems to edge router?

residential access netsinstitutional access

networks (school, company): LAN

mobile access networks

Keep in mind :bandwidth (bits per

second) of access network?

shared or dedicated? 7

Page 8: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

Local area networks

company/univ local area network (LAN) connects

end system to edge router

Ethernet: 10 Mbs, 100Mbps, 1Gbps, 10Gbps

Ethernet

modern configuration: end systems connect into Ethernet

switch

8

Page 9: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

Wireless access networks

shared wireless access network connects end

system to routervia base station aka “access

point”

wireless LANs:802.11b/g (WiFi): 11 or 54

Mbps

wider-area wireless accessprovided by operators

~1Mbps over cellular system

WiMAX (10’s Mbps) over wide area

9

basestation

mobilehosts

router

Page 10: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

The Network Core

mesh of interconnected routers

the fundamental question: how is data

transferred through net?

circuit switching: dedicated circuit per call: telephone net

packet-switching: data sent thru net in discrete “chunks”

10

Page 11: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

Internet protocol stackapplication: supporting network

applications (FTP, SMTP, HTTP)transport: process-process data

transfer (TCP, UDP)network: routing of datagrams

from source to destinationIP, routing protocols

link: data transfer between neighboring network elements

PPP, Ethernet

physical: bits “on the wire”11

Page 12: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

Encapsulation

12

source

application

transportnetwork

linkphysical

HtHn M

segment Ht

datagram

destination

application

transportnetwork

linkphysical

HtHnHl M

HtHn M

Ht M

M

networklink

physical

linkphysical

HtHnHl M

HtHn M

HtHn M

HtHnHl M

router

switch

message M

Ht M

Hn

frame

Page 13: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

error control (detection & recovery)

13

EDC= Error Detection and Correction bits (redundancy)D = Data protected by error checking, may include header

fields

• Error detection not 100% reliable!• protocol may miss some errors, but rarely• larger EDC field yields better detection and correction

•ARQ: automatic request repeat•Stop and Wait•Sliding Window

Page 14: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

Two Key Network-Layer Functions forwarding: move packets from

router’s input to appropriate router output

routing: determine route taken by packets from source to dest .

routing algorithms

14

Page 15: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

15

1

23

0111

value in arrivingpacket’s header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between routing and forwarding

Page 16: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

Routing

Graph abstraction for routing algorithms:

graph nodes are routers

graph edges are physical links

link cost: delay, $ cost, or congestion

level16

Goal: determine “good” path

(sequence of routers )thru network from source to

dest.

Routing protocol

A

ED

CB

F

22

13

1

1

2

53

5

“good” path:typically means

minimum cost pathother def’s possible

Page 17: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

Routing: only two approaches used in practice Global:

all routers have complete topology, link cost info

“link state” algorithms: use Dijkstra’s algorithm to find shortest path from given router to all

destinations

Decentralized: router knows physically-connected neighbors, link

costs to neighbors

iterative process of computation, exchange of info with neighbors

“distance vector” algorithms

a ‘self-stabilizing algorithm’ (we’ll see these later)17

Page 18: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

Addressing: network layerIP address: 32-bit

identifier for host, router interface

interface: connection between host, router

and physical linkrouter’s typically have

multiple interfaces

host may have multiple interfaces

IP addresses associated with interface, not

host, router

18

223.1.1.1

223.1.1.2

223.1.1.3

223.1.1.4 223.1.2.9

223.1.2.2

223.1.2.1

223.1.3.2223.1.3.1

223.1.3.27

223.1.1.1 = 11011111 00000001 00000001 00000001

223 1 11

Page 19: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

IP AddressingIP address:

network part (high order bits)

host part (low order bits)

what’s a network ? (from IP address

perspective)

device interfaces with same network

part of IP address

can physically reach each other without intervening router

19

223.1.1.1

223.1.1.2

223.1.1.3

223.1.1.4 223.1.2.9

223.1.2.2

223.1.2.1

223.1.3.2223.1.3.1

223.1.3.27

network consisting of 3 IP networks(for IP addresses starting with 223 ,

first 24 bits are network address)

LAN

Page 20: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

LANs

bus topology popular through mid 90s

today: star topology prevails

active switch in center, each “spoke” runs a (separate) Ethernet protocol

wireless LANS: 802.11

20

bus: coaxial cableswitch

star

shared RF( e.g., 802.11 WiFi)

Page 21: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

LAN Addresses

21

Each adapter on LAN has unique LAN address (also has an IP address)

LAN (or MAC or physical) address :used to get datagram from one

interface to another physically-connected interface (same

network)48 bit MAC address (for most

LANs) burned in the adapter ROM

Question: why separateMAC and IP addresses?

Page 22: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

ARP: Address Resolution Protocol

Each IP node (host, router) on LAN has

ARP tableARP table: IP/MAC

address mappings for some LAN nodes

<IP address; MAC address; TTL>

TTL (Time To Live): time after which

address mapping will be forgotten (typically

20 min)

22

Question: how to determineMAC address of B

knowing B’s IP address?

1A-2F-BB-76-09-AD

58-23-D7-FA-20-B0

0C-C4-11-6F-E3-98

71-65-F7-2B-08-53

LAN

137.196.7.23

137.196.7.78

137.196.7.14

137.196.7.88

Page 23: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

ARP protocol: Same LAN (network)

A wants to send datagram to B, and B’s MAC address

not in A’s ARP table.A broadcasts ARP query

packet, containing B's IP address

dest MAC address = FF-FF-FF-FF-FF-FF

all machines on LAN receive ARP query

B receives ARP packet, replies to A with its (B's)

MAC addressframe sent to A’s MAC

address (unicast)

A caches (saves) IP-to-MAC address pair in its ARP table

until information becomes old (times out)

soft state: information that times out (goes

away) unless refreshed

ARP is “plug-and-play:”nodes create their ARP

tables without intervention from net

administrator23

Page 24: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

Addressing: routing to another LAN

walkthrough: send datagram from A to B via R

assume A knows B’s IP address

two ARP tables in router R, one for each IP network (LAN)

24

R

1A-23-F9-CD-06-9B

222.222.222.220111.111.111.110

E6-E9-00-17-BB-4B

CC-49-DE-D0-AB-7D

111.111.111.112

111.111.111.111

A74-29-9C-E8-FF-55

222.222.222.221

88-B2-2F-54-1A-0F

B222.222.222.222

49-BD-D2-C7-56-2A

Page 25: شبکه های کامپیوتری پیشرفته مطالب درس مروری بر شبکه های کامپیوتری و اینترنت شبکه های گسترده (WAN) ATM MPLS

A creates IP datagram with source A, destination B A uses ARP to get R’s MAC address for 111.111.111.110

A creates link-layer frame with R's MAC address as dest, frame contains A-to-B IP datagram

A’s NIC sends frame R’s NIC receives frame R removes IP datagram from Ethernet frame, sees its destined

to B

R uses ARP to get B’s MAC address R creates frame containing A-to-B IP datagram sends to B

25

R

1A-23-F9-CD-06-9B

222.222.222.220111.111.111.110

E6-E9-00-17-BB-4B

CC-49-DE-D0-AB-7D

111.111.111.112

111.111.111.111

A74-29-9C-E8-FF-55

222.222.222.221

88-B2-2F-54-1A-0F

B222.222.222.222

49-BD-D2-C7-56-2A

This is a really importantexample – make sure you

understand!