Anda di halaman 1dari 133

Network+ Guide to Networks

6th Edition

Chapter 4
Introduction to TCP/IP Protocols
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 and explain how addresses are
assigned automatically using DHCP (Dynamic
Host Configuration Protocol)

Network+ Guide to Networks, 6th Edition 2


Objectives (cont’d.)
• 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+ Guide to Networks, 6th Edition 3


Characteristics of TCP/IP (Transmission
Control Protocol/Internet Protocol)
• Protocol Suite
– Referred to as “IP” or “TCP/IP”
– Subprotocols include TCP, IP, UDP, ARP
• Developed by US Department of Defense
– ARPANET (1960s)
• Internet precursor

Network+ Guide to Networks, 6th Edition 4


Characteristics of TCP/IP
(cont’d.)
• 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

Network+ Guide to Networks, 6th Edition 5


The TCP/IP Model
• Four layers
– Application layer
– Transport layer
– Internet layer
– Network access layer (or Link layer)

Network+ Guide to Networks, 6th Edition 6


Figure 4-1 The TCP/IP model compared with the OSI model

7
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

Network+ Guide to Networks, 6th Edition 8


TCP (Transmission Control
Protocol)
• Transport layer protocol
• Provides reliable data delivery services
– Connection-oriented subprotocol
• Establish connection before transmitting
• Uses sequencing and checksums
• Provides flow control
• TCP segment format
– Encapsulated by IP packet in Network layer
• Becomes IP packet’s “data”
9
Figure 4-2 A TCP segment

10
Table 4-1 Fields in a TCP
segment

11
Figure 4-3 TCP segment data

12
TCP (cont’d.)
• Three segments establish connection
• Computer A issues message to Computer
B
– Sends segment with SYN bit set
• SYN field: Random synchronize sequence number
• Computer B receives message
– Sends segment
• ACK field: sequence number Computer A sent plus 1
• SYN field: Computer B random number

13
TCP (cont’d.)
• Computer A responds
– Sends segment
• ACK field: sequence number Computer B sent plus 1
• SYN field: Computer B random number
• FIN flag indicates transmission end

14
Figure 4-4 Establishing a TCP connection

15
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
– No error checking, sequencing
– Lacks sophistication
• More efficient than TCP
• Useful situations
– Great volume of data transferred quickly
17
Figure 4-5 A UDP segment
Courtesy Course Technology/Cengage Learning

18
IP (Internet Protocol)
• Network layer protocol
– How and where data delivered, including:
• Data’s source and destination addresses
• Enables TCP/IP to internetwork
– Traverse more than one LAN segment
• More than one network type through router
• Network layer data formed into packets
– IP packet
• Data envelope
• Contains information for routers to transfer data
between different LAN segments
19
IP (cont’d.)
• Two versions
– IPv4: unreliable, connectionless protocol
– IPv6
• Newer version of IPv6
– IP next generation
– Released in 1998
• Advantages of IPv6
– Provides billions of additional IP addresses
– Better security and prioritization provisions

20
Figure 4-6 An IPv4 packet

21
Figure 4-8 An IPv6 packet header

22
IGMP (Internet Group
Management Protocol)
• Operates at Network layer of OSI model
• Manages multicasting on networks running
IPv4
• Multicasting
– Point-to-multipoint transmission method
– One node sends data to a group of nodes
– Used for Internet teleconferencing or
videoconferencing
23
ARP (Address Resolution
Protocol)
• Network layer protocol
• Used with IPv4
• Obtains MAC (physical) address of host or
node
• Creates database that maps MAC to
host’s IP address
• ARP table
– Table of recognized MAC-to-IP address mappings
– Saved on computer’s hard disk
24
– Increases efficiency
ICMP (Internet Control Message
Protocol)
• 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 25
IPv4 Addressing
• 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
26
Table 4-4 Commonly used TCP/IP classes

27
IPv4 Addressing (cont’d.)
• Class D, Class E rarely used (never
assign)
– Class D: value between 224 and 239
• Multicasting
– Class E: value between 240 and 254
• Experimental use
• Eight bits have 256 combinations
– Networks use 1 through 254
– 0: reserved as placeholder
– 255: reserved for broadcast transmission

