Protocols_2 - Computing Sciences

Download Report

Transcript Protocols_2 - Computing Sciences

Protocols – Part 2
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
Some Simple Binary Arithmetic
Tomsho, Tittel, Johnson (2007)
• Four kinds of binary calculations:
– Converting between binary and decimal
– Converting between decimal and binary
– Understanding how setting high-order bits to
the value of 1 in 8-bit binary numbers
corresponds to specific decimal numbers
– Recognizing the decimal values for numbers
that correspond to low-order bits when set to 1
4
Converting Decimal to Binary
Tomsho, Tittel, Johnson (2007)
• 125 is converted to binary as follows:
– 125 divided by 2 equals 62, remainder 1
– 62 divided by 2 equals 31, remainder 0
– 31 divided by 2 equals 15, remainder 1
– 15 divided by 2 equals 7, remainder 1
– 7 divided by 2 equals 3, remainder 1
– 3 divided by 2 equals 1, remainder 1
– 1 divided by 2 equals 0, remainder 1
5
Converting Binary to Decimal
Tomsho, Tittel, Johnson (2007)
To convert 11010011 to decimal:
1. Count the total number of digits in the number (8)
2. Subtract one from the total (8 - 1 = 7)
3. That number (7) is the power of 2 to associate with
the highest exponent for two in the number
4. Convert to exponential notation, using all the digits
as multipliers
5. 11010011, therefore, converts to:
6
High-Order Bit Patterns
Tomsho, Tittel, Johnson (2007)
7
Low-Order Bit Patterns
Tomsho, Tittel, Johnson (2007)
8
Types of IP Addressing
• The demarcation point in the 32 bit
address between network ID and host ID
depends on addressing scheme:
– Class Based Addressing generally uses a
byte boundary as the dividing point
– Classless Based Addressing uses a bit
boundary.
9
Class Based IP Addressing
(Cisco – IP Addressing, n.d.).
Used less frequently now, CIDR preferred
10
Special IP Addresses
•
•
Information on this slide from http://www.iana.org/faqs/abuse-faq.htm
"Private Use" IP addresses:
– 10.0.0.0 - 10.255.255.255
– 172.16.0.0 - 172.31.255.255
– 192.168.0.0 - 192.168.255.255
•
"Autoconfiguration" IP Addresses:
– 169.254.0.0 - 169.254.255.255
– used automatically by some PCs and Macs when
• They are configured to use IP
• Do not have a static IP Address assigned
• And are unable to obtain an IP address using DHCP.
•
"Loopback" IP addresses:
–
–
–
–
–
127.0.0.0 - 127.255.255.255
Each computer on the Internet uses 127.0.0.0/8 to identify itself, to itself.
127.0.0.0 to 127.255.255.255 is earmarked for what is called "loopback".
This construct allows a computer to establish/validate its IP stack.
Most software only uses 127.0.0.1 for loopback purposes
11
Classless Interdomain Routing
(CDIR)
• Division between Network and Host ID is at bit level.
• Example: 192.203.187.0/27
– IP address is: 192.203.187.0
– ‘/27’ indicates that:
• First 27 bits define Network ID
• Last 5 bits define Host ID (defines size of subnet)
• Subnet Mask =
– (binary) 11111111 11111111 11111111 11100000
– (decimal) 255.255.255.224
• Subnet Mask defines Host ID size
– 1’s used to define which bits belong to Network ID
– 0’s used to define which bits belong to Host ID
• Subnet Mask is assigned to host at same time that IP address is
assigned.
12
CDIR (Cont.)
• Mapping class based IP addressing to
CDIR:
– Class A submask = 255.0.0.0
– Class B submask = 255.255.0.0
– Class C submask = 255.255.255.0
• All hosts in same network must use same
subnet mask.
13
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 CDIR Notation: 194.10.3.0/27
14
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
15
Subnetting with Classless IP Addressing: Example 2
• Background
• Assume you have the network address:
132.132.0.0
• Assume you want to create 15 subnets.
• You have a class B network. Default Mask =
• 1111 1111 . 1111 1111 . 0000 0000. 0000 0000
• or 255.255.255.0
4
• 2 = 16, which is >= 15; therefore n = 4
• Therefore the new submask is:
• 1111 1111 . 1111 1111 . 1111 0000. 0000 0000
• or 255.255.128+64+32+16.0
• or 255.255.240.0
• We have 5 bits left for host ID
• Each subnet can support 212-2 or 4,094 hosts
• Subnet Interval = 256 – 240 = 16
• IP address using CDIR Notation: 132.132.0.0/20
16
Subnetting with Classless IP Addressing: Example 2
(Continued)
Subnet Subnet
Address
0
132.132.0.0
1
132.132.16.0
2
132.132.32.0
3
132.132.48.0
Broadcast
Address
132.132.15.255
132.132.31.255
132.132.47.255
132.132.63.255
13
14
15
132.132.223.255
132.132.239.255
132.132.255.255
First Usable
Last Usable IP
IP Address
Address
132.132.0.1
132.132.15.254
132.132.16.1 132.132.31.254
132.132.32.1 132.132.47.254
132.132.48.1 132.132.63.254
… and so on…
132.132.208.0 132.132.208.1 132.132.223.254
132.132.224.0 132.132.224.1 132.132.239.254
132.132.240.0 132.132.240.1 132.132.255.254
17
IP Addressing Tools
• Looking up an IP address:
– http://psacake.com/web/eg.asp
– http://www.faqs.org/rfcs/rfc1812.html
• Subnetting:
– http://ccna.exampointers.com/subnet.phtml
18
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:
– 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
19
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
Cisco – IP Addressing (n.d.). IP Addressing. Retrieved
09/27/2006 from
http://cco.cisco.com/warp/public/701/3.html#figone
IANA (n.d.) Abuse Issues and IP Addresses . Retrieved
11/11/06 from http://www.iana.org/faqs/abuse-faq.htm
20