middleware pour software radio€¦ · computer networks network layer & ip protocol...

Post on 02-Aug-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

P.Bakowski 1

Computer NetworksComputer Networks Network Layer & IP protocolNetwork Layer & IP protocol

bako@ieee.orgbako@ieee.org

www.smartcomputerlab.orgwww.smartcomputerlab.org

P.Bakowski 2

digital digital communicationcommunication

Functional LayersFunctional Layers

Network layerNetwork layer

Transport layerTransport layer

Application layerApplication layer

Physic layerPhysic layerMAC layerMAC layerLink layerLink layer

datadata : text, audio, video,.. : text, audio, video,..

segmentssegments , , datagramsdatagrams

packetspackets

framesframes

bitsbits

signalssignals

P.Bakowski 3

Network Layer & Internet InfrastructureNetwork Layer & Internet Infrastructure

long links & many routers long links & many routers => => transmission & routing errorstransmission & routing errors

TransportTransport

ApplicationApplication

Network layerNetwork layerNetworkNetwork

TransportTransport

ApplicationApplication

Network layerNetwork layerNetworkNetwork

NetworkNetwork NetworkNetwork NetworkNetwork

routerrouterrouterrouter routerrouter routerrouter

routerrouterrouterrouter

corruption of bits corruption of bits loss of packetsloss of packets

P.Bakowski 4

Network Layer & Internet InfrastructureNetwork Layer & Internet Infrastructure

IP packets and @IP are analyzed by routersIP packets and @IP are analyzed by routers

Transport Transport

Application Application

Network Network

routerrouter

Network Network

routerrouter

LANLANLANLAN switchswitchswitchswitch

Network layerNetwork layerrouterrouter

IP packetIP packet

LAN LAN

ETHETH

Locally the IP packets are carried by Ethernet/WiFi framesLocally the IP packets are carried by Ethernet/WiFi frames

Network Network

IP packetIP packet

P.Bakowski 5

IP addressing scheme (v4)IP addressing scheme (v4)The Internet addressing scheme is two-level scheme :The Internet addressing scheme is two-level scheme :• network levelnetwork level (network address or number) (network address or number) • host level host level (host address or number) (host address or number)

hosthost

routerrouter

switchswitch

switchswitch

routerrouter

networknetwork

routerrouter

32-bit32-bit

P.Bakowski 6

IP addressing scheme (v4)IP addressing scheme (v4)There are two kinds of addressing schemes :There are two kinds of addressing schemes :based on based on classes classes : A,B,C,D: A,B,C,D

AA 0...0... 0 – 127...0 – 127...

/11/11

0 ­ (20 ­ (22121­1)­1)   0 ­ (20 ­ (21111­1)­1)

172.19.64.141172.19.64.141

based on based on prefixprefix (class-less) (class-less)

128 – 191...128 – 191...10..10..BB192 – 223...192 – 223...110110110.110.CC

1110.1110. 224 – 239...224 – 239...  multi­castmulti­cast

DD

P.Bakowski 7

IP addressing scheme (v4)IP addressing scheme (v4)

switchswitch

switchswitch

32-bit32-bit

201.123.34.201.123.34.xxxxxx

201.123.34.201.123.34.1010        unicastunicast

routerrouterrouterrouter routerrouter

all computers on this network are all computers on this network are « visible »« visible »

P.Bakowski 8

IP addressing scheme (v4)IP addressing scheme (v4)

routerrouter

switchswitch

switchswitch

routerrouter routerrouter

32-bit32-bit

201.123.34.201.123.34.xxxxxx

201.123.34.201.123.34.255255    broadcastbroadcast

all computers on this network are all computers on this network are « visible »« visible »

P.Bakowski 9

IP addressing scheme (v4)IP addressing scheme (v4)

switchswitch

switchswitch

32-bit32-bit

231.123.34.15231.123.34.15

joinjoin and and leaveleave

routerrouterrouterrouter routerrouter

231.123.34.15231.123.34.15    multicastmulticast

201.123.34.201.123.34.1010201.123.34.201.123.34.1212201.123.34.201.123.34.2121201.123.34.201.123.34.3232

201.123.34.201.123.34.1010 201.123.34.201.123.34.1212

201.123.34.201.123.34.2121201.123.34.201.123.34.3232

P.Bakowski 10

IP packetsIP packets

IHLIHL – header length – header length (in 32-bit words)(in 32-bit words)

TOSTOS – Type of Service (6-bit field) – Type of Service (6-bit field)

Total LengthTotal Length of IP of IP packetpacket or or fragmentfragment in bytes in bytes

P.Bakowski 11

IP packetsIP packets

IdentifierIdentifier – a unique – a unique value for IP packet and value for IP packet and all its fragmentsall its fragments

IP FlagsIP Flags : : D – Don't fragmentD – Don't fragmentM – More fragmentsM – More fragments

P.Bakowski 12

