Presentation is loading. Please wait.

Presentation is loading. Please wait.

CCNA Discovery 1 Chapter 5: Network Addressing

Similar presentations


Presentation on theme: "CCNA Discovery 1 Chapter 5: Network Addressing"— Presentation transcript:

1 CCNA Discovery 1 Chapter 5: Network Addressing

2 Contents 5.1: IP Addresses & Subnet Masks 5.2: Types of IP Addresses
Purpose of an IP Address 5.1.2 – Address Structure 5.1.3 – Parts of an Address 5.1.4 – IP Addresses & Subnet Masks 5.2: Types of IP Addresses 5.2.1 – Address Classes 5.2.2 – Public vs. Private Addresses 5.2.3 – Unicast, Broadcast and Multicast 5.3: Obtaining IP Addresses 5.3.1 – Static vs Dynamic Addresses 5.3.2 – DHCP Servers 5.3.3 – Configuring DHCP 5.4: Address Management 5.4.1 – Address Space 5.4.2 – Address Assignment – NAT 5.5: Booleans and Anding

3 5.1.1: Purpose of the IP Address
An IP address is a logical network address that identifies a particular host on a network The IP address is assigned to the Network interface connection for a host. All hosts need a unique IP address to participate and communicate with other devices on the Internet. This includes workstations, servers, network printers and IP phones Some servers can have more than one NIC and each of these has its own IP address. Router interfaces that provide connections to an IP network will also have an IP address. Every packet sent across the Internet has a source and destination IP address. This information is required by networking devices to insure the information gets to the destination and that any replies are returned to the source.

4 5.1.2: IP Address Structure IP Addresses are 32 bit addresses written in dotted decimal notation The address is represented by 32 bits (zeros and ones) The 32 bits are grouped into four 8-bit bytes called octets. Each octet is represented by its decimal value, separated by a decimal point or period. Example: This represents the address: The dotted decimal format is much easier to use The 32-bit IP address is called IP version 4 (IPv4) addressing and is currently the most common form of IP address on the Internet. There are over 4 billion possible IP v4 addresses

5 Converting IP Addresses
When a host receives an IP address, it reads it as bits as they are received on the NIC. Humans, on the other hand, need to convert those 32 bits into their four octet decimal equivalent. Each octet can be converted just like any other 8 bit binary number The maximum values for each octet are: Binary : Decimal: 255

6 Conversion of an IP Address

7 5.1.3: Parts of an IP Address IP addresses are hierarchical and re made up of two parts.: The Network Portion: identifies the network The Host Portion: identifies a host on that network IP Addressing is considered hierarchical addressing because the network portion indicates the network on which each unique host address is located. Telephone numbers are also hierarchical : the country code, area code and exchange represent the network address and the remaining digits represent a local phone number Example: The IP host address The 1st 3 octets are the Network portion: The last octet is the Host portion: 57

8 Network Addresses The network portion of the address, is used to represent the entire network It represents a group of IP addresses that can be used on that network The network address is created by taking the Network portion of the address and putting all 0’s in the host portion of the address The Network address is not a usable host IP address Network addresses are only used by routers to decide how to get packets to their destination

9 Usable Host Addresses As we just saw, the Network address is not a usable host address A usable host IP address is an IP address that does not have all 0’s or 1’s in the host portion of the address Only a usable host IP address can be assigned to a host device Example: on the network , the usable host IP addresses are: to

10 Host vs. Network Portion
Network Number Host Number

11 Network vs. Host Portion
Network Addresses Host IP Addresses

12 5.1.4: Subnet Masks Since there are two parts to every IP address, how do hosts and routers know which portion is the network and which is the host? This is the job of the subnet mask A subnet mask is a 32 bit address, like an IP address, which is written in dotted decimal notation The subnet mask is a special address that tells devices which part of the IP address is network and which part is host A subnet mask is assigned to devices at the same time as the IP address Example Subnet Masks:

