Address Class Binary Subnet Mask Decimal Subnet Mask Class A 11111111.00000000.00000000.00000000 255.0.0.0 Class B 11111111.11111111.00000000.00000000 255.255.0.0 Class C 11111111.11111111.11111111.00000000 255.255.255.0

 In reality, these subnet masks currently represent unsubnetted networks, which is an unfortunate result of the terminology.What happens if we want to subnet a network?  Let's assume we want to divide our local network into six subnets.  Now we need to borrow bits from the host portions of the IP addresses.  Thus we need to determine how many more bits we need to use to communicate this in the subnet mask. The following table tells us how many subnets we could specify using a particular number of additional bits.  Further in the past, it wasn't good to use all 0s or all 1s in a section denoting a subnet.  More recently, it is possible to use all 0s or all 1s.

 Number of Bits Subnet Addresses - Currently Subnets in the Past 1 21 = 2 2 - 2 = 0 2 22 = 4 4 - 2 = 2 3 23 = 8 8 - 2 = 6 4 24 = 16 16 - 2 = 14 5 25 = 32 32 - 2 = 30

 Again, we subtract off two potential subnet addresses due to not wanting to use all 0s or 1s for a particular subnet address.From this table we can see that we need to take three additional bits from our host addresses in order to specify the subnets.  So now if we were working with Class B addresses the subnet mask would be 11111111.11111111.11100000.00000000 Where the positions in the additional 111 triple will be used to specify the 6 different subnets. 001 010 011 100 101 110 Unfortunately, by taking away some of the bits from the specification of the hosts, we diminish our capacity to uniquely specify a larger number of them.  So now since we have only 13 remaining 0s for identifying hosts we are restricted to 213 - 2 = 8190 hosts on each subnet. The following list outlines many of the advantages of subnetting. reduces broadcast traffic subnets are connected to each other by routers which do not pass on broadcast messages by default increases organization for ease of overall administration improves isolation of particular portions of the network for increased security and filtering improves efficiency in use of addresses We have neglected to mention ANDing for determining if particular devices are in the same subnet.  This might be covered in class. Ports and Sockets.  What happens if two network applications running on the same device are sending and receiving packets at the same time?  Remember that an IP address is used to route the messages to particular devices.  Port numbers are used to route messages within the device to ensure there isn't confusion about what packets go with what message.  Port numbers are used as add ons to the IP address.  They are used by TCP and UDP to identify the specific application that is sending or receiving the message.Common internet applications have predefined port numbers.  This sort of standardization makes communication easier.  These assigned port numbers are called well known ports and contained in the following table.

 Application TCP Port UDP Port FTP - Data 20 FTP 21 SSH 22 Telnet 23 SMTP 25 25 TIME 37 37 TACACS+ Login 49 49 DNS 53 53 TACACS+ Database 65 65 HTTP 80 80 Kerberos 88 88 POP3 110 110 NNTP 119 119 NetBIOS name service 137 137 SNMP 161 161 IRC 194 194 LDAP 389 389 NetWare over IP 396 396 Apple QuickTime 458 458 ISAKMP 500 500 rexec 512 UNIX rlogin 513 UNIX Broadcast Naming - rwho 513 UNIX rsh and rep 514 UNIX SYSLOG 514 SSL Shell - SSHELL 614 614 L2TP 1701 PPTP 1723 1723 RADIUS - authorization 1812 1812 RADIUS accounting 1813 1813

 There are 65,536 usable ports.  Ports 0 through 1024 are reserved as well known ports.A socket is the endpoint of a connection.  You must have a socket in order for communication to happen.  Different socket types use different addressing methods.  The most common approach is to use an IP address combined with a port number.  In UNIX this is called AF_NET addressing.  Another UNIX approach called AF_UNIX uses pathnames to identify sockets. BSD - Berkeley Sockets became the standard for TCP/IP communications.  Winsock - Windows Sockets are loaded as a DLL - Dynamic Link Library in Windows operating system platforms. If you have multiple versions of an application open, such as Internet Explorer, packets associated with an HTTP request will be configured to use port 80.  But how will your system know which of the open Internet Explorer sessions should be receiving the packets?  This is done using a different socket designation for each port. Addressing in Packet Headers.  When communications occur over networks, the addresses need to be available in relatively standard ways in order to facilitate their success.  Remember, each layer of the OSI Reference model encapsulates information into packet headers before sending the packet on.  These sorts of headers are used in TCP/IP communications to ensure the correct source and destination addresses are passed along in addition to a large variety of other information. By default, IP headers are 20 bytes in length.  These headers contain fields that indicate the following. type of service total length of the datagram unique identifier for the datagram flags and fragmentation offset to aid in reassembly TTL - Time to Live to limit the number of routers through which the datagram can pass upper layer protocol that is to receive data ICMP TCP UDP IGRP OSPF checksum for detection of message corruption source IP address destination IP address The following diagram gives a more visual representation of a typical IP header containing 12 fields plus options.

 The options can include things such as security restrictions timestamps routing restrictions The IP header without options will be 20 bytes in length. Name Resolution.  Remember TCP/IP makes use of addresses composed of network bits, subnet bits, host bits and ports to resolve difficulties in locating sources and destinations.  On the other hand, people prefer names instead of obscure numbering schemes.  For example, think of remembering and IP address such as 193.234.23.5 to go shopping.  It is much better to remember a simple and mnemonic URL.Standard names on the Internet involve some sort of top level domain type identifier such as those contained in the following list. com - originally intended for commercial organizations net - originally intended for networks such as ISPs org - originally intended for non-profit organizations edu - restricted for use by educational institutions gov - restricted for use by governmental entities mil - restricted for use by US military efforts int - restricted for use by international organizations Outside the US there are also designations that specify sites with particular national origins such as the following. uk - United Kingdom au - Australia ca - Canada Specific organizations or individuals can register second level domain names.  this used to be done by InterNIC, but it has been recently distributed to other organizations.The following are three of the most widely used approaches to translate names to IP addresses. HOSTS and LMHOSTS files these are text files stored on computer hard disks DNS - Domain Name System or DDNS - Dynamic DNS WINS - Windows Internet Name Server HOSTS and LMHOSTSIn the early days the way to match domain names with IP addresses was through a HOSTS file usually on the client's computer.  This worked reasonably well, except every time a new site was added the HOSTS file needed to be modified.  In addition, in order to make certain this site was available to everyone, the HOSTS file would also need to be updated on every computer on the network.  It should be obvious that this was worse than cumbersome. LMHOSTS did something quite similar on Microsoft networks.  We won't go into more detail because this is largely a technology that has gone out of use. DNS and DDNS DNS - Domain Name System was devised to overcome the problems associated with using HOSTS.  DNS Servers store databases of IP addresses associated with particular host names and URLs.A hierarchy of DNS servers exists on the Internet.  Each server contains information for its own zone.  If a particular DNS server doesn't have the IP address associated with a particular domain name it can pass it to another DNS server.The following diagram gives a representation of the process.

 When you type a URL into the address field of your browser an accurate and unique domain name such as velte.com needs to be resolved with a unique IP address.  This is done at the nearest DNS server to translate the URL to an IP address.  The IP address for velte.com is 209.98.208.34, which is the decimal equivalent satisfying the criteria for IP addresses.  The routers and switches that run the internet don't recognize domain names.  The IANA issues IP addresses.DNS is a big improvement over HOSTS.  But even with DNS the server's tables must be updated manually.  This motivated an enhancement called DDNS - Dynamic DNS where automatic updates of the database tables are enabled. DNS database tables have a variety of different types of records.  The following list contains three of the most common. (A) Address Record - maps a host name to an IP address (MX) Mail Exchange Record - points to a mail exchange server for a specific host (CNAME) Canonical Name Record - maps aliases or additional names to a host WINS WINS - Windows Internet Name Server is another method for resolving domain names with IP addresses.  This is done for NetBIOS names on Microsoft networks.  These NetBIOS names are mapped in a database on a WINS server.  Windows NT and Windows 2000 can function as WINS servers. Since TCP/IP doesn't understand NetBIOS names, this is necessary.  But WINS actually uses a dynamically updatable database, unlike DNS.  When WINS clients come onto the network they announce themselves to the WINS server with their names and IP addresses.  The WINS server builds the database from this information. DHCP, DNS and WINS can actually all work on the same network.  In Microsoft's most recent server operating systems these three services have already been integrated to interoperate efficiently.