1 / 8

Subnets and Subnet Masks in Networks

Learn about the importance of subnet masks in internet protocols and how they are used to define subnetworks within a domain. Discover why subnet masks are necessary and how they help routers route incoming packets effectively.

vincentc
Download Presentation

Subnets and Subnet Masks in Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Subnets and Subnet Masks CS 447 Networks and Data Communication Department of Computer Science Southern Illinois University Edwardsville Fall, 2019 Dr. Hiroshi Fujinoki E-mail: hfujino@siue.edu

  2. CS 447 Networks and Data Communication IP Subnet and IP Subnet Mask Subnet_Mask/001

  3. Why do we need “Subnet Mask” Internet CS 447 Networks and Data Communication internal router  How are “subnet addresses” used?  Who use “subnet addresses”? forwards incoming packets using subnet address subnet 1 Public Network (Internet) gateway router subnet 2 32-bit IP address forwards incoming packets using subnet address forwards incoming packets using subnet address Host Address Domain Address Host Address Domain Address subnet 4 subnet 3 this IP packet is delivered to the destination host using the “host address” a network domain (e.g. “146.163.x.x” for “SIUE domain”) Subnet Address Subnet_Mask/002

  4. Why do we need “Subnet Mask” CS 447 Networks and Data Communication • IP has a way to specify the number of hosts within a domain (CIDR-prefix), but does not have a way to specify the number of subnets in a domain • Since each domain has a different number of sub-networks, there must be a mechanism to let routers know which bits in each IP address indicate a subnet address (as long as your network does not have any sub-network, you do not have to manually set up “subnet mask” – or “default subnet mask” is automatically applied, which indicates “0 subnet in this domain”) Subnet_Mask/003

  5. If there are two subnetworks within a domain  If there are four subnetworks within a domain  10010000 10100011 XXXXXXXX XXXXXXXX If there are 2n subnetworks within a domain  146 163 XX XX We need to indicate how many bits are assigned for subnetworks CS 447 Networks and Data Communication Owners of a network domain can create as many subnets as they want. Problem “manually ” (= “the network administrator needs to set up the routers in the domain”) “subnet mask” 1 bit to indicate subnetwork 2 bits to indicate subnetwork n bits to indicate subnetwork Example: a domain of “146.163.X.X/16” Subnet_Mask/004

  6. 146 163 XX XX 10010000 10100011 XXXXXXXX XXXXXXXX Example We know that the last 16 bits indicate the host addresses (since /16 assumes to use the last 16 bits for host address) CS 447 Networks and Data Communication IP Subnet and IP Subnet Mask Purpose: To indicate which portion of an IP address indicates host address SIUE IP Network Domain: 146.163.XX.XX If we do NOT have any subnetwork Subnet_Mask/005

  7. Mask for subnetwork Mask for domain address Subnet Mask: Invert 1 and 0s 10010000 10100011 01101101 00000001 00000000 00000000 00001111 11111111 00000000 00000000 00001101 00000001 11111111 11111111 11110000 00000000 13 1 CS 447 Networks and Data Communication How to use Subnet Mask #1: Get Host Address • If SIUE has 16 subnetworks • Try to figure out the host address of 146.163.109.1 (255.255.240.0) BINARY AND 146.163.109.1: Subnet_Mask/006

  8. Mask for domain address Subnet Indicator Subnet Mask: BINARY AND 146.163.109.1: 10010000 10100011 01101101 00000001 10010000 10100011 01100000 00000000 11111111 11111111 11110000 00000000 IP domain address Subnetwork address CS 447 Networks and Data Communication How to use Subnet Mask #2: Get Domain Address and Subnet Address • If SIUE has 16 subnetworks • Try to figure out the domain and subnetwork address of 146.163.109.1 Subnet_Mask/007

More Related