13 How is the Subnet Mask Used?
When a host sends a packet, it uses the Subnet mask to decide if the packet is destined for a host on the local network or on a different network: It compares its own subnet mask to its own IP address, from left to right, bit for bit. The 1s in the subnet mask represent the network portion; the 0s represent the host portion Once it knows what network it belongs to, it compares its own subnet mask to the destination IP address If the network bits in its own address and the destination address match, it knows that the destination host is on the same network This means the packet can be delivered locally If the network bits do not match, the sending host forwards the packet to the local router interface to be forwarded to the other network.

14 Using the Subnet Mask

15 Network vs. Host Bits The subnet masks we see most often with home and small business networking are: (8-bit network) { } (16 bit network) { } (24 bit network) { } A subnet mask of uses 8 bits to identify the network number, which leaves 24 bits to create host addresses for the network A subnet mask of uses 16 bits to identify the network number, which leaves 16 bits to create host addresses for the network A subnet mask of uses 24 bits to identify the network number which leaves 8 bits to number the hosts on that network.

16 Available Host Addresses
The number of available host addresses on a network can be calculated with the formula: ^ host bits – 2 Network type Available Hosts ^ 24 = 16, 777, 216 – 2 = 16, 277, 214 ^ 16 = 65, – 2 = 65, 534 ^ 8 = – 2 = 254 The reason we always subtract 2 from the total host addresses to determine the available host addresses, is because a valid host address can not have all 0’s or all 1’s in the host portion of the address Therefore, every network has 2 addresses that can not be assigned to hosts, the very 1st address (all 0’s in the host portion) and the very last address (all 1’s in the host portion)

17 Network and Broadcast Addresses
Example Networks: 120. 170.5 All 0’s in the host portion of an IP address, represents the Network Address for that network, and can not be assigned to a host All 1s in the host portion of an IP address, represents the broadcast address for that network, and can not be assigned to a host

18 5.2.1: IP v. 4 Address Classes As we have seen, the IP address and subnet mask work together to determine which portion of the IP address represents the network address and which portion represents the host address. IP v. 4 addresses are grouped into 5 classes: Classes A, B and C are commercial addresses and are assigned to business, organizations and individuals to be used for hosts on the Internet Class D is reserved for multicast use Class E is for experimental use

19 Commercial IP Address Classes
Class C addresses are usually assigned to small networks Use 3 octets for the network and 1 for the hosts N.N.N.H The default subnet mask is 24 bits: 2, 097, 150 (2 ^ 21 – 2) possible networks 254 (2 ^ 8 – 2) available host addresses per network Class B addresses are typically used for medium-sized networks Use 2 octets for the network and 2 for the hosts N.N.H.H The default subnet mask is 16 bits: 16, 382 (2 ^ 14 – 2) possible networks 65, 534 (2 ^ 16 – 2) available host addresses per network Class A addresses are typically assigned to large organizations. Use 1 octet for the network and 3 for the hosts N.H.H.H The default subnet mask is 8 bits: 126 (2 ^ 7 – 2) possible networks 16, 777, 214 (2 ^ 24 – 2) available host addresses per network

20 The value of the 1st Octet
The class of an address can be determined by the value of the first octet Each Class of IP Address can only begin with a certain value Also notice, that there is a leading bit pattern that never changes for each class of addresses Class Decimal Value of 1st Octet Leading Bit value Class A Class B 128 – Class C 192 – Class D 224 – Class E 240 –

21 1 to 126

22 5.2.2: Public vs. Private Addresses
All hosts that connect directly to the Internet require a unique public IP address. Because there are a limited number of 32-bit addresses available, there is a risk of running out of IP addresses. One solution to this problem was to reserve some private addresses for use exclusively inside an organization. Private IP Addresses allow hosts within an organization to communicate with one another without needing a unique public IP address. The RFC 1918 standard reserves 3 ranges of Private IP Addresses, for classes A, B and C.