28
IPv4 Addressing (cont’d.)
• Class A devices
– Share same first octet (bits 0-7)
• Network ID
– Host: second through fourth octets (bits 8-31)
• Class B devices
– Share same first two octet (bits 0-15)
– Host: second through fourth octets (bits 16-31)
• Class C devices
– Share same first three octet (bits 0-23)
– Host: second through fourth octets (bits 24-31)
29
Figure 4-11 IPv4 addresses and their classes

30
IPv4 Addressing (cont’d.)
• Loop back address
– First octet equals 127 (127.0.0.1)
• Loopback test
– Attempting to connect to own machine
– Powerful troubleshooting tool
• Windows XP, Vista
– ipconfig command
• Unix, Linux
– ifconfig command
31
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
• Dotted decimal address has binary
equivalent
– Convert each octet
– Remove decimal points

32
Subnet Mask
• 32-bit number identifying a device’s subnet
• Combines with device IP address
• Informs network about segment, network
where device attached
• Four octets (32 bits)
– Expressed in binary or dotted decimal notation
• Assigned same way as IP addresses
– Manually or automatically (via DHCP)

33
Subnet Mask (cont’d.)

Table 4-5 Default subnet masks


Courtesy Course Technology/Cengage Learning

34
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

35
IPv6 Addressing (cont’d.)
• 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

36
Assigning IP Addresses
• Government-sponsored organizations
– Dole out IP addresses
– IANA, ICANN, RIRs
• Companies, individuals
– Obtain IP addresses from ISPs
• Every network node must have unique IP
address
– Error message otherwise

37
Assigning IP Addresses (cont’d.)
• Static IP address
– Manually assigned
– To change: modify client workstation TCP/IP
properties
– Human error causes duplicates
• Dynamic IP address
– Assigned automatically
– Most common method
• Dynamic Host Configuration Protocol (DHCP)

38
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

39
DHCP (cont’d.)
• 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

40
Figure 4-14 The DHCP leasing process

41
DHCP (cont’d.)
• Terminating a DHCP Lease
– Expire based on period 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
• DHCP services run on several server
types
– Installation and configurations vary
42
Private and Link-Local
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
• Link-local address
– Provisional address
– Capable of data transfer only on local network
segment
43
Private and Link-Local
Addresses (cont’d.)
• Zero configuration (Zeroconf)
– Collection of protocols that assign link-local
addresses
– Part of computer’s operating software
• Automatic private IP addressing (APIPA)
– Service that provides link-local addressing on
Windows clients

44
Sockets and Ports
• Processes assigned unique port numbers
• Process’s socket
– Port number plus host machine’s IP address
• Port numbers
– Simplify TCP/IP communications
– Ensures data transmitted correctly
• Example
– Telnet port number: 23
– IPv4 host address: 10.43.3.87
– Socket address: 10.43.3.87:23
45
Figure 4-15 A virtual connection for the telnet service

46
Sockets and Ports (cont’d.)
• Port number range: 0 to 65535
• Three types
– Well Known Ports
• Range: 0 to 1023
• Operating system or administrator use
– Registered Ports
• Range: 1024 to 49151
• Network users, processes with no special privileges
– Dynamic and/or Private Ports
• Range: 49152 through 65535
• No restrictions
47
Table 4-6 Commonly used TCP/IP port numbers
Courtesy Course Technology/Cengage Learning 48
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

49
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

50
Domain Names (cont’d.)
• 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

51
Table 4-7 Some well-known top-level domains

52
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

Network+ Guide to Networks, 6th Edition 53


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

54
Figure 4-16 Sample host file

55
DNS (Domain Name System)
• Hierarchical
– Associate domain names with IP addresses
• DNS refers to:
– Application layer service accomplishing association
– Organized system of computers, databases making
association possible
• DNS redundancy
– Many computers across globe related in hierarchical
manner
– Root servers
• 13 computers (ultimate authorities)
56
DNS (cont’d.)
• Three components
– Resolvers
• Any hosts on Internet needing to look up domain name
information
– Name servers (DNS servers)
• Databases of associated names, IP addresses
• Provide information to resolvers on request
– Namespace
• Abstract database of Internet IP addresses, associated
names
• Describes how name servers of the world share DNS
information
57
Figure 4-17 Domain name
resolution

