Você está na página 1de 43

Addressing in TCP/IP

IP core protocol responsible for logical addressing


IP Address: unique 32-bit number
Divided into four octets separated by periods 0 reserved as placeholder referring to entire group of computers on a network 255 reserved for broadcast transmissions

Addressing in TCP/IP (continued)

Figure 4-8: IP addresses and their classes

Objectives
Understand methods of network design unique to TCP/IP networks, including subnetting, CIDR, NAT and ICS Explain the differences between public and private networks Describe protocols used between mail clients and mail servers, including SMTP, POP3, and IMAP4 Employ multiple TCP/IP utilities for network discovery and troubleshooting

Designing TCP/IP-Based Networks


Review of some TCP/IP fundamentals:
IP is a routable protocol On a network using TCP/IP, each interface associated with unique IP address Some nodes may use multiple IP addresses IP addresses consist of four 8-bit octets Many networks assign IP addresses and host names dynamically, using DHCP Every IP address can be associated with a network class

Subnetting
Separates network into multiple, logically defined segments (subnets) Each subnets traffic separated from every other subnets traffic
Enhances security
Subnetworks must be connected via routers or other Layer 3 devices

Improves performance
Data is selectively retransmitted

Simplifies troubleshooting

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

Classful Addressing (continued)

Figure 11-1: Example IP addresses with classful addressing

Subnet Masks
Subnetting 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 hosts network ID given IP address and subnet mask, perform ANDing

Subnet Masks (continued)

Table 11-1: Default subnet masks

Subnet Masks (continued)

Table 11-2: ANDing

Figure 11-2: Example of calculating a hosts network ID

Reserved Addresses
Certain types of IP addresses reserved for special functions
In network IDs, bits for host information set to 0 In broadcast addresses, octet(s) representing host information set to all 1s (255 in decimal notation)

Subnetting Techniques
Subnetting breaks rules of classful addressing
Some bits that in classful addressing would represent host information changed to represent network information Reduce number of usable host addresses per subnet

Subnetting Techniques (continued)

Table 11-3: Class B subnet masks

Subnetting Techniques (continued)

Table 11-4: Class C subnet masks

Calculating Subnets
Formula for determining how to modify a default subnet mask: 2n-2=Y n = number of bits in subnet mask that must be switched from 0 to 1 Y = number of subnets that result Extended network prefix: Additional bits used for subnet information plus existing network ID Class A, B, and C networks can all be subnetted External routers pay attention to only the network portion of devices IP addresses

Calculating Subnets (continued)

Figure 11-3: A router connecting several subnets

Addressing in TCP/IP (continued)


Many Internet addresses go unused Cannot be reassigned because they are reserved IP version 6 (IPv6) will incorporate new addressing scheme Some IP addresses reserved for special functions 127 reserved for a device communicating with itself Loopback test ipconfig: Windows XP command to view IP information ifconfig on Unix and Linux

Binary and Dotted Decimal Notation


Most common way of expressing IP addresses
Decimal number between 0 and 255 represents each binary octet Separated by period

Each number in dotted decimal address has binary equivalent

Subnet Mask
Every device on TCP/IP-based network identified by subnet mask
32-bit number that, when combined with devices 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

Assigning IP Addresses
Nodes on a network must have unique IP addresses Static IP address: manually assigned
Can easily result in duplication of addresses

Most network administrators rely on network service to automatically assign IP addresses

BOOTP (Bootstrap Protocol)


Uses central list of IP addresses and associated devices MAC addresses to assign IP addresses to clients dynamically
Dynamic IP addresses Application layer protocol Client broadcasts MAC address, BOOTP server replies with:
Clients IP address IP address of server Host name of server IP address of a default router

DHCP (Dynamic Host Configuration Protocol)


Automated means of assigning unique IP address to every device on a network Application layer protocol Reduces time and planning spent on IP address management Reduces potential for errors in assigning IP addresses Enables users to move workstations and printers without having to change TCP/IP configuration Makes IP addressing transparent for mobile users

DHCP (continued)

Figure 4-11: The DHCP leasing process

APIPA (Automatic Private IP Addressing)


Provides computer with IP address automatically
For Windows 98, Me, 2000, XP client and Windows 2003 server For situations where DHCP server unreachable Assigns computers network adapter IP address from predefined pool of addresses
169.254.0.0 through 169.254.255.255

Computer can only communicate with other nodes using addresses in APIPA range

Sockets and Ports


Every process on a machine assigned a port number 0 to 65535 Processs port number plus host machines IP address equals processs socket
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

Sockets and Ports (continued)


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

Host Names and DNS (Domain Name System): Domain Names


Every host can take a host name Every host is member of a domain Group of computers belonging to same organization and has part of their IP addresses in common Domain name usually associated with company or other type of organization Fully qualified host name: local host name plus domain name Domain names must be registered with an Internet naming authority that works on behalf of ICANN

DNS (Domain Name System)


Hierarchical method of associating domain names with IP addresses Refers to Application layer service that accomplishes association and organized system of computers and databases making association possible Relies on many computers around world Thirteen root servers Three components: Resolvers Name servers Name space

DNS (continued)

Figure 4-14: Domain name resolution

DNS (continued)

Figure 4-14 (continued): Domain name resolution

Internet Gateways
Combination of software and hardware enabling two different network segments to exchange data Every device on a TCP/IP-based network has a default gateway First interprets outbound requests to other subnets Interprets inbound requests from other subnets Each node on network has one default gateway May be network interface on a router Must maintain routing tables as well Core gateways make up the Internet backbone

Internet Gateways (continued)

Figure 11-6: The use of default gateways

NAT (Network Address Translation)


Default gateways can be used to hide IP numbers assigned within an organization Clients behind gateway may use any IP addressing scheme Even non-legitimate schemes Must have legitimate IP address to exchange data with Internet NAT: when clients transmission reaches default gateway, it assigns clients transmission a valid IP address

NAT (continued)

Figure 11-7: NAT through an Internet gateway

Additional TCP/IP Utilities


TCP/IP comes with complete set of utilities that can help to track down most TCP/IPrelated problems
e.g., Ping, Telnet, ARP

Nearly all TCP/IP utilities can be accessed from command prompt on any type of server or client running TCP/IP
Syntax may differ depending on OS Options may differ according to OS

Netstat
Displays TCP/IP statistics and details about TCP/IP components and connections on a host
Port on which a particular TCP/IP service is running Network connections currently established Number of packets handled by network interface since activation Number of data errors

Netstat (continued)
Common Netstat switches: -a lists all available TCP and UDP connections -e displays details about all packets that have been sent -n lists currently connected hosts according to their ports and IP addresses (in numerical form) -p allows you to specify what type of protocol statistics to list -r provides list of routing table information -s provides statistics about each packet transmitted by a host, separated according to protocol type

Nbtstat
Given NetBIOS name, get IP address Common nbtstat switches: -a displays a machines name table given its NetBIOS name -A displays a machines name table given its IP address -r lists statistics about names that have been resolved to IP addresses by broadcast and by WINS -s displays a list of all the current NetBIOS sessions for a machine

Nslookup
Query DNS database from any network computer and find host name of a device by specifying its IP address, or vice versa
Provides hosts IP address, primary DNS server name, and address holding record for this name Many options (switches)

Whois
Query DNS registration database and obtain information about a domain Who is domain registered to? Technical person responsible for domain? Hosting entity? DNS Server addresses? Must install software to use on Windows systems Web-based alternatives exist e.g., www.arin.net

Traceroute (Tracert)
Uses ICMP to trace path from one node to another Identifies all intermediate hops Useful for determining router or subnet connectivity problems Transmits series of UDP datagrams to specified destination Increases TTL as path is discovered Traceroute may stop before completing Device problem on path Device does not accept ICMP transmissions Often indicates firewall

Traceroute (continued)
Common switches:
-d instructs traceroute not to resolve IP addresses to host names -h specifies maximum number of hops packets should take when attempting to reach a host
Default is 30

-w identifies timeout period for responses

Ipconfig
TCP/IP administration utility for use with Windows NT, 2000, XP, and Server 2003 OSs Provides information about network adapters IP address, subnet mask, and default gateway Commonly used switches: /? displays list of available switches /all displays complete TCP/IP configuration information for each network interface on device /release releases DHCP-assigned addresses for all network interfaces /renew renews DHCP-assigned addresses for all network interfaces

Você também pode gostar