Transcript Ch08

Chapter Overview

Subnet
1
What is a subnet


When you break a network into a few smaller
networks, you have created several subnets
Like IP address where we have network
addresses and host IDs, we now have subnet
addresses and host IDs
2
What Is a Subnet Mask?



A subnet mask is a 32-bit binary number that
indicates which bits of an IP address identify
the network and which bits identify the host.
The 1 bits are the network identifier bits and
the 0 bits are the host identifier bits.
A subnet mask is typically expressed in
dotted decimal notation.
3
Subnet Masks for IP Address Classes
Class
Subnet Mask
A
255.0.0.0
B
255.255.0.0
C
255.255.255.0
4
Creating Subnets


Borrow bits from the host identifier and use
them as a subnet identifier.
Convert the binary values to decimals.
5
Subnetting a Class B Address
6
Classless Inter-Domain Routing (CIDR)

(CIDR) is an Internet Protocol (IP) address
allocation and route aggregation
methodology used within the Internet
addressing architecture that replaced the
IPv4 classful network organization of the IP
address space.
7
CIDR notation


In the CIDR notation, the IP address is
expressed according to the standards of IPv4
or IPv6, followed by the separator character
which is a slash (/), followed by the prefix
size as a decimal number.
the address specification 192.168.100.1/24
represents the given IPv4 address and its
associated routing prefix 192.168.100.0 or,
equivalently, its subnet mask, 255.255.255.0.
8
CIDR notation (2)

You cannot have 192.168.100.1/31 because
the hosts need to have at least two bits
9
The five key questions of a subnet mask





How many subnets does a subnet mask
produce?
Number of valid hosts per subnet
What are the valid subnets
What are the broadcast address of each
subnet
What are the valid hosts in a subnebt
10
How many subnets


2x where x is the number of 1s in the subnet
mask after the 1s for the traditional class (8
for A, 16 for B, and 24 for C)
For example, the subnet mask
255.255.255.192 would have 22=4 subnet for
a class C network.
11
Number of valid hosts per subnet



2y -2, where y is the number of zeros in a
subnet mask, is the number of hosts
The -2 are for all 0s and all 1s.
For 255.255.255.192, the number of hosts
are 26 -2 = 62
12
What are the valid subnets

For 255.255.255.192 on a class C network
they are




0, (00000000 to 00111111)
64, (01000000 to 01111111)
128, (10000000 to 10111111) and
192 , (11000000 to 11111111)
13
What are the broadcast address

For 255.255.255.192 they are




0  00111111
64  01111111
128  10111111
192  11111111
14
What are the valid hosts

For 255.255.255.192 they are




0, (00000001 to 00111110)
64, (01000001 to 01111110)
128, (10000001 to 10111110) and
192 , (11000001 to 11111110)
15
Example #1C (Page 219)

On mask of 255.255.255.128/25




# of subnet 2
Hosts in each subnet 126
The two subnets are 0 and 128, which broadcast
address be 127 and 255 respectively
Valid host addresses
16
Assigning IP addresses

Note, this 192.168.0.0 ~192.168.255.255 are
class C private IP addresses
17
Troubleshooting

1. Ping 127.0.0.1 (or ::1)

If cannot connect, host problems


Ping IP address of the host


If works, NIC is working
Ping the default gateway



NIC, TCP/IP, subnet mask, etc
If works, connected to LAN
If not, most likely physical layer issues
Ping server


If working, the server is working, so is IP
If not, server could be down, or others
18
What’s wrong here (pp. 237)
It is a broadcast
address
19
Tools




Ping (Packet Internet groper)
Traceroute/tracert
Arp –a
Ipconfig
20
Network Address Translation (NAT)



Access the Internet with private IP address
Change ISP without renumbering computer’s
IP addresses
Merge two networks with some duplicated IP
addresses
21
NAT where?
22
Good and bad
23
Three types of translations



Static – allow one to one mapping of local
and global address, use to hide internal
addresses
Dynamic – doing the same as Static, just
need a pool of real IP addresses
Overloading – most interesting, used by
home Internet routers – using ports
24
Example of overloading
25