23 Private Network Addresses

24 Private IP Addresses Private addresses can be used internally by hosts in an organization as long as the hosts do not connect directly to the Internet. Private addresses are not routed on the Internet and are blocked by ISP routers. Hosts that are using private addresses, must use the services a computer or network device with a public IP address to access the Internet. This allows multiple organizations to use the same set of private addresses internally. The use of private addresses can also provide a measure of security since they are only visible on the local network, and outsiders cannot gain direct access to the private IP addresses.

25 The Loopback Address There are also private addresses that can be used for the diagnostic testing of devices. This type of private address is known as a loopback address. The class A, network address, is reserved for loopback testing. The loopback IP address, is used to test a NIC card to verify that it is sending and receiving signals.

26 Private IP Addresses

27 5.2.3: Unicast, Broadcast, Multicast
In addition to address classes, we also categorize IP addresses as : Unicast - one-to-one Broadcast - one-to-many Multicast- one-to-all

28 Unicast Addresses A unicast address is the most common type on an IP network. A packet with a unicast destination address is intended for a specific host. Example: a host with IP address (source) requests a web page from a server at IP address (destination) For a unicast packet to be sent and received, a destination IP address must be in the IP packet header. A corresponding destination MAC address must also be present in the Ethernet frame header. The IP address and MAC address combine to deliver data to one specific destination host.

29 Unicast Addresses

30 Multicast IP Address Multicast IP addresses allow a source device to send a packet to a group of devices. Devices that belong to a multicast group are assigned a multicast group IP address. The range of multicast addresses is: to Since multicast addresses represent a group of addresses (sometimes called a host group), they can only be used as the destination of a packet. The source will always have a unicast address. Examples: Remote gaming, with many players connected remotely to the same server Distance learning through video conferencing, with many students connected

31 Multicast MAC Addresses
A packet with a destination multicast IP address needs a corresponding multicast MAC address to actually deliver the packet on the local network. The multicast MAC address is a special value that begins with E in hexadecimal. The rest of the address is a result of converting the lower 23 bits of the IP multicast group address into the remaining 6 hexadecimal characters of the Ethernet address. Example: Multicast IP Address: Multicast MAC Address: E-0F-64-C5

32 Multicast MAC Address Example
Multicast IP Address: Multicast MAC Address: E-0F-64-C5 E - Standard Multicast MAC prefix 0F-64-C5 = The last 23 bits of the Multicast IP address in HEX Conversion: The last 23 bits of the IP address are: Those bits in Hex are: 000 = = F (15) = = = C (12) = 5

33 Multicast Addresses

34 Broadcast IP Address A Broadcast IP Address has all ones (1s) in the host portion. A Broadcast packet will be received and looked at by every host in the local network, or in the broadcast domain Many network protocols, such as ARP and DHCP use broadcasts. Examples: The Class C network uses the Broadcast address The Class B network uses the broadcast address The Class A network uses the broadcast address

35 Broadcast MAC Address A packet with a broadcast IP address needs a corresponding broadcast MAC address in the Ethernet frame. On Ethernet networks, the broadcast MAC address is FF-FF-FF-FF-FF-FF

36 Broadcast Addresses

37 5.3.1: Static IP Addresses With static IP assignment, the network administrator must manually configure the network information for a host. At a minimum, this includes the host IP address, subnet mask and default gateway. Static addresses have some advantages: Useful for printers, servers and other networking devices that need to be accessible to clients on the network. Can provide increased control of network resources, Static Addresses have some disadvantages: Time Consuming The host only performs basic error checks on the IP address. So errors are more likely to occur. When using static IP addressing, it is important to maintain an accurate list of which IP addresses are assigned to which devices.

38 Static IP Addressing