IP packetsIP packets

TTLTTL – the maximal – the maximal number of routing number of routing hopshops

P.Bakowski 13

IP fragmentationIP fragmentation

IP fragIP fragETHETH IP fragIP fragETHETH IP fragIP fragETHETH IP fragIP fragETHETH

13-bit ?13-bit ?

The same identifier !The same identifier !

IP packetIP packet

P.Bakowski 14

IP fragmentation – an exampleIP fragmentation – an example

IP fragIP frag

20+? 20+?

ETHETH

IP packet: 20 header bytes + 5000 data bytes IP packet: 20 header bytes + 5000 data bytes + +

MTU for Ethernet is 1500 bytesMTU for Ethernet is 1500 bytes

IP fragIP fragETHETH

20+1480 20+1480

IP fragIP fragETHETH

20+1480 20+1480

IP fragIP fragETHETH

20+1480 20+1480

13-bit13-bit

TL=1500,FO=0TL=1500,FO=0 TL=1500,FO=185TL=1500,FO=185 TL=1500,FO=370TL=1500,FO=370 TL=?,FO=?,M=?TL=?,FO=?,M=?

P.Bakowski 15

How to get IP addressHow to get IP addressThere are There are two waystwo ways to get an IP address : to get an IP address :● The The manualmanual (fixed) – the user/administrator (fixed) – the user/administrator fixes the addresses fixes the addresses ● The The automaticautomatic (dynamic)- the directly visible (dynamic)- the directly visible router provides the IP address + the IP address router provides the IP address + the IP address of the router/gateway + the address of the DNS of the router/gateway + the address of the DNS serverserverff:ff:ff:ff:ff:ffff:ff:ff:ff:ff:ff broadcastbroadcast

routerrouterCLICLI

ETHETH IPHIPH UDP:67UDP:67

replyreply

ETHETH IPHIPH UDP:67UDP:67

requestrequest

6767

DDynamic ynamic HHost ost CControl ontrol PProtocolrotocol

P.Bakowski 16

How to get physical addressHow to get physical address

ff:ff:ff:ff:ff:ffff:ff:ff:ff:ff:ff 172.19.64.140172.19.64.140

To communicate between computers we need to use To communicate between computers we need to use physical addressesphysical addresses. . Before sending an IP packet we must acquire the physical Before sending an IP packet we must acquire the physical (MAC) destination address via (MAC) destination address via Address Request ProtocolAddress Request Protocol – – ARPARP ! !

SRCSRC DSTDST

ETHETH IPHIPH ARP:requestARP:request

ETHETH IPHIPH ARP:replyARP:reply 172.19.64.140172.19.64.140

Cache ARPCache ARP

@IP @IP ­ @ETH ­ @ETH @IP @IP ­ @ETH ­ @ETH @IP @IP ­ @ETH ­ @ETH @IP @IP ­ @ETH ­ @ETH 

P.Bakowski 17

internetinternetinternetinternet

routerrouter

routerrouter

BGP protocolBGP protocol

Routing protocols (tables)Routing protocols (tables)

ASASASASRR

routerrouterRRRR RR

router/gatewayrouter/gateway

ASASASAS

routerrouter

RR

RR

CC

TT TT TT TTAutonomous SystemAutonomous System

Free/OrangeFree/Orange

LANLANLANLAN SSRR

TT TT TT

RR

RIP protocolRIP protocol

P.Bakowski 18

The Implementation : IP layerThe Implementation : IP layer

OS OS kernelkernel

UDP/TCPUDP/TCPIP/ICMP/RIPIP/ICMP/RIPARPARP/RARP/RARP

« socket » interface« socket » interface

Ethernet/WiFi interfaceEthernet/WiFi interface

Network layerNetwork layer

Transport layerTransport layer

Application layerApplication layer

Physic layerPhysic layerMAC layerMAC layerLink layerLink layer

P.Bakowski 19

SummarySummary

Internet (Internet (networknetwork) layer architecture) layer architecture IP addressingIP addressing with classes & class-less with classes & class-less IPIP packets packets headerheader and functions and functions IP fragmentationIP fragmentation How to get How to get IP addressIP address How to learn How to learn physical addressphysical address – MAC address – MAC address Routing IP packetsRouting IP packets over Internet over Internet

P.Bakowski 20

Complementary lecturesComplementary lectures

4.1. Network Layer Overview4.1. Network Layer Overview4.2. Network Services4.2. Network Services4.3. Internetworking4.3. Internetworking4.4. IP Prefixes4.4. IP Prefixes4.5. IP Forwarding4.5. IP Forwarding4.6. IP helpers: ARP and DHCP4.6. IP helpers: ARP and DHCP4.7. IP Packet Fragmentation4.7. IP Packet Fragmentation4.8. IP Errors and ICMP4.8. IP Errors and ICMP4.10 Network Address Translation (NAT)4.10 Network Address Translation (NAT)

top related