Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.

Similar presentations


Presentation on theme: "Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these."— Presentation transcript:

1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you see the animations; and can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) that you mention their source (after all, we’d like people to use our book!) If you post any slides on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Network Layer

2 Chapter 4: network layer
chapter goals: understand principles behind network layer services: network layer service models forwarding versus routing how a router works routing (path selection) broadcast, multicast instantiation, implementation in the Internet Network Layer

3 Chapter 4: outline 4.1 introduction
4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer

4 Network layer transport segment from sending to receiving host
application transport network data link physical transport segment from sending to receiving host on sending side encapsulates segments into datagrams on receiving side, delivers segments to transport layer network layer protocols in every host, router router examines header fields in all IP datagrams passing through it network data link physical application transport network data link physical Network Layer

5 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 destination routing algorithms Network Layer

6 Interplay between routing and forwarding
1 2 3 0111 value in arriving packet’s header routing algorithm local forwarding table header value output link 0100 0101 1001 routing algorithm determines end-to-end-path through network forwarding table determines local forwarding at this router Network Layer

7 3rd important function : Connection setup
3rd important function in some network architectures: ATM, frame relay, X.25 before datagrams flow, two end hosts and intervening routers establish virtual connection (VC) routers get involved network vs transport layer connection service: network: between two hosts (may also involve intervening routers in case of VCs) transport: between two processes Network Layer

8 Network service model Q: What service model for “channel” transporting datagrams from sender to receiver? example services for individual datagrams: guaranteed delivery guaranteed delivery with less than 40 msec delay example services for a flow of datagrams: in-order datagram delivery guaranteed minimum bandwidth to flow restrictions on “changes in inter-packet spacing (jitter)” Security Network Layer

9 Network layer service models:
Guarantees ? Network Architecture Internet ATM Service Model best effort CBR ABR Congestion feedback no (inferred via loss) no yes Bandwidth none constant rate guaranteed minimum Loss no yes Order no yes Timing no yes CBR: Constant Bit Rate ABR: Available Bit Rate Network Layer

10 Chapter 4: outline 4.1 introduction
4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer

11 Connection, connection-less service
datagram network provides network-layer connectionless service virtual-circuit network provides network-layer connection service analogous to TCP/UDP connection-oriented / connectionless transport-layer services, but: Network layer - service: host-to-host Network layer - no choice: network provides either one or the other, but not both Network layer - implementation: in network core Network Layer

12 Virtual circuits (VCs)
“source-to-dest path behaves much like telephone circuit” Performance is almost guaranteed network actions along source-to-dest path call setup, teardown for each call before data can flow each packet carries VC identifier (not destination host address) every router on source-dest path maintains “state” for each passing connection link, router resources (bandwidth, buffers) may be allocated to VC (dedicated resources = predictable service) Network Layer

13 VC implementation a VC consists of:
path from source to destination VC numbers, one number for each link along path entries in forwarding tables in routers along path packet belonging to VC carries VC number (rather than dest address) VC number can be changed on each link. new VC number comes from forwarding table Network Layer

14 VC forwarding table VC routers maintain connection state information!
22 12 32 1 3 2 VC number interface number forwarding table in northwest router: Incoming interface Incoming VC # Outgoing interface Outgoing VC # … … … … VC routers maintain connection state information! Network Layer

15 Virtual circuits: signaling protocols
used to setup, maintain teardown VC used in ATM, frame-relay, X.25 not used in today’s Internet application transport network data link physical application transport network data link physical 5. data flow begins 6. receive data 4. call connected 3. accept call 1. initiate call 2. incoming call Network Layer

16 Datagram networks no call setup at network layer
routers: no state about end-to-end connections no network-level concept of “connection” packets forwarded using destination host address application transport network data link physical application transport network data link physical 1. send datagrams 2. receive datagrams Network Layer

17 Datagram forwarding table
4 billion IP addresses, so rather than individual destination address list “range of addresses” list (aggregate table entries) routing algorithm local forwarding table dest address output link address-range 1 address-range 2 address-range 3 address-range 4 3 2 1 IP destination address in arriving packet’s header 1 2 3 Network Layer

18 Datagram forwarding table
Destination Address Range through otherwise Link Interface 1 2 3 Q: but what happens if ranges don’t divide up so nicely? Network Layer

19 Longest prefix matching
when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address. Destination Address Range *** ********* ********* *** ********* otherwise Link interface 1 2 3 examples: DA: which interface? DA: which interface? Network Layer

