2.2 Internet Protocol
Download
Report
Transcript 2.2 Internet Protocol
CompTIA Server+ Certification
(Exam SK0-004)
2.2 Internet Protocol
This courseware is copyrighted © 2016 gtslearning. No part of this courseware or any training material supplied by gtslearning International Limited to accompany
the courseware may be copied, photocopied, reproduced, or re-used in any form or by any means without permission in writing from a director of gtslearning
International Limited. Violation of these laws will lead to prosecution. All trademarks, service marks, products, or services are trademarks or registered trademarks
of their respective holders and are acknowledged by the publisher.
All gtslearning products are supplied on the basis of a single copy of a course per student. Additional resources that may be made available from gtslearning may
only be used in conjunction with courses sold by gtslearning. No material changes to these resources are permitted without express written permission by a director
of gtslearning. These resources may not be used in conjunction with content from any other supplier.
If you suspect that this course has been copied or distributed illegally, please telephone or email gtslearning.
Objectives
• Describe the properties
and characteristics of
Internet Protocol (IP)
addressing
• Configure appropriate
settings for an IP host
• Troubleshoot IP
configuration issues
using command-line
tools
2.2 Internet Protocol
100
The TCP/IP Suite
• IP (Internet Protocol)
• ARP (Address Resolution
Protocol)
• ICMP (Internet Control
Message Protocol)
• TCP (Transmission
Control Protocol)
• UDP (User Datagram
Protocol)
• Application protocols
2.2 Internet Protocol
100
IPv4 Address Format
• IP address represents
o
The network number (network ID) - this number is common to all
hosts on the same network
o
The host number (host ID) - this unique number identifies a host
on a particular network
• 32-bit binary value
o
11000110001010010001000000001001
• Expressed in 8-bit octets
o
11000110 00101001 00010000 00001001
• Converted to dotted decimal notation for entry into
configuration dialogs
o
198.41.16.9
2.2 Internet Protocol
101
Binary / Decimal Conversion
• Number bases
o
Place value
o
Base 10 (Decimal)
o
Base 2 (Binary)
• Converting between binary and decimal
128
64
32
16
8
4
2
1
1
1
1
0
1
1
0
1
128 x 1 64 x 1 32 x 1 16 x 0 8 x 1 4 x 1 2 x 0 1 x 1
128
64
32
16
8
4
2
1
128 x 1 64 x 1 32 x 0 16 x 0 8 x 0 4 x 1 2 x 1 1 x 1
1
1
0
0
0
1
1
1
2.2 Internet Protocol
102
Subnet Masks
• IP address represents both a network ID and
host ID
• A mask is applied to identify the network and
host portions
• A “1” in the mask means corresponding bit in
the address is part of the network ID
• “1”s in mask must be contiguous
o
11111111 11110000 00000000 00000000 – VALID
o
11111111 00000000 11110000 00000000 - INVALID
2.2 Internet Protocol
102
Masking an IP Address (ANDing)
• To work out a network ID, given an address and
mask in decimal, convert to binary and back
IP address
(172.30.15.12)
10101100 00011110 00001111 00001100
Mask
(255.255.0.0)
Network ID
(172.30.0.0)
11111111 11111111 00000000 00000000
2.2 Internet Protocol
10101100 00011110 00000000 00000000
103
Routing Decision
• Local network
Source IP (172.30.15.12)
10101100 00011110 00001111 00001100
Mask (255.255.0.0)
11111111 11111111 00000000 00000000
Destination IP (172.30.16.101) 10101100 00011110 00010000 01100101
• Remote network
Source IP (172.30.15.12)
10101100
Mask (255.255.0.0)
11111111
Destination IP (172.31.16.101) 10101100
2.2 Internet Protocol
00011110
11111111
00011111
00001111
00000000
00010000
00001100
00000000
01100101
103
IP Class
2.2 Internet Protocol
104
Configuring IP
• IP Address
o
Enter using dotted decimal
notation
• Subnet Mask
o
Usually specified in dotted decimal
• Default Gateway
o
IP address of the router handling
transmissions to remote networks
• Client-side DNS (Domain
Name System)
o
IP address(es) of DNS servers
handling name resolution
• Client-side WINS (Windows
Internet Name Service)
2.2 Internet Protocol
105
DHCP and APIPA
• Dynamic Host Configuration
Protocol
o
Reduces chance of configuration errors
and simplifies administration
o
Configure IP settings on a central server
o
Client contacts server to obtain
configuration
o
IP addresses leased from a pool
o
Critical network infrastructure usually
uses static addressing however (to
reduce risks from DHCP service failure /
compromise)
• Automatic IP Addressing
(APIPA)
2.2 Internet Protocol
o
Host that is configured to contact a
DHCP server might not be able to
o
Defaults to using an address from the
APIPA range
o
Can communicate with other APIPA
hosts on the local network
107
Public and Private Addressing
• Address ranges not routable over the Internet
o
10.0.0.0 to 10.255.255.255
o
172.16.0.0 to 172.31.255.255
o
192.168.0.0 to 192.168.255.255
o
169.254.0.0 to 169.254.255.255
− Used by hosts for link-local autoconfiguration / Automatic Private IP
Addressing (APIPA)
• Hosts on the private network must use some
mechanism to access the Internet
o
Network Address Translation (NAT)
o
Proxy
2.2 Internet Protocol
108
Classless Addressing
• Classful addressing not sustainable
• Classless Interdomain Routing (CIDR)
o
o
o
Netmask does not have to align on an octet boundary
Routing decisions made on basis of network prefix, representing
number of bits in mask (e.g. /21)
Some configuration dialogs might require CIDR notation rather
than dotted decimal mask (e.g. firewall rule configuration)
2.2 Internet Protocol
109
Planning an IPv4 Addressing Scheme (1)
• Consider
o
Whether you need a public or private addressing scheme
o
How many networks you need
o
How many subnetworks you need
o
How many hosts per subnet
• Addressing Rules
o
Network ID cannot be 127
o
Network and / or host IDs cannot be all 255 (all 1s in binary)
o
Network and / or host ID cannot be 0 (all zeros in binary)
o
Host ID must be unique in the subnet
o
Network ID must be unique
− On the Internet (if using a public addressing scheme)
− On your internal system of networks (if using a private addressing scheme)
2.2 Internet Protocol
110
Planning an IPv4 Addressing Scheme (2)
• Work out how many subnets are needed
o
Must be a power of 2
o
Exponent (the value of “n” in 2n) is the number of bits to add to the default
network prefix
• Check that subnets allow for sufficient hosts (2n-2 where “n”
is number of host bits)
• Work out the subnets - deduct the least significant octet in
the mask from 256
• Work out the next subnet ID - the lowest subnet value higher
• Work out the host ranges for each subnet
o
Take the subnet address and add a binary 1 to it for the first host
o
Take the next subnet ID and deduct two binary digits from it
2.2 Internet Protocol
111
ipconfig
• Windows utility reporting
IP configuration
o
ipconfig /all
o
ipconfig /release AdapterName
o
ipconfig /renew AdapterName
o
ipconfig /displaydns
o
ipconfig /flushdns
• Identify static
configuration
• Look for APIPA address /
limited connectivity icon
2.2 Internet Protocol
112
ifconfig
• Linux utility for
reporting and
modifying IP
configuration
o
o
o
2.2 Internet Protocol
Can be used to change
configuration (though
changes lost at next boot)
and bring adapter up or
down
Does not support DHCP or
DNS switches
Does not show default
gateway (use route)
113
ping
• ping IPAddress
• ping HostName
• Internet Control
Message Protocol
(ICMP)
• Standard tests
o
Ping the loopback address
(ping 127.0.0.1)
o
Ping the host’s IP address
o
Ping the IP address of the
default gateway
o
Ping the IP address of a
remote host
2.2 Internet Protocol
114
Interpreting ping Output
• Reply from, round trip
time and packet loss
o
Detect whether a link is slow or
experiences packet loss
o
Use tracert to identify where on
the route there is a problem
• Destination unreachable
o
No route to host
o
Check IP configuration
o
Check router (default gateway)
• No reply / timed out
2.2 Internet Protocol
o
Host / interface is down
o
Host cannot route reply
o
Firewall
114
Troubleshooting Connectivity Issues
• Verify configuration
(ipconfig / ifconfig)
• Check DHCP
• Test connectivity with
ping
o
Loopback
o
Workstation address
o
Default gateway (or other
local host)
2.2 Internet Protocol
115
IP Version 6
• IPv4 address shortage
o
32-bit address space
o
Inefficiently allocated
o
Complex routing tables
• IPv6 / IPng
o
128-bit address space
o
Cope with mobile / “Internet of Things” growth
o
Hierarchical address allocation (simpler routing)
• Very slow transition!
2.2 Internet Protocol
116
Hexadecimal Numbering
• Base 10 (decimal) - 0-9 and place value powers
of 10
• Base 2 (binary) - 0 or 1 and place value powers
of 2
• Base 16 (hex) - up to 16 values represented by
0-9 and A, B, C, D, E, F
o
1 hex digit can represent 4 binary digits (a “nibble”)
o
2 hex digits can represent 1 octet (byte / 8 bits)
o
4 hex digits can represent 1 double-byte (16 bits)
2.2 Internet Protocol
116
IPv6 Address Notation
• 128-bit binary address = lots of typing!
o
0010 0000 0000 0001 0000 1101 1011 1000 0000 0000 0000
0000
0000 0000 0000 0000 0000 1010 1011 1100 0000 0000 0000
0000
1101 1110 1111 0000 0001 0010 0011 0100
• Hex notation
o
Each hex digit represents 4 binary digits
o
Hex digits are arranged in 8 x 16-bit (double byte) blocks
separated by colons
− 2001:0db8:0000:0000:0abc:0000:def0:1234
• Zero compression
o
Can omit leading zeroes
o
Can compress one sequence of “all zero” double bytes
− 2001:db8::abc:0:def0:1234
2.2 Internet Protocol
117
IPv6 Addressing Schemes
• In IPv6, host bits are fixed
o
Network prefix (64-bit)
o
Host ID (64-bit)
• Global
o
001 binary prefix (2 or 3 in hex)
o
Next 45 bits allocated to registries and ISPs
o
Following 16 bits for subnetting
o
64 bits for interface
− MAC-derived / EUI-64
− Pseudo-random token
• Link-local
o
1111111010 binary prefix (or fe80 in hex)
o
Not routable
o
Communicate with same subnet
(neighbors)
o
All interfaces have link-local addresses
2.2 Internet Protocol
117
IPv4 versus IPv6 Misconfiguration
• Incorrect address or network prefix
• Networks running both IPv4 and IPv6
o
o
Which protocol is in use for a given connection
Whether IPv4 or IPv6 are enable or disabled on particular
hosts?
2.2 Internet Protocol
118
Review
• Describe the properties
and characteristics of
Internet Protocol (IP)
addressing
• Configure appropriate
settings for an IP host
• Troubleshoot IP
configuration issues using
command-line tools
2.2 Internet Protocol
119
Labs
• Lab 4 / Configuring
Network Settings
2.2 Internet Protocol