IP adress and routing(networking)

Preview:

DESCRIPTION

 

Citation preview

Module 6 IP Address and Routing

(The Internetworking Layer)

By Dr. Percy DIAS

Internet Addresses

3

IP Address as a 32-Bit Binary Number

• Network number identifies the network to which a device is attached (high order or left most bits)

• Host portion identifies the specific device on that network (lower order or right most bits)

4

IP Addressing Fundamentals

Note: The IP protocol has begun what will be a long conversion from IP version 4 to IP version 6. This section focuses on IP version 4.

• Basic Facts About IP Addresses

-They must be unique inside a particular network

-They are 32-bit numbers

-They are typically written, entered and displayed as dotted-decimal numbers (e.g., 10.1.5.66)

-Each decimal number in a dotted-decimal IP address represents 8 bits of the IP address (often called an octet)

-Each of the four decimal values in an IP address is between 0 and 255, inclusive

5

Dual-Homed Computer

• Device cannot be said to have an address, but each of its connection points (or interfaces) to a network has an address that allows other computers to locate it on that particular network

6

Network Layer Addressing

• Network ID enables a router to put a packet onto the appropriate network segment. Host ID helps the router deliver the packet to a specific host.

7

How IP Routing Uses IP Addresses

• Routers learn routes to directly connected networks easily

• Routers can forward packets to networks that are not directly connected by sending them to another router, called the next-hop router

• IP routing relies on organization of IP addresses into groups to allow efficient routing:

- IP addresses on the same physical network must have the same value in the first part of the addresses

- Routers can scale their routing tables because they need only one entry for each IP network

8

Hierarchical IP addresses

•MAC address: Flat address, locally significant•IP address: Globally significant

9

Address Class (Classful Addresses)

•Allocation of addresses is managed by American Registry for Internet Numbers (ARIN)

10

Identifying Address Class

IP Address Class Higher Order Bits First Octet Address Range

Class A 0 0-127*

Class B 10 128-191

Class C 110 192-223

Class D 1110 224-239

11

IP Address Range

12

Analyzing the Structure of IP Addresses

• The value of the first octet denotes class of address

13

Calculating the Number of Hosts per Network

• Count the number of bits in the host portion of the address

• For a Class A network, there are 24 host bits, which gives 224 addresses (16,777,216 addresses)

• However, the 1st and last addresses are reserved for the network and network broadcast addresses

• Actual host addresses = 2n - 2

14

Number of Hosts in Each Class A, B, and C Network

15

Number of Class A, B, and C Networks

• Class A networks have a one-octet network field

- Might think that there are 28 or 28 – 2 networks available

- Since all Class A networks start with a binary 0, only 7 bits are available for network numbers

- 27 – 2 = 126 Class A networks

• Same logic can be applied to Class B and C networks, but no need to subtract two networks as there are not any reserved network addresses

16

Number of Different Class A, B, and C Networks

17

Reserved IP Addresses: Network Address

• All zeros in the host portion of the address are reserved for the entire network

18

Network Address

19

Reserved IP Addresses: Broadcast Addresses

• All ones in the host portion of the address specifies the broadcast address for that network

20

Broadcast Address

21

Correct Convention for Classful Network Numbers

22

IP Network Number and the Broadcast Address

• Two numbers in each network must be reserved for special purposes

- Cannot be assigned as unicast address to any host

- The network number is one of the reserved addresses

- The network broadcast address is a dotted-decimal number that, when a packet is sent to this address, it is sent to every host on the network

23

IP Network Number and the Broadcast Address

• Two numbers in each network must be reserved for special purposes (continued)

- The network broadcast address has all 1s in the host portion of the address

- The network number is numerically the smallest number in the network, and the network broadcast address is the largest number in the network

- The term host address is often used to describe any address that can be assigned to an interface in a network

24

Public and Private Address

• Public IP addresses are unique

• No two machines that connect to a public network can have the same IP address

• Private networks that are not connected to the Internet can have any valid address as long as it is unique within the private network

• Grabbing “just any address” is strongly discouraged because that network might eventually be connected to the Internet

25

Private IP Addresses

• Internet routers immediately discard private addresses

26

NAT and Private IP Networks

• Connecting a network to the Internet using private addresses requires translating the private address to public address: Network Address Translation (NAT)

• NAT allows a company to use a few registered IP addresses instead of an entire network

• Hosts inside the company network typically use private IP addresses

27

Network Address Translation (NAT )

28

IPv6

• IPv6 uses hexadecimal numbers to represent the 128 bits

Obtaining an IP Address

30

Windows Static IP Configuration

