Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 4, slide: 1 CS 372 – introduction to computer networks* Friday July 23, 2010 Announcements: r Midterms are graded. r Lab 4 is posted. Acknowledgement:

Similar presentations


Presentation on theme: "Chapter 4, slide: 1 CS 372 – introduction to computer networks* Friday July 23, 2010 Announcements: r Midterms are graded. r Lab 4 is posted. Acknowledgement:"— Presentation transcript:

1 Chapter 4, slide: 1 CS 372 – introduction to computer networks* Friday July 23, 2010 Announcements: r Midterms are graded. r Lab 4 is posted. Acknowledgement: slides drawn heavily from Kurose & Ross * Based in part on slides by Bechir Hamdaoui and Paul D. Paulson.

2 Internet addresses r A key aspect of a virtual network is a single, uniform address format r Can't use hardware addresses because different technologies have different address formats r Can't use addresses that are local to a network because multiple networks might use the same addresses internally r Address format must be independent of any particular hardware address format Chapter 4, slide: 2

3 IP address notation r IP address is just a 32-bit number  It’s the same internally, regardless of its external representation  In decimal form, the range is [0 … 4294967296]  Some are reserved  In hexadecimal form, the range is [00000000 … FFFFFFFF] divides naturally into 4 2-hexdigit groups e.g.:80 FD 28 1C each group represents one byte (octet) Binary form is 10000000 11111101 00101000 00011100 r For convenience, use dotted decimal notation  e.g.:128.253.40.28 (= 80.FD.28.1C)  range is [0.0.0.0 … 255.255.255.255] Chapter 4, slide: 3

4 4 IP Addressing: introduction r IP address: 32-bit identifier for  host,  router interface r interface: connection between host/router and physical link  multiple interfaces per router  one interface per host  one IP address per interface 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.1 = 11011111 00000001 00000001 00000001 223 111

5 Chapter 4, slide: 5 Subnets r IP address:  subnet part (higher bits)  host part (lower bits) r What’s a subnet ?  device interfaces with same subnet part of IP address  can physically reach each other without intervening router network consisting of 3 subnets 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 subnet 11001000 00010111 00010000 00000000 subnet part host part 200.23.16.0/23

6 Chapter 4, slide: 6 Subnets 223.1.1.0/24 223.1.2.0/24 223.1.3.0/24 Recipe r 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

7 Chapter 4, slide: 7 Subnets How many? 223.1.1.1 223.1.1.3 223.1.1.4 223.1.2.2 223.1.2.1 223.1.2.6 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.2 223.1.7.0 223.1.7.1 223.1.8.0223.1.8.1 223.1.9.1 223.1.9.2

8 Chapter 4, slide: 8 IP addresses: how to get one? Q: How does host get IP address? r hard-coded by system admin in a file r DHCP: Dynamic Host Configuration Protocol:  dynamically get IP address from as server when joining the network  IP address can be reused by other hosts if released  Can renew IP addresses if stayed connected

9 Chapter 4, slide: 9 DHCP client-server scenario 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E DHCP server arriving DHCP client needs address in this network

10 Chapter 4, slide: 10 IP addresses: how to get one? Q: How does network get subnet part of IP addr? A: gets allocated portion of its provider ISP’s address space ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20 Organization 0 11001000 00010111 00010000 00000000 200.23.16.0/23 Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23 Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23... ….. …. …. Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23

11 Chapter 4, slide: 11 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

12 IP address format r Each IP address is divided into a prefix and a suffix r Prefix identifies the network and the type of network to which a host computer is attached r Suffix identifies a host computer within that network r Usually includes indicator for number of bits used for prefix r Address format enables efficient routing Chapter 4, slide: 12

13 IP address hierarchy r Every network in a TCP/IP internet is assigned a unique network number r Each host on a specific network is assigned a host number or host address that is unique within that network r Host's IP address is the combination of the network number (prefix) and host address (suffix) Chapter 4, slide: 13

14 IP address assignment r Network numbers (prefixes) are unique r Host addresses (suffixes) may be duplicated on different networks r The combination of network number prefix and host address suffix is unique in the entire internet Chapter 4, slide: 14

15 IP address assignment r Assignment of network numbers must be coordinated globally r Assignment of host addresses can be managed locally Chapter 4, slide: 15

16 IP address design r IP-v4 designers chose 32-bit addresses r Allocate some bits for prefix, some for suffix  Large prefix, small suffix - many networks, few hosts per network  Small prefix, large suffix - few networks, many hosts per network r Because of the wide variety of technologies, need to allow for both large and small networks Chapter 4, slide: 16

17 IP addressing (two types): Classful addressing: A, B, C  A: /8  B: /16  C: /24 CIDR: Classless InterDomain Routing  network portion of address of arbitrary length  address format: a.b.c.d/x, where x is # bits in network portion of address 11001000 00010111 000100 00 00000000 network part host part 200.23.16.0/22 (only 2 8 networks, but 2 24 hosts per network) (2 16 networks, and 2 16 hosts per network) (2 24 networks, but only 2 8 hosts per network) Chapter 4, slide: 17

18 IP address classes: Classful addressing r Multiple address formats that allow both large and small prefixes r Each format is called an address class r The class of an address is identified by first four bits r The number of bits allocated for the prefix is determined by the class Chapter 4, slide: 18

19 IP address classes: Classful addressing Chapter 4, slide: 19

20 Chapter 4, slide: 20

21 IP address classes: Classful addressing r Class A, B and C are primary classes  Used for ordinary host addressing r Class D is used for multicast, a limited form of broadcast  Internet hosts join a multicast group  Packets are delivered to all members of group  Routers manage delivery of single packet from source to all members of multicast group  Used for multicast backbone r Class E is reserved Chapter 4, slide: 21

