Computer Communication and Networking Abdul Wahab Yaqoob B.E(Telecom)MUET,CCNA,CCNP,MCSA,CCDA Department of Information Technology Campus Dadu ,University of Sindh a.wahabtlmuet@gmail.com Unit #01 Lecture#02 IPv4 Addressing
Computer Communication and Networking Title of Subject : Computer Communication and Networking Effective : 2K13 Batch Marks : 100(theory) + 50 (Practical) Credit Hours : 2+1 This Class will meet at: 9:00-11:00 AM on Thursday Recommended Books ” Data Communications & Networking”, by Behroz Forouzan ” Data and Computer Communications”, by William Stallings ” Computer Networks, 4th Edition”, by Andrew S Tanenbaum Department of Information Technology Sindh U, Campus Dadu 2
Computer Communication and Networking IPv4 Addressing Binary and decimal Types of IP addresses Assigning addresses Network part and subnet masks Calculating addresses Ping and Traceroute Utilities Department of Information Technology Sindh U, Campus Dadu 3
Computer Communication and Networking IP addressing – works at OSI model layer 3 TCP/IP model Internet layer Application Presentation Session Transport Network Data link Physical Application Transport Internet Network Access TCP, UDP IP Ethernet, WAN technologies HTTP, FTP, TFTP, SMTP etc Segment Packet Frame Bits Data stream Department of Information Technology Sindh U, Campus Dadu 4
Computer Communication and Networking Binary and decimal Convert to 8-bit binary 248 187 89 Convert to decimal 00110100 01010101 11001111 Department of Information Technology Sindh U, Campus Dadu 5
Computer Communication and Networking Binary and decimal Convert to 8-bit binary 248 11111000 187 10111011 89 01011001 Convert to decimal 00110100 52 01010101 85 11001111 207 Department of Information Technology Sindh U, Campus Dadu 6
Computer Communication and Networking IPv4 Address Classes Department of Information Technology Sindh U, Campus Dadu 7
Computer Communication and Networking IPv4 Address Classes Class D Addresses A Class D address begins with binary 1110 in the first octet. First octet range 224 to 239. Class D address can be used to represent a group of hosts called a host group, or multicast group. Class E Addresses First octet of an IP address begins with 1111 Class E addresses are reserved for experimental purposes and should not be used for addressing hosts or multicast groups. Department of Information Technology Sindh U, Campus Dadu 8
Computer Communication and Networking Find the network address 192. 168. 21. 17 11000000 10101000 00010101 00010001 In a network address, all the host bits are 0. 192. 168. 21. 11000000 10101000 00010101 00000000 The router needs to do this for every packet. Department of Information Technology Sindh U, Campus Dadu 9
Computer Communication and Networking Logical AND 192. 168. 21. 17 11000000 10101000 00010101 00010001 255. 11111111 00000000 192. 168. 21. 11000000 10101000 00010101 00000000 Do a logical AND at each position Department of Information Technology Sindh U, Campus Dadu 10
Computer Communication and Networking Find the broadcast address 192. 168. 21. 17 11000000 10101000 00010101 00010001 In a broadcast address, all the host bits are 1. 192. 168. 21. 255 11000000 10101000 00010101 11111111 The broadcast is the last address in the network. Department of Information Technology Sindh U, Campus Dadu 11
Computer Communication and Networking 3 types of address Every network has: Network address – the first one Broadcast address – the last one Host addresses – everything in between Department of Information Technology Sindh U, Campus Dadu 12
Computer Communication and Networking Calculating addresses A host has IP address 192.168.1.70/24 What is the subnet mask? What is the network address? What is the broadcast address? What is the range of host addresses in the network? Department of Information Technology Sindh U, Campus Dadu 13
Computer Communication and Networking Calculating addresses A host has IP address 192.168.1.70/26 What is the subnet mask? What is the network address? What is the broadcast address? What is the range of host addresses in the network? Department of Information Technology Sindh U, Campus Dadu 14
Computer Communication and Networking Unicast, Multicast, Broadcast Unicast – a message addressed to one host Broadcast – a message addressed to all hosts on a network. Uses network’s broadcast address or 255.255.255.255 locally Multicast – a message addressed to a group of hosts. Uses an address starting 224 - 239 Department of Information Technology Sindh U, Campus Dadu 15
Computer Communication and Networking Private IP addresses Unrestricted use on private networks. Not routed across the Internet. 10.0.0.0 – 10.255.255.255 (10.0.0.0/8) 172.16.0.0 – 172.31.255.255 (172.16.0.0/20) 192.168.0.0 – 192.168.255.255 (192.168.0.0/24) Department of Information Technology Sindh U, Campus Dadu 16
Computer Communication and Networking Public IP addresses Routed over the Internet Master holder is IANA Assigned to regional registries and then to ISPs ISPs allocate them to organisations and individual users Use is strictly controlled as duplicate addresses are not allowed Department of Information Technology Sindh U, Campus Dadu 17
Computer Communication and Networking Special addresses 0.0.0.0 “all addresses” in default route. Hosts cannot be given addresses starting 0. 127.0.0.1 is loopback. Hosts cannot be given addresses starting 127. 240.0.0.0 and higher – reserved for experimental purposes. 169.254.0.0 - 169.254.255.255 local only 192.0.2.0 to 192.0.2.255 for teaching Department of Information Technology Sindh U, Campus Dadu 18
Computer Communication and Networking Network address translation NAT A large number of hosts on a network use private addresses to communicate with each other. The ISP allocates one or a few public addresses. NAT allows the hosts to share the public addresses when they want to use the Internet Department of Information Technology Sindh U, Campus Dadu 19
Computer Communication and Networking Addressing hosts Static addressing – address is configured by an administrator Servers, printers, routers, switches need static addresses Dynamic addressing – address is allocated automatically by DHCP by leasing addresses from a pool Dynamic addressing is best for workstations Department of Information Technology Sindh U, Campus Dadu 20
Computer Communication and Networking Ping and traceroute Ping sends an ICMP message. If all is well, the destination replies. If not, a router may reply to say the destination is unreachable, or the ping may time out. Traceroute sends a series of messages so that each router along the path replies. You get a list of addresses of all the routers. Department of Information Technology Sindh U, Campus Dadu 21
Computer Communication and Networking IP v4 Address Allocation History 1981: IPv4 Protocol was published. 1985: 6% of IPv4 address space in use. 2001: 66% of IPv4 address space in use. 2010: 96% of IPv4 address space in use. NEED OF IPv6 Department of Information Technology Sindh U, Campus Dadu 22
Computer Communication and Networking IPv6 Development started in 1990s because of concerns about IPv4 addresses running out A whole new protocol suite – not just layer 3 Uses 128-bit hierarchical addressing, written using hexadecimal Simpler header Integrated security – authentication, privacy Quality of service mechanisms Department of Information Technology Sindh U, Campus Dadu 23
Computer Communication and Networking Larger Address Space IPv4 32 bits or 4 bytes long 4,200,000,000 possible addressable nodes IPv6 128 bits or 16 bytes: four times the bits of IPv4 3.4 * 1038 possible addressable nodes 340,282,366,920,938,463,374,607,432,768,211,456 5 * 1028 addresses per person 50,000,000,000,000,000,000,000,000,000 Department of Information Technology Sindh U, Campus Dadu 24
Computer Communication and Networking IPv6 Advantage Larger address space (2^128 Address) Elimination of NAT Elimination of broadcast addresses Simplified header for improved router efficiency Support for mobility and security Transition richness Department of Information Technology Sindh U, Campus Dadu 25