58
DNS (cont’d.)
• Resource record
– Describes one piece of DNS database information
– Many different types
• Dependent on function

Table 4-8 Common DNS record types

59
DDNS (Dynamic DNS)
• Used in Website hosting
– Manually changing DNS records unmanageable
• Process
– Service provider runs program on user’s computer
• Notifies service provider when IP address changes
– Service provider’s server launches routine to
automatically update DNS record
• Effective throughout Internet in minutes
• Not DNS replacement
• Larger organizations buy statically
assigned IP address 60
Application Layer Protocols
• Work over TCP or UDP plus IP
– Translate user requests into format readable by
network
• HTTP
– Application layer protocol central to using Web
• DHCP
– Automatic address assignment
• Additional Application layer protocols exist

61
Telnet
• Terminal emulation protocol
– Log on to remote hosts
• Using TCP/IP protocol suite
– TCP connection established
• Keystrokes on user’s machine act like keystrokes on
remotely connected machine
• Often connects two dissimilar systems
• Can control remote host
• Drawback
– Notoriously insecure
62
FTP (File Transfer Protocol)
• Send and receive files via TCP/IP
• Host running FTP server portion
– Accepts commands from host running FTP client
• FTP commands
– Operating system’s command prompt
• No special client software required
• FTP hosts allow anonymous logons
• Secure FTP (SFTP)
– More secure version of FTP
– Will be covered in Chapter 11
63
TFTP (Trivial File Transfer

Protocol)
Enables file transfers between computers
– Simpler (more trivial) than FTP
• TFTP relies on Transport layer UDP
– Connectionless
– Does not guarantee reliable data delivery
• No ID or password required
– Security risk
• No directory browsing allowed
• Useful to load data, programs on diskless
workstation
64
NTP (Network Time Protocol)
• Synchronizes network computer clocks
• Depends on UDP Transport layer services
– Benefits from UDP’s quick, connectionless nature
• Time sensitive
• Cannot wait for error checking
• Time synchronization importance
– Routing
– Time-stamped security methods
– Maintaining accuracy, consistency between multiple
storage systems
65
PING (Packet Internet Groper)
• Provides verification
– TCP/IP installed, bound to NIC, configured correctly,
communicating with network
– Host responding
• Uses ICMP services
– Send echo request and echo reply messages
• Determine IP address validity
• Ping IP address or host name
• Ping loopback address: 127.0.0.1
– Determine if workstation’s TCP/IP services running
66
PING (cont’d.)
• Operating system determines PING
command options, switches, syntax

Figure 4-19 Output from successful and unsuccessful PING

67
Summary
• Protocols define standards for network
communication
– TCP/IP suite most popular
• TCP: connection-oriented subprotocol
• UDP: efficient, connectionless service
• IP provides information about how and where to
deliver data
• IPv4 addresses: unique 32-bit numbers
• IPv6 addresses: composed of eight 16-bit fields
• DHCP assigns addresses automatically
• DNS tracks domain names and their addresses
68
Network+ Guide to Networks
6th Edition

Chapter 9
In-Depth TCP/IP Networking
Objectives
• Describe methods of network design
unique to TCP/IP networks, including
subnetting, CIDR, and address translation
• Explain the differences between public
and private TCP/IP networks
• Describe protocols used between mail
clients and mail servers, including SMTP,
POP3, and IMAP4
• Employ multiple TCP/IP utilities for
70
network discovery and troubleshooting
Designing TCP/IP-Based
Networks
• TCP/IP protocol suite use
– Internet connectivity
– Private connection data transmission
• TCP/IP fundamentals
– IP: routable protocol
• Interfaces requires unique IP address
• Node may use multiple IP addresses
– Two IP versions: IPv4 and IPv6
– Networks may assign IP addresses dynamically

71
Subnetting
• Separates network
– Multiple logically defined segments (subnets)
• Geographic locations, departmental boundaries,
technology types
• Subnet traffic separated from other subnet
traffic
• Reasons to separate traffic
– Enhance security
– Improve performance
– Simplify troubleshooting
72
Subnetting (cont’d.)
• Classful addressing in IPv4
– First, simplest IPv4 addressing type
– Adheres to network class distinctions
– Recognizes Class A, B, C addresses
• Drawbacks
– Fixed network ID size limits number of network hosts
– Difficult to separate traffic from various parts of a
network