20 Datagram or VC network: why?
Internet (datagram) data exchange among computers “elastic” service, no strict timing req. “smart” end systems (computers) can adapt, perform control, error recovery simple inside network, complexity at “edge” ATM (VC) evolved from telephony “dumb” end systems telephones complexity inside network Network Layer

21 Chapter 4: outline 4.1 introduction
4.2 virtual circuit and datagram networks 4.3 what’s inside a router (skip) 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer

22 The Internet network layer
host, router network layer functions: transport layer: TCP, UDP IP protocol addressing conventions datagram format packet handling conventions routing protocols path selection RIP, OSPF, BGP network layer forwarding table ICMP protocol error reporting router “signaling” link layer physical layer Network Layer

23 32 bit destination IP address
IP datagram format IP protocol version number ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier header checksum time to live 32 bit source IP address head. len type of service flgs fragment offset upper layer 32 bit destination IP address options (if any) total datagram length (bytes) header length (bytes) “type” of data for fragmentation/ reassembly max number remaining hops (decremented at each router) upper layer protocol to deliver payload to e.g. timestamp, record route taken, specify list of routers to visit. how much overhead? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead Network Layer

24 IP datagram format Network Layer

25 Link MTU vs. Path MTU vs. MSS
Maximum Transmission Unit (MTU) is defined by the maximum payload size of the Layer 2 frame. Link MTU: The max packet size that can be transmitted over a link Path MTU: The minimum link MTU of all links in a path between a source and a destination Layer 3 payload determines Layer 4 Maximum Segment Size (MSS) MAC Header (Path MTU) Transport Layer

26 IP fragmentation, reassembly
network links have MTU - largest possible link-level frame different link types, different MTUs large IP datagram divided (“fragmented”) within net one datagram becomes several datagrams “reassembled” only at final destination IP header bits used to identify, order related fragments fragmentation: in: one large datagram out: 3 smaller datagrams reassembly Network Layer

27 IP fragmentation, reassembly
ID =x offset =0 flags =010 length =4000 example: 4000 byte datagram MTU = 1500 bytes ID =x offset =0 flags =001 length =1500 =185 =370 =000 =1040 one large datagram becomes several smaller datagrams 1480 bytes in data field (20 bytes in head) offset = 1480/8 offset = 2960/8 Network Layer

28 Chapter 4: outline 4.1 introduction
4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Network Layer

29 IP addressing: introduction
IP address: 32-bit identifier for host, router interface interface: connection between host/router and physical link routers typically have multiple interfaces host typically has one or two interfaces (e.g., wired Ethernet, wireless ) IP addresses associated with each interface = 223 1 1 1 Network Layer

30 IP addressing: introduction
Q: how are interfaces actually connected? A: we’ll learn about that in chapter 5, 6. A: wired Ethernet interfaces connected by Ethernet switches (or hubs) A: wireless WiFi interfaces connected by WiFi base station For now: don’t need to worry about how one interface is connected to another (with no intervening router) Network Layer

31 Subnets IP address: what’s a subnet ? subnet part - high order bits
host part - low order bits what’s a subnet ? device interfaces with same subnet part of IP address can physically reach each other without intervening router subnet network consisting of 3 subnets Network Layer

32 Subnets /24 /24 /24 subnet recipe to determine the subnets, detach each interface from its router, creating islands of isolated networks each isolated network is called a subnet subnet mask: /24 Network Layer

33 Subnets how many? Network Layer

34 Classful Addressing 0~127 128~191 192~223 224~239 240~255
Network Layer

35 Classful Addressing Class A, B and C addresses are divided into 2 parts : (fixed sized) Netid and Hostid. Network Layer

36 Classful Addressing – blocks in class A
Class A addresses are wasted!!! Network Layer

37 Classful Addressing – blocks in class B
Many class B addresses are wasted too. Network Layer

38 Classful Addressing – blocks in class C
Class C blocks are too small for most businesses. Network Layer

39 Masking Concept Given an address from a block of addresses, we can find the network address (netid) by ANDing with a mask. Network Layer

40 Masking Concept - Default masks
- Network address (netid) can be found by applying the default mask to any of the addresses in the block (including itself). - The masked address retains the netid of the block and sets the hostid to zero. Network Layer

41 IP addressing: CIDR CIDR: Classless InterDomain Routing
subnet portion of address of “arbitrary length” address format: a.b.c.d/x, where x is # bits in subnet portion of address subnet part host part /23 Network Layer

42 IP addressing: CIDR Subnet mask
Used by every machine to determine which part of IP address is to be used for the “subnet address”  /25  /26 .  /31 Network Layer


Download ppt "Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these."

Similar presentations


Ads by Google