Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 8: The Network Layer.

Similar presentations


Presentation on theme: "Lecture 8: The Network Layer."— Presentation transcript:

1 Lecture 8: The Network Layer

2 IP routers Alice Bob

3 application transport network link physical router Alice’s machine
message transport Ht network Hn link Hl physical router Alice’s machine

4 application transport network link physical router Bob’s machine
Hn link Hl physical Hl Hn Ht message router Bob’s machine

5 application transport network link physical Bob’s machine
Hl Hn Ht message Bob’s machine

6 Outline Network-layer functions Network-layer services
IP forwarding ++

7 Outline Network-layer functions Network-layer services
IP forwarding ++

8 Alice router router Bob
h.v.=1 Alice router router Bob

9 forwarding table forwarding table

10 header value output link header value output link 1 3 1 2 1 1 2 2 2 2 3 1 3 4 1 1 h.v. =1 3 2 4 2 3

11 Forwarding Local router process that determines output link for each packet How: read value from packet’s network-layer header search forwarding table

12 1 1 3 2 4 2 3 routing manually connection setup 1 3 1 2 1 1 2 2 2 2 3
header value output link header value output link 1 3 1 2 1 1 2 2 2 2 3 3 3 4 1 1 3 2 4 2 3

13 routing algorithm

14 routing algorithm routing algorithm

15 Routing Network-wide process that determines end-to-end path for each packet How: centralized routing algorithm distributed routing algorithm

16 Connection setup Path-wide process that sets up connection state in routers How: will see in a moment

17 Network-layer functions
Forwarding = determines output link for each packet Routing = determines end-to-end path for each packet Connection setup = sets up connection state in routers

18 Network-layer functions
Forwarding table populated by routing or connection setup ...depending on the type of network layer

19 Outline Network-layer functions Network-layer services
IP forwarding ++

20 Possible network-layer services
Guaranteed (in-order) delivery Guaranteed maximum delay Guaranteed minimum throughput Security (confidentiality, authenticity)

21 Possible network-layer services
Guaranteed (in-order) delivery Guaranteed maximum delay Guaranteed minimum throughput Security (confidentiality, authenticity)

22 1 1 3 2 4 2 3 1 3 2 1 4 1 setup Alice - Bob 100 Mbps Alice - Bob
VC input link output link VC input link output link 1 3 2 1 4 1 1 1 setup 3 2 4 2 Alice - Bob 100 Mbps Alice - Bob 100 Mbps 3 VC #1 VC #1

23 1 1 3 2 4 2 3 1 3 2 1 4 1 done Alice - Bob 100 Mbps VC #1 VC
input link output link VC input link output link 1 3 2 1 4 1 1 1 3 2 4 done 2 Alice - Bob 100 Mbps 3 VC #1

24 1 1 3 2 4 2 3 1 3 2 1 4 1 VC=1 VC #1 VC #1 VC input link output link

25 millions of concurrent connections 2 10 5 3 3 24 4 4 2 5 1 7 6 16 7 7
VC input link output link 1 3 2 millions of concurrent connections 2 10 5 3 3 24 4 4 2 5 1 7 6 16 7 7 16 3

26 Virtual-circuit networks
Useful for network-layer guarantees Forwarding state: per connection VC #, input link, output link populated by connection setup

27 Internet network-layer services
Best-effort delivery

28 dest. address output link dest. address output link 1 3 1 2 1 1 2 2 2 2 3 3 3 4 1 1 dest=1 3 2 4 1 2 3

29 dest. address output link dest. address output link 2 1 1 2 3 3 otherwise 1 otherwise 4 1 1 dest=1 3 2 4 1 2 3

30 dest. address range output link 0 - 3 00** 1 4 - 7 01** 2 8 - 11 10** 3 11** 4 1110 0100

