72
NT1210 Introduction to Networking Unit 8: Chapter 8, The Internet Protocol (IP) Chapter 8, The Internet Protocol (IP) 1

NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Embed Size (px)

Citation preview

Page 1: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

NT1210 Introduction to Networking

Unit 8:Chapter 8, The Internet Protocol (IP)Chapter 8, The Internet Protocol (IP)

1

Page 2: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

ObjectivesObjectives

Id tif th j d d t k h ld f tIdentify the major needs and stakeholders for computer networks and network applications.

Identify the classifications of networks and how they areIdentify the classifications of networks and how they are applied to various types of enterprises.

Compare and contrast the OSI and TCP/IP models andCompare and contrast the OSI and TCP/IP models and their applications to actual networks.

Explain the functionality and use of typical network protocols.

2

Page 3: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

ObjectivesObjectives

Diff ti t j t f LAN d WANDifferentiate among major types of LAN and WAN technologies and specifications and determine how each is used in a data network.

Explain basic security requirements for networks.

Use network tools to monitor protocols and trafficUse network tools to monitor protocols and traffic characteristics.

Plan and design an IP network by applying subnetting skills.

Explain the functionality of typical network protocols.

3

Page 4: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

ObjectivesObjectives

Pl d d i IP t k b l i b ttiPlan and design an IP network by applying subnetting skills.

Categorize TCP/IP protocols according to networkCategorize TCP/IP protocols according to network model layers.

Describe how TCP/IP addressing moves data packetsDescribe how TCP/IP addressing moves data packets through networks.

4

Page 5: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)

TCP/IP M d l i L 1 d 2 P t lTCP/IP Model review: Layers 1 and 2 Protocols

Figure 8-1Example LAN/WAN Standards and Types in the TCP/IP Model5

Page 6: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)

TCP/IP M d l i U l d fi h i lTCP/IP Model review: Upper layers define non-physical (logical) networking functions

Figure 8-2Various Perspectives on the TCP/IP Model and Roles6

Page 7: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)

N t k L t lNetwork Layer protocolsIP: Most important protocol defined by Network layer

Almost every computing device on planet communicates andAlmost every computing device on planet communicates, and most use IP to do so

Network layer also defines other protocols

7

Page 8: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)Network Layer protocols: Part 1y p

Name Full Name Comments

ICMPInternetwork Control

Messages that hosts and routers use to manage and control packet forwarding process; used byICMP

Message Protocol and control packet forwarding process; used by ping command

ARPAddress Resolution Used by LAN hosts to dynamically learn

ARPProtocol another LAN host’s MAC address

DHCPDynamic Host Configuration Protocol

Used by host to dynamically learn IP address (and other information) it can use

DNSDomain Name System/Service

Allows hosts to use names instead of IP address; needs DNS server to translate name into corresponding IP address (required by IP

Table 8-1Other TCP/IP Network Layer Protocols

y p g ( q yrouting process)

8

Page 9: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)Network Layer protocols: Part 2y p

Name Full Name CommentsApplication that runs on routers so that routers

RIPRouting Information Protocol

Application that runs on routers so that routers dynamically learn IP routing tables (used to route IP packets correctly); open standard

t l d fi d i RFC 2453protocol defined in RFC 2453

EIGRPEnhanced Interior Gateway Routing

Proprietary routing protocol owned by Cisco Systems

Protocol Systems

OSPFOpen Shortest Path First

Open source routing protocol defined in RFC 2328

Table 8-1Other TCP/IP Network Layer Protocols9

Page 10: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)

IP 6 N t ti f IP dd iIPv6: Next generation of IP addressing.

Needed because IPv4 addresses exhausted.

128-bit long addresses: 2128 or 3.4x1038 or over 340 undecillion IPs, that’s 340 with 36 zero’s after it.

C t ll t /64 b t hi h i ld 4 billiCustomer usually gets /64 subnet, which yields 4 billion times IPs available in all of IPv4.

Comparison: Number of IPv4 addresses equal to weightComparison: Number of IPv4 addresses equal to weight of cat; number of IPv6 addresses equal to weight of Earth and provides enough IP addresses for every grain f d b h thof sand on every beach on earth.

