Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Layer IS250 Spring 2010

Similar presentations


Presentation on theme: "Network Layer IS250 Spring 2010"— Presentation transcript:

1 Network Layer IS250 Spring 2010 chuang@ischool.berkeley.edu

2 John Chuang2 Network Layer  Application (layer 7): specific to application need  Transport (layer 4): end-to-end delivery, congestion and flow control  Network (layer 3): addressing, routing  Data Link (layer 2): framing, error detection  Physical (layer 1): bits (0/1), voltages, frequencies, wires, pins, … IP TCP, UDP HTTP, FTP, NNTP, SMTP, telnet,... coax, twisted pair, fiber, wireless,... Ethernet FDDI, SONET Wi-Fi

3 John Chuang3 L3 Outline  Addressing: -Internet Protocol (IP): address notation; address allocation; address translation  Packet switching: -Routing: BGP, OSPF, RIP -Packet forwarding: IP fragmentation, TTL, …  Extensions: -IP Multicast; QoS; Mobile IP; IPSec; …  Evolution: -IPv6

4 John Chuang4 Internet Protocol  Supports two main functions: -Addressing -Packet switching (routing)  Allows packets to traverse multiple networks -hence the term “inter-networking”  Delivers packet to specified destination host  Best effort service model -deliver as reliably and as soon as it can

5 John Chuang5 IP Does Not:  Guarantee latency for packets that are delivered  Guarantee delivery, or notify source host if packet is not delivered  Guarantee order of delivery  Guarantee integrity of packet payload  Maintain conversational context (each packet is independent)  Specify process that should receive the packet at destination host

6 John Chuang6 “Definition” of the Internet "Internet" refers to the global information system that -- -(i) is logically linked together by a globally unique address space based on the Internet Protocol (IP) or its subsequent extensions/follow-ons; -(ii) is able to support communications using the Transmission Control Protocol/Internet Protocol (TCP/IP) suite or its subsequent extensions/follow-ons, and/or other IP-compatible protocols; and -(iii) provides, uses or makes accessible, either publicly or privately, high level services layered on the communications and related infrastructure described herein. Resolution passed by the Federal Networking Council (FNC) October 24, 1995

7 John Chuang7 IP Address  An IP address identifies a network interface, i.e., a connection between a computer and a network, not a specific computer. -A computer with multiple network interfaces (e.g., a router) must be assigned one IP address for each interface.  IP (version 4) addresses are 32 bits long -2 32 = 4,294,967,296 unique IPv4 addresses  IPv6 addresses are 128 bits long -2 128 = 340,282,366,920,938,463,463,374,607,431,768,211,455 = 3.4*10^38 unique IPv6 addresses

8 John Chuang8 Dotted Decimal Notation  Represent each byte (8 bits) in decimal separated by dots 128 32 226 87  Hostname: www.ischool.berkeley.edu  IP address: 128.32.226.87 01631824 1 0 0 0 0 0 0 00 0 1 0 0 0 0 01 1 1 0 0 0 1 00 1 0 1 0 1 1 1 Domain Name Service (DNS) performs translation

9 John Chuang9 Example of Dotted Decimal Notation  Four decimal values per 32-bit address  Each decimal number -Represents eight bits -Is between 0 and 255

10 John Chuang10 IP Address  Divided into two parts -Prefix identifies network -Suffix identifies host  Global authority (IANA) assigns unique prefix to network  Local administrator assigns unique suffix to host

11 John Chuang11 Illustration of Router Addresses  Routers usually have multiple IP addresses -One address needed for each network interface -Address prefix identifies network

12 John Chuang12 Special Addresses (Reserved)

13 John Chuang13 Original Classes of Addresses  Initial bits determine class  Class determines boundary between prefix and suffix

14 John Chuang14 IP Addresses

15 John Chuang15 Classful Addresses and Network Sizes  Maximum network size determined by class of address  Class A large (mostly assigned or reserved)  Class B medium (mostly assigned)  Class C small

16 John Chuang16 IP Address Exhaustion  32 bit address space not enough -Exacerbated by inefficient allocation of addresses  Several approaches to deal with problem: -Increase IP address length (IPv6) -Overcome inefficient address allocation -Subnetting -Classless inter-domain routing (CIDR) -Allow sharing of addresses -Network Address Translation (NAT) -Dynamic Address Allocation (DHCP)

17 John Chuang17 Subnetting  Problem: -Class A and class B address blocks have too many host ID’s allocated (tremendous waste of addresses) -Can we support multiple physical networks (subnets) within a single class A or class B address block?  Solution: External routing based on Network ID Internal routing based on Subnet ID -Significantly reduces the number of entries required in Internet routing tables.

18 John Chuang18 Subnetting  Host ID portion is divided into subnet ID and host ID  Routers and hosts use a subnet mask to separate the subnet id from the host id.  Example: supporting 256 subnets within a class B network Network IDHost ID 16 Subnet IDHost ID 16 88 IP address (Class B) Network ID 16 Subnet IDHost ID 88 IP address (Class B) 111111111111111111111111 24 00000000 8 Subnet mask (255.255.255.0)

19 John Chuang19 Example: Router Operation with Subnet Mask  Router R: -Receives incoming IP packet (128.32.226.87) -Applies subnet mask (255.255.255.0) via logical AND operation -Gets result (128.32.226.0) -Also applies subnet mask to its own addresses (one on each subnet) -Gets: 128.32.1.0, 128.32.226.0 -There is a match (128.32.226.0) -Router delivers to host on that network Internet 128.32.1.0 128.32.226.0 128.32.0.1 128.32.226.1 128.32.1.1 128.32.226.87 128.32.1.87 128.32.0.0 R

20 John Chuang20 Classless Inter-Domain Routing (CIDR)  Drops notion of fixed classes  Represent network address as: -E.g., 65.0.0.0/8 or simply 65/8; 192.1.2.0/22  Prefix_size is length of “network id” field (in bits)  CIDR allows arbitrary prefix size -Each network can be as large or small as needed (power of two)  Backward-compatible with network classes: -Class A networks have prefix size of 8 -Class B networks have prefix size 16 -Class C networks have prefix size 24

21 John Chuang21 CIDR Example  Combining four class C networks -192.1.4.0/24 -192.1.5.0/24 -192.1.6.0/24 -192.1.7.0/24 -First two can be combined as: 192.1.4.0/23 -Last two can be combined as: 192.1.6.0/23 -All four can be combined as: 192.1.4.0/22

22 John Chuang22 Classless Addressing ABCD 0 2 32 -1 0 128.9/16 128.9.0.0 2 16 142.12/19 65/8 Classless: Class-based: 128.9.16.14 (drawings not to scale) 128.9.16/20 Most specific route = “longest matching prefix”

23 John Chuang23 Network Address Translation  Network Address Translators (NATs) allow multiple hosts within a local network to share a single IP address  From outside perspective, the network appears as a single end host  Can use arbitrary IP address scheme within network -Typically: 10.0.0.0 or 192.168.0.0  Most common implementation is actually Network Address and Port Translation (NAPT) -Maps internal to external where ports are transport layer (Layer 4) addresses -Incorporated into most residential gateway routers today -Controversial because it violates layering principle

24 John Chuang24 NAT Example: Outbound Source: David Maltz

25 John Chuang25 NAT Example: Inbound Source: David Maltz


Download ppt "Network Layer IS250 Spring 2010"

Similar presentations


Ads by Google