39 Dynamic IP Addresses Dynamic Assignment of IP Addresses is achieved using a protocol known as Dynamic Host Configuration Protocol (DHCP). DHCP can provide the automatic assignment of addressing information such as IP address, subnet mask, default gateway, and other configuration information. Advantages: On local networks the user population changes frequently It reduces the burden on network support staff It virtually eliminates IP Address entry errors Addresses are not permanently assigned to a host but are only leased for a period of time. If the host is powered down or taken off the network, the address is returned to the pool for reuse.

40 Dynamic IP Addressing

41 5.3.2: DHCP Server How does a Host receive an IP Address with DHCP?
The host acts as a DHCP client and contacts the local DHCP server The DHCP server assigns an IP address to your laptop. A DHCP Server is a device that is running the DHCP service software. A dedicated PC or server (medium to large networks) An Integrated Router (home networks) A dedicated Router (an ISP) Many home networks and small businesses use an integrated router to connect to the ISP modem. In this case, the integrated router is both a DHCP client and a server. The integrated router acts as a client to receive its IP configuration from the ISP and It then acts a DHCP server for internal hosts on the local network.

42 DHCP Services

43 5.3.3 DHCP Negotiation When a host is first configured as a DHCP client, it does not have an addressing information It obtains this information from a DHCP server, either on the local network or one located at the ISP. The DHCP server is configured with a range, or pool, of IP addresses that can be assigned to DHCP clients. These are the 4 steps in the DHCP Negotiation Process: When a client configured with DHCP boots, it sends out a DHCP Discover message Using the broadcast destination IP and the broadcast destination MAC FF-FF-FF-FF-FF-FF All hosts on the network will receive this broadcast DHCP frame, but only a DHCP server will reply. The DHCP server will respond with a DHCP Offer, suggesting an IP address for the client. The host then sends a DHCP Request to that server asking to use the suggested IP address. The server responds with a DHCP Acknowledgment.

44 Configuring DHCP on an ISR
For most home and small business networks, a multi-function device provides DHCP services to the local network clients. To configure a Linksys wireless router, you access its graphical web interface by opening the browser and entering the in the router’s default IP address: Other brands of wireless routers might use the default address or The IP address and subnet mask are the defaults for the internal router interface. This is the default gateway for all hosts on the local network and also the internal DHCP server IP address. DHCP configuration: Most ISR have DHCP Server enabled by default Use the default DHCP range or specify your own (do not use ) Specify the lease time (default is 24 hours). Verify DHCP Configuration: The DHCP Client Table shows the client name and whether it is connected via the Ethernet LAN or wireless (Interface).

45 ISR DHCP Configuration

46 5.4.1: Default Gateway A router provides a gateway through which hosts on one network can communicate with hosts on different networks. Each interface on a router is connected to a separate network. The IP address assigned to the router interface identifies which local network is connected directly to it. Every host on a network must use the router as a gateway to other networks. Therefore, each host must know the IP address of the router interface connected to the network where the host is attached. This address is known as the default gateway address. It can be either statically configured on the host, or received dynamically by DHCP.

47 Default Gateway with an ISR
When an integrated router is configured to be a DHCP server for the local network, it automatically sends the correct interface IP address to the hosts as the default gateway address. All hosts on the network can use that IP address to forward messages to hosts located at the ISP and get access to hosts on the Internet. The IP address of that local router interface becomes the default gateway address for all hosts on the network

48 Default Gateway

49 5.4.2: Address Assignment When hosts on a local network use the services of a DHCP server, they are referred to as being located on an internal, or inside, network. Most DHCP servers are configured to assign private addresses to the hosts on the internal network This secures the internal network because it is not directly accessible from the Internet Many ISPs also use DHCP servers to provide IP addresses to the Internet side of home or small business routers installed at their customer sites. The network address assigned to the Internet side of the integrated router is referred to as the external, or outside, network.