22 Determining IP class r Dotted decimal makes separating network address from host address easier r Look at first dotted decimal number, and use this table: Chapter 4, slide: 22

23 How many networks? r Classful scheme does not yield equal number of networks in each class r class A:  First bit must be 0  7 remaining bits identify Class A net  2 7 (= 128) possible class A nets Minus a few that are reserved r class B:  First 2 bits must be 10  14 remaining bits identify Class B net  2 14 (= 16384) possible class B nets Minus a few that are reserved r class C:  First 3 bits must be 110  21 remaining bits identify Class C net  2 21 (= 2097152) possible class C nets Minus a few that are reserved Chapter 4, slide: 23

24 Networks and hosts in each class 8 16 24 Chapter 4, slide: 24

25 What if the form doesn't fit? r Large organizations may not be able to get as many addresses in the Internet as they need r Example - UPS needs addresses for millions of computers r Example – School needs 6000 hosts  Too big for class C, too many wasted addresses for class B Chapter 4, slide: 25

26 Possible solutions r Classless addressing  allow division between prefix and suffix at any bit boundary r Sharing an IP address  Use one IP address for multiple hosts Chapter 4, slide: 26

27 Classless Addressing Example 128.193.47.25dotted decimal 80 C1 2F 19hexadecimal 1000 0000 1100 0001 0010 1111 0001 1001 binary This can be “re-aligned” to use variable-size prefixes and suffixes. Example: Suppose we want a 22-bit prefix and a 10-bit suffix Chapter 4, slide: 27

28 Example: r 1000 0000 1100 0001 0010 1111 0001 1001 r Logical AND with a "mask" using 22 bits for prefix (netmask), 10 bits for suffix: 1111 1111 1111 1111 1111 1100 0000 0000 r … gives a prefix: 1000 0000 1100 0001 0010 1100 0000 0000 r The complement mask (hostmask) 0000 0000 0000 0000 0000 0011 1111 1111 r … gives a suffix: 0000 0000 0000 0000 0000 0011 0001 1001 Chapter 4, slide: 28

29 Example: 1000 0000 1100 0001 0010 1100 0000 0000 0000 0000 0000 0000 0000 0011 0001 1001 i.e., the “network number” is 80C12C00h, and the “host number” within the network is 319h r With 10 bits for suffix, 1024 host addresses are available within the subnet (but 2 of these are reserved) r Address still looks almost the same in dotted decimal  128.193.47.25 / 22  Additional information is provided so addressing can be handled by routers Chapter 4, slide: 29

30 CIDR r CIDR (Classless Inter-Domain Routing) address includes specification for number of bits to use for the netmask  Example:host address 128.193.47.25/22  What is the netmask? 255.255.252.0  What is the network address? 128.193.44.0  What is the hostmask? 0.0.3.255  What is the host number? 0.0.3.25 = 319h = 793 (decimal) Chapter 4, slide: 30

31 CIDR r What is the netmask for /20 ?  255.255.240.0 r What is the netmask for /24 ?  255.255.255.0 r What is the netmask for /27 ?  255.255.255.224 r How many hosts can be supported in /28 ?  2 4 - 2 = 14 Chapter 4, slide: 31

32 Chapter 4, slide: 32 Example Subnet 1 Subnet 2 Subnet 3 r Three subnets r All interfaces in all these subnets are required to have prefix: 223.1.13/24 r Subnet 1 is required to support 125 interfaces r Subnet 2 & 3 are each required to support 60 interfaces r Question: Provide 3 network addresses in the form: a.b.c.d/x

33 IP address assignment r Select an address class for each network depending on expected number of hosts r Assign network numbers from appropriate classes r Assign host suffixes to form internet addresses for all hosts r The lowest host number (0) is not used because that complete address is the network address  e.g., 192.168.5.0 r The highest host number (depends on network type) is not used because that complete address is the “broadcast address” for the network  e.g., 192.168.5.255 Chapter 4, slide: 33

34 OSU IP addresses r Oregon State has a single Class B network: 128.193.0.0 r All hosts at OSU have 128.193 prefix r E.G.:  ns1.oregonstate.edu128.193.0.10  ns2.oregonstate.edu128.193.4.20 r Suffix bytes are used to determine local network and host through subnetting r Individual host addresses assigned by system administrators  may be static or dynamic assignment Chapter 4, slide: 34

35 IP address allocation r Addresses in the Internet are not used efficiently  Less than 10% of possible addresses are actually assigned r Concerns about address space being exhausted r OSU is like most organizations, using 5,000- 6,000 out of possible 2 16 (= 65,536) available addresses Chapter 4, slide: 35

36 Routing table information r In the routing table  Destination stored as network address  Next hop stored as IP address of router r Address mask defines how many bits of address are in prefix  Prefix defines how much of address used to identify network  e.g., class B mask is 255.255.0.0 In binary: 11111111111111110000000000000000 Chapter 4, slide: 36

37 Example: Routing table for Chapter 4, slide: 37

38 Consider 192.4.10.26: Routing table for doesn’t care what does with the packets Chapter 4, slide: 38

39 Address masks r To identify destination network, apply address mask to destination address and compare to network address in routing table r Use Boolean and if ((Mask[i] & D) == Dest[i]) forward to NextHop[i] Chapter 4, slide: 39


Download ppt "Chapter 4, slide: 1 CS 372 – introduction to computer networks* Friday July 23, 2010 Announcements: r Midterms are graded. r Lab 4 is posted. Acknowledgement:"

Similar presentations


Ads by Google