pdfjoiner.pdf
Document Details
Uploaded by ProperGriffin
Full Transcript
IT2203 IP Addressing and Subnetting The Internet Protocol (IP) had undergone several version changes. Currently, there are two (2) versions of an IP, IP version 4 (IPv4) and IP version 6 (IPv6). IP version 4 (IPv4) IP version 6 (IPv6) Deplo...
IT2203 IP Addressing and Subnetting The Internet Protocol (IP) had undergone several version changes. Currently, there are two (2) versions of an IP, IP version 4 (IPv4) and IP version 6 (IPv6). IP version 4 (IPv4) IP version 6 (IPv6) Deployed 1981 1992 32 – bit (4 bytes) Address Size 128 – bit (16 bytes) addressing scheme addressing scheme Dotted Decimal Notation: Hexadecimal Notation: Address Format 192.149.252.76 3FFE:F200:0234:AB00:0123:4567:8901:ABCD Prefix Notation 192.149.0.0/24 3FFE:F200:0234::/48 Number of 2128 = ̴ ,294,967,296 232 = 4 Addresses ̴ 40,282,366,920,938,463,374,607,431,768,211,456 3 Network Identifiers via TCP/IP MAC (Media Access Control) address refers to the unique physical address of all computers, which are assigned by the manufacturer of the network interface card. Organizational Unique Identifier (OUI) – This is the first 24 bits of the MAC address that is vendor-specific; it identifies the company that manufactured or sold the device (e.g., network interface card, router ports). Vendor-Assigned – This is the remaining 24 bits of the MAC address that is incrementally and uniquely assigned by the specific vendor of the hardware–denotes the serial number of the individual device. An IP address refers to an address that is usually assigned by the network administrator or internet service provider in order to uniquely and universally identify each device on an IP network. o A public IP address is what computers use to find each other online and exchange information. It is assigned to the computer by the Internet Service Provider as soon as the computer is connected to the Internet gateway. ▪ Static public IP address – It is a fixed IP address and is used primarily for hosting web pages or services on the Internet. ▪ Dynamic public IP address – It is chosen from a pool of available addresses and changes each time one connects to the Internet. o A private IP address is what computers on a network use to communicate with the router. It can change each time they are connected. o Parts of an IP Address ▪ The network ID/field identifies the host that is located on the same physical network. ▪ The host ID (also known as a host address) identifies the individual host (e.g., workstation, server, router, or other TCP/IP host) within a network. Classes of IPv4 Address Class A address – This uses only the first octet (8 bits) 1.0.0.0 to 127.0.0.0 of the 32-bit number to indicate the network address. Network.Host.Host.Host The entire second to the fourth octet is used for host Number of Bits used in Network / Host – 24 addresses, which is now equivalent to a total of 24 bits. Maximum Host of Network – 16,777,214 04 Handout 1 *Property of STI [email protected] Page 1 of 6 IT2203 Class B address – This uses two (2) of the four (4) octets 128.0.0.0 to 191.255.255.255 (16 bits) to indicate the network address. The two Network.Network.Host.Host other octets, which specify the host addresses, now Number of Bits used in Network / Host – 16 have a total of 16 bits. Maximum Host of Network – 65,534 Class C address – This uses the first three octets (24 192.0.0.0 to 233.255.255.255 bits) of the IP address to identify the network portion, Network.Network.Network.Host with the remaining octet reserved for the host portion, Number of Bits used in Network / Host – 8 which is equivalent to eight (8) bits. Maximum Host of Network – 254 Class D address – This is created to enable multicasting 224.0.0.0 to 239.255.255.255 using an IP address. A multicast address is a unique Host.Host.Host.Host address that directs packets with that destination The first four bits of Class D must be 1110. address to predefined groups of hosts. The first octet range for this class is 11100000 to 11101111, or 224 to 239. Class E address – This is reserved by the Internet 240.0.0.0 to 255.255.255.255 Engineering Task Force (IETF) for its own research. The first four bits of Class E is set to “1111”. Therefore, the first octet range for Class E addresses is 11110000 to 11111111, 240 to 255. IANA IPv4 Special-Purpose Addresses Diagnostic It is used for testing and debugging of (Loopback/Localhost 127.0.0.0 – 127.255.255.255 programs, hardware, protocol, and Address) connections. (SYN-ACK) Default Network 0.0.0.0 It is used for routing internet datagram (TCP). It is used for broadcasting messages to the Network Broadcast 255.255.255.255 entire network. 10.0.0.0 – 10.254.254.254 It is the preconfigured default IP addresses for Private-use of 172.16.0.0 – 172.16.254.254 network devices to extend IPv4 spaces Internet Space 192.168.0.0 – 192.168.254.254 (Home, Commercial, Enterprise) If DHCP is not present, these IP addresses will Link-Local Addresses 169.254.0.0 – 169.254.254.254 be selected and configured by the network device. o The subnet mask (default mask) determines which portion of an IP address identifies the network and which portion identifies the host. Like the IP address, it is represented by four octets. The network bits are represented by the 1s in the network mask, and the node bits are represented by the 0s. Class Default Mask Decimal Binary Shorthand A 255.0.0.0 11111111.00000000.00000000.00000000 /8 B 255.255.0.0 11111111.11111111.00000000.00000000 /16 C 225.255.255.0 11111111.11111111.11111111.00000000 /24 Note: Class D & E are used for Multicast and Research purposes. Default Gateway is used to specify the address of the nearest routing device that is used by the host device to forward addressed packets onto the network. 04 Handout 1 *Property of STI [email protected] Page 2 of 6 IT2203 Dotted-Binary to Dotted-Decimal Conversion (Using Positional Notation) 01110101. 10010101. 00011101. 00000010 N10 For: 01110101 For: 10010101 For: 00011101 For: 00000010 The IP address is equivalent to 117.149.29.2 when written in dotted-decimal notation. Subnet Masking For our computer to tell where to break the IP address apart to get the abovementioned Input Output parts of an IP address, the IP address must be “ANDed” with its default mask in binary. x y F = xy 0 0 0 Example: Determine the network and the host portion of an IP address, 200.133.175.33. 0 1 0 Step 1: Convert IPv4 address from decimal into binary. 1 0 0 Step A: Divide the given decimal number by 2 and note down the remainder. 1 1 1 Step B: Divide the obtained quotient by 2, and note the remainder again. Step C: Repeat the above steps until you get 0 as the quotient. Step D: Write the remainders in such a way that the last remainder is written first, followed by the rest in the reverse order. Step E: This can also be understood in another way which states that the Least Significant Bit (LSB) of the binary number is at the top and the Most Significant Bit (MSB) is at the bottom. This number is the binary value of the given decimal number. 200 133 175 33 Div Qou Rem Div Qou Rem Div Qou Rem Div Qou Rem 200/2 100 0 LSB 133/2 66 1 LSB 175/2 87 1 LSB 33/2 16 1 LSB 100/2 50 0 66/2 33 0 87/2 43 1 16/2 8 0 50/2 25 0 33/2 16 1 43/2 21 1 8/2 4 0 25/2 12 1 16/2 8 0 21/2 10 1 4/2 2 0 12/2 6 0 8/2 4 0 10/2 5 0 2/2 1 0 6/2 3 0 4/2 2 0 5/2 2 1 1/2 0 1 MSB 3/2 1 1 2/2 1 0 2/2 1 0 0 1/2 0 1 MSB 1/2 0 1 MSB 1/2 0 1 MSB 0 Binary equivalent is 11001000.10000101.10101111. 00100001. 04 Handout 1 *Property of STI [email protected] Page 3 of 6 IT2203 Step 2: Check the IP Address class and use the “AND” operation to the binary equivalent of the IP address with its equivalent default mask. Note: Default mask to be used is 225.255.255.0 or 11111111.11111111.11111111.00000000 in Class C. Subnetting It refers to a process of borrowing bits from the host ID field to form a new subnet ID field. Example: A company is granted a site address 138.45.0.0 and it needs to be subnetted into 45 individual networks. Step 1: Determine the class and the default mask of the IP address you have been given. First Octet Second Octet Third Octet Fourth Octet 138 45 0 0 Class B Range: 128 to 191. Default Mask is 255.255.0.0 or 11111111.11111111.00000000.00000000 Step 2: Identify the number of subnetworks (subnets) that are required. Subnets Needed: 45 Step 3: Determine how many bits are required to support the total number of subnets. This tells us that it takes a total of 6 bits to support the value of 45, 101101. Step 4: Determine the custom subnet mask for our network by masking. Thus, the custom subnet mask in dotted-decimal notation is 255.255.252.0; to support 45 individual networks with a given network ID of 138.45.0.0, we would have to use a subnet mask of 255.255.252.0 04 Handout 1 *Property of STI [email protected] Page 4 of 6 IT2203 Step 5: Determine all of the valid network IDs by using the smallest bit of the custom subnet mask. Increments of 4: 138.45.4.0 - 138.45.8.0 Step 6: List each subnet address starting with the incremental value. Total number of subnets = 2s – 2; S = 6 bits Total number of hosts = 26 – 2 = 62 Step 7: Determine the number of host addresses that could support each subnetwork. Count the remaining bits (zero’s) to the right-hand side of the custom subnet mask. Default Mask 11111111. 11111111. 00000000. 00000000 Custom Subnet Mask 11111111. 11111111. 11111100. 00000000 Total Hosts = 2h- 2; h = 10 Total Hosts = 210- 2 = 1,024 - 2 (for the invalid addresses) = 1,022 total hosts per subnetwork IPv6 Addresses and Notation The rapid expansion of the Internet scale was unforeseen at that time. In the 1990s, the IETF launched technologies such as Network Address Translation (NAT) and Classless Inter-Domain Routing (CIDR) to delay IPv4 address exhaustion. On February 3, 2011, the Internet Assigned Numbers Authority (IANA) announced even allocation of its last 4.68 million IPv4 addresses to five Regional Internet Registries (RIRs) around the world. On November 25, 2019, the last batch of /22 IPv4 allocation was created. (IPv4 exhaustion) In December 1998, IPv6 became a Draft Standard for the IETF, which subsequently ratified it as an Internet Standard on 14 July 2017. Internet Protocol version 6 (IPv6) is a set of specifications designed by the IETF, which is an upgraded version of IPv4. The other term for this is IP Next Generation (IPng). The length of an IPv6 address is 128 bits. Colons are generally used to divide the IPv6 address into eight segments. Each segment contains 16 bits and is expressed in hexadecimal notation. 04 Handout 1 *Property of STI [email protected] Page 5 of 6 IT2203 Like an IPv4 address, an IPv6 address is expressed in the format of IPv6 address/mask length. o Example: 2001:0DB8:2345:CD30:1230:4567:89AB:CDEF/64 ▪ IPv6 address: 2001:0DB8:2345:CD30:1230:4567:89AB:CDEF ▪ Subnet number: 2001:0DB8:2345:CD30::/64 IPv6 Abbreviation Specifications The leading 0s in each 16-bit segment can be omitted. However, if all bits in a 16-bit segment are 0s, at least one 0 must be reserved. The tailing 0s cannot be omitted. If one or more consecutive 16-bit segments contain only 0s, a double colon (::) can be used to represent them, but only one :: is allowed in an entire IPv6 address. If an abbreviated IPv6 address contains two double colons (::), the IPv6 address cannot be restored to the original one. IPv6 Address Classification Unicast address identifies an interface. A packet destined for a unicast address is sent to the interface having that unicast address. o Unspecified address: 0:0:0:0:0:0:0:0/128, or ::/128. The address is used as the source address of some packets. o Loopback address: 0:0:0:0:0:0:0:1/128, or ::1/128, which is used for local loopback. The data packets sent to ::/1 are actually sent to the local end and can be used for loopback tests of local protocol stacks. Multicast address identifies multiple interfaces. A packet destined for a multicast address is sent to all the interfaces joining in the corresponding multicast group. o Only the interfaces that join a multicast group listen to the packets destined for the corresponding multicast address. o IPv6 does not define any broadcast address. On an IPv6 network, all broadcast application scenarios are served by IPv6 multicast. Anycast address identifies a group of network interfaces (usually on different nodes). o A packet sent to an anycast address is routed to the nearest interface having that address, according to the router's routing table. References: Comer, D. (2019). The Internet book: Everything you need to know about computer networking and how the Internet works. CRC Press. Decimal to Binary. (n.d.). In cuemath.com. Retrieved on February 4, 2022 from https://www.cuemath.com/numbers/decimal-to-binary/ Huawei. (2020). HCIA-Datacom V1.0 Training Material. Karumanchi, N., Damodaram, A., & Rao, S. (2020). Elements of computer networking: An integrated approach. Career Monk. Kurose, T. & Ross, K. (2021). Computer networking: A top-down approach. Pearson. Robertazzi, T. (2017). Introduction to computer networking. Springer International. 04 Handout 1 *Property of STI [email protected] Page 6 of 6 IT2203 Network Standard Protocols Standards are documented agreements containing technical specifications or other precise criteria that stipulate how a particular product or service should be designed or performed. Common Standardization Organizations (Huawei, 2020) Institute of Electrical and Electronics Engineers (IEEE) is an international society composed of engineering professionals. It aims to promote development and education in the electrical engineering and computer science fields. o IEEE is probably best known for the standardization of LAN technologies. IEEE’s Project 802 aided in the standardization of Ethernet (802.3), token-ring (802.5), and Wireless LAN’s (802.11). American National Standards Institute (ANSI) is an organization composed of more than one thousand representatives from industry and government who together to determine standards for electronics, industry and other fields such as chemical and nuclear engineering, health and safety, and construction. o This organization is known for published standards such as American Standard for Code Information Interchange (ASCII) and Small Computer System Interface (SCSI). Electronic Industries Alliance (EIA) is a trade organization composed of representatives from electronics manufacturing firms across the United States. This organization writes ANSI standards and legislation favorable to the growth of computer and electronic industries. Telecommunications Industry Association (TIA) focuses on standards for information technology, wireless, satellite, fiber optics, and telephone equipment. o The best-known standards to come from the TIA/EIA alliance are its guidelines for how network cable should be installed in commercial buildings, known as the “TIA/EIA 568 – B Series”. Internet Engineering Task Force (IETF) is an organization that is responsible for the overall development of the Internet and the standardization of internetworking technologies. In short, the IETF sets standards for how systems communicate over the Internet. o Internet Society (ISOC) – This oversees the overall development on the Internet. o Internet Engineering Steering Group (IESG) – This oversees the activities of IETF and manages the process used to introduce or update Internet standards. o Internet Architecture Board (IAB) – This serves as the technology advisory group to the Internet Society and is responsible for the overall development of the protocols and architecture associated with the Internet. o Internet Assigned Numbers Authority (IANA) – This oversees Internet naming and addressing; they are in charge of all “unique parameters” on the Internet including IP (Internet Protocol) addresses. Organization for Standardization (ISO) - The International Organization for Standardization (ISO) is an international standards organization responsible for a wide range of standards, including many that are relevant to networking. Application Layer Protocols (Huawei, 2020) The application layer provides interfaces for application software so that applications can use network services. The application layer protocol designates transport layer protocols and ports. Simple Mail Transfer Protocol (SMTP) refers to a TCP/IP protocol that specifies a reliable and efficient transfer of electronic mail service on the Internet. Post Office Protocol, version 3 (POP3) refers to a TCP/IP protocol that is designed to allow a workstation to retrieve mail that the server is holding for it. Trivial File Transfer Protocol (TFTP) is a small and simple alternative to FTP that uses UDP to transfer files between systems. File Transfer Protocol (FTP) refers to a TCP/IP protocol that enables the sharing of computer programs and/or data between hosts over a TCP/IP network. It uses TCP to create a virtual connection for control information and then creates a separate TCP connection for data transfer. Network File System (NFS) refers to a TCP/IP protocol that enables computers to mount drives on remote hosts and operate them as if they were local drives. 03 Handout 1 *Property of STI [email protected] Page 1 of 4 IT2203 Domain Name System (DNS) refers to a TCP/IP protocol that is used on the Internet for translating names of domains and their publicly advertised network nodes into IP addresses. Simple Network Management Protocol (SNMP) refers to a TCP/IP protocol that monitors and controls the exchange of management information between networks and network components; it enables network administrators to manage configurations, statistics collection, network performance, and security. SNMP model includes three (3) components: o Managed devices collect and store management information and make this information available to NMSs using SNMP. o An agent has local knowledge of management information and translates that information into a form compatible with SNMP. o NMS executes applications that monitor and control managed devices. NMSs provide the bulk of the processing and memory resources required for network management. Terminal Emulation Protocol Network (Telnet) refers to a TCP/IP protocol that uses the TCP as the transport protocol to establish a connection between server and client. o It uses special software called a daemon, which is referred to as a remote host. A connection using Telnet is called a Virtual Terminal (VTY) session, or connection. Remote login application (rlogin) is a UNIX command that allows authorized users to log in to other UNIX machines (hosts) on a network and to interact as if the user were physically at the host computer. Once the user is logged into the host, the user can do anything that the host has permitted, such as read, edit, or delete files. Hypertext Transfer Protocol (HTTP) refers to an application-level protocol service and an Internet standard developed by the IETF that supports the exchange of information on the World Wide Web, as well as on internal networks. HTTPS (Hypertext Transfer Protocol over Secure Socket Layer) is a secure message-oriented communications protocol designed for use in conjunction with HTTP. o Secure Sockets Layer (SSL) – is a security protocol that works at a socket level. This layer exists between the TCP layer and the application layer to encrypt/decode data and authenticate concerned entities. TCP and UDP Connections (Karumachi, et. al., 2020) Computers running on the Internet communicate to each other using either the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). Transport Control Protocol (TCP) refers to a connection-oriented TCP/IP standard transport layer protocol that provides reliable data delivery, duplicate data suppression, congestion control, and flow control on which many application protocols depend. o Transport protocols are used to deliver information from one port to another and thereby enable communication between application programs. o The reliability of the communication between the source and destination programs is ensured through error-detection and error-correction mechanisms that are implemented within TCP. User Datagram Protocol (UDP) refers to a connectionless TCP/IP standard transport layer protocol that provides unreliable, best-effort service. o UDP is a protocol that sends independent packets of data, called datagrams, from one computer to another with no guarantees about arrival. ▪ Sending datagrams is much like sending a letter through the postal service: The order of delivery is not important and is not guaranteed, and each message is independent of any other. Port Numbers (Karumachi, et. al., 2020) Data transmitted over the Internet is accompanied by addressing information that identifies the computer and the port for which it is destined. The computer is identified by its 32-bit IP address, which it uses IP to deliver data to the specific computer on the network. Ports are identified by a 16-bit number, which TCP and UDP use to deliver the data to the specific application. 03 Handout 1 *Property of STI [email protected] Page 2 of 4 IT2203 Port numbers range from 0 to 65,535 because ports are represented by 16-bit numbers. The port numbers ranging from 0 - 1023 are restricted; they are reserved for use by well- known services such as HTTP and FTP and other system services called well-known ports. Port Protocol 21 File Transfer Protocol 23 Telnet Protocol 25 Simple Mail Transfer Protocol (Karumachi, et. al., 2020) 80 Hypertext Transfer Protocol TCP and UDP Formats TCP Header Fields Source Port identifies the application that sends the segment. This field is 16 bits long. Destination Port identifies the application that receives the segment. This field is 16 bits long. Sequence Number refers to every byte of data sent over a TCP connection. The value of this field is equal to the sequence number of the first byte in a sent segment. This field is 32 bits long. Acknowledgment Number indicates the sequence number of the next segment's first byte that the receiver is expecting to receive. The value of this field is 1 plus the sequence number of the last byte in the previous segment that is successfully received. This field is 32 bits long. Header Length indicates the length of the TCP header. The unit is 32 bits (4 bytes). If there is no option content, the value of this field is 5, indicating that the header contains 20 bytes. Reserved - this field is always set to 0 as it is intended for future protocol changes. It is 6 bits long. Control Bits include FIN, ACK, and SYN flags which indicate the TCP data segments in different states. Window is used for TCP flow control. The value is the maximum number of bytes that are allowed by the receiver. Checksum is a mandatory field in which it is calculated and stored by the sender and verified by the receiver. UDP Header Fields Source Port identifies the application that sends the segment. This field is 16 bits long. Destination Port identifies the application that receives the segment. This field is 16 bits long. Length specifies the total length of the UDP header and data. The possible minimum length is 8 bytes because the UDP header already occupies 8 bytes. Checksum field refers to the checksum of the UDP header and UDP data. This field is 16 bits long. SYN-ACK Handshake (Huawei, 2020) Three-way handshake is a method, in which the sender and the receiver inform their respective operating systems that a connection will be initiated before the actual data communication begins. SYN - Synchronize ACK - Acknowledge FIN - Finish 03 Handout 1 *Property of STI [email protected] Page 3 of 4 IT2203 Sequence Number and Acknowledgment Number fields to implement reliable and ordered data transmission. Window Sliding Mechanism. requires the sender to receive an acknowledgment from the receiver after transmitting a certain amount of data. TCP uses the sliding window mechanism to control the data transmission rate. TCP Shutdown (Four- Way Handshake) is engaged when the data transmission is complete in order to disconnect the TCP connection and release system resources. References: Comer, D. (2019). The internet book: Everything you need to know about computer networking and how the internet works. CRC Press. Huawei. (2020). HCIA-Datacom V1.0 Training Material. Karumanchi, N., Damodaram, A., & Rao, S. (2020). Elements of computer networking: An integrated approach. Career Monk. Kurose, T & Ross, K. (2021). Computer networking: A top-down approach. Pearson. Robertazzi, T. (2017). Introduction to computer networking. Springer International. 03 Handout 1 *Property of STI [email protected] Page 4 of 4