Download presentation
Presentation is loading. Please wait.
Published byKornelia Sadowska Modified over 5 years ago
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
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
3
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 analogy: routing: process of planning trip from source to dest forwarding: process of getting through single interchange Network Layer
4
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-end-path through network forwarding table determines local forwarding at this router Network Layer
5
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
6
Datagram forwarding table
4 billion IP addresses, so rather than list individual destination address list range of addresses (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
7
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
8
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
9
IP addressing: introduction
IP address: 32-bit identifier for host, router interface interface: connection between host/router and physical link router’s 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
10
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 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
11
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
12
Subnets /24 /24 /24 subnet recipe to determine the subnets, detach each interface from its host or router, creating islands of isolated networks each isolated network is called a subnet subnet mask: /24 Network Layer
13
Subnets how many? Network Layer
14
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
15
Network Layer 4-15 Network Layer
16
Binary Numbers 00000000 in binary = 0 in decimal
… in binary = 254 in decimal in binary = 255 in decimal Network Layer
17
IP Address Written in dotted-decimal format for humans to read
Binary = Dotted decimal format = Two parts specified by subnet mask Network address Host address Example IP address with subnet mask Network portion = Host portion = 26 Network Layer
18
Special IP Addresses Host bits are all zero describes network
/24 refers to the network Host bits all ones refers to directed broadcast /24 Broadcast Multicast range Private IP ranges (not supposed to be routed) – Loopback – 127.X.Y.Z like (also called home) Network Layer
19
How many valid host IP addresses can I use?
/24 Why? reserved to specify network reserved for directed broadcast Network Layer
20
And now you understand this!
21
IP addresses: how to get one?
Q: How does a host get IP address? hard-coded by system admin in a file Windows: control-panel->network->configuration->tcp/ip->properties UNIX: /etc/rc.config DHCP: Dynamic Host Configuration Protocol: dynamically get address from as server “plug-and-play” Network Layer
22
DHCP client-server scenario
/24 arriving DHCP client needs address in this network /24 /24 Network Layer
23
IP addressing: the last word...
Q: how does an ISP get block of addresses? A: ICANN: Internet Corporation for Assigned Names and Numbers allocates addresses manages DNS assigns domain names, resolves disputes Network Layer
24
IPv6: motivation initial motivation: 32-bit address space soon to be completely allocated. In February 2011, the Internet Assigned Numbers Authority (IANA) allocated final free block of IPv4 addresses. They have recovered some unused ones since then. additional motivation: header format helps speed processing/forwarding header changes to facilitate QoS IPv6 datagram format: fixed-length 40 byte header no fragmentation allowed Network Layer
25
IPv6 datagram format priority: identify priority among datagrams in flow flow Label: identify datagrams in same “flow.” (concept of“flow” not well defined). next header: identify upper layer protocol for data ver pri flow label payload len next hdr hop limit source address (128 bits) destination address (128 bits) data 32 bits Network Layer
26
Graph abstraction: costs
u y x w v z 2 1 3 5 c(x,x’) = cost of link (x,x’) e.g., c(w,z) = 5 cost could always be 1, or inversely related to bandwidth, or inversely related to congestion cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp) key question: what is the least-cost path between u and z ? routing algorithm: algorithm that finds that least cost path Network Layer
27
Host-to-host communication
Is the network layer for host-to-host communication or process-to-process communication? Host-to-host communication The transport layer is for process-to-process communication Network Layer
28
True or False. Routers must process the IP address of every datagram.
Network Layer
29
True or False. Routers maintain state about end-to-end connections.
Routers look at the IP address of a datagram, determine the next link to send it to, send it, and forget about it Network Layer
30
How many bytes are in an IPv4 IP address?
4 bytes (32 bits) Network Layer
31
True or False. It is assumed that device interfaces with the same subnet part of the IP address can physically reach each other without intervening router. True If a device is not configured with the correct subnet part, it may not be able to communicate correctly. Network Layer
32
What are the two ways that a PC can obtain an IP address?
Automatically from a DHCP server Configure the PC to find a DHCP server and ask for an address An administrator can configure the PC with an IP address Network Layer
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.