31

Static Assignment of an IP address

• IP addresses can be assigned either statically or dynamically

• When IP addresses are assigned statically, each device must be configured with an IP address

• Assign static IP address, if the device need to be referenced by other devices (like an address of a building)

• Records of the address assignments to be kept, because problem can occur if duplicated IP addresses are used

• Servers should be assigned a static IP address so workstations and other devices know how to access needed service

• Other devices that should be assigned static IP addresses are network printers, application servers and routers

32

Dynamic Host Configuration Protocol (DHCP) IP Address Assignment

33

Dynamic Host Configuration Protocol (DHCP) IP Address Assignment

• DHCP uses the concept of the client making a request and the server supplying the IP address to the client, plus other information such as the default gateway, subnet mask, DNS IP address

• Allows a host to obtain IP address using a defined range of IP addresses on a DHCP server

• As host come online, contact DHCP server and request an address

• DHCP server choose an address and leases it to a device and then reclaim that IP address for another user after the first user release it

• DHCP request UDP port number 67 and reply port number 68

34

Problems in Address Resolution

• In TCP/IP communications, a datagram on a local-area network must contain both a destination MAC address and a destination IP address.

• TCP/IP needs a way to let a computer find the IP address of another computer based on its name.

• TCP/IP also needs a way to find MAC addresses associated with other computers.

35

Problems in Address Resolution

• Hannah Knows her own name, IP address, and MAC address because those things are configured in advance

• To find Jessie’s IP and MAC address, Hannah uses the Domain Name System (DNS) and the Address Resolution Protocol (ARP).

• DNS server IP address can be preconfigured or learned using Dynamic Host Configuration Protocol (DHCP).

• Hannah simply sends a DNS request to the server, supplying the name jessie, or jessis.skylinecomputer.com, and the DNS replies with the IP address.

36

Hannah knows Jessie’s Name, Needs IP Address and MAC Address

37

DNS Request and Reply

38

DNS Hierarchy

39

Address Resolution Protocol (ARP)

• Some devices keep ARP tables which contain MAC address and IP addresses of other devices that are connected to the same LAN

40

Address Resolution Protocol (ARP)

• When a network devices analyze the incoming data frames to determine if the transmission for them, part of this process adds the IP-MAC source addresses to the ARP table.

• ARP table is dynamically updated, adding and removing entries based on segment activity and timeout values (time to keep an entry in the table).

• Length of time is depend on the OS, typically a few hours.

41

ARP operation within a subnet

• If host knows the IP address, but not MAC address, host build an ARP request (ARP broadcast) and sends it to all devices (MAC broadcast)

• Destination device responds by sending its MAC address (ARP reply)

42

Simple ARP Process

43

Example of the ARP Process

44

Default Gateway• IP address of the interface on the router that connect to

the network segment on which the source host is located (default gateway’s IP address must be the same network segment as the source host)

45

Default Gateway

• With a default gateway set on a computer, the destination IP address is compared with the host source address

• If the destination is in another network, destination MAC address is default gateway MAC address.

46

Gateways Enable Communications between Networks

47

Host Logic: Sending a Packet to Another Subnet by Using a Default Gateway

172.16.10.2

48

IP Routing Logic Including Data Link Perspective

Routing Fundamentals and Subnets

50

Path Determination

• Path determination enables a router to compare the destination address to the available routes in its routing table, and to select the best path.

51

Routing Overview

• Routing is the process of finding the most efficient path from one device to another

• Router has two key functions

– Maintain routing table and make sure other routers know of changes in the network topology

– When packets arrive at an interface, the router must use the routing table to determine where to send the packets. (It switches them to appropriate interface)

52

IP Routing Logic, from IP Perspective

53

Use of the ARP Cache in Routing

Network

54

Comparing Routing and Switching Logic

55

Comparing the Benefits of Routing and Switching

• Switches provide the performance benefits of making collision domains smaller, and providing for full duplex transmission

• Routers provide a method of using sophisticated security tools such as access control lists (ACLs)

56

Comparing Routers and Switches

57

Routed Protocol vs Routing Protocol

Routing protocols determine the path that routed protocols follow to their destinations.

58

Routed Protocol

• Protocols that transfer data from one host to another across a router are routed or routable protocols

• Includes any network protocol suite that provides enough information in its network layer address to allow a router to forward it to the next device and ultimately to its destination.

–IP

–Internetwork Packet Exchange (IPX)

–Apple Talk

59

Routing Protocol

• Routers use routing protocols to exchange routing tables and share routing information

• Provides processes for sharing route information.