10

Page 11: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)

Mi ti t IP 6 h t k d d d till iMigration to IPv6 has taken over decade and still in process.

IPv6 originally defined back in mid 1990sIPv6 originally defined back in mid-1990s.

June 6, 2012 – Was the scheduled IPv6 Day, official worldwide “switch over” day, moved up to Februaryworldwide switch over day, moved up to February 2012.

Figure 8-3IPv4 Vs. IPv6 Timeline11

Page 12: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)

IP d fi f ti th t k t th ithIP defines many functions that work together with one ultimate goal: To send data from one host to another host through any TCP/IP network.g y

Most important functions include:Creating end-to-end physical paths through TCP/IP network by g p y p g yinterconnecting physical networks (LANs and WANs) using routers

Identifying individual hosts and groups of hosts using IPIdentifying individual hosts and groups of hosts using IP addressing

Routing (forwarding) IP packets to correct destination host

Figure 8-4Example of a Post Office Sorting a Letter Sent to Hollywood, California12

Page 13: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)

IP i lik P t OffiIP is like Post Office

Figure 8-4Example of a Post Office Sorting a Letter Sent to Hollywood, California13

Page 14: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)

R t i IP t k I t t LAN d WANRouters in IP network: Interconnect LANs and WANs via physical connectors called interfaces

Example: Cisco 1841 router with two built-in Gigabit EthernetExample: Cisco 1841 router with two built in Gigabit Ethernet LAN interfaces that use RJ-45 connectors

Figure 8-5Enterprise Class Router, LAN Interfaces, and WAN Interfaces14

Page 15: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)

IP i t t LAN d WANIP interconnects LANs and WANs

Figure 8-7Interconnected LANs and WANs: Redundancy, but No LAN/WAN Detail15

Page 16: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)

IP 4 AddIPv4 Addresses32 bitsExpressed in binary and dotted decimal formsExpressed in binary and dotted decimal formsSource and destination IP addresses included in 20-byte IP header added to all IP packets

Figure 8-8IPv4 Header Format and Fields16

Page 17: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)

C ti bi IP dd t d tt d d i lConverting binary IP address to dotted decimal 1. Separate 32 bits into 4 groups of 8 bits each

2 Do binary-to-decimal conversion of each 8-bit number (each2. Do binary to decimal conversion of each 8 bit number (each decimal value between 0 and 255)

3. Put period (dot) between each decimal number

Figure 8-9Generic View of Converting from Binary IP Address to DDN Format17

Page 18: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP)

E l C ti bi IP dd t d tt dExample: Converting binary IP address to dotted decimal

Figure 8-10Converting Binary IP Address to DDN 10.1.2.318

Page 19: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP):Introducing the Internet Protocol (IP): Routing

R ti IP P k t f S t D ti tiRouting IP Packets from Source to DestinationIP addressing groups addresses into networks

All dd ith l i fi t t f ddAll addresses with same value in first parts of addresses considered to be in one network

Example: All addresses that begin with 11, 12, 13, 14, or 15 in that particular network

Figure 8-11Example IP Address Groupings: All with the Same First Octet in the Same Group19

Page 20: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP):Introducing the Internet Protocol (IP): Routing

IP ti l ith ti t bl PC11 i l ft LANIP routing example with routing tables: PC11 in left LAN sends IP packet to address 12.1.1.21 (LAN on upper right)g )

Figure 8-12Example IP Address Groupings: All with the Same First Octet in the Same Group20

Page 21: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP):Introducing the Internet Protocol (IP): Routing

R t b ild ti t bl i tRouters build routing tables in two waysStatic configuration: Routes entered manually and do not changeg

Dynamic routingprotocol: Application router uses torouter uses to automatically learn new routes from other routersot e oute s

Figure 8-13Routing Protocols Advertising All Addresses that Begin with 12 as One Route21

Page 22: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP): OtherIntroducing the Internet Protocol (IP): Other Protocols

D i N S t /S i (DNS) M iDomain Name System/Service (DNS): Mapping names to IP addresses

Users use names; IP ;routing uses numbers

