670 likes | 862 Views
CIS 1140 Network Fundamentals. Chapter Four: Introduction to TCP/IP Protocols. Collected and Compiled By JD Willard MCSE, MCSA, Network+, Microsoft IT Academy Administrator Computer Information Systems Instructor Albany Technical College. Attention: Accessing Demos.
E N D
CIS 1140 Network Fundamentals Chapter Four: Introduction to TCP/IP Protocols Collected and Compiled By JD Willard MCSE, MCSA, Network+, Microsoft IT Academy Administrator Computer Information Systems Instructor Albany Technical College
Attention: Accessing Demos • This course presents many demos. • The Demosrequire that you be logged in to the Virtual Technical College web site when you click on them to run. • To access and log in to the Virtual Technical College web site: • To access the site type www.vtc.com in the url window • Log in using the username: CIS 1140 or ATCStudent1 • Enter the password: student (case sensitive) • If you should click on the demo link and you get an Access Denied it is because you have not logged in to vtc.com or you need to log out and log back in. • If you should click on the demo link and you are taken to the VTC.com web site page you should do a search in the search box for the CompTIA Network+ (2009 Objectives) Course and run the video from within that page.
Objectives • Identify and explain the functions of the core TCP/IP protocols • Explain the TCP/IP model and how it corresponds to the OSI model • Discuss addressing schemes for TCP/IP in IPv4 and IPv6 protocols • Discuss addressing schemes for TCP/IP in IPv4 and IPv6 and explain how addresses are assigned automatically using DHCP (Dynamic Host Configuration Protocol) • Describe the purpose and implementation of DNS (Domain Name System) • Identify the well-known ports for key TCP/IP services • Describe how common Application layer TCP/IP protocols are used
Network Protocols • A Protocol is a set of standards or rules that governs how networks communicate • Protocols often provide services, such as e-mail or file transfer. Most protocols are not intended to be used alone, but instead rely on and interact with other dependent or complimentary protocols • Protocols vary according to their purpose, speed, transmission efficiency, utilization of resources, ease of setup, compatibility, and ability to travel between different LANs. • Multiprotocol networks: networks running more than one protocol • A group of protocols that is intended to be used together is called a protocol suite • Most popular protocol suite is TCP/IP • Others: IPX/SPX, NetBIOS, and AppleTalk Network Protocols Defined Demo Transport Protocols Demo Understanding Network Protocols Demo
Characteristics of TCP/IP (Transmission Control Protocol/Internet Protocol) • TCP/IP is not one protocol but a suite of specialized protocols called subprotocols. • Subprotocols include TCP, IP, UDP, ARP, ICMP, IGMP etc. • Developed by US Department of Defense • ARPANET (1960s) • Internet precursor • Advantages of TCP/IP • Open nature • Costs nothing to use • Flexible • Runs on virtually any platform • Connects dissimilar operating systems and devices • Routable • Transmissions carry Network layer addressing information • Suitable for large networks Introduction Demo Overview Demo TCP IP Basics Demo
TCP/IP Compared to the OSI Model The TCP/IP suite of protocols can be divided into four layers that roughly correspond to the seven layers of the OSI Model. ■ Application layer— The Application layer corresponds to the Session, Presentation, and Application layers of the OSI model. Applications gain access to the network through this layer, via protocols such as the File Transfer Protocol (FTP), Trivial File Transfer Protocol (TFTP), Hypertext Transfer Protocol (HTTP), Simple Mail Transfer Protocol (SMTP), and Dynamic Host Configuration Protocol (DHCP). ■ Transport layer— This layer comparable to the Transport layer of the OSI model and contains the Transmission Control Protocol (TCP) and User Datagram Protocol (UDP), which provide flow control, error checking, and sequencing. All service requests use one of these protocols. ■ Internet layer— This layer is comparable to the Network layer of the OSI model contains the Internet Protocol (IP), Internet Control Message Protocol (ICMP), Internet Group Message Protocol (IGMP), and Address Resolution Protocol (ARP). These protocols handle message routing and host address resolution. ■ Network access layer (or Link layer) — This layer corresponds to the functions of the Physical and Data Link layers of the OSI mode and is responsible for describing the physical layout of the network and how messages are formatted and transmitted to the network wire. The TCP/IP Model (5:00) TCP/IP and OSI ModelsDemo
The TCP/IP model compared with the OSI model The TCP/IP Suite Demo continued The TCP/IP Suite Demo continued The TCP/IP Suite Demo
The TCP/IP Core Protocols • TCP/IP suite subprotocols • Operate in Transport or Network layers of OSI model • Provide basic services to protocols in other layers • Most significant protocols in TCP/IP suite • TCP • IP TCP/IP Suite Basics Demo Networking Protocols (6:17)
TCP (Transmission Control Protocol) • Transport layer protocol that operates host to host. • Provides reliable data delivery services • Connection-oriented subprotocol • Establish connection before transmitting • Uses sequencing and acknowledgements • Provides flow control • TCP segment format • Encapsulated by IP packet in Network layer • Becomes IP packet’s “data” Understanding TCP Demo
A TCP segment Transmission Control Protocol Demo Connection Controls and WindowingDemo
TCP (cont’d.) • The TCP three-way handshake is the process used to establish a TCP session. • The steps to a TCP three-way handshake process are: • A host sends a SYN packet to the target host. • The target host responds to the original host with a SYN ACK packet. • The host responds to the target host with an ACK packet. Establishing a TCP connection
UDP (User Datagram Protocol) • Transport layer protocol • Provides unreliable data delivery services • Connectionless transport service • No assurance packets received in correct sequence • No guarantee packets received at all • Best effort delivery • No error checking, sequencing • Lacks sophistication • More efficient than TCP • Useful when large amounts of data need to be transferred quickly such as with live audio and video transmissions over the Internet. Understanding UPD Demo
UDP (User Datagram Protocol) A UDP segment
IP (Internet Protocol) Understanding IP Demo • Network layer protocol • How and where data delivered, including: • Data’s source and destination addresses • Addressing schemes: uses an IP address, such as 10.1.1.1 and a Subnet Mask such as 255.0.0.0 • Enables TCP/IP to internetwork • Traverse more than one LAN segment • More than one network type through router • Routing: Statically and Dynamically via many routing protocols; OSPF, BGP, RIP and EIGRP • Network layer data formed into packets • IP packet • Data envelope that contains information for routers to transfer data between different LAN segments • Unreliable, connectionless protocol • Relies on upper layer protocols like TCP to ensure delivery and connection orientation Internet Protocol Demo TCP/IP Demo Pt.2
IP Packet • IP datagram: packet, in context of TCP/IP • Envelope for data • IP adds the following header fields to each packet: • Source IP Address • Destination IP Address • Protocol • Checksum • Time to Live (TTL) An IPv4 packet
IGMP • Operates at the Network layer of the OSI model and is a protocol for defining host groups • Manages multicasting on networks running IPv4 • Allows one node to send data to a defined group of nodes • Similar to broadcast transmission • All group members can receive broadcast messages intended for the group (called multicasts) • Multicast groups can be composed of devices within the same network or across networks (connected with a router) • Point-to-multipoint method • Used for Internet teleconferencing or videoconferencing Understanding IGMP Demo
ARP (Address Resolution Protocol ) • Network layer protocol used with IPv4 that provides IP address-to-MAC address name address resolution • Obtains MAC (physical) address of host or node • A host wishing to obtain a physical address broadcasts an ARP request onto the TCP/IP network. The host on the network that has the IP address in the request then replies with its physical hardware address. • Creates database that maps MAC to host’s IP address • ARP table (ARP Cache) • Table of recognized MAC-to-IP address mappings • Saved on computer’s hard disk • Increases efficiency • Contains dynamic and static entries Understanding ARP Demo ARP (4:02)
ICMP (Internet Control Message Protocol) ICMP is commonly used for troubleshooting and information gathering. ICMP allows you to test the path (among other things). Ping and Tracert are two tools that can be used to test a path and they both use ICMP. ICMP packets will be able to help send information about errors, control, and other informational messages. • Network layer protocol • Reports on data delivery success/failure • Announces transmission failures to sender • Network congestion • Data fails to reach destination • Data discarded: TTL expired • ICMP cannot correct errors • Provides critical network problem troubleshooting information • ICMPv6 used with IPv6 Understanding ICMP Demo
Connectivity Parameters The following table summarizes the configuration settings required to connect to a TCP/IP network.
IP Addressing Overview IP Addresses Demo IP Addressing Demo Pt.1 IP Addressing Demo Pt.2
Addressing in TCP/IP • Networks recognize two addresses • Logical (Network layer) • Physical (MAC, hardware) addresses • IP protocol handles logical addressing • Specific parameters • Unique 32-bit number • Divided into four octets (sets of eight bits) separated by periods • Example: 144.92.43.178 • Network class determined from first octet IP AddressDemo What is an IP Address?Demo Adding ProtocolsDemo
Binary and Dotted Decimal Notation • Dotted decimal notation • Common way of expressing IP addresses • Decimal number between 0 and 255 represents each octet • Period (dot) separates each decimal • Each number in dotted decimal address has binary equivalent • Convert each octet • Remove decimal points • Base 2 Numbering is Binary • Consists of ‘0’ and ‘1’. Bits are either “Off” (0) or “On” (1) • Computers like Binary! • IP Addresses are comprised of four 8 bit octets that are expressed as a decimal number between 0 and 255 separated by a period Bit Value 128 64 32 16 8 4 2 1 Bit 1 0 1 1 0 0 1 1 = 128+32+16+2+1=179 Binary Math (7:59) A Binary Lesson Demo Binary AddressingDemo Solutions for Binary Demo
Binary to Decimal Conversions Bit Number: 8 7 6 5 4 3 2 1 Binary Equiv: 27 26 25 24 23 22 21 20 Decimal Equiv: 128 64 32 16 8 4 2 1 Binary Number: 1 0 0 1 1 1 0 1 Decimal Equiv: 128+ 0+ 0+ 16+ 8+ 4+ 0+ 1= 157 1) Determine what decimal numbers in the table will create the number you want to make. 2) Enter a “1” under each value you must use. Enter a “0” for each value that is not used in the Binary Number line. 3) The resulting combination of 0’s and 1’s is the binary equivalent of the number.
Sample Binary to Decimal Conversion Convert Decimal 5 to Binary Bit Number: 8 7 6 5 4 3 2 1 Binary Equiv: 27 26 25 24 23 22 21 20 Decimal Equiv: 128 64 32 16 8 4 2 1 Binary Number: 0 0 0 0 0 1 0 1 4) Determine what decimal numbers in the table will create the decimal number 5 (4+1). 5) The resulting combination of 00000101 is the binary equivalent of the decimal number 5.
Address Classes • There are three primary classes of network addresses: A, B, and C. • The actual class used is based on the size of the network. • An IP address is accompanied by a subnet mask. • Each address class has a different default subnet mask. • IP addresses are expressed in dotted-decimal format, such as 192.168.123.132. • Each set of four dotted-decimal numbers represents eight bits of the binary address. • The addresses range from 00000000 to 11111111, or, in decimal notation, from 0 to 255. IP Address Classes Demo IP Classes (9:52) Address ClassesDemo
Classful Addressing • Adheres to network class distinctions • Only Class A, B, and C addresses are recognized • Network ID limited to first 8 bits in Class A, first 16 bits in Class B, and first 24 bits in Class C • Fixed network ID size ultimately limits number of hosts a network can include First Octet 1-126 First Octet 128 – 191 First Octet 192 - 223 Components of an IP Address Demo
Classful Addressing • IPv4 addresses have a default class. The address class identifies the range of IPv4 addresses. The following table shows the default address class for each IPv4 address range.
Reserved Addresses • Certain types of IP addresses reserved for special functions • Network ID Cannot Be 127 • 127 is reserved for lookback functions • Network ID and Host ID Cannot Be 255 (All Bits Set to 1) • In broadcast addresses, octet(s) representing host information set to all 1s (255 in decimal notation) • 255 is a broadcast address • Network ID and Host ID Cannot Be 0 (All Bits Set to 0) • In network IDs, bits for host information set to 0 • 0 means “this network only” • Host ID Must Be Unique to the Network IP Address RulesDemo
Results of the ipconfig /all command on a Windows XP or Windows Vista workstation Addressing in TCP/IP • ipconfig: Windows NT, XP, Vista, 2000, 2003, 2008 command to view IP information • Winipcfg: Win98, ME • ifconfig on Unix and Linux /all switch Ipconfig Demo IPConfig,Ifconfig, Winipcfg Demo
What Is a Subnet Mask? • In binary form, the subnet mask is always a series of 1's followed by a series of 0's (1's and 0's are never mixed in sequence in the mask). A simple mask might be 255.255.255.0. • Distinguishes the Network ID from the Host ID • Combines with device IP address to mask the Network ID with all 1s • Informs network about segment, network where device attached • Used to specify whether the destination host is local or remote (ANDing) • Four octets (32 bits) • Expressed in binary or dotted decimal notation • Assigned same way as IP addresses • Manually or automatically (via DHCP) Subnet Mask Demo Subnet Masks Demo
Subnet Masks • Every device on TCP/IP-based network identified by subnet mask • 32-bit number that, when combined with device’s IP address, informs rest of network about segment or network to which a device is attached • Subnetting, subdividing single class of networks into multiple, smaller logical networks or segments, depends on subnet masks to identify how a network is subdivided • Indicates where network information is located in an IP address • “1” bits indicate corresponding bits in IP address contain network information • “0” bits indicate corresponding bits in IP address contain host information • To calculate host’s network ID given IP address and subnet mask, perform ANDing Anding IP Addresses Demo Subnet MasksDemo Solutions for MasksDemo
131.107. 16.200 255.255. 0.0 Default Subnet Masks (No Subnetting) Address Class Bits Used for Subnet Mask Dotted Decimal Notation Class A Class B Class C 11111111 00000000 00000000 00000000 11111111 11111111 00000000 00000000 11111111 11111111 11111111 00000000 255.0.0.0 255.255.0.0 255.255.255.0 Class B Example IP Address Subnet Mask 131.107. y.z Network ID w.x. 16.200 Host ID
IPv6 Addressing • Composed of 128 bits • Eight 16-bit fields • Typically represented in hexadecimal numbers • Separated by a colon • Example: FE22:00FF:002D:0000:0000:0000:3012:CCE3 • Abbreviations for multiple fields with zero values • 00FF can be abbreviated FF • 0000 can be abbreviated 0 • Multicast address • Used for transmitting data to many different devices simultaneously • Anycast address • Represents any one interface from a group of interfaces • Modern devices and operating systems can use both IPv4 and IPv6 Why IPv6? Demo IPv4 and IPv6 (5:18) IPv6 Basics Demo
ADDRESS ASSIGNMENT • Because IP addresses assigned to hosts must be unique, the use of IP addresses on the Internet is controlled by organizations that ensure that no two organizations are given the same range of IP addresses to assign to hosts. • The Internet Assigned Numbers Authority (IANA) manages the assignment of IP addresses on the Internet. IANA is operated by the Internet Corporation for Assigned Names and Numbers (ICANN). • IANA allocates blocks of IP addresses to Regional Internet Registries (RIRs). An RIR has authority for IP addresses in a specific region of the world. • An RIR assigns a block of addresses to Internet Service Providers (ISPs). • An ISP assigns one or more IP addresses to individual computers or organizations connected to the Internet. • On private networks IP addresses are assigned to computers either manually, called static addressing, or automatically through a DHCP server which is called dynamic address allocation. Configure TCP/IP Demo IP Address Assignment Demo Pt.1
DHCP (Dynamic Host Configuration Protocol) • Automatically assigns device a unique IP address • Application layer protocol • Reasons for implementing • Reduce time and planning for IP address management • Reduce potential for error in assigning IP addresses • Enable users to move workstations and printers • Make IP addressing transparent for mobile users • DHCP leasing process • Device borrows (leases) an IP address while attached to network • Lease time • Determined when client obtains IP address at log on • User may force lease termination • DHCP service configuration • Specify leased address range • Configure lease duration • Several steps to negotiate client’s first lease Dynamic Addressing Demo Dynamic ClientsDemo
DHCP Leasing Process • Device borrows (leases) an IP address while attached to network • Lease time • Determined when client obtains IP address at log on • User may force lease termination • ipconfig /release • DHCP service configuration • Specify leased address range • Configure lease duration • Several steps to negotiate client’s first lease
DHCP Leasing Process DHCP Addressing Overview (4:35) • The client goes through a four stage broadcast based process to obtain an IP Address lease from a DHCP server. • Step 1: Upon bootup the client sends out a DHCPDISCOVER packet in broadcast fashion to discover the identity and whereabouts of all DHCP servers on the broadcast segment. • Step 2: Upon receiving the broadcast any DHCP servers on that broadcast segment will respond with their own DHCPOFFER packet. • Step 3: The client will accept the first offer received and respond with a DHCPREQUEST broadcast. Other DHCP servers who have made an offer hear this broadcast and return their IP address to the pool. • Step 4: The chosen DHCP server responds with an DHCPACK confirming the clients acceptance of the IP lease along with additional information such as subnet mask, default gateway and DNS server.
DHCP Leasing Process DHCPOFFER BROADCAST DHCPDISCOVER BROADCAST DHCPACK BROADCAST DHCPREQUEST BROADCAST DHCP Lease Process Demo DHCP in a Routed Environment Demo
IP Lease Renewal DHCP Leases (4:24)
Terminating a DHCP Lease • Lease expiration • Automatic • Established in server configuration • Manually terminated at any time • Client’s TCP/IP configuration • Server’s DHCP configuration • Circumstances requiring lease termination • DHCP server fails and replaced • Windows: release of TCP/IP settings • DHCP services run on several server types • Installation and configurations vary
Private Addresses • Private addresses • Allow hosts in organization to communicate across internal network • Cannot be routed on public network • Specific IPv4 address ranges reserved for private addresses • 10.0.0.0 - 10.255.255.255 - Addresses: 16,777,216 • 172.16.0.0 - 172.31.255.255 - Addresses: 1,048,576 • 192.168.0.0 - 192.168.255.255 - Addresses: 65,536 • The private addressing works well for allowing computers to access resources inside the private network only • Routers inside the private network can route traffic between private addresses with no trouble. • To access the Internet, or a public network, computers have to have a public address. This is where Network Address Translation (NAT) comes into play. • Routers on the Internet will not accept IP addresses in a private IP address range Special Addresses Demo
Link-Local Addresses APIPA (Automatic Private IP Addressing) • Link-local address • Provisional address • Capable of data transfer only on local network segment • APIPA is a Microsoft implementation of automatic IP address assignment without a DHCP server. Using APIPA, hosts assign themselves an IP address on the 169.254.0.0 network (mask of 255.255.0.0). With APIPA: • The host is configured to obtain IP information from a DHCP server (this is the default configuration). • If a DHCP server can't be contacted, the host uses APIPA to assign itself an IP address. • The host only configures the IP address and mask. It does not assign itself the default gateway and DNS server addresses. For this reason, APIPA can only be used on a single subnet. • Disadvantage • Computer only communicates with other nodes using addresses in APIPA range APIPA (3:42) IP Address Assignment Demo Pt.2
Static (manual) Assignment • Using static addressing, IP configuration information must be manually configured on each host. Use static addressing: • On networks with a very small number of hosts. • On networks that do not change often or that will not grow. • To permanently assign IP addresses to hosts that must always have the same address (such as printers, servers, or routers). • For hosts that cannot accept an IP address from DHCP. • To reduce DHCP-related traffic. • Static addressing is very susceptible to configuration errors and duplicate IP address configuration errors. • Static addressing disables both APIPA and DHCP capabilities on the host. Static Addressing Demo Static ClientsDemo
Ports and Sockets • Ports are logical connections, provided by the TCP or UDP protocols at the Transport layer, for use by protocols in the upper layers of the OSI model. TCP/IP uses port numbers stored in the header of a packet to determine what protocol incoming traffic should be directed to. • Every process on a machine assigned a port number 0 to 65535 • Process’s port number plus host machine’s IP address equals process’s socket Example:10.216.5.1:53 • Ensures data transmitted to correct application • Well Known Ports: in range 0 to 1023 • Assigned to processes that only the OS or system administrator can access • Registered Ports: in range 1024 to 49151 • Accessible to network users and processes that do not have special administrative privileges • Dynamic and/or Private Ports: in range 49152 through 65535 • Open for use without restriction Understanding Port Numbers Demo Common TCP and UDP Ports (8:09)
Sockets and Ports Well Known Port Numbers Demo Commonly used TCP/IP port numbers
Name Resolution Overview Name Resolution Overview Demo NetBIOS Name Resolution Demo Resolving a Host NameDemo DHCP/ DNS/WINS Servers Demo
Host Names and DNS (Domain Name System) • TCP/IP addressing • Long, complicated numbers • Good for computers • People remember words better • Internet authorities established Internet node naming system • Host • Internet device • Host name • Name describing device • Every host can take a host name Host Naming Demo
Domain Names • Domain • Group of computers belonging to same organization • Share common part of IP address • Domain name • Identifies domain (loc.gov) • Associated with company, university, government organization • Fully qualified host name (blogs.loc.gov) • Local host name plus domain name • Label (character string) • Separated by dots • Represents level in domain naming hierarchy • Example: www.google.com • Top-level domain (TLD): com • Second-level domain: google • Third-level domain: www • Second-level domain • May contain multiple third-level domains • ICANN established domain naming conventions • Domain names must be registered with an Internet naming authority that works on behalf of ICANN What is DNS?Demo
Domain Names (cont’d.) • ICANN approved over 240 country codes • Host and domain names restrictions • Any alphanumeric combination up to 253 characters • Include hyphens, underscores, periods in name • No other special characters Structure of DNS Demo
Host Files • ARPAnet used HOSTS.TXT file • Associated host names with IP addresses • Host matched by one line • Identifies host’s name, IP address • Alias provides nickname • UNIX-/Linux-based computer • Host file called hosts, located in the /etc directory • Windows computer • Host file called hosts • Located in Windows\system32\drivers\etc folder Host Name Resolution Demo