50 ISR Address Assignment
The default IP address configured on an ISR router interface is usually a private Class C address. The Internal hosts must also be assigned addresses within the same network as the integrated router, either statically configured, or through DHCP. When configured as a DHCP server, the integrated router provides host addresses in this range. It also provides the subnet mask information and its own interface IP address as the default gateway. When an integrated router is connected to the ISP, it acts like a DHCP client to receive the correct external network IP address for the Internet interface. When using an ISR on a home network, all hosts use the same PUBLIC Internet-routable address to connect to the internet

51 IP Address Assignment Internal Network External Network

52 Address Management Direct Connection
There are several ways hosts can be connected to an ISP and the Internet. Whether or not an individual host is assigned a public or private address depends on how it is connected. Direct Connection A single host with a direct connection from the ISP through a modem A public address from the ISP’s DHCP server is assigned to the host Connection Through an Integrated Router More than one host that needs access to the Internet The ISP modem and hosts are attached directly to an ISR The ISR receives a public address from the ISP Internal hosts receive private addresses from the ISR Connection Through a Gateway Device Gateway devices combine an integrated router and a modem in one unit The Gateway is directly connected to the ISP service The gateway device receives a public address from the ISP Internal hosts receive private addresses from the gateway device

53 Address Management

54 5.4.3: NAT When a network is using one or a few Public IP address and Private IP addresses internally, a process is needed to translate private addresses into unique public addresses The hosts on the internal network must share the single Public Internet routable addressed assigned to the network or household The process used to convert private addresses to Internet- routable addresses is called Network Address Translation (NAT). Internal private source IP addresses are translated to one or more public IP address. Only packets destined for other networks need to be translated. NAT Servers provide this translation process A NAT server is a device like an ISR or a dedicated PC server configured with NAT software NAT servers are able to translate many internal IP addresses to the same public address

55 NAT Translation So how do NAT servers keep track of which private IP addresses sent or should receive a packet? The NAT server adds a port number to the IP Packet, in order to keep track of which internal private IP address sent the message Each internal Private IP Address is assigned a different port number, to keep track of which packets go to which address The internal Private IP addresses are called Inside Local Addresses The public IP address that all hosts must use to connect to the internet is called the Inside Global Address

56 NAT Inside Global Address (Public IP Address) Inside Local Addresses
(Private IP Address)

57 5.5: Booleans and Anding Computers operate based on electronic circuits The circuits in a computer depend on logic gates, which are like little decision makers that receive binary input and produce an output in binary The logic gates are used to make decisions and to make comparisons between data A logic gate accepts 1’s and 0’s as input, compares the bits and then produces a binary output of 1 or 0

58 Logic Gates The 3 primary logic gates are: AND OR NOT
if either input is off (0), the result is off (0) And is like multiplication (0 x anything is 0) OR if either input is on (1), the result is on (1) Or is like adding (think of it like adding 1 to something) NOT if the input is on (1), the result is off (0) if the input is off (0), the result is on (1) NOT is the exact reverse of the input There is also 1 additional Gate: NOR if either input is on (1), the result is off (0) A combination of NOT and OR

59 Boolean Operations AND 1 NOT 1 NOR 1 OR 1

60 ANDING Earlier we saw how a host uses its Subnet Mask to make comparisons against its own IP address and the IP address of a destination packet, to see if they are on the same network. The process that is used to compare a Subnet Mask against an IP address, is called ANDING When ANDING, each bit in the IP Address is compared with each bit in the Subnet Mask, using the AND boolean operation The result is the network address that the host address belongs to

61 ANDING IP Address: 192.100.10.33 Mask: 255.255.255.0 Anding Process:
Example: a host compares its subnet mask with its IP address to see which Network it belongs to IP Address: Mask: Anding Process: Network Address =

62 5.1 Summary

63 5.2 Summary

64 5.3 Summary

65 5.4 Summary


Download ppt "CCNA Discovery 1 Chapter 5: Network Addressing"

Similar presentations


Ads by Google