73
Subnetting (cont’d.)

Figure 9-1 Network and host information in classful IPv4 addressing

74
Subnetting (cont’d.)

Figure 9-2 Sample IPv4 addresses with classful addressing

75
Subnetting (cont’d.)
• IPv4 subnet masks
– Identifies how network subdivided
– Indicates where network information located
– Subnet mask bits
• 1: corresponding IPv4 address bits contain network
information
• 0: corresponding IPv4 address bits contain host
information
• Network class
– Associated with default subnet mask

76
Subnetting (cont’d.)

Table 9-1 Default IPv4 subnet masks

77
Subnetting (cont’d.)
• ANDing
– Combining bits
• Bit value of 1 plus another bit value of 1 results in 1
• Bit value of 0 plus any other bit results in 0
– Logic
• 1: “true”
• 0: “false”

78
Table 9-2 ANDing
Courtesy Course Technology/Cengage Learning

Figure 9-3 Example of calculating a host’s network ID

79
Subnetting (cont’d.)
• Special addresses
– Cannot be assigned to node network interface
– Used as subnet masks
• Examples of special addresses
– Network ID
– Broadcast address

80
Table 9-3 IPv4 addresses reserved for special functions

81
Subnetting (cont’d.)
• IPv4 subnetting techniques
– Subnetting alters classful IPv4 addressing rules
– IP address bits representing host information change
to represent network information
– Reduces usable host addresses per subnet
– Number of hosts, subnets available after subnetting
depend on host information bits borrowed

82
Table 9-4 Class B subnet masks

83
Table 9-5 IPv4 Class C subnet masks

84
Subnetting (cont’d.)
• Calculating IPv4 Subnets
– Formula: 2n −2=Y
• n: number of subnet mask bits needed to switch from 0
to 1
• Y: number of resulting subnets
• Example
– Class C network
• Network ID: 199.34.89.0
• Want to divide into six subnets

85
Table 9-6 Subnet information for six subnets in a sample IPv4 Class C network

86
Subnetting (cont’d.)
• Class A, Class B, and Class C networks
– Can be subnetted
• Each class has different number of host information bits
usable for subnet information
• Varies depending on network class and the way
subnetting is used
• LAN subnetting
– LAN’s devices interpret device subnetting information
– External routers
• Need network portion of device IP address

87
Figure 9-4 A router connecting several subnets

88
CIDR (Classless Interdomain
Routing)
• Also called classless routing or
supernetting
• Not exclusive of subnetting
– Provides additional ways of arranging network and
host information in an IP address
– Conventional network class distinctions do not exist
• Example: subdividing Class C network into
six subnets of 30 addressable hosts each
• Supernet
– Subnet created by moving subnet boundary left 89
Figure 9-5 Subnet mask and supernet mask

90
CIDR (cont’d.)
• Example: class C range of IPv4 addresses
sharing network ID 199.34.89.0
– Need to greatly increase number of default host
addresses

Figure 9-6 Calculating a host’s network ID on a supernetted network

91
CIDR (cont’d.)
• CIDR notation (or slash notation)
– Shorthand denoting subnet boundary position
– Form
• Network ID followed by forward slash ( / )
• Followed by number of bits used for extended network
prefix
– CIDR block
• Forward slash, plus number of bits used for extended
network prefix
• Example: /22

92
Subnetting in IPv6
• Each ISP can offer customers an entire
IPv6 subnet
• Subnetting in IPv6
– Simpler than IPv4
– Classes not used
– Subnet masks not used
• Subnet represented by leftmost 64 bits in
an address
• Route prefix
– Slash notation is used 93
Figure 9-7 Subnet prefix and interface ID in an IPv6 address
Courtesy Course Technology/Cengage Learning

Figure 9-8 Hierarchy of IPv6 routes and subnets

94
Internet Gateways
• Combination of software and hardware
• Enables different network segments to
exchange data
• Default gateway
– Interprets outbound requests to other subnets
– Interprets inbound requests from other subnets
• Network nodes
– Allowed one default gateway
• Assigned manually or automatically (DHCP)
95
Internet Gateways (cont’d.)
• Gateway interface on router
– Advantages
• One router can supply multiple gateways
• Gateway assigned own IP address
• Default gateway connections
– Multiple internal networks
– Internal network with external networks
• WANs, Internet
– Router used as gateway
• Must maintain routing tables
96
Figure 9-9 The use of default gateways