DNS translates name into corresponding IP addresscorresponding IP address

DNS client sends DNS Request message

DNS server returns DNS Reply

Figure 8-14DNS Name Resolution Request, Reply, and Packet to Server1 IP Address22

Page 23: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Introducing the Internet Protocol (IP): OtherIntroducing the Internet Protocol (IP): Other Protocols

Layer 3 - NetworkLayer 3 - Network

Figure 8-15IP with its Support Protocols23

Page 24: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

L ti N d IP ddLocations Need IP addressesEach LAN and WAN interface on hosts and routers need IP address to communicateaddress to communicate

Figure 8-17IP Addresses Used on Every LAN/WAN Interface24

Page 25: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

IP Add i All IP ti t k b ttIP Address grouping: Allows IP routing to work better

Routers list one number to represent each network (address group) in routing tables(address group) in routing tables

Figure 8-18IP Address Groupings: IP Networks25

Page 26: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

Original IPv4 RFC defined way to group IPv4 addressesOriginal IPv4 RFC defined way to group IPv4 addresses using IP address classes (classful IP addressing) Every possible IPv4 address falls into class

First Octet Class Purpose0 A Reserved 1 - 126 A Unicast addresses, in class A networks 127 A Reserved for loopback testing128 - 191 B Unicast addresses, in class B networks ,192 - 223 C Unicast addresses, in class C networks 224 - 239 D Multicast addresses; not used as unicast IP addresses240 255 E Experimental; not used as unicast IP addresses

Table 8-2Summary of IPv4 Address Classes Based on First Octet Values26

240 - 255 E Experimental; not used as unicast IP addresses

Page 27: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

Class A includes lower half of IPv4 address space: AllClass A includes lower half of IPv4 address space: All IPv4 address that begin with first octet between 0 and 127

Network ID Class A IP Network ConceptSize (Number of Addresses)

1.0.0.0 All addresses with a first octet equal to 1 > 16,000,0002.0.0.0 All addresses with a first octet equal to 2 > 16,000,000 3.0.0.0 All addresses with a first octet equal to 3 > 16,000,000 4.0.0.0 All addresses with a first octet equal to 4 > 16,000,000 … Etc…. > 16,000,000126 0 0 0 All addresses with a first octet equal to 126 > 16 000 000

Table 8-3Example Class A Networks27

126.0.0.0 All addresses with a first octet equal to 126 > 16,000,000

Page 28: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

Class B includes ¼ of IPv4 address space with firstClass B includes ¼ of IPv4 address space with first octet value from 128 – 191Includes medium number (216) of medium sized IP networks for approximately 65,000 hosts per network

Network ID ConceptSize (Number of Addresses)of Addresses)

128.1.0.0 All with a first two octets equal to 128.1 > 65,000128.2.0.0 All with a first two octets equal to 128.2 > 65,000 128 3 0 0 All ith fi t t t t l t 128 3 > 65 000128.3.0.0 All with a first two octets equal to 128.3 > 65,000 150.48.0.0 All with a first two octets equal to 150.48 > 65,000 180.255.0.0 All with a first two octets equal to 180.255 > 65,000

Table 8-4Example Class B Networks28

191.200.0.0 All with a first two octets equal to 191.200 > 65,000

Page 29: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

Class C includes 1/8th of IPv4 address space with firstClass C includes 1/8 of IPv4 address space with first octet between 192 and 223Large number of small IP networks: over 2,000,000 IP networks, each with 256 IP addresses each

Network ID ConceptSize (Number of Addresses)Addresses)

192.1.1.0 All with a first three octets equal to 192.1.1 254192.1.2.0 All with a first three octets equal to 192.1.2 254 192 1 3 0 All ith a first three octets eq al to 192 1 3 254192.1.3.0 All with a first three octets equal to 192.1.3 254 200.200.200.0 All with a first three octets equal to 200.200.200 254 220.255.0.0 All with a first three octets equal to 220.255.0 254

Table 8-5Example Class C Networks29

223.1.1.0 All with a first three octets equal to 123.1.1 254

Page 30: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

LAN IP dd lLAN IP address classes summary