31 dest. address range output link 0 - 2 00** 1 3 0011 0011 2 4, 6, 7 01** 0100, 0110, 0111 3 5 0101 0101 2 8 - 15 1*** 4 0011 0101 0010

32 dest. address range output link 0 - 1 000* 1 2 - 3 001* 2 4 - 7 01** 3 8 1000 1000 2 9 - 15 1*** 4 prefixes 1000 1010

33 Datagram networks Appropriate for best-effort service
Forwarding state: per destination prefix destination prefix, output link populated by routing process

34 Why the datagram approach?
It scales better no per-connection state in routers It keeps the network simpler no support for connection setup and teardown in routers

35 dest. address range output link 0 - 3 00** 1 4 - 7 01** 2 8 - 11 10** 3 11** 4

36 dest. address range output link 0 - 2 00** 1 3 0011 0011 2 4, 6, 7 01** 0100, 0110, 0111 3 5 0101 0101 2 8 - 15 1*** 4

37 dest. address range output link 0 - 1 000* 1 2 0010 0010 2 3 0011 0011 3 4, 6, 7 01** 0100, 0110, 0111 2 4 5 0101 0101 8 - 15 1*** 1 10 1010 1010 3

38 Location-dependent addresses
Address embeds location information address proximity implies location proximity Significantly reduces forwarding state per destination prefix (otherwise, it would be per destination)

39 Outline Network-layer functions Network-layer services
IP forwarding ++

40 IP address format IP address = number from 0 to 232-1

41 IP prefix format IP prefix = range of IP addresses 223.1.1.0 / 24 mask
/ 24 mask ******** *

42 IP prefix format IP prefix = range of IP addresses 223.1.1.74 / 24
/ 24 mask ******** *

43 IP prefix format IP prefix = range of IP addresses 223.1.1.74 / 24
/ 24 mask / 24 / 24 *

44 IP prefix format IP prefix = range of IP addresses 223.1.1.0 / 8 mask
/ 8 mask ******** ******** ******** 223.*.*.*

45 IP prefix format IP prefix = range of IP addresses 223.1.1.0 / 12 mask
/ 12 mask **** ******** ******** from: from: to: to:

46 /24 IP subnet /24 /24 /24 /24 /24

47 /24 dest= dest= /24 /24

48 IP subnet (Informal) Contiguous network area that does not “include” any routers All its end-systems and incident routers have IP addresses from the same IP prefix

49 /24 IP subnet /24 /24 /24 /24 /24

50 IP address assignment Each organization obtains IP prefixes
from its ISP or from regulatory body Network operator assigns IP addresses to router interfaces: manually to end-systems: manually or through DHCP

51 223.1.1.0/24 10.0.0.0/24 private address space IP dst=223.1.9.2
IP dst= IP src= IP dst= IP src= /24 private address space IP dst= IP src=

52 Network Address Translation (NAT)
IP address origin TCP port 756 954 new TCP port /24 IP dst= IP src= TCP dst port=954 IP dst= IP src= TCP dst port=756 IP dst= IP src= TCP src port=954 NAT gateway /24 Network Address Translation (NAT) IP dst= IP src= TCP src port=756

53 Network Address Translation
IP subnet uses private address space Attached to NAT gateway with public IP rewrites private source IP address with its own encodes original source into source port

54 Network Address Translation
Resolves IP address depletion problem Requires per-connection state

55

56 IP fragmentation & reassembly
When packet size exceeds MTU router fragments it adds an identifier to each fragment The end-system reassembles the fragments before passing the packet to the transport layer

57 IP forwarding Choose the output link Perform IP fragmentation
look up destination IP address in forwarding table perform longest prefix matching Perform IP fragmentation when packet size exceeds MTU reassembly happens at the destination end-system

58 Network Address Translation
IP subnet uses private address space Attached to NAT gateway with public IP rewrites private source IP address with its own encodes original source into source port


Download ppt "Lecture 8: The Network Layer."

Similar presentations


Ads by Google