• Allows routers to communicate with other routers to update and maintain the routing tables (through the transmission of routing updates).

–Routing Information Protocol (RIP)

–Interior Gateway Routing Protocol (IGRP): Cisco proprietary

–Enhanced Interior Gateway Routing Protocol (EIGRP): Cisco proprietary

–Open Shortest Path First (OSPF)

60

Connected Routes Only, on R1 and R2

61

Routing Protocols

62

Basics of Learning Routes with Routing Protocols

• Each router sends messages to other routers attached to the same subnets

- The messages list all the routing information they know

- Each router sends routing updates containing information about new routes

- Eventually, all the routers learn all the routes

• Figure shows how Routing Information Protocol (RIP) advertises and learns routes

63

R1 Learns Multiple Routes for 172.16.3.0

64

Using Metrics to Pick the Best Routes

• A router can learn of multiple routes when there is redundancy in the network

• Routing protocols determine the best route by using a metric

- The metric allows a router to measure how good each competing route is and to pick the best route

• RIP is a simple routing protocol that uses only hop count as its metric

- The hop count metric represents how many routers sit between a router and a destination subnet

65

R1 Learning One Metric 1 and One Metric 2 Route

66

Other Metric Components

• Cisco proprietary routing protocols such as Interior Gateway Routing Protocol (IGRP) and Enhanced Interior Gateway Routing Protocol (EIGRP) can use four metrics

- Bandwidth

- Delay

- Link loading

- Link error rate (reliability)

• By default, both IGRP and EIGRP use only bandwidth and delay

67

EIGRP’s Use of Constraining Bandwidth

68

Routing Table

• Protocol type

– Type of routing protocol that created the routing table entry

• Destination/ next-hop association

– Tell a router that a particular destination is either directly connected to the router or that it can be reached via another router called the next hop on the way to the final destination

• Routing metrics

– Routing metrics are used to determine a route’s desirability

• Outbound interface

– Interface that the data must be sent out to reach the final destination

69

Routing Tables

70

Route Types

• Static Routes:

–Routes learned by the router when an administrator manually establishes the route. The administrator must manually update this static route entry whenever an internetwork topology requires an update, such as during a link failure.

• Dynamic Routes:

–Routes automatically learned by the router after an administrator configures a routing protocol that helps determine routes. Unlike static routes, as soon as the network administrator enables dynamic routing, route knowledge is automatically updated by a routing process whenever new topology information is received from routers within the internetwork.

71

Dynamic Routing

72

Interior Gateway Protocols (IGP) and Exterior Gateway Protocols (EGP)

•16-bit number assigned by IANA

73

IGP and EGP

• IGPs route data within an autonomous system.

–RIP, RIPv2, IGRP, EIGRP, OSPF, IS-IS

• EGPs route data between autonomous systems

–Border Gateway Protocol (BGP) 4

74

Type of Routing Protocols

• Examples of distance-vector protocols:

–Routing Information Protocol (RIP)

–Interior Gateway Routing Protocol (IGRP)

• Examples of link-state protocols:

–Open Shortest Path First (OSPF)

–Intermediate System-to-Intermediate System (IS-IS)

• Examples of Hybrid Protocol:

–Enhanced IGRP (EIGRP)

Mechanics of Subnetting

76

Subnetworks

To create a subnet address, a network administrator borrows bits from the original host portion and designates them as the subnet field.

77

Subnetworks

78

Introduction to Subnetting

• Host bits must are reassigned (or “borrowed”) as network bits.

• The starting point is always the leftmost host bit.

3 bits borrowed allows 23-2 or 6 subnets

79

Introduction to Subnetting

5 bits borrowed allows 25-2 or 30 subnets

12 bits borrowed allows 212-2 or 4094 subnets

80

Reasons for Subnetting

• Provides addressing flexibility for the network administrator.

Each LAN must have its own network or subnetwork address.

• Provides broadcast containment and low-level security on the LAN.

• Provides some security since access to other subnets is only available through the services of a router.

81

Subnet Addresses

• Internet knows your network as a whole, subnet field will become additional routing bits, routers within your organization can recognize different locations, or subnets, within the whole network

82

Subnet Mask

• Determines which part of an IP address is the network field and which part is the host field.

• Follow these steps to determine the subnet mask:

1. Express the subnetwork IP address in binary form.

2. Replace the network and subnet portion of the address with all 1s.

3. Replace the host portion of the address with all 0s.

4. Convert the binary expression back to dotted-decimal notation.

• Default Subnet Mask

83

Subnet mask in decimal = 255.255.240.0

Subnet Mask

84

Subnet Mask