Figure 8-20Summary of How Class Rules Break Down the IPv4 Address Space30

Page 31: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

Private addresses: Classful IP networks reserved forPrivate addresses: Classful IP networks reserved for enterprises to use in their network designsCan only be used on local LAN; can’t be routed through WAN (non-routable)Not regulated by agencies such as ARIN or ICANN

Network ID Concept Size (Number of Addresses)

10.x.x.x Class A Private IP addressing spaceOver 16,000,000 networks of over 16,000,000 IPs each, ,

172.16.x.x –172.31.x.x

Class B Private IP addressing spaceOver 65,000 networks of over>65,000 IPs eachOver 65 000 networks of 256

31

192.168.x.x Class C Private IP addressing spaceOver 65,000 networks of 256IPs each

Page 32: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

St ti IP dd i t M ll fi dStatic IP address assignment: Manually configured

Figure 8-21Static IP Address Assignment on Mac OS X32

Page 33: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

M t h t OS’ ll t ti fi ti f lMost host OS’s allow static configuration of several network settings

Figure 8-22Host IP Settings33

Page 34: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

D i H t C fi ti P t l (DHCP)Dynamic Host Configuration Protocol (DHCP) defines way hosts can lease IP address from DHCP network server so does not have to be configured gstatically

Operates on client-server concept

DHCP protocol defined by set of RFCs

Figure 8-23Sample Network for DHCP Discussions34

Page 35: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

E l IP dd i t d i i b thExample: IP address assignment design using both DHCP and statically assigned addresses

Location Type Range

Atlanta LANStatic 11.1.1.1 - 11.1.1.254 DHCP 11.1.2.1 - 11.1.2.254

Boston LANStatic 172.20.1.1 - 172.20.1.254 DHCP 172.20.2.1 - 172.20.2.254 Static 172 30 1 1 172 30 1 254

San Fran LANStatic 172.30.1.1 - 172.30.1.254 DHCP 172.30.2.1 - 172.30.2.254

Table 8-6Address Planning: Some Static, Some DHCP, for Every LAN35

Page 36: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

O DHCP i t i t k d h bOnce DHCP server exists in network and has been configured with set of IP addresses to lease, DHCP clients can request IP addressesq

Figure 8-24DHCP Lease Process between a DHCP Client and Server36

Page 37: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

U lt f DHCP f tUser can see results of DHCP process from computer

Figure 8-25DHCP Client Configuration on Mac OS X37

Page 38: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Addressing on User LANs: NetworkIP Addressing on User LANs: Network Settings

DHCP l C i t k t DHCPDHCP example: Crossing networks to access DHCP server

Figure 8-26Remote DHCP Client in Boston38

Page 39: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Short BreakShort Break

Take 10

39

Page 40: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3

IP d fi h t t k t TCP/IP t kIP defines how to route packets across TCP/IP network

Some routing tasks must use logic from lower two layers because Network layer (3) cannot physicallylayers because Network layer (3) cannot physically send bits

Network layer relies on yLayers 1 and 2 logic for this

Figure 8-27IP Routing Perspective, While Ignoring LAN/WAN Details40

Page 41: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3

R t t h IP ti t bl ith f l t i tRouter must have IP routing table with useful entries to route IP packets.

Routing table may list multiple routesRouting table may list multiple routes.

Each IP route identifies network, as well as other information about how to send packets to that network.information about how to send packets to that network.

Routers look at incoming packet’s destination IP address and compare it to list of network IDs in its routing table to determine where to send packet to destination.

41

Page 42: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3

Fi di l f l t k ID b d IP ddFinding a classful network ID based on IP address

Figure 8-28Five Classful Networks in a Small Corporate Network42

Page 43: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3

E h t i ti t bl li tEach route in routing table lists: Information about how to match IP packetsto match IP packets

