C227 L10 LP1 PDF - Computer System Technologies

Document Details

FlexibleSaturn

Uploaded by FlexibleSaturn

Republic Polytechnic

Tags

computer networking ipv4 addressing computer systems network technologies

Summary

This document is a lesson on computer networking, specifically focusing on building simple networks. It includes information about network components, IPv4 addressing, and subnetting. The material is intended for an undergraduate computer science course at Republic Polytechnic.

Full Transcript

C227 Computer System Technologies Lesson 10 : Building a simple network AY2024 Semester 1 School of Infocomm C227 Computer System Technologies Lesson 10 : Building a simple network Lesson flow for Learning Phase 1 Learning Phase 1 Week 9 recap Unpack problem statement...

C227 Computer System Technologies Lesson 10 : Building a simple network AY2024 Semester 1 School of Infocomm C227 Computer System Technologies Lesson 10 : Building a simple network Lesson flow for Learning Phase 1 Learning Phase 1 Week 9 recap Unpack problem statement IPv4 addressing Team activity 1 & 2 IP Subnetting exercise Team activity 3 Any slides with the Cisco logo are from the Cisco academy. C227 Computer System Technologies Lesson 10 : Building a simple network Recap on Week 9 C227 Computer System Technologies Lesson 10 : Building a simple network Problem Statement Four of your friends and you have decided to start a business that specialises in creating Chatbots, powered by Artificial Intelligence (AI) and Natural Language Processing (NLP), for Small Medium Enterprises (SMEs). As a young start-up, with limited funds, you have chosen to setup a Small Office Home office (SOHO) instead of renting an office space. For your SOHO, you wish to setup a network for resource sharing and for Internet access. Identify the components and the configurations required to set up such a network. C227 Computer System Technologies Lesson 10 : Building a simple network Approaching the Problem Statement What components and services are required to connect computers to each other and to the Internet? What are the functions of these components? How do we connect the components up? What are the configurations required on the components? C227 Computer System Technologies Lesson 10 : Building a simple network Team Activity 1 Think about your home and/or your school network: What components are required to connect a group of computers? What are the functions of these components? What else is required for Internet access in your home network? Components Functions Computers For developing codes, create content, communication C227 Computer System Technologies Lesson 10 : Building a simple network Possible components required Optical Fibre Internet Service Provider (ISP) Equipment provided by ISP Wireless Router Ethernet Switch Laptops Ethernet cables C227 Computer System Technologies Lesson 10 : Building a simple network Demo: Connecting the devices in a home network using Packet Tracer Assume that no configurations are required on the ISP router, we will work interactively to set up the home network Demo on packet tracer C227 Computer System Technologies Lesson 10 : Building a simple network Examining the given network in greater details What are these numbers? What are their purposes? What can these numbers tell you? IPv4 addressing Module 11.1: IPv4 Address Structure Module 11.2: IPv4 Unicast, Broadcast and Multicast Module 11.3: Types of IPv4 addresses Introduction to Networks v7.0 (ITN) C227 Computer System Technologies Lesson 10 : Building a simple network IPv4 Address Structure Network and Host Portions An IPv4 address is a 32-bit hierarchical address that is made up of a network portion and a host portion. When determining the network portion versus the host portion, you must look at the 32-bit stream. A subnet mask is used to determine the network and host portions. Each octet is made of 8 bits. An IPv4 address therefore has 4 octets in total. A decimal of 255 is equivalent to 11111111 in binary C227 Computer System Technologies Lesson 10 : Building a simple network IPv4 Address Structure The Subnet Mask To identify the network and host portions of an IPv4 address, the subnet mask is compared to the IPv4 address bit for bit, from left to right. The actual process used to identify the network and host portions is called ANDing. C227 Computer System Technologies Lesson 10 : Building a simple network IPv4 Address Structure The Prefix Length A prefix length is a less cumbersome method used to identify a subnet mask address. Prefix The prefix length is the Subnet Mask 32-bit Address Length number of bits set to 1 in 255.0.0.0 11111111.00000000.00000000.00000000 /8 the subnet mask. 255.255.0.0 11111111.11111111.00000000.00000000 /16 255.255.255.0 11111111.11111111.11111111.00000000 /24 It is written in “slash 255.255.255.128 11111111.11111111.11111111.10000000 /25 notation” therefore, count the number of bits in the 255.255.255.192 11111111.11111111.11111111.11000000 /26 subnet mask and prepend it 255.255.255.224 11111111.11111111.11111111.11100000 /27 with a slash. 255.255.255.240 11111111.11111111.11111111.11110000 /28 255.255.255.248 11111111.11111111.11111111.11111000 /29 255.255.255.252 11111111.11111111.11111111.11111100 /30 C227 Computer System Technologies Lesson 10 : Building a simple network IPv4 Address Structure Determining the Network: Logical AND A logical AND Boolean operation is used in determining the network address. Logical AND is the comparison of two bits where only a 1 AND 1 produces a 1 and any other combination results in a 0. 1 AND 1 = 1, 0 AND 1 = 0, 1 AND 0 = 0, 0 AND 0 = 0 1 = True and 0 = False To identify the network address, the host IPv4 address is logically ANDed, bit by bit, with the subnet mask to identify the network address. Using calculators for ANDing Note: Any decimal number ‘AND’ with 0 is 0 Any decimal number ‘AND’ with 255 is the number itself C227 Computer System Technologies Lesson 10 : Building a simple network IPv4 Address Structure Network, Host, and Broadcast Addresses Within each network are three types of IP addresses: Network address Host addresses Broadcast address Network Portion Host Portion Host Bits Subnet mask 255 255 255 0 255.255.255.0 or /24 11111111 11111111 11111111 00000000 Network address 192 168 10 0 All 0s 192.168.10.0 or /24 11000000 10100000 00001010 00000000 First address 192 168 10 1 All 0s and a 1 192.168.10.1 or /24 11000000 10100000 00001010 00000001 Last address 192 168 10 254 All 1s and a 0 192.168.10.254 or /24 11000000 10100000 00001010 11111110 Broadcast address 192 168 10 255 All 1s 192.168.10.255 or /24 11000000 10100000 00001010 11111111 The range of hosts address (from the first to the last address) refers to the number of hosts that can be in the given network. For the example above, there can only be a total of 254 hosts in this given network. C227 Computer System Technologies Lesson 10 : Building a simple network Identifying Hosts on same Network Same Network Different Network Example Example ▪ 192.168.1.20 AND 255.255.255.0 = 192.168.1.0 192.168.1.20 AND 255.255.255.0 = 192.168.1.0 ▪ 192.168.1.129 AND 255.255.255.0 = 192.168.1.0 192.168.2.20 AND 255.255.255.0 = 192.168.2.0 To conclude, if two addresses after masking produce the same result, then they’re on the same network (can communicate without a router). Otherwise, they will need a router to forward the packets between the two different networks. C227 Computer System Technologies Lesson 10 : Building a simple network IPv4 Unicast, Broadcast, and Multicast Unicast Unicast transmission is sending a packet to one destination IP address. For example, the PC at 172.16.4.1 sends a unicast packet to the printer at 172.16.4.253. C227 Computer System Technologies Lesson 10 : Building a simple network IPv4 Unicast, Broadcast, and Multicast Multicast / Broadcast Multicast transmission is sending a packet to a multicast address group. For example, the PC at 172.16.4.1 sends a multicast packet to the multicast group address 224.10.10.5. Broadcast transmission is sending a packet to a every host on the network. For example, the PC at 172.16.4.1 sends a broadcast packet to all host on the network. C227 Computer System Technologies Lesson 10 : Building a simple network Using the subnet Calculator Examine 192.168.2.1/24 address. Fill in the details in the following table. 192.168.2.1/24 Details Subnet Mask 255.255.255.0 Network or subnet address 192.168.2.0 Broadcast address 192.168.2.255 First host IP address 192.168.2.1 Last host IP address 192.168.2.254 Demo on subnet calculator C227 Computer System Technologies Lesson 10 : Building a simple network Team Activity 2 150.20.10.4/8 Details Subnet Mask Network address Broadcast address First host IP address Last host IP address C227 Computer System Technologies Lesson 10 : Building a simple network Types of IPv4 Addresses Public and Private IPv4 Addresses As defined in in RFC 1918, public IPv4 addresses are globally routed between internet service provider (ISP) routers. Private addresses are common blocks of addresses used by most organizations to assign IPv4 addresses to internal hosts. Private IPv4 addresses are not unique and can be used internally within any network. However, private addresses are not globally routable. C227 Computer System Technologies Lesson 10 : Building a simple network Types of IPv4 Addresses Routing to the Internet Network Address Translation (NAT) translates private IPv4 addresses to public IPv4 addresses. NAT is typically enabled on the edge router connecting to the internet. It translates the internal private address to a public global IP address. C227 Computer System Technologies Lesson 10 : Building a simple network Types of IPv4 Addresses Special Use IPv4 Addresses Loopback addresses 127.0.0.0 /8 (127.0.0.1 to 127.255.255.254) Commonly identified as only 127.0.0.1 Used on a host to test if TCP/IP is operational. Link-Local addresses 169.254.0.0 /16 (169.254.0.1 to 169.254.255.254) Commonly known as the Automatic Private IP Addressing (APIPA) addresses or self-assigned addresses. Used by Windows DHCP clients to self-configure when no DHCP servers are available. Note: you will learn about DHCP in a later lesson. For now, just be aware that DHCP is a service that automatically assigns hosts on the network with working IP addresses. C227 Computer System Technologies Lesson 10 : Building a simple network Types of IPv4 Addresses Legacy Classful Addressing RFC 790 (1981) allocated IPv4 addresses in classes Class A (0.0.0.0/8 to 127.0.0.0/8) Class B (128.0.0.0 /16 – 191.255.0.0 /16) Class C (192.0.0.0 /24 – 223.255.255.0 /24) Class D (224.0.0.0 to 239.0.0.0) Class E (240.0.0.0 – 255.0.0.0) Classful addressing wasted many IPv4 addresses. Classful address allocation was replaced with classless addressing which ignores the rules of classes (A, B, C). The “slash notation” used to denote the network mask (e.g., /15, /20) is also termed as the Classless Inter Domain Routing (CIDR) notation since these mask do not need to follow the byte or octet boundary of /8, /16 and /24. C227 Computer System Technologies Lesson 10 : Building a simple network Types of IPv4 Addresses Assignment of IP Addresses The Internet Assigned Numbers Authority (IANA) manages and allocates blocks of IPv4 and IPv6 addresses to five Regional Internet Registries (RIRs). RIRs are responsible for allocating IP addresses to ISPs who provide IPv4 address blocks to smaller ISPs and organizations. IP Subnetting Module 11.4: Network Segmentation Module 11.5: Subnet an IPv4 Network Introduction to Networks v7.0 (ITN) C227 Computer System Technologies Lesson 10 : Building a simple network Network Segmentation Broadcast Domains and Segmentation Many protocols use broadcasts or multicasts (e.g., ARP use broadcasts to locate other devices, hosts send DHCP discover broadcasts to locate a DHCP server.) Switches propagate broadcasts out all interfaces except the interface on which it was received. The only device that stops broadcasts is a router. Routers do not propagate broadcasts. Each router interface connects Switch to a broadcast domain and broadcasts are only propagated within that specific router broadcast domain. Note: you will learn about DHCP in a later lesson C227 Computer System Technologies Lesson 10 : Building a simple network Network Segmentation Problems with Large Broadcast Domains A problem with a large broadcast domain is that these hosts can generate excessive broadcasts and negatively affect the network. The solution is to reduce the size of the network to create smaller broadcast domains in a process called subnetting. Dividing the network address 172.16.0.0 /16 into two subnets of 200 users each: 172.16.0.0 /24 and 172.16.1.0 /24. Broadcasts are only propagated within the smaller broadcast domains. C227 Computer System Technologies Lesson 10 : Building a simple network Network Segmentation Reasons for Segmenting Networks Subnetting is the process of creating multiple logical networks that exist within a single class A, B or C network. Subnetting reduces overall network traffic and improves network performance. It can be used to implement security policies between subnets. Subnetting reduces the number of devices affected by abnormal broadcast traffic. Subnets are used for a variety of reasons including by: Location Group or Function Device Type C227 Computer System Technologies Lesson 10 : Building a simple network Subnetting the network Before Subnetting After Subnetting IP address consists of IP address consists of network portion network portion host portion Subnet portion (Subnet bits) Two level hierarchy host portion (host bits) Three level hierarchy AY2012/13 SEM 2 C225: P7 - Group Together! C227 Computer System Technologies Lesson 10 : Building a simple network IP Subnet Basics Bottom line: Splitting the network into smaller network reduces the network traffic. AY2012/13 SEM 2 C225: P7 - Group Together! C227 Computer System Technologies Lesson 10 : Building a simple network Subnet an IPv4 Network Subnet on an Octet Boundary Networks are most easily subnetted at the octet boundary of /8, /16, and /24. Notice that using longer prefix lengths decreases the number of hosts per subnet. Prefix Length Subnet Mask Subnet Mask in Binary (n = network, h = host) # of hosts nnnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh /8 255.0.0.0 16,777,214 11111111.00000000.00000000.00000000 nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh /16 255.255.0.0 65,534 11111111.11111111.00000000.00000000 nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh /24 255.255.255.0 254 11111111.11111111.11111111.00000000 C227 Computer System Technologies Lesson 10 : Building a simple network Subnet an IPv4 Network Subnet on an Octet Boundary (Cont.) In the first table 10.0.0.0/8 is subnetted using /16 and in the second table, a /24 mask. Subnet Address Host Range Subnet Address Host Range (256 Possible (65,534 possible hosts per Broadcast (65,536 Possible Broadcast (254 possible hosts per subnet) Subnets) subnet) Subnets) 10.0.0.0/16 10.0.0.1 - 10.0.255.254 10.0.255.255 10.0.0.0/24 10.0.0.1 - 10.0.0.254 10.0.0.255 10.0.1.0/24 10.0.1.1 - 10.0.1.254 10.0.1.255 10.1.0.0/16 10.1.0.1 - 10.1.255.254 10.1.255.255 10.0.2.0/24 10.0.2.1 - 10.0.2.254 10.0.2.255 10.2.0.0/16 10.2.0.1 - 10.2.255.254 10.2.255.255 … … … 10.3.0.0/16 10.3.0.1 - 10.3.255.254 10.3.255.255 10.0.255.0/24 10.0.255.1 - 10.0.255.254 10.0.255.255 10.4.0.0/16 10.4.0.1 - 10.4.255.254 10.4.255.255 10.1.0.0/24 10.1.0.1 - 10.1.0.254 10.1.0.255 10.5.0.0/16 10.5.0.1 - 10.5.255.254 10.5.255.255 10.1.1.0/24 10.1.1.1 - 10.1.1.254 10.1.1.255 10.1.2.0/24 10.1.2.1 - 10.1.2.254 10.1.2.255 10.6.0.0/16 10.6.0.1 - 10.6.255.254 10.6.255.255 … … … 10.7.0.0/16 10.7.0.1 - 10.7.255.254 10.7.255.255 10.100.0.0/24 10.100.0.1 - 10.100.0.254 10.100.0.255.................. 10.255.0.0/16 10.255.0.1 - 10.255.255.254 10.255.255.255 10.255.255.0/24 10.255.255.1 - 10.2255.255.254 10.255.255.255 Note: This method however will result in the inefficient use of the given address space. C227 Computer System Technologies Lesson 10 : Building a simple network Subnet an IPv4 Network Subnet within an Octet Boundary Subnet does not have to be on an Octet Boundary. For example, a /24 network will need to borrow bits that are not on an Octet Boundary. Refer to the table below to see six ways to subnet a /24 network. Subnet Mask in Binary Prefix Length Subnet Mask # of subnets # of hosts (n = network, h = host) nnnnnnnn.nnnnnnnn.nnnnnnnn.nhhhhhhh /25 255.255.255.128 2 126 11111111.11111111.11111111.10000000 nnnnnnnn.nnnnnnnn.nnnnnnnn.nnhhhhhh /26 255.255.255.192 4 62 11111111.11111111.11111111.11000000 nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnhhhhh /27 255.255.255.224 8 30 11111111.11111111.11111111.11100000 nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnhhhh /28 255.255.255.240 16 14 11111111.11111111.11111111.11110000 nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnhhh /29 255.255.255.248 32 6 11111111.11111111.11111111.11111000 nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnnhh /30 255.255.255.252 64 2 11111111.11111111.11111111.11111100 If you are interested to learn more on how to calculate these addresses manually, you can refer to NetAcad module 11.5.2 to 11.6.6. C227 Computer System Technologies Lesson 10 : Building a simple network Using the subnet Calculator 1. Which subnet does the host 10.96.255.4/20 belongs to? Is it on the same network as the host 10.96.240.10/20? Enter the given IP address and mask bits Answer: Both addresses can be found within the host range Demo on subnet calculator C227 Computer System Technologies Lesson 10 : Building a simple network Using the subnet Calculator 2. Subnet a network with IP address 192.16.0.0/24 into 4 subnets. For each of the 4 subnets, identify the followings: Network address First host address Last host address Broadcast address Enter the given IP address and mask. Enter the required number of subnets. Answers: Demo on subnet calculator C227 Computer System Technologies Lesson 10 : Building a simple network Using the subnet Calculator 3. Given IP address is 170.0.0.0 with a subnet mask of 255.255.240.0, how many subnets can I have and what is the maximum number of hosts per subnet? Enter the given IP address and the subnet mask. Answer: Demo on subnet calculator C227 Computer System Technologies Lesson 10 : Building a simple network Team Activity 3 Answer the following questions in your team. 1. Given the IP address of 172.16.0.45/30, what is its network address? Is it on the same network as hosts 172.16.0.48? 2. Given an IP address of 192.168.192.10/29. What is its broadcast address? 3. How many hosts can be placed on the 10.0.0.0/16 network? 4. If you were to subnet 199.200.0.0/16 into 2 subnets, identify the following for each subnet: Network address First host address Last host address Broadcast address C227 Computer System Technologies Lesson 10 : Building a simple network Variable Length Subnet Masks (VLSM) VLSM allows a network space to be divided into unequal parts. With VLSM, the subnet mask will vary depending on how many bits have been borrowed for a particular subnet, thus the “variable” part of the VLSM. C227 Computer System Technologies Lesson 10 : Building a simple network

Use Quizgecko on...
Browser
Browser