27 26 25 24 23 22 21 20

128 64 32 16 8 4 2 1

1 0 0 0 0 0 0 0 =128

1 1 0 0 0 0 0 0 =192

1 1 1 0 0 0 0 0 =224

1 1 1 1 0 0 0 0 =240

1 1 1 1 1 0 0 0 =248

1 1 1 1 1 1 0 0 =252

1 1 1 1 1 1 1 0 =254

1 1 1 1 1 1 1 1 =255

Class A: 1-126 (0xxx…..)Class B: 128-191 (10xx…..)Class C: 192-223 (110xx…)

First Octet:

85

Four Practice Problems: Subnet Masks Listed

89

9

86

Subnet Scheme (3 bits to the subnet field)

87

Subnetting Chart

• The “slash format” is a shorter way of representing the subnet mask:

• /25 represents the 25 bits in the subnet mask 255.255.255.128

88

Creating Subnet

• Borrow at least 2 bits

• At least 2 bits must remain for host numbers

• Number of usable subnets: 2n – 2 where n is the number of bits borrowed

• Number of usable host: 2m – 2 where m is the number of remaining bits

• To determine the number of bits to be used, network designer needs to calculate how many hosts the largest subnet requires and the number of subnet.

• Network administrators decide the size of subnets based on organization and growth needs.

89

Four Practice Problems: Finding the Number of Subnet and Host Bits

90

Subnetting Class A and B Networks

• The available bits for assignment to the subnet field in a Class A address is 22 bits while a Class B address has 14 bits.

91

The address 197.15.22.131 would be on the subnet 197.15.22.128.

11000101 00001111 00010110 100 00011

Network Field SN Host Field

Class C address 197.15.22.131 with a subnet mask of 255.255.255.224 (3 bits borrowed)

Determining Subnet Mask Size

92

Calculating the Subnetwork With ANDing

• ANDing is a binary process by which the router calculates the subnetwork ID for an incoming packet.

1 AND 1 = 1; 1 AND 0 = 0; 0 AND 0 = 0

• The router then uses that information to forward the packet across the correct interface.

Packet Address 192.168.10.65 11000000.10101000.00001010.010 00001

Subnet Mask 255.255.255.224 11111111.11111111.11111111.111 00000

Subnetwork Address 192.168.10.64 11000000.10101000.00001010.010 00000

93

Subnetting Example with AND Operation

94

Broadcast Addresses

95

Broadcast Addresses

• Local or flooded broadcasts (255.255.255.255) are not propagated by Layer 3 internetworking device.

• Broadcasts directed into a specific network are allowed and are forwarded by a Layer 3 device if configured

• In Cisco IOS Release 12.0 and later, routers by default do not forward all subnets or directed broadcast.

96

Cisco Academy 3 References

Slide 3,5 CCNA1 9.2.1

Slide 6,8,10 CCNA1 9.2.3

Slide 9,11 CCNA1 9.2.4

Slide 17-20 CCNA1 9.2.5

Slide 24-26 CCNA1 9.2.6

Slide 31 CCNA1 9.3.2

Slide 32-33 CCNA1 9.3.5

Slide 34-37 CCNA1 9.3.6

Slide 39-42, 44-45 CCNA1 9.3.7

97

Cisco Academy 3 References

Slide 49,69 CCNA1 10.2.4

Slide 50 CCNA1 10.2.1

Slide 56-58 CCNA1 10.2.3

Slide 67-68 CCNA1 10.2.5

Slide 70-71 CCNA1 10.2.7

Slide 72 CCNA1 10.2.9

Slide 74-79 CCNA1 10.3.2

Slide 80-82 CCNA1 10.3.3

Slide 84-85 CCNA1 10.3.4

Slide 88-89 CCNA1 10.3.5

Slide 90-91 CCNA1 10.3.6

98

Cisco Academy 4 Exploration Reference

Slide 3-4 Networking Fundamentals 6.1.1

Slide 9-11 Networking Fundamentals 6.2.6-6.2.7

Slide 12-16 Networking Fundamentals 6.5.3-6.5.7

Slide 17-23 Networking Fundamentals 6.2.1

Slide 24-25 Networking Fundamentals 6.2.5

Slide 32 Networking Fundamentals 6.3.6

Slide 32-33 Networking Fundamentals 3.3.5

Slide 34-37 Networking Fundamentals 3.3.1

Slide 39-43 Networking Fundamentals 9.7.1-9.7.4

Slide 49-50 Routing Protocol and Concepts 1.4.1-1.4.4

Slide 74-93 Networking Fundamentals 6.5.1-6.5.6

Recommended