Forwarding instructions that tell router where to forward packets to (e g nextpackets to (e.g., next router)

Example: R1’s IP routing table shows five network IDs so it knows routes to all five networks

Figure 8-29R1 Routing Table with Routes for Five Classful Networks43

Page 44: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3

R t i i IP k t’ d ti tiRouter compares incoming IP packet’s destination address to information in its routing tables to find best route to destination

Figure 8-30How Router R1 Uses its IP Routing Table: Match and Forward44

Page 45: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3

Figure 8-31Routing from End-to-End: Multiple Cooperative Routing Decisions45

Page 46: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3:IP Routing with Focus on Layer 3: Subnetting

Cl f l IP t k d t d IP ddClassful IP networks and wasted IP addressesSubnetting: Process of subdividing network to create smaller groups of consecutive IP addressesgroups of consecutive IP addresses

Subnets (subdivided networks): Smaller groups of addresses

Figure 8-32Numbers of Classful Networks, and Their Sizes46

Page 47: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3:IP Routing with Focus on Layer 3: Subnetting

E l S l b t t d b b tti t kExample: Several subnets created by subnetting network 10.0.0.0

Each subnet has subnet/network IDEach subnet has subnet/network ID

Figure 8-33Subdividing (Subnetting) Class A Network 10.0.0.047

Page 48: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3:IP Routing with Focus on Layer 3: Subnetting

E l ti d IP dd d t kExample continued: IP addresses and networks replaced with five subnets of network 10.0.0.0

Figure 8-34Sample Corporate Network Using Subnets of Network 10.0.0.048

Page 49: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3:IP Routing with Focus on Layer 3: Subnetting

S b t k Sh h h f IP dd f hSubnet mask: Shows how much of IP address for each device is in common to all IPs in subnet

Example 255 255 255 0 (/24): First three octets (first 24 bits)Example 255.255.255.0 (/24): First three octets (first 24 bits) must be equal for all subnets in network

PC11 sends packet to PC21 (d ti ti IP dd(destination IP address 10.1.2.21)

R1 will have route for PC21’s subnet (network ID 10.1.2.0)

Figure 8-35Routing Logic with Subnets and Masks49

Page 50: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3:IP Routing with Focus on Layer 3: Subnetting

Cl f l t k h d f lt b t k b dClassful networks have default subnet mask based on each class

Class A: 255 0 0 0 (8 bits)Class A: 255.0.0.0 (8 bits)

Class B: 255.255.0.0 (16 bits)

Class C: 255.255.255.0 (24 bits)Class C: 255.255.255.0 (24 bits)

If subnet mask anything other than default, then subnetting being used

Figure 8-35Routing Logic with Subnets and Masks50

Page 51: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3:IP Routing with Focus on Layer 3: Subnetting

H t l l t b tHow to calculate subnets1. Determine network class (A, B, or C)2. Determine EITHER number of hosts needed for each subnet2. Determine EITHER number of hosts needed for each subnet

OR how many subnets needed3. Determine how many bits needed to provide correct number of

hosts/subnets; last subnet is NOT usablehosts/subnets; last subnet is NOT usable4. Calculate IPs for each subnet; first IP identifies subnet (Network

ID) and last IP identifies broadcast address5 Determine subnet mask (total number of bits for network/subnet5. Determine subnet mask (total number of bits for network/subnet

ID)

51

Page 52: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3:IP Routing with Focus on Layer 3: Subnetting

E l C l l ti b t f t k 192 168 12 0Example: Calculating subnets for network 192.168.12.0Class: CNumber of subnets needed: 14Number of subnets needed: 14Number of bits needed to supply 14 subnets: 3Number of bits left to determine number of IPs per subnet: 5 (results in 32 IPs per subnet)(results in 32 IPs per subnet)Subnet mask: 255.255.255.224 (default 16 bits + 3 more bits for subnetting = 19 bits)

52

Page 53: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3:IP Routing with Focus on Layer 3: Subnetting

Subnet No. Network ID Host Range IPs Broadcast IP0 192.16.12.0 192.16.12.1 – 192.16.12.30 192.16.12.311 192.16.12.32 192.16.12.33 – 192.16.12.62 192.16.12.632 192.16.12.64 192.16.12.65 – 192.16.12.94 192.16.12.953 192.16.12.96 192.16.12.97 – 192.16.12.126 192.16.12.1274 192.16.12.128 192.16.12.129 – 192.16.12.158 192.16.12.1595 192.16.12.160 192.16.12.161 – 192.16.12.190 192.16.12.1916 192 16 12 192 192 16 12 161 192 16 12 222 192 16 12 2236 192.16.12.192 192.16.12.161 – 192.16.12.222 192.16.12.2237 192.16.12.224 192.16.12.225 – 192.16.12.254 192.16.12.255

53

Page 54: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3:IP Routing with Focus on Layer 3: Subnetting

Wh t h h PC11 d IP k t t PC12What happens when PC11 sends IP packet to PC12: Same subnet1 PC11 determines its own1. PC11 determines its own

IP address and subnet mask (10.1.1.11 and 255.255.255.0) )

2. PC11 decides determines destination is in same subnetsubnet

3. PC11 sends packet directly to PC12 without going through router R1

Figure 8-36IP Host Routing Logic: Local Destination54

Page 55: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Focus on Layer 3:IP Routing with Focus on Layer 3: Subnetting

Wh t h h PC11 d IP k t t PC12What happens when PC11 sends IP packet to PC12: Different subnets1 Host’s default gateway (default router) setting tells it where to1. Host s default gateway (default router) setting tells it where to

send packets when they have destination address in different subnet

2 Default gateway tells host2. Default gateway tells host IP address of router attached to its LAN

3. Router then consults its routing table and determines how to deli er packetdeliver packet

Figure 8-37IP Host Routing Logic: Remote Destination55

Page 56: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

E l ti A ti t k b l l h itEncapsulation: Action taken by lower layer when it takes data from higher layer and adds header (and sometimes trailer) to higher layer’s data) g y

Example: PC11 opened web browser and tried to connect to URL at web server: PC11 creating bits it uses to send to server S1 (web server)

Figure 8-38Encapsulation Review: Application, Transport, and Network Layers56

Page 57: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

PC l ti IP k t i t Eth t f ( t 4)PC encapsulating IP packet into Ethernet frame (step 4)

Sending bits over LAN cable into network (step 5)

Figure 8-39Encapsulation Review: Data Link Layer57

Page 58: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

D l ti O th d ti ti idDe-encapsulation: On the destination side

Figure 8-40De-encapsulation on a Receiving Host (S1)58

Page 59: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

Add i f d k t h i SAMEAddressing frames and packets when crossing SAME subnet: Both MAC and IP addresses in Ethernet frame and encapsulated IP packetp p

Figure 8-42IP and Ethernet Addresses, PC11 to server S1, Same Subnet59

Page 60: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

T l d ti ti MAC dd di d iTo learn destination MAC address, sending device uses Address Resolution Protocol (ARP) and info in ARP table

Address Short Answer Long Answer

Source MAC On NIC Given to Ethernet NIC by manufacturer; sending host can find MAC on NIC hardware.

Source IP Configuration Either through static configuration or DHCP

Destination MAC ARP

From its ARP table, or if not found, by using ARP protocol and sending ARP Request and waiting MAC for ARP Reply from destination

Destination IP User Either typed or clicked by user

Table 8-9How a Sending IP Host Knows What Addresses to Use60

Page 61: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

Discovering MAC addresses using ARP: ARP RequestDiscovering MAC addresses using ARP: ARP Request and ARP Reply

ARP Request (ARPBroadcast): Sending device queries for MAC address of destination device; sends Request as broadcast t ll th d ito all other devices on subnet

Example: PC11 wants to send packet to server S1 (in same subnet) but does not know S1’s MAC address;know S1 s MAC address; PC11 sends ARP Request to all devices on subnet

Figure 8-43ARP Request (Broadcast)61

Page 62: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

ARP R l Li t IP dd ARP R t k d b tARP Reply: Lists IP address ARP Request asked about with corresponding MAC address of that hostExample: ARP Reply that serverExample: ARP Reply that server S1 makes in response to PC11’s ARP Request

ARP Reply is unicast since ARP Requestgenerated from onegenerated from oneparticular device

Figure 8-44ARP Reply (Unicast)62

Page 63: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

R ti d t b t diff t b tRouting data between different subnetsIP packets in network act like person traveling to destination, using all forms of transportation; packet goes from end-to-endusing all forms of transportation; packet goes from end to end

Data Link frames act like individual vehicles used for only part of trip (e.g., just train); frames never leave their own LAN/WAN

Figure 8-45Example, IP Packet End-to-End, Data Link Heads Stay on LAN or WAN63

Page 64: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

Addressing frames and packets when crossing subnetsAddressing frames and packets when crossing subnets example: PC11 (10.1.1.11) sends IP packet to PC21 (10.1.2.21)

Hosts sit on different LANs (may also be in different subnets)

Figure 8-46IP Addresses Stay the Same Through End-to-End Path64

Page 65: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

E l PC11 d IP k t t PC21Example: PC11 sends IP packet to PC21PC11’s logic tells it to send packet to default router because destination is in different network or subnetdestination is in different network or subnet

PC11 encapsulates packet inside Ethernet frame with destination MAC address R1

Figure 8-47Ethernet Frames Use MAC on that LAN (Only)65

Page 66: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

Removing/adding Data Link headers: Router removesRemoving/adding Data Link headers: Router removes IP packet from incoming Data Link frame (de-encapsulation) and then adds new Data Link header and trailer before sending packet (encapsulation)

Steps router goes through:1 D l t IP k t f i id D t Li k f1. De-encapsulates IP packet from inside Data Link frame2. Makes routing decision using packet’s destination IP address

and its own IP routing table, identifying correct outgoing interface

3. Encapsulates packet into new Data Link frame that works on outgoing interface

4. Sends packet through outgoing interface to destination

Figure 8-48Routers Discard Old and Add New Data Link Framing66

Page 67: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

E l Wh R1 i k t d ti d t b tExample: When R1 receives packet destined to subnet on R2

Figure 8-48Routers Discard Old and Add New Data Link Framing67

Page 68: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

IP Routing with Layer 1 2 and 3IP Routing with Layer 1, 2, and 3 Interactions

U i ARP ith t R2 d t d li IP k tUsing ARP with routers: R2 needs to deliver IP packet to host PC211 R2 builds Ethernet header with1. R2 builds Ethernet header with

PC21’s MAC address as destination

2 If R2 d t k2. If R2 does not know PC21’s MAC address (i.e., it is not in its ARP table), R2 uses ARP to learn MAC addressARP to learn MAC address

3. When R2 receives ARP Reply with PC21’sMAC address, sends frame

Figure 8-49Example of Router R2 Using ARP to Learn a Local Host’s MAC Address68

Page 69: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Summary, This Chapter…Described the main functions of the TCP/IP networkDescribed the main functions of the TCP/IP network layer in regards to its focus on either physical or logical functions, and the focus on the network or endpoint h thosts.

Listed three major functions defined by IP.

Listed common TCP/IP network layer functions in addition to IP.

Examined a figure of an Enterprise TCP/IP network andExamined a figure of an Enterprise TCP/IP network and determine where IP address groups (IP networks or subnets) would be needed.

69

Page 70: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Summary, This Chapter…Looked at any IP version 4 address and determined itsLooked at any IP version 4 address and determined its class, and if a unicast IP address, determined the class A, B, or C network ID of the network in which it resides.

Listed the four IP settings typically set on IP hosts during static configuration.

Described the layer 3 logic used by routers when routing IP packets.

Described an IP host’s layer 3 logic when routing IPDescribed an IP host s layer 3 logic when routing IP packets.

70

Page 71: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Summary, This Chapter…Explained the basic ideas of how the IP subnettingExplained the basic ideas of how the IP subnetting process subdivides a classful network into smaller groups.

Predicted the MAC and IP addresses used by two hosts on the same LAN subnet when they send IP packets to each otherpackets to each other.

Predicted the MAC and IP addresses used throughout an IP packet’s journey from a host in one subnet to a p j yhost in another subnet.

71

Page 72: NT1210 Introduction to Networking - YPW · NT1210 Introduction to Networking Unit 8: ... Generic View of Converting from Binary IP Address to DDN Format Figure ... IPv4 address that

Questions? Comments?

72