ip adress and routing(networking)

98
Module 6 IP Address and Routing (The Internetworking Layer) By Dr. Percy DIAS

Upload: welcometofacebook

Post on 28-Jan-2015

132 views

Category:

Devices & Hardware


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: IP adress and routing(networking)

Module 6 IP Address and Routing

(The Internetworking Layer)

By Dr. Percy DIAS

Page 2: IP adress and routing(networking)

Internet Addresses

Page 3: IP adress and routing(networking)

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)

Page 4: IP adress and routing(networking)

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

Page 5: IP adress and routing(networking)

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

Page 6: IP adress and routing(networking)

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.

Page 7: IP adress and routing(networking)

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

Page 8: IP adress and routing(networking)

8

Hierarchical IP addresses

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

Page 9: IP adress and routing(networking)

9

Address Class (Classful Addresses)

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

Page 10: IP adress and routing(networking)

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

Page 11: IP adress and routing(networking)

11

IP Address Range

Page 12: IP adress and routing(networking)

12

Analyzing the Structure of IP Addresses

• The value of the first octet denotes class of address

Page 13: IP adress and routing(networking)

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

Page 14: IP adress and routing(networking)

14

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

Page 15: IP adress and routing(networking)

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

Page 16: IP adress and routing(networking)

16

Number of Different Class A, B, and C Networks

Page 17: IP adress and routing(networking)

17

Reserved IP Addresses: Network Address

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

Page 18: IP adress and routing(networking)

18

Network Address

Page 19: IP adress and routing(networking)

19

Reserved IP Addresses: Broadcast Addresses

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

Page 20: IP adress and routing(networking)

20

Broadcast Address

Page 21: IP adress and routing(networking)

21

Correct Convention for Classful Network Numbers

Page 22: IP adress and routing(networking)

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

Page 23: IP adress and routing(networking)

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

Page 24: IP adress and routing(networking)

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

Page 25: IP adress and routing(networking)

25

Private IP Addresses

• Internet routers immediately discard private addresses

Page 26: IP adress and routing(networking)

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

Page 27: IP adress and routing(networking)

27

Network Address Translation (NAT )

Page 28: IP adress and routing(networking)

28

IPv6

• IPv6 uses hexadecimal numbers to represent the 128 bits

Page 29: IP adress and routing(networking)

Obtaining an IP Address

Page 30: IP adress and routing(networking)

30

Windows Static IP Configuration

Page 31: IP adress and routing(networking)

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

Page 32: IP adress and routing(networking)

32

Dynamic Host Configuration Protocol (DHCP) IP Address Assignment

Page 33: IP adress and routing(networking)

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

Page 34: IP adress and routing(networking)

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.

Page 35: IP adress and routing(networking)

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.

Page 36: IP adress and routing(networking)

36

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

Page 37: IP adress and routing(networking)

37

DNS Request and Reply

Page 38: IP adress and routing(networking)

38

DNS Hierarchy

Page 39: IP adress and routing(networking)

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

Page 40: IP adress and routing(networking)

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.

Page 41: IP adress and routing(networking)

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)

Page 42: IP adress and routing(networking)

42

Simple ARP Process

Page 43: IP adress and routing(networking)

43

Example of the ARP Process

Page 44: IP adress and routing(networking)

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)

Page 45: IP adress and routing(networking)

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.

Page 46: IP adress and routing(networking)

46

Gateways Enable Communications between Networks

Page 47: IP adress and routing(networking)

47

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

172.16.10.2

Page 48: IP adress and routing(networking)

48

IP Routing Logic Including Data Link Perspective

Page 49: IP adress and routing(networking)

Routing Fundamentals and Subnets

Page 50: IP adress and routing(networking)

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.

Page 51: IP adress and routing(networking)

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)

Page 52: IP adress and routing(networking)

52

IP Routing Logic, from IP Perspective

Page 53: IP adress and routing(networking)

53

Use of the ARP Cache in Routing

Network

Page 54: IP adress and routing(networking)

54

Comparing Routing and Switching Logic

Page 55: IP adress and routing(networking)

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)

Page 56: IP adress and routing(networking)

56

Comparing Routers and Switches

Page 57: IP adress and routing(networking)

57

Routed Protocol vs Routing Protocol

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

Page 58: IP adress and routing(networking)

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

Page 59: IP adress and routing(networking)

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)

Page 60: IP adress and routing(networking)

60

Connected Routes Only, on R1 and R2

Page 61: IP adress and routing(networking)

61

Routing Protocols

Page 62: IP adress and routing(networking)

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

Page 63: IP adress and routing(networking)

63

R1 Learns Multiple Routes for 172.16.3.0

Page 64: IP adress and routing(networking)

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

Page 65: IP adress and routing(networking)

65

R1 Learning One Metric 1 and One Metric 2 Route

Page 66: IP adress and routing(networking)

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

Page 67: IP adress and routing(networking)

67

EIGRP’s Use of Constraining Bandwidth

Page 68: IP adress and routing(networking)

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

Page 69: IP adress and routing(networking)

69

Routing Tables

Page 70: IP adress and routing(networking)

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.

Page 71: IP adress and routing(networking)

71

Dynamic Routing

Page 72: IP adress and routing(networking)

72

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

•16-bit number assigned by IANA

Page 73: IP adress and routing(networking)

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

Page 74: IP adress and routing(networking)

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)

Page 75: IP adress and routing(networking)

Mechanics of Subnetting

Page 76: IP adress and routing(networking)

76

Subnetworks

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

Page 77: IP adress and routing(networking)

77

Subnetworks

Page 78: IP adress and routing(networking)

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

Page 79: IP adress and routing(networking)

79

Introduction to Subnetting

5 bits borrowed allows 25-2 or 30 subnets

12 bits borrowed allows 212-2 or 4094 subnets

Page 80: IP adress and routing(networking)

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.

Page 81: IP adress and routing(networking)

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

Page 82: IP adress and routing(networking)

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

Page 83: IP adress and routing(networking)

83

Subnet mask in decimal = 255.255.240.0

Subnet Mask

Page 84: IP adress and routing(networking)

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:

Page 85: IP adress and routing(networking)

85

Four Practice Problems: Subnet Masks Listed

89

9

Page 86: IP adress and routing(networking)

86

Subnet Scheme (3 bits to the subnet field)

Page 87: IP adress and routing(networking)

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

Page 88: IP adress and routing(networking)

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.

Page 89: IP adress and routing(networking)

89

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

Page 90: IP adress and routing(networking)

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.

Page 91: IP adress and routing(networking)

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

Page 92: IP adress and routing(networking)

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

Page 93: IP adress and routing(networking)

93

Subnetting Example with AND Operation

Page 94: IP adress and routing(networking)

94

Broadcast Addresses

Page 95: IP adress and routing(networking)

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.

Page 96: IP adress and routing(networking)

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

Page 97: IP adress and routing(networking)

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

Page 98: IP adress and routing(networking)

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