2001 Copyright SCUT DT&P Labs 1 The Principle of TCP/IP Part 1.
-
Upload
rebecca-hensley -
Category
Documents
-
view
220 -
download
1
Transcript of 2001 Copyright SCUT DT&P Labs 1 The Principle of TCP/IP Part 1.
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 1
The Principle of TCP/IPThe Principle of TCP/IP
Part 1Part 1
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 2
1. History of TCP/IP
1969: ARPANET went into operation
four packet-switched nodes at three different sites
connected together via 56 kbit/s circuits
using the Network Control Protocol (NCP)
funded by the U.S. Department of Defence
1974: TCP/IP designed by Vinton G. Cerf and Robert E.
Kahn
1979: IP version 4 documented
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 3
1. History of TCP/IP (Contd)
1979: the Internet Control and Configuration Board
(ICCB) formed
1979: BSD Unix with TCP/IP supplied to Universities
1980: ARPA started converting machines to TCP/IP
1983: mandate that all computers connected to
ARPANET use TCP/IP
1983 ARPANET split into two separate networks,
ARPANET for further research
MILNET for the military
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 4
1985: the ARPANET was heavily used and congested 1986: NSFNET developed to replace ARPANET
universities and research organisations connected to regional networks
regional networks connected to a main backbone six nationally funded super-computer centres connected
to backbone The original links were 56 kbit/s.
1988: Links upgraded to T1 (1.544 Mbit/s) The NSFNET T1 backbone connected a total of 13 sites
1991: NSF decided to move the backbone to a private company
1993: New Internet backbone, ANSNET, with T3 (45 Mbit/s) links
1. History of TCP/IP (Contd)
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 5
• 1993 NSF Solicitations 1993 NSF Solicitations four separate projects for which proposals were invited:
Create a set of Network Access Points (NAPs)
Implement a Route Arbiter
Provide a very high-speed Backbone Network Service
(vBNS)
Transition existing “regional” networks
1. History of TCP/IP (Contd)
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 6
2. Today's Internet Distributed architecture operated by commercial Network
Service Providers (NSPs) Connected together at Network Access Points (NAPs)
high-speed switch to which a number of routers can be connected for the purpose of traffic exchange
allows Internet traffic from the customers of one provider to reach the customers of another provider.
ISPs provide Internet services to end customers Connection point between a customer and an ISP is called a
point of presence (POP) ISP networks exchange information with each other by
connecting to NSPs that are connected to NAPs, or by connecting directly to NAPs
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 7
3. Internet Architecture Board (IAB) 3. Internet Architecture Board (IAB) OrganisationOrganisation
The IAB organisation
The IAB Board
IESG
Research groups Working groups
IRTF IETF
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 8
4. Active IETF (Internet Engineering Task Force) Working Groups
Applications
Internet
Operations and Management
Routing
Security
Transport
User services
General
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 9
5. Active IRTF (Internet Research Task Force)
Research Groups End-to-End Information Infrastructure Architecture Internet Resource Discovery Network Management Reliable Multicast Routing Secure Multicast Services Management
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 10
6. Internet Assigned Number Authority 6. Internet Assigned Number Authority (IANA)(IANA)
IANA
RIPE Reseaux IP Europeen
APNIC AsiaPacificNetworkInformation Centre
ARIN American Registry for Internet Numbers
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 11
DraftPaper
RFCSpec
ProposedStandard
Standard
Review by IETF and IESG not to exceed two years
IESG recommends promotion to proposed standard. RFC publishes as RFC. Otherwise it is sent back to the IETF work group.
Implementation and test for a minimum of 6 months
DraftStandard
Evaluation of implementation for a minimum of 4 months
7. RFC Standards Track Process
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 12
IESG - Internet Engineering Steering Group
The Internet Engineering Steering Groupforms part of the IETF (Internet Engineering Task Force) and is comprised of theIETF Chairman and the Area Managers of each of the associated working groups.
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 13
8. Internet Protocol Suite and OSI 8. Internet Protocol Suite and OSI Reference ModelReference Model
DATA LINK
PHYSICAL
NETWORK
TRANSPORT
SESSION
APPLICATION
PRESENTATION
NETWORK INTERFACE(LAN - ETH, TR, FDDI)
(WAN - Serial lines, FR, ATM)
INTERNET(IP, ARP, RARP)
TRANSPORT (TCP or UDP)
APPLICATION (FTP, TELNET, SNMP, DNS)
ICMP, IGMP
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 14
9. TCP/IP Protocol Stack Based on Data Flow9. TCP/IP Protocol Stack Based on Data Flow
OSPF EGP TCP UDP ICMP IGMP
IP RARPARP
RIP BGP
Ethernet, Token Ring, PPP, and so on
Telnet, FTP, TFTP,HTTP,SNMP,SMTP, and so on
Port Number
Protocol Number
Type code
Application Layer
Data LinkLayer
InternetLayer
TransportLayer
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 15
Internet Protocol (IP)Internet Protocol (IP)
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 16
1. Internet Protocol (IP)1. Internet Protocol (IP) Provides logical 32-bit network addresses
Routes data packets
Connectionless protocol
No session is established “Best effort” delivery
Reliability is responsibility of higher-layer
protocols and applications
Fragments and reassembles packets
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 17
2. IP Packet Structure
Source Address
VersionType ofService
Total LengthIHL
Identification Fragment Offset
ProtocolTime to Live Header Checksum
Destination address
PaddingOptions (variable)
32 bits (4 Bytes)
IP header is normally
20 bytes long
Flags
DATA (variable)
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 18
D T R UNUSEDPRECEDENCE
D = DelayT = ThroughputR = Reliability
2.1 Type of Service (TOS)
3 1 1 1 2
2. IP Packet Structure
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 19
Version: the field keeps track of which version of the protocol the datagram belong to.IHL: it is provided to tell how long the header is, in 32-bit words.Type of service: the field allows the host to tell the subnet what kinds of service it wants.Identification: it is needed to allow the destination host to determine which datagram a newly arrived fragment belong to. DF: it stands for Don’t Fragment.MF: it stands for More Fragment.Fragment offset: the field tells where in the current datagram the fragment belongs.
2. IP Packet Structure
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 20
Host A
Network Interface
IP Fires & Forgets
Reliability & Sequencing
IPRoutes
If Possible
Router
Host B
Network Interface
IP Delivers
as Received
Reliability & Sequencing
PACKET
Fragmented Packet
1. Internet Protocol (IP)1. Internet Protocol (IP)
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 21
2. IP Packet Structure
Time to live: the field is a counter used to limit packet lifetimes.
Protocol: the field tells which transport process to give it to. TCP is one possibility, but so are UDP and some others.
Header checksum: it verifies the header only.
Source address & Destination address: they indicate the network number and host number (IP addresses).
Options: they may include Security, Strict source routing, Loose source routing, Record route, Timestamp and so on.
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 22
2.2 Fragmentation
Router1
Router2MTU =1500
IP Header Original IP Packet data area
IP Hdr 1 Data 1 IP Hdr 2 Data 2 IP Hdr 3 Data 3
MTU = 4500 bytes MTU = 4500 bytes
FDDI FDDIETHERNET
bytes
2. IP Packet Structure
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 23
3. Traditional IP Address Classes3. Traditional IP Address Classes
CLASS A
CLASS B
CLASS C
0
1 0
1 1 0
NET ID
NET ID
NET ID
HOST ID
HOST ID
HOST ID
Number of Networks
Hosts per Network
1st Octet
Class A 126 16,777,214 1 – 126 Class B 16,384 65,534 128 – 191 Class C 2,097,152 254 192 - 223
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 24
3. Traditional IP Address Classes
1 1 10 Group Identification
Class D Used for multicast group usage - first 4 high-order bits are
1110 1st Octet between 224 and 239
Class E Reserved for future use - first 5 high-order bits are 11110
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 25
4. Addressing Guidelines4. Addressing Guidelines
Network ID cannot be 127
127 is reserved for loop-back function
Network ID and host ID cannot be 255 (all bits set to 1)
255 is a broadcast address
Network ID and host ID cannot be 0 (all bits set to 0)
O means “this network only”
Host ID must be unique to the network
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 26
5. Private IP Address Space5. Private IP Address Space
10.0.0.0 - 10.255.255.255 1 “Class A”
network
172.16.0.0 - 172.31.255.255 16 “Class B”
networks
192.168.0.0 - 192.168.255.255 256 “Class C”
networks
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 27
A network (class A, B or C) is allowed to be split into several parts for internal use but still act like a single network to the outside world.These parts are called subnet.Subnet mask is employed to distinguish different subnet.
Example: one of the ways to subnet a class B network1 01 0 HostHost
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 10 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0
NetworkNetwork SubnetSubnet IP address
Subnet mask
6. Subnet 6. Subnet
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 28
6.1 Subnet Mask6.1 Subnet Mask Blocks out a portion of the IP address to distinguish
the Network ID from the host ID Specifies whether the destination’s host IP address
is located on a local network or on a remote network.
The source’s IP address is ANDed with its subnet mask. The destination’s IP address is ANDed with the same subnet mask. If the result of both ANDing operations match, the destination is local to the
source, that is, it is on the same subnet.
6. Subnet 6. Subnet
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 29
6.2 Subnet Mask Example6.2 Subnet Mask Example For example 160.30.20.10 is on the same subnet as
160.30.20.100 if the mask is 255.255.255.0 Note: 1 AND 1 = 1. Other combinations = 0.
IP Address 10100000 00011110 00010100 00001010
Subnet Mask 11111111 11111111 11111111 00000000
10100000 00011110 00010100 00000000Result
160.30.20.10
255.255.255.0
160.30.20.0
IP Address 10100000 00011110 11001000 01100100
Subnet Mask 11111111 11111111 11111111 00000000
10100000 00011110 00010100 00000000Result
160.30.20.100
255.255.255.0
160.30.20.0
6. Subnet 6. Subnet
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 30
6.3 Subnetting6.3 Subnetting
INTERNET
PRIVATE NETWORK
160.30.0.0/24160.30.1.0/24160.30.2.0/24…………….…………….
160.30.254.0/24 160.30.255.0/24
Routing Advertisement
160.30.0.0/16
•Before subnetting: 1 network with approx.. 65 thousand hosts•After subnetting: 256 networks with 254 hosts per subnet
6. Subnet 6. Subnet
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 31
Example 1: network with customized maskExample 1: network with customized mask
Allocated IP address space 160.30.0.0/16
8 bits available for subnets and 8 bits available for host
0255 255 255
0000 00001111 1111 1111 1111 1111 1111
No. of Subnets
xxxx xxxx1010 0000 0001 1110 0000 0000160.30.0.x
xxxx xxxx1010 0000 0001 1110 1111 1111160.30.255.x
3 octet mask 255.255.255.0
Maximum of 256 subnets (28)
Network Host
6. Subnet 6. Subnet
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 32
Example 1: network with customised mask Example 1: network with customised mask (continued)(continued)
Allocated IP address space 160.30.0.0/16
8 bits available for subnets and 8 bits available for host
0255 255 255
0000 00001111 1111 1111 1111 1111 1111
No. of hosts
0000 00011010 0000 0001 1110 xxxx xxxx160.30.x.1
1111 11101010 0000 0001 1110 xxxx xxxx160.30.x.254
3 octet mask 255.255.255.0
Maximum of 254 hosts (28 - 2)
Network Host
6. Subnet6. Subnet
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 33
Subnetting Example 2Subnetting Example 2
200.200.200.0 255.255.255.0
Network Address Subnet Mask
Allocated IP address space 200.200.200.0/24
200.200.200.64
200.200.200.0
62 hosts per network
Note: Subnet mask for each subnet = 255.255.255.192
200.200.200.192
200.200.200.128
6. Subnet6. Subnet
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 34
Example 3: Network with Variable Length Example 3: Network with Variable Length Subnet Masks (VLSM)Subnet Masks (VLSM)
Allocated IP address space 200.200.200.0/24 want 2 subnets with 50 hosts and 8 subnets with 10 hosts?
200.200.200.0
200.200.200.0 /26 (max of 62 hosts)
200.200.200.64 /26 (max of 62 hosts)
200.200.200.192 /28 (max. of 14 hosts)200.200.200.208 /28200.200.200.224 /28200.200.200.240 /28
200.200.200.128 /28 (max. of 14 hosts)200.200.200.144 /28200.200.200.160 /28200.200.200.176 /28
Note: Subnet masks /26 = 255.255.255.192/28 = 255.255.255.240
6. Subnet 6. Subnet
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 35
Example 4: Network with VLSMExample 4: Network with VLSM
160.40.140.0 255.255.252.0
160.40.156.0255.255.255.0
160.40.152.0255.255.252.0
160.40.157.12255.255.255.252
160.40.157.4255.255.255.252
LAN 1
LAN 3
LAN 2
160.40.144.0255.255.252.0
160.40.148.0255.255.252.0
Site A
Site CSite B
160.40.156.1
160.40.140.1
160.40.152.1
160.40.157.5
160.40.157.6
160.40.157.13
160.40.157.14 160.40.148.1
160.40.144.1
6. Subnet 6. Subnet
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 36
7. Classless Inter Domain Routing (CIDR) 7. Classless Inter Domain Routing (CIDR) Route AggregationRoute Aggregation
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 37
Variable Length Subnets from 1 to 16Variable Length Subnets from 1 to 16CIDR
prefix-lengthSubnet Mask
# Individual Addresses
# Classful Networks
32 B64 B
128 B1 A or 256 Bs
2 A4 A
2 M4 M8 M
16 M32 M64 M
255.224.0.0255.192.0.0255.128.0.0
255.0.0.0254.0.0.0252.0.0.0
/11/10/9/8/7/6
/4/5
240.0.0.0248.0.0.0
16 A8 A128 M
256 M
64 A32 A
128 A1024 M512 M
2048 M 192.0.0.0224.0.0.0
128.0.0.0/2/3
/1
/16 255.255.0.0 1 B or 256 Cs65,534
4 B2 B
8 B262,142131,070
524,286255.252.0.0255.254.0.0
255.248.0.0/14/15
/1316 B1 M255.240.0.0/12
7. Classless InterDomain Routing (CIDR) Route Aggregation7. Classless InterDomain Routing (CIDR) Route Aggregation
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 38
Variable Length Subnets from 17 to 32 Variable Length Subnets from 17 to 32 CIDR
prefix-lengthSubnet Mask
# Individual Addresses
# Classful Networks
1/8 C1/4 C1/2 C1 C2 Cs4 Cs8 Cs
16 Cs32 Cs64 Cs
3062
126254510
1,0222,0464,0948,190
16,382
255.255.255.224255.255.255.192255.255.255.128
255.255.255.0255.255.254.0255.255.252.0255.255.248.0255.255.240.0255.255.224.0255.255.192.0
/27/26/25/24/23/22/21/20/19/18/17 255.255.128.0 128 Cs32,766
1/16 C14255.255.255.240/281/32 C6255.255.255.248/291/64 C2255.255.255.252/30
7. Classless InterDomain Routing (CIDR) Route Aggregation7. Classless InterDomain Routing (CIDR) Route Aggregation
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 39
7. Classless InterDomain Routing (CIDR) Route Aggregation7. Classless InterDomain Routing (CIDR) Route Aggregation
ISP
The INTERNET 200.25.16.0/20
200.25.16.0/24 200.25.17.0/24200.25.18.0/24200.25.19.0/24200.25.20.0/24200.25.21.0/24200.25.22.0/24200.25.23.0/24 200.25.24.0/24
200.25.25.0/24200.25.26.0/24200.25.27.0/24
200.25.28.0/24 200.25.29.0/24
200.25.30.0/24 200.25.31.0/24
200.25.16.0/21
200.25.24.0/22
200.25.28.0/23
200.25.30.0/23
200.25.0.0/16
Company ACompany B
Company C Company D
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 40
Subnet ID TablesNo. of bits
in maskSubnet Mask
255.255.255.248255.255.255.252
255.255.255.240255.255.255.224255.255.255.192255.255.255.128
255.255.255.0255.255.254.0255.255.252.0255.255.248.0255.255.240.0255.255.224.0255.255.192.0
2930
2827262524232221201918
1617
255.255.0.0255.255.128.0
Subnet IDs
0
0,16,32,48,64,80,96,112,128,144,160,176,192,208,224,240
0,8,16,24,32,40,48,56,64…………….,216,224,232,240,248
0,4,8,12,16,20,24,28,32,…………….236,240,244,248,252
0,2,4,6,8,10,12,14,16,18,…………….246,248,250,252,254
0,1,2,3,4,5,6,7,8,9,10,11,…………….251,252,253,254,255
0, 128
0, 64, 128, 192
0,32,64,96,128,160,192,224 3rdOctet
4thOctet
0, 128
0, 64, 128, 192
0,32,64,96,128,160,192,2240,16,32,48,64,80,96,112,128,144,160,176,192,208,224,240
0,8,16,24,32,40,48,56,64…………….,216,224,232,240,248
0,4,8,12,16,20,24,28,32,…………….236,240,244,248,252
7. Classless InterDomain Routing (CIDR) Route Aggregation7. Classless InterDomain Routing (CIDR) Route Aggregation
2001 Copyright 2001 Copyright SCUT DT&P LabsSCUT DT&P Labs 41
The end of part 1