97
Address Translation
• Public network
– Any user may access
– Little or no restrictions
• Private network
– Access restricted
• Clients, machines with proper credentials
– Hiding IP addresses
• Provides more flexibility in assigning addresses
• NAT (Network Address Translation)
– Gateway replaces client’s private IP address with
Internet-recognized IP address
98
Address Translation (cont’d.)
• Reasons for using address translation
– Overcome IPv4 address quantity limitations
– Add marginal security to private network when
connected to public network
– Use own network addressing scheme
• SNAT (Static Network Address
Translation)
– Client associated with one private IP address, one
public IP address
– Addresses never change
– Useful when operating mail server 99
Figure 9-10 SNAT (Static Network Address Translation)

10
0
Address Translation (cont’d.)
• DNAT (Dynamic Network Address
Translation)
– Also called IP masquerading
– Internet-valid IP address might be assigned to any
client’s outgoing transmission
• PAT (Port Address Translation)
– Each client session with server on Internet assigned
separate TCP port number
• Client server request datagram contains port number
– Internet server responds with datagram’s destination
address including same port number 10
1
Figure 9-11 PAT (Port Address Translation)

10
2
Address Translation (cont’d.)
• NAT
– Separates private, public transmissions on TCP/IP
network
• Gateways conduct network translation
– Most networks use router
• Gateway might operate on network host
– Windows operating systems
• ICS (Internet Connection Sharing)

10
3
TCP/IP Mail Services
• Internet mail services
– Mail delivery, storage, pickup
• Mail servers
– Communicate with other mail servers
– Deliver messages, send, receive, store messages
– Popular programs: Sendmail, Microsoft Exchange
Server
• Mail clients
– Send and retrieve messages to/from mail servers
– Popular programs: Microsoft Outlook, Thunderbird
10
4
SMTP (Simple Mail Transfer
Protocol)
• Protocol responsible for moving messages
– From one mail server to another
• Over TCP/IP-based networks
• Operates at Application layer
– Relies on TCP at Transport layer
• Operates from port 25
• Provides basis for Internet e-mail service
– Relies on higher-level programs for its instructions
• Services provide friendly, sophisticated
mail interfaces 10
5
SMTP (cont’d.)
• Simple subprotocol
– Transports mail, holds it in a queue
• Client e-mail configuration
– Identify user’s SMTP server
• Use DNS: Identify name only
– No port definition
• Client workstation, server assume port 25

10
6
MIME (Multipurpose Internet

Mail Extensions)
SMPT drawback: 1000 ASCII character
limit
• MIME standard
– Encodes, interprets binary files, images, video, non-
ASCII character sets within e-mail message
– Identifies each mail message element according to
content type
• Text, graphics, audio, video, multipart
• Does not replace SMTP
– Works in conjunction with it
• Encodes different content types
10
– Fools SMTP 7
POP (Post Office Protocol)
• Application layer protocol
– Retrieve messages from mail server
• POP3 (Post Office Protocol, version 3)
– Current, popular version
– Relies on TCP; operates over port 110
– Store-and-forward type of service
• Advantages
– Minimizes server resources
• Mail deleted from server after retrieval (disadvantage for
mobile users)
– Mail server, client applications support POP3
10
8
IMAP (Internet Message Access
Protocol)
• More sophisticated alternative to POP3
• IMAP4: current version
• Advantages
– Replace POP3 without having to change e-mail
programs
– E-mail stays on server after retrieval
• Good for mobile users

10
9
IMAP (cont’d.)
• Features
– Users can retrieve all or portion of mail message
– Users can review messages and delete them
• While messages remain on server
– Users can create sophisticated methods of organizing
messages on server
– Users can share mailbox in central location

11
0
IMAP (cont’d.)
• Disadvantages
– Requires more storage space, processing resources
than POP servers
– Network managers must watch user allocations
closely
– IMAP4 server failure
• Users cannot access mail

11
1
Additional TCP/IP Utilities
• TCP/IP transmission process
– Many points of failure
• Increase with network size, distance
• Utilities
– Help track down most TCP/IP-related problems
– Help discover information about node, network
• Nearly all TCP/IP utilities
– Accessible from command prompt
– Syntax differs per operating system

11
2
Ipconfig
• Command-line utility providing network
adapter information
– IP address, subnet mask, default gateway
• Windows operating system tool
– Command prompt window
• Type ipconfig and press Enter
– Switches manage TCP/IP settings
• Forward slash ( / ) precedes command switches
• Requires administrator rights
– To change workstation’s IP configuration
11
3
Figure 9-12 Output of an ipconfig command on a Windows workstation

11
4
Ifconfig
• Utility used on UNIX and Linux systems
– Modify TCP/IP network interface settings
– Release, renew DHCP-assigned addresses
– Check TCP/IP setting status
– Runs at UNIX, Linux system starts
• Establishes computer TCP/IP configuration
• Used alone or with switches
– Uses hyphen ( - ) before some switches
– No preceding character for other switches

11
5
Figure 9-13 Detailed information available through ifconfig

11
6
Netstat
• Displays TCP/IP statistics, component
details, host connections
• Used without switches
– Displays active TCP/IP connections on machine
• Can be used with switches

11
7
Figure 9-14 Output of a netstat –a command

11
8
Nbtstat
• NetBIOS
– Protocol runs in Session and Transport layers
– Associates NetBIOS names with workstations
– Not routable
• Can be made routable by encapsulation
• Nbtstat utility
– Provides information about NetBIOS statistics
– Resolves NetBIOS names to IP addresses
– Useful only on Windows-based operating systems
and NetBIOS
• Limited use as TCP/IP diagnostic utility
11
9
Hostname, Host, and Nslookup
• Hostname utility
– Provides client’s host name
• Administrator may change
• Host utility
– Learn IP address from host name
– No switches: returns host IP address or host name
• Nslookup
– Query DNS database from any network computer
• Find the device host name by specifying its IP address
– Verify host configured correctly; troubleshoot DNS
resolution problems
12
0
Figure 9-15 Output of a simple nslookup command

12
1
Dig
• Domain information groper
• Similar to nslookup
– Query DNS database
– Find specific IP address host name
• Useful for diagnosing DNS problems
• Dig utility provides more detailed information than
nslookup
• Flexible: two dozen switches
• Included with UNIX, Linux operating systems
• Windows system: must obtain third party code
12
2
Figure 9-16 Output of a simple dig command

12
3
Traceroute (Tracert)
• Windows-based systems: tracert
• Linux systems: tracepath
• ICMP ECHO requests
– Trace path from one networked node to another
– Identifying all intermediate hops between two nodes
• Transmits UDP datagrams to specified
destination
– Using either IP address or host name
• To identify destination
• Several switches available 12
4
Figure 9-17 Output of a traceroute command

12
5
Mtr (my traceroute)
• Comes with UNIX, Linux operating systems
– Route discovery, analysis utility
• Combines ping, traceroute functions
– Output: easy-to-read chart
• Simplest form
– mtr ip_address or mtr host_name
• Run continuously
• Stop with Ctrl+C or add limiting option to command
• Number of switches refine functioning, output
• Results misleading
– If devices prevented from responding to ICMP traffic
12
6
Mtr (my traceroute)
• Windows operating systems
– Pathping program as command-line utility
– Similar switches to mtr
– Pathping output differs slightly
• Displays path first
• Then issues hundreds of ICMP ECHO requests before
revealing reply, packet loss statistics

12
7
Figure 9-18 Output of the mtr command

12
8
Route
• Route utility
– Shows host’s routing table
• UNIX or Linux system
– Type route and press Enter
• Windows-based system
– Type route print and press Enter
• Cisco-brand router
– Type show ip route and press Enter

12
9
Figure 9-19 Sample routing table

13
0
Table 9-7 Fields in routing table on a UNIX host

13
1
Route (cont’d.)
• Route command
– Add, delete, modify routes
• Route command help
– UNIX or Linux system
• Type man route
– Windows system
• Type route ?

13
2
Summary
• Subnetting separates network into multiple
segments or subnets
• Creating subnets involves changing IP
address bits to represent network
information
• CIDR is a newer variation on traditional
subnetting
• Last four blocks represent interface in IPv6
• Gateways facilitate communication 13
between subnets 3

Anda mungkin juga menyukai