1 / 77

TCP/IP

TCP/IP. Chapter 11. Contents. Recognize properly formatted IP addresses Describe the function of subnet mask and default gateway Define and calculate classfull and classless subnets Describe the functions of DNS, DHCP, and WINS

linda-downs
Download Presentation

TCP/IP

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. TCP/IP Chapter 11

  2. Contents • Recognize properly formatted IP addresses • Describe the function of subnet mask and default gateway • Define and calculate classfull and classless subnets • Describe the functions of DNS, DHCP, and WINS • Recognize the port numbers and the function of popular TCP and UDP applications • Describe the need for IPv6 and recognize properly formatted IPv6 addresses.

  3. Introduction • TCP/IP was designed from the ground up by the United States government • It is difficult to configure but still the most popular protocol suite today • TCP/IP is very flexible and scaleable

  4. IP Address Basics

  5. IP Address Format • Every host in an IP network needs an IP address • Run WINIPCFG (Windows 9x) or IPCONFIG (Windows NT/2000/XP) to see what an IP address looks like

  6. IP Address Format • An IP address consists of 4 numbers, each between 0 and 255 • Each number is separated by a period • No IP address may be all 0’s or all 255’s • Called dotted decimal format

  7. Dotted Decimal Format • Dotted decimal format is just convenient for us • Real IP addresses are expressed as a series of 0s and 1s in binary format • Each number in dotted decimal format is shorthand for a series of eight 0s and 1s (or bits) ranging from 00000000 to 11111111 (in decimal from 0 to 255) called an octet

  8. Converting IP Addresses • IP addresses are converted between dotted decimal format and binary format by converting each of the octets individually

  9. Converting Binary to Decimal • In the chart below the binary number 10010011 is converted to decimal

  10. Converting Decimal to Binary • In the chart below the decimal number 49 is converted to a binary number

  11. Converting IP Addresses 11000101.10101001.01011110.01010010 197 . 169 . 94 . 82

  12. Local vs. Remote

  13. Historical • The U. S. Defense Advanced Research Projects Agency (DARPA) was tasked in the early 1970s with creating a protocol that could handle a crisis such as an atomic bomb attack • DARPA needed to create a large network that would still work even if parts of it were suddenly down • Communication systems are vital during war! • Routers could reroute traffic around downed areas by reading the destination IP address in the packet

  14. Historical • DARPA’s project led to the creation of TCP/IP and the Internet • A TCP/IP network does not need to connect to other networks like they do on the Internet • A cloud in a network diagram represents a part of the network whose details are not relevant to the discussion – it could represent one network or even the entire Internet

  15. Back to a Simple Network • In a simple TCP/IP network all of the systems share the same network technology • Packets are put inside of frames that are sent between systems using MAC addresses • How does a sending system know the MAC address of the destination system?

  16. ARP • Address Resolution Protocol (ARP) helps to determine the MAC address of the destination device • The sending station sends a frame using the broadcast MAC address (FFFFFFFFFFFF) so that every host sees it • The frame asks every host “What is the MAC address for this specific IP address?” – called an ARP request • The system with the given IP address responds with its MAC address

  17. ARP Request

  18. ARP Requests • Once a MAC address for a given IP address is learned, it is stored in a cache for possible future use • To see what is in your ARP cache right now, run arp –a from a command prompt • ARP only works within a network, because routers that connect your network to other networks will not forward broadcast frames

  19. Gateways • TCP/IP assumes that a system knows, or can find out on the fly, the IP address of any system on the Internet • To send data to a host on another network, a local network must connect to a larger network using a router • The router knows how to address packets for other systems • The router that gets you out of your local network to other networks is called the default gateway, gateway router, or just gateway

  20. Gateways • Gateways may be routers or a PC that runs routing software

  21. Default Gateway • The IP address of the gateway must be configured in your TCP/IP setup • A local system sends its data to the default gateway • The default gateway works with all the other routers on the Internet to get the packet to its destination on a remote network

  22. Review • Assume a system wants to send data over a network • If the address is local, the sending system can use ARP. • If the address is on a remote network, it creates packets with the remote system’s IP address and runs an ARP to determine the MAC address of the default gateway. Armed with the default gateway’s MAC address, the sending system tells its NIC to make frames with the gateway’s MAC address and sends frames to the default gateway.

  23. Review • As each frame comes into the default gateway, it strips off the frame, leaving the IP packets (which still have the IP address of the remote system as its destination). The default gateway then inspects the IP packets, wraps them up in whatever type of frame the outgoing connection needs, and sends them towards the intended system. • But does a system know whether a destination is local or remote?

  24. Subnet Masks and Subnetting

  25. Network IDs • IP addresses are divided into two parts • Network ID defining a group of systems • Host ID defining a specific system in that group • The first part of the IP address is the network ID and the remaining bits are the host ID • Some IP addresses use the first three octets for the network ID and the last octet for the host ID • Other IP addresses use the first two octets for the network ID and the last two octets for the host ID • Why? Because some networks have more hosts than others, and each host needs a unique IP address

  26. Network IDs • A network ID and a host ID cannot have all 0s or all 1s • Note that an octet could be all 0s or all 1s • A network ID has all 0s in the host portion • A broadcast packet has all 1s in the host portion • On a TCP/IP network no two devices can have the same IP address – this includes the entire Internet

  27. IANA • The Internet Assigned Numbers Authority (IANA) is the source for all network IDs that are used on the Internet • Small networks get their network ID from their ISP • ISPs and large end-users get their network ID directly from IANA-authorized Regional Internet Registries

  28. Network IDs • How does a system know if a destination system is on the local network or a remote network? • It compares its IP address with the destination IP address to see if they have the same network ID • If they have the same network ID, they are on the same local network

  29. Subnet Mask • How does a system know which part of the IP address represents the network ID portion? • A subnet mask is a series of 1s followed by a series of 0s and is the same length as an IP address (32 bits) • Every position with a 1 in the subnet mask corresponds to part of the network ID • Every position with a 0 in the subnet mask corresponds to part of the host ID • The IP address is filtering by using the subnet mask to determine which part is which

  30. Subnet Mask

  31. Comparing Network IDs

  32. Shorthand Notation • Many network administrators represent an IP address and subnet mask together by following the IP address with a slash (/) and the number of 1s in the subnet mask • For example, 201.23.45.123/24 refers to an IP address of 201.23.45.123 with a subnet mask of 255.255.255.0 11111111000000000000000000000000 = 255.0.0.0 = /8 11111111111111110000000000000000 = 255.255.0.0 = /16 11111111111111111111111100000000 = 255.255.255.0 = /24

  33. TCP/IP Settings • Computers use the IP address and subnet mask automatically

  34. Class Licenses • IP addresses are separated into classes • A block of IP addresses is assigned by IANA or your ISP for use if you connect to the Internet

  35. Creating Subnets • To create a subnet borrow extra bits from the host portion of the network ID • The number of subnets you can create depends on how many bits you borrow • If you borrow x bits, then the number of subnets you may create is 2x-2 (you can’t use all 0s or all 1s)

  36. Subnet Example: Borrowing 4 bits

  37. Subnet Example: Resulting IP addresses

  38. Subnetting Secrets • Start with the subnet mask and move to the right until you have enough subnets • Forget the dots • Never try to subnet without first converting to binary • Practice

  39. All 0s and All 1s • We use all 0s in the host ID to create the network ID • For example, for the IP address 150.10.5.6/16 the network ID is 150.10.0.0 • We use all 1s for the broadcast address • For example, for the network 150.10.0.0 we would send a packet to 150.10.255.255 to get it to every host on the 150.10.0.0 network • Remember, 11111111 in binary equals 255 in decimal

  40. Routing • Routers use network IDs in making choices on routing packets • Network IDs are kept in routing tables • Each NIC in the router is called an interface • Routing tables match network IDs to interfaces • If a network ID is not in the routing table for a packet, then the router uses its own default gateway to route the packet

  41. Routing Table

  42. Classless Subnetting • Suppose we have a class C network ID of 216.30.120.0/24 and we have two networks to address • Then we need to split this class C network ID into two subnetwork IDs or subnets • Up to now we’ve split the network IDs on the periods using classful subnetting • Network IDs may be split on any bit – not just at the periods using classless subnetting

  43. Multiple Networks

  44. Classless Subnetting Example • Begin by writing the subnet mask in binary – a class C (/24) is 11111111111111111111111100000000 • Now extend the subnet mask one place to the right by borrowing one bit

  45. Classless Subnetting Example • If we borrow one bit, then the subnet ID is either all 1s or all 0s – not allowed • If we borrow two bits, we end up with 22-2, or 2 useable subnets

  46. Classless Subnetting Example • Having borrowed two bits, the subnet mask becomes 11111111111111111111111111000000 or 255.255.255.192 in dotted decimal format or /26 in slash format

  47. IP Addresses for 216.30.120.64 Subnet

  48. IP Addresses for 216.30.120.128 Subnet

  49. Subnetting Note • The more subnets you create, the fewer host IDs per subnet

  50. Loopback Address • 127.0.0.1 is the loopback address • If you ping 127.0.0.1, you are pinging yourself • This may be used to troubleshoot your NICs ability to send and receive packets

More Related