Network Architectures - Computing Sciences

advertisement
Internet Protocol (IP)
ITEC 370
George Vaughan
Franklin University
1
Sources for Slides
• Material in these slides comes primarily
from course text, Guide to Networking
Essentials,Tomsho, Tittel, Johnson (2007).
• Other sources are cited in line and listed in
reference section.
2
TCP/IP and OSI Models
TCP/IP and OSI Models (OSI-Model, n.d.) and (Tomsho, 2007)
TCP/IP
Layers
Application
PDU
Data
OSI Layers
7 Application
6
5
Transport
Segments 4
Network
Packets
3
Link
Frames
2
Function
Network process to application,
Initiates or accepts a request to transfer
data
Presentation Adds formatting, display, and
encryption of information
Session
Adds communication session control
information, Login/Logout
Transport
Adds End-to-end connections and
reliability, re-sequencing, flow control
Network
Path determination and logical
addressing (IP), translates MAC
address to logical address
LLC
Data
Adds error checking and physical
Link
addressing (MAC & LLC)
Devices - Apps
Standards
Browsers,
servers,
Gateways
Gateways
HTTP, SNMP,
FTP, Telnet
DNS,
Gateways
Gateways
NetBIOS
Routers
IP, ICMP,
ARP, NetBEUI
Switches,
Bridges, NICs
802.3, 802.11,
FDDI
ASCII, MPEG
TCP, UDP
MAC
Bits
1 Physical
Media, signal and binary transmission, Hubs,
sends data as a bit stream
Repeaters
10Base-T, T1,
E1
3
Subnetting with Classless IP Addressing: Example 1
• Background
• Assume you have the network address: 194.10.3.0
• Assume you want to create 5 subnets.
• You have a class C network. Default Mask =
• 1111 1111 . 1111 1111 . 1111 1111. 0000 0000
• or 255.255.255.0
3
• 2 = 8, which is >= 5; therefore n = 3
• Therefore the new submask is:
• 1111 1111 . 1111 1111 . 1111 1111. 1110 0000
• or 255.255.255.128+64+32
• or 255.255.255.224
• We have 5 bits left for host ID
• Each subnet can support 25-2 or 30 hosts
• Subnet Interval = 256 – 224 = 32
• IP address using CIDR Notation: 194.10.3.0/27
4
Subnetting with Classless IP Addressing: Example 1
(Continued)
Subnet Subnet
Address
0
192.10.3.0
1
194.10.3.32
2
194.10.3.64
3
194.10.3.96
4
194.10.3.128
5
194.10.3.160
6
194.10.3.192
7
194.10.3.224
First Usable IP
Address
192.10.3.1
194.10.3.33
194.10.3.65
194.10.3.97
194.10.3.129
194.10.3.161
194.10.3.193
194.10.3.225
Last Usable IP
Address
194.10.3.30
194.10.3.62
194.10.3.94
194.10.3.126
194.10.3.158
194.10.3.190
194.10.3.222
194.10.3.254
Broadcast
Address
194.10.3.31
194.10.3.63
194.10.3.95
194.10.3.127
194.10.3.159
194.10.3.191
194.10.3.223
194.10.3.255
5
Network Diagram of Subnets
Subnet 0
194.10.3.0 194.10.3.31
Subnet 1
194.10.3.32 194.10.3.63
Subnet 2
194.10.3.64 194.10.3.95
Subnet 3
194.10.3.96 194.10.3.127
Subnet 4
194.10.3.128 194.10.3.159
Subnet 5
194.10.3.160 194.10.3.191
Subnet 6
194.10.3.192 194.10.3.223
Subnet 7
194.10.3.224 194.10.3.255
6
IP Packet Structure
(IP Structure, n.d.)
7
IP Packet Structure (Cont.)
(IP Structure, n.d.)
• Version (4 bits)
– IP Version (e,g, IPv4)
• IHL (4 bits)
– Internet header length in 32 bit words
– Minimum length is 5 (32 bit words)
• Type of Service (8 bits)
– A set of values used to specify desired Quality of Service (QoS).
• Total Length (16 bits)
– Length of datagram in octets, including header (max 65, 535)
8
IP Packet Structure (Cont.)
(IP Structure, n.d.)
• Identification (16 bits)
– A unique value for sender, receiver to aid in assembling fragments of a
datagram
• Flags (3 bits)
– Fragmentation control flags
• Fragment Offset (13 bits)
– Fragment position in datagram
• Time to Live (8 bits)
– Time to live in seconds
– Each hop decrements this field be at least 1 (even if less than a second
per hop)
– Prevents packets from floating around forever in a misconfigured
network.
9
IP Packet Structure (Cont.)
(IP Structure, n.d.)
• Protocol (8 bits)
– The upper layer protocol that generated this datagram
– Examples: ICMP, TCP, UDP, GRE, etc.
•
Header Checksum (16 bits)
– Used to detect errors in IP header only
– Since ‘Time to Die’ changes at each hop, checksum is also recomputed
at each hop.
•
Source IP Address (32 bits)
•
Destination IP Address (32 bits)
•
Options (Variable in bit size)
•
Padding (Variable in bit size)
– Enough bits to round out the last word to 32 bits.
10
Internet Protocol (IP)
• Network Layer
• Supports packet data communication across an
internetwork.
• Source and Destination logical addressing,
routing
– IP addresses (not layer 2 MAC addressing)
• Connectionless
– No circuit setup before use
• Fast but not reliable
– Best effort delivery
11
Internet Control Message Protocol
(ICMP)
•
•
•
•
Network Layer
Used to send error and control messages
Used by ‘Ping’ utility
Used when ‘Time to Live’ (TTL) value
reaches zero
– An ICMP message is sent back to the source
12
Address Resolution Protocol (ARP)
• Network Layer
• Used to resolve logical (IP) address to
physical (MAC) address
• Can only be used for two systems in same
network (subnet).
13
ARP Example
•
•
Device A needs to send a message to Device
B
Before device A can send message, it needs
the following addresses for device B:
– IP (logical address)
– MAC (physical address)
1. Device A sends out ARP broadcast message to all
devices in same network as Device A.
2. Device B recognizes IP address in ARP and sends
back MAC address to Device A
3. Device A now has 2 addresses necessary for send
message to device B.
14
Transmission Control Protocol
(TCP)
•
•
•
•
•
•
•
Transport Layer
Accepts messages of any length from upper layers
Connection-Oriented
Uses 3-way handshake to establish connection
1. A sends ‘Synchronize’ (SYN) message to B
2. B sends ‘Synchronize Acknowledgement’ (SYN-ACK)
message back to A
3. A sends a ‘Forward Acknowledgment’ (ACK) to B
4. Connection between A and B is now established.
TCP is responsible for fragmenting application into segments
TCP is responsible for reassembling the application data from
segments.
TCP uses Acknowledgment messages to:
–
Ensure that data is properly received.
–
Manage flow control
15
User Datagram Protocol (UDP)
• Transport Layer
• Connectionless
• Similar to IP, but operates at Transport Layer,
therefore, directly accessible to applications
• Faster, but less reliable than TCP
• UDP itself does not segment application data
• UDP does not use acknowledgements
• UDP is used by some higher layer protocols
such as NFS and DNS.
16
Domain Name System (DNS)
• Application Layer
• Domain Name-to- IP Address resolution system
• Used for translating domain name based URLs and
email addresses into IP addresses
• einstein.franklin.edu  65.24.7.3 (try ‘nslookup
einstein.franklin.edu’)
• Once a name has been resolved, it is often cached to
limit traffic on Domain Name Servers
• Cache has figured value for ‘Time To Live’.
• When an IP to Domain Name mapping is changed, it
may take on the order of hours for caches to catch up
17
Hypertext Transport Protocol
(HTTP)
• Application Layer
• Web-pages, browsers, servers
• Runs on top of TCP
18
File Transfer Protocol (FTP)
• Application Layer
• Runs on top of TCP
• Used to send and/or manipulate text and
binary files from one computer to another.
• Example FTP Application: WinSCP
19
Telnet Protocol
• Application Layer
• Runs on top of TCP
• Used to establish a remote, text-based
session from one computer to another
• Example Telnet application: PuTTY.
20
Simple Mail Transport Protocol
(SMTP)
• Application Layer
• Runs on top of TCP
• De facto standard protocol for email
programs.
21
Dynamic Host Configuration
Protocol (DHCP)
• Application Layer
• UDP Based
• Allows a device to obtain a temporary IP address from a
DHCP server.
– Server must be configured with a block of IP available IP
addresses.
• In addition to providing a temporary IP address, DHCP
can also provide the following information:
– Default Gateway
– Subnet Mask
• Broadcast based protocol sent during boot:
– Client leases the address the server assigns to it
– If no answer is received, in an APIPA-enabled OS, the computer
assigns itself an address (169.254.x.x)
22
Network Address Translation (NAT)
• Allows a company to use private IP addresses
within the company.
• Router maps private IP addresses to a smaller
pool of public IP addresses.
• Home routers use this technique for private IP
addresses such as 192.168.1.x
• Also provides security since devices outside of
private network can’t see private IP addresses.
• NAT has greatly extended the life of IPv4
– IPv4 supports less than 4 billion IP addresses
– NAT uses these IP addresses very efficiently.
23
Port Address Translation (PAT)
• PAT extends the efficiency of NAT
• PAT maps private IP address, port combination
to public IP address, public port.
• Example:
– 192.168.1.3, port 5005 -> 201.35.2.33 port 80
– 192.168.1.4, port 5006 -> 201.35.2.33 port 23
• PAT can allow thousands of workstations to
reuse the same IP address.
• Ports 1024 through 65535 can be used by router
for remapping
24
IP Addressing Tools
• Looking up an IP address:
– http://psacake.com/web/eg.asp
• Subnetting:
– http://ccna.exampointers.com/subnet.phtml
25
IPv6 Address Scheme
•
•
•
•
Hexidecimal grouped in 16 bit sections:
– 2001:1b20:302:442a:110:2fea:ac4:2b
Leading zeroes are eliminated
2 or more 16 bit fields of all zeros can be ignored, as long as there is
only one double colon in the address:
– 2001:260:0:0:0:2ed3:340:ab (long form)
– 2001:260::2ed3:340:ab (short form)
IPv6 has 3 parts:
Bits # of 16-bit fields
Purpose
Example
48
3
Public Topology Backbone Provider
16
1
Site Toplogy
Business, Local ISP
64
4
Interface identifier Based on MAC address
26
References
Tomsho, Tittel, Johnson (2007). Guide to Networking
Essentials. Boston: Thompson Course Technology.
Odom, Knott (2006). Networking Basics: CCNA 1
Companion Guide. Indianapolis: Cisco Press
Wikipedia (n.d.). OSI Model. Retrieved 09/12/2006 from
http://en.wikipedia.org/wiki/OSI_Model
IP Structure (n.d.). IP Packet Structure. Retrieved 03/04/07
from http://www.freesoft.org/CIE/Course/Section3/7.htm
27
Download