IPv4 Addressing

Download Report

Transcript IPv4 Addressing

TCP/IP Fundamentals
Ch10
IPv4 Addressing
• Dev by DoD
• IPv4 1980
• Four Octets (8-bit/1 byte values) range from 0255
• Address has two parts
– network number
– host number
Network Class
• Class, 1st Octet, Network Octets, Number of
Networks, Network Size, Host Octets
• Class A, 1-127,1, 127 Networks 16M Host, 3
• Class B, 128-191, 2, 16K Networks, 65K Host, 3
• Class C, 192-223, 3, 2M Networks, 254 Host, 1
• 192.168.#.# - Class C
• 172.16-31.#.# - Class B
• 10.#.#.# - Class A
Related Technologies
• ICS Internet connection sharing
• NAT Network address translation
– Greatly Elongated life of IPv4
• Default Gateway Address
• ipconfig
• ipconfig/all
DNS
• DNS Domain Name System Domain Name Service Domain
Name Server
• Maps names (google.com) to ipaddress (cannot remember)
• ICANN
• Internet Corporation for Assigned Names and Numbers
• www.icann.org
• Assigns IP address to names though registrars
• History:
• InterNIC Integrated Network Information Center
• IANA Internet assigned Numbers Authority
• US controlled
DNS structure and Operation
•
•
•
•
Root (13 root level DNS servers): Root
Top level: .com .edu.gov.net. org
Second level: uwa.edu assigned by ICANN
Subdomains: mail.uwa.edu
DNS Process
• Query first Domain name server
• Fetches from higher level domain name server
• Result will be cached to speed future access
IP, TCP, UDP protocols
•
•
•
•
Segments - TCP
Datagrams - UDP
Packets - IP
Frame - Data link
UDP Frame (aka Datagram)
•
•
•
•
•
Source Port
Desination Port
Msg Length
Checksum
Data
TCP Frame (aka segment)
•
•
•
•
•
•
•
•
•
•
•
•
Source Port
Desination Port
Sequence Num
Ack Num
Offset
Flags
Window
Checksum
Urgent Ponter
Options
Padding
Data
IP Frame
•
•
•
•
•
•
•
•
•
•
•
•
Version
HDR Len
Svc Type
Tot Len
TTL
Protocol
HDR checksum
Source IP
Dest IP
IP options
Padding
Datagram Data
Ethernet Frame
•
•
•
•
•
•
DA - Dest MAC
SA - Src MAC
Type
IP Header
Datagram
CRC Error check
Assigning IP addresses
•
•
•
•
•
•
•
•
Static IP address - manually entered
Dynamic IP assignment
WINS Windows internet naming service
Dynamic DNS
DHCP Dynamic Host Configuration Protocol
dynamically assigns ip addresses from a pool
Addresses are leased and expire
Printers and servers need static IP addresses
Port numbers and Socets
•
•
•
•
•
•
•
•
•
•
•
IP address plus port number is a socket
Well known port numbers
80 HTTP
443 HTTPS
20 FTP Data
21 FTP control
53 DNS
22 SSH
23 Telnet
25 SMTP
110 POP
Hint: Be able to
name several of
these!
IPv6
•
•
•
•
•
classless addressing
IPv4 32 bit address IPv6 128 bit address
64X10E30 times as many
IPSec built in
ND Neighbor discovery will replace ARP
eventually
• IPv6 address may contain MAC address
ICMP Internet control Message
Protocol
• ICMP Internet control Message Protocol
IPv6
• 8 units of 16 bits (4 digit hex)
802 MAC
•
•
•
•
•
•
IPv4 uses 48 but Mac Address and IPv6 64 bits
24 bit mfg ID
24 bit unique ID
IPv^6 uses 40 bit Unique ID
FFFE stuffing
Not always tied to MAC
Address Types
• Global Address - Routed
• Link Local Address - un routed
• Unique Local Address - within LAN
Addressing modes
• Unicast - single address
• multicast - multiple addresses
• anycast - to interface
Loopback addresses
• IPv4 127.0.0.1
• IPv6 ::1
• Unspecified Address ::
Example
• Example: Outside world knows me as
199.88.23.102
• But locally (via ipconfig)
• Ethernet adapter Local Area Connection:
• Connection-specific DNS Suffix . : uwa.edu
• IPv4 Address. . . . . . . . . . . : 172.25.30.58
• Subnet Mask . . . . . . . . . . . : 255.255.255.0
• Default Gateway . . . . . . . . . : 172.25.30.1
Subnet Mask
• Subnetwork
• Host portion can be re-divided into
subnetwork
• bitwise AND used to determine subnet
• See chapter 11
Reserved IPv4 Addresses (private use,
not on internet)
• 192.168.0.0 - 192.168.255.255 Class C
• 172.16.0.0 - 172.31.255.255 Class B
• 10.0.0.0 - 10.255.255.255 Class A
TCP/IP Troubleshooting
•
Netstat – reveal network connections and stats
– Try netstat –a
•
Nbstat – netbios connections and stats
– Netbios
– WINS or lmhosts
– Try nbstat/? Or nbstat/help
•
Ping – just reply please (ICMP)
– Ping6
– Ping -6
– Ping -4
•
•
Tracert or traceroute – analyze “hop” times
ARP – IP to MAC translator
– Arp –a
– Rarp – reverse tranlation (bootp)
•
Nslookup - domain name to IP address
– whois