Transcript Document

Networks I
Internet Protocol
Prof. MSc. Ivan A. Escobar Broitman
Instituto Tecnológico y de Estudios Superiores de
Monterrey Campus Estado de México
TC1007
Introduction
“Many networks exist in the world, often with different hardware
and software. People connected to one network want to
communicate with people attached to a different one. This desire
requires connecting together different, and frequently incompatible
networks, sometimes by using machines called gateways to make
the connection and provide the necessary translation, both in the
terms of hardware and software. A collection of interconnected
networks is called an inter-network or just Internet”
___________
Tananebaum pg16.
Network Arquitecture
 How are networks interconnected?
Red 1
Red 1
GW
GW1
Red 2
Red 2
GW2
Red3
Network Arquitecture
 Internet Protocol:
 It is the glue that holds together the Internet.
 It treats all the networks in the same way, for example a
LAN like Ethernet or Token Ring, a Wan like ARPANET
and even a point to point link between two computers.
 Designed with internetworking in mind.
Network Arquitecture: IP
IP in the OSI MODEL
Aplications
L7
Trustworthy Transport Service
L4 TCP
Best Effort no Connection Transfer of
L3
Packets
IP
Ethernet Frames: Data Link
Layer
a) DIX Ethernet Frame
b)IEEE 802.3 Frame
Frame Demultiplexing in
Ethernet
IP Module
0X800
ARP Mod.
0X806
Demux Based
on Frame Type
Frame Arrival
RARP Mod.
0X835
The Internet Protocol (IP)
 IP is a “best effort” protocol.
 Delivery of datagrams is not
 Provides mechanisms to
transport units called IP
datagrams.
IP HEADER
DATA
The fundamental part of
the internet services are
the delivery of packets.

guaranteed by this protocol.
 IP is made up of 5 parts:
 Datagram Format.
 Datagram Routing.
 Error Control.
 Fragmentation
 IP Options.
IP Frame Format
0
4
8
16
19
24
31
IPv4 Frame Fields
 Version (4 bits):
 Version of the protocol,
currently IPv4.
 Assures compatibility during
transition.
 IHL (4 bits):
 Type of Service (8 bits):
 Specifies the way to process
a datagram.
 Tells us how long is the
header.
 Default Value = 5, no
options, header 20 bytes.
 Max value is 15 which limits
header to 60 bytes.
Precedence D
–
–
T
R
Unused
Precedence: priority from 0
(normal) to 7.
Three flag bits allow the
hosts to specify what they
care most about the set
(Delay, Throughput,
Reliability)
IPv4 Frame Fields
 Total Length (16 bits):
 Includes the length of data
and header.
 Maximum theoretical length
64Kbytes.
 Identification (16 bits):
 Frame identification.
 Unused bit.
 DF (1 bit):
 Don’t Fragment.
 Avoid small packet networks.
 MF (1 bit):
 More fragments.
 Used to acknowledge when
the last fragment has arrived.
 All fragments except the last
one have it set.
 Fragment Offset (13 bits):
 Tells us where in the current
datagram the fragment is.
 Maximum fragments per
datagram > 8192.
IPv4 Frame Fields
 Time To live (TTL 8 bits):
 Theoretically marks the
maximum lifetime in
seconds of a packet. In
practice it counts hops.
 Initialised to 255,
decremented by one at
each hop.
 Prevents packets from
wondering around the net
forever.
 Protocol (8 bits):
 Tells us which protocol to use
to interpret the information in
the data area. (TCP,ARP,etc.)
 Analogous to the Type Field in
Ethernet.
 Header Checksum
(16 bits):
 Used to verify the header of a
packet.
 Source and Destination
Address (32 bits):
 Indicate network and host
numbers.
Analogy between Type and
Protocol
 When Protocol field is initialized to:
 1 it indicates that in the datagram area we have
encapsulated the ICMP protocol
 17 it indicates that in the datagram area we have
encapsulated the UPD protocol
 6 it indicates that in the datagram area we have
encapsulated the TCP protocol
Frame Encapsulation
Datagram
Data
Header
Header
Data
Frame
IPv4 Frame Fields
 Options Field (0  40 bytes):
 Used to include information not present in the original
design.
 Information for network test.
 Rarely used.
 Variable in length.
IPv4 Frame Fields
Some of the IP Options
IPv4 Frame Fields: Options
 Security:
 How secret the
information might be.
 Military applications.
 Monitor specific data.
 Strict Source Routing:
 Establishes complete path
to follow from source to
destination.
 Useful for emergency
packets.
 Loose Source Routing:
 Specifies certain routers
the packet must travel
from source to
destination.
 Allows packets to choose
other routers on the way.
 Application, send routers
through a certain type of
route.
IPv4 Frame Fields: Options
 Record route:
 Each router along the
path from source to
destination writes down its
IP address in the options
field.
 Managers can track down
bugs in routing algorithm.
 Used to debug and to
modify existing routing
algorithms.
 Ex: packet from ITESM to
UNAM.
 Timestamp:
 Similar to record route
option.
 Routers record both a 32
bit IP address and a 32 bit
timestamp.
 Used mainly for
debugging and algorithm
creation.
 Are 40 bytes enough?
IP: Options.
 Options are included to:
 Test and Depure the network.
 IP OPTIONS FIELD :
0
8
CODE
0
16
LENGTH
24
POINTER
31
PADDING
1
2
3
4
5
6
7
COPY OPTION CLASS
OPTION NUMBER
IP Options
Class Num Op
Long Description
0
3
var
Loose source routing
0
7
var
Record route
0
9
var
Strict source routing
2
4
var
Internet timestamp
IP Addresses
IP address formats.
IP Addresses
 NIC:




Network Information Center.
Assigns only netid portion of the IP address.
Host id is the responsibility of the Network Administrator.
Examples:
 Lans.
 Websites.
IP Addresses
Special IP addresses.