Title: TCPIP Overview I
1TCP/IP Overview (I)
2TCP/IP Overview
- Trace back to the U.S. Governments ARPA
(Advanced Research Projects Agency) as early as
1969 - Two standards adopted by the DoD
- TCP Transmission Control Protocol
- IP Internet Protocol
- Forms the foundation of the Internet as we know
today - Contains many user applications, including
services to - Electronic Mail (SMTP)
- Remote login (Telnet)
- File transfer (FTP)
- IAB (Internet Architecture Board) is responsible
for the TCP/IP standards
3The TCP/IP Protocol Suite
- Consists of four layers
- Network access layer Provides physical delivery
of IP packets via frames or cells - Internet layer Contains the information so that
data can be routed through an IP network - Host-to-host layer Services the process layer
and Internet layer to handle reliability and
session aspects of the transmissions - Process layer Application support
4The TCP/IP Protocol Suite
5Network Access Layer
- TCP/IP relies on a physical network to deliver
its packets (can be a LAN, a MAN, or a WAN) - Characteristics
- Process data down from the TCP/IP stack to build
and send frames or cells out to the network - Sends frames or cells over the physical network,
one bit at a time - Process data up to the TCP/IP stack on the
receiver side - Example Ethernet, ATM, and Frame Relay
6Network Access Layer
7Internet Layer
- The Internet layer handles several jobs
- Network addressing (ARP RARP) RARP is used to
find the IP address when the MAC address is known - Routing information (OSPF, EGP)
- Data fragmentation If a large datagram is
transferred from network to network, the router
may divide the datagram into fragments. Each
fragment has an identification number. - Reassembly
- Handling error and request (ICMP) When a
fragment fails to arrive or is corrupted, ICMP
generates an error message. Also, it allows one
to see if there is a physical connection to a
host (ping)
8Internet Layer
9IP Header (Version 4)
10The Version 4 IP Header
- IP version (4 bits)
- IP header length (4 bits)
- Precedence 3 bits
- 000 routing datagram
- 001 priority
- 111 allow diagnostic and management packets to
go through the network when it is congested or
having problems - Type of service (5 bits) (some routers do not
implement this) - 00000 normal service
- 10000 low delay request (Telnet)
- 01000 high throughput request (SNMP)
- 00100 high reliability request
- 00010 low monetary cost
11The Version 4 IP Header
- Total IP length, including the IP header (2
bytes) - Datagram ID number (2 bytes)
- Fragmentation (2 bytes with 3 flag bits)
- 000 fragmentation allowed and no more fragments
to follow - 001 fragmentation allowed and more fragments to
follow - 010 fragmentation not allowed
- Time to live The number of seconds that a
datagram can live before it must be delivered or
discarded - Protocol The ID of the higher layer protocol
(TCP6, UDP17) - IP Header check sum
- Source IP address
- Destination IP address
12IP Addressing (I)
- Dotted decimal notation format
- 4 decimal number separated by decimal points
- Each decimal is one byte in length
- The decimal numbers are in the range 0-255
- Consists of two parts
- The network portion Internet administered
(cannot be modified) - The host portion Locally administered (can be
modified) - IANA (Internet Assigned Numbers Authority) and
ARIN (American Registry for Internet Numbers)
manage the assigning of IP addresses - Look up who has which address www.arin.net/whois
13IP Addressing (II)
- Address assignment characteristics
- Addresses are assigned to one of the three
classes A, B, and C - Class D is reserved for multicast address
- Class E is reserved for experiment
- Address 127.0.0.0 is used for IP loopback testing
- Addresses reserved for private addresses
- Class A 10.0.0.0
- Class B 172.16.0.0 thru 172.31.0.0
- Class C 192.168.0.0 thru 192.168.255.0
14IP Addressing (III)
- Class A
- 7 bits for network number, 24 bits for host
number - The first bit of the first octet (byte) is a 0
- The first decimal number must fall in the range
between 0 and 127 - 128 (27) possible networks
- 224 16,777,216 number of hosts per network
15IP Addressing (IV)
- Class B
- 14 bits are used for network number and 16 bits
for host numbers - The first two bits of the first octet begin with
binary 10 - The first decimal number must fall in the range
between 128 to 191 - 16,384 (214) possible networks
- 216 65,536 number of hosts per network
16IP Addressing (V)
- Class C
- 21 bits are for the network number and 8 bits are
for the host numbers - The first three bits of the first octet begin
with binary 110 - The first decimal number must fall in the range
between 192 to 223 - 2,097,152 (221) possible networks
- 28 256 number of hosts per network
17Subnetting (I)
- Subnet A network that is a portion of a larger
network, connected by router - Why Subnetting
- Performance problems
- Security issues (sensitive data)
- Connectivity issues (different floors, buildings,
states, or countries) - Connecting dissimilar media protocols (Ethernet,
token ring, FDDI) - Subnetting is accomplished by applying a subnet
mask, which identifies which bits are used to
indicate the different portions of the address
network, subnet, and host
18Subnetting (II)
19Subnet Mask
- The mask indicates how many of the host bits have
been used for subnetting - The mask is constructed by placing a 1 in any bit
that is part of the network or subnetwork portion
of the address - The mask needs to be configured on all hosts on
the network
20Class C Subnetting Example A (I)
- When no subnets are introduced, one network can
have 256 host numbers (but two cannot be used) - Subnet mask for no subnets
255
255
255
0
Network Address
Host
21Class C Subnetting Example A (II)
- 2 subnets are needed
- Use 2 bits for subnet addressing
- The number of bits (x) needed 2x gt the number
of desired subnets 2 (two addresses cannot be
used)
194
194
14
Network Address
Subnet Address
Host
22Class C Subnetting Example A (III)
- First subnet Address 194.194.14.64
- Second subnet address194.194.14.128
- Subnet Mask 255.255.255.192
23Class C Subnetting Example A (IV)
- Number of available addresses for hosts in each
subnet 2h 2, where h is the number of bits
assigned for host - In our example, h6 and the number of available
addresses for hosts 26 -2 62 - Total number host addresses 2 subnets 62124
- Before subnetting the number of available host
addresses 254 (256-2) - The number of lost addresses130, due to
subnetting
24Class C Subnetting Example A (V)
- IP addresses for hosts in the first subnetwork
25Class C Subnetting Example A (V)
- IP addresses for hosts in the 2nd subnetwork
26Class C Subnetting Example B
- 196.196.15.0
- Subnet mask without subnetting
- Number of available IP addresses for host without
subnetting - Divide the network into 8 subnetworks
- How many bits are needed for subnet addressing?
- What are the eight network addresses?
- How many IP addresses are available for the first
subnet? List all host IP addresses. - How many total IP addresses for this
organization? - How many IP addresses are lost due to subnetting?
- What is the subnet mask?
27Class B Subnetting Example
- 130.128.0.0
- Subnet mask without subnetting
- Number of available IP addresses for host without
subnetting - Divide the network into 254 subnetworks
- How many bits are needed for subnet addressing?
- What are the eight network addresses?
- How many IP addresses are available for the first
subnet? List all host IP addresses. - How many total IP addresses for this
organization? - How many IP addresses are lost due to subnetting?
- What is the subnet mask?
28Class A Subnetting Example
- 3.0.0.0
- Subnet mask without subnetting
- Number of available IP addresses for host without
subnetting - Divide the network into 254 subnetworks
- How many bits are needed for subnet addressing?
- What are the eight network addresses?
- How many IP addresses are available for the first
subnet? List all host IP addresses. - How many total IP addresses for this
organization? - How many IP addresses are lost due to subnetting?
- What is the subnet mask?
29Variable Length Subnetting (I)
- Consider the following situation
- A Class C network address 200.200.200.0
- One home LAN with 50 hosts
- 3 branch offices, with 20 hosts each
30Variable Length Subnetting (II)
- For the home office
- 2 bits are assigned for subnet addressing
- The remaining 6 bits are for hosts at the main
office, allowing up to 62 hosts - Assume we choose 10 for the subnet address bits
(we can use 01, too) - The hosts at the home office are assigned IP
addresses from 200.200.200.129 to 200.200.200.178 - The last octet for the first and last IP
addresses are 1000 0001 and 1011 0010 - Subnet Mask 255.255.255.192
31Variable Length Subnetting (III)
- For the branch offices
- 3 bits are used for subnet addressing
- 001 for Branch 1
- 010 for Branch 2
- 011 for Branch 3
- 100 Used by the main office
- 101 used by the main office
- 110 used by the main office
- IP addresses for the hosts in Branch 1
200.200.200.33 200.200.200.62 - IP addresses for the hosts in Branch 2
200.200.200.65 200.200.200.94 - IP addresses for the hosts in Branch 3
200.200.200.97 200.200.200.126 - The subnet mask for these three branches
255.255.255.224 - Requires a routing protocol that transmits the
subnet mask when exchanging routing tables