Transcript TCP/IP
TCP/IP Introduction
George Macri
<[email protected]>
ROMTELECOM S.A.
Romania
5th Network Technologies Workshop
.
1
CEENET Workshop Budapest 16-26 August 1999
Technological Prerequisites
• Internetworks
• Internet Protocols
• Internet Addresses
• Routing
• Subneting
• CIDR
2
CEENET Workshop Budapest 16-26 August 1999
What internetworks are
• Start with lots of little networks
• Many different types
– ethernet, dedicated leased lines, dialup, ATM,
Frame Relay, FDDI
• Each type has its own idea of addressing and
protocols
• Want to connect them all together and provide a
unified view of the whole lot
3
CEENET Workshop Budapest 16-26 August 1999
The unifying effect of the network layer
• Define a protocol that works in the same
way with any underlying network
• Call it the network layer
• routers operate at the network layer
• There are defined ways of using:
• protocol over ethernet, ATM, FDDI
• protocol over serial lines (PPP)
• protocol over almost anything
4
CEENET Workshop Budapest 16-26 August 1999
The 7 Layer OSI Model
Application
Presentation
Session
Transport
Network
Datalink
Physical
5
CEENET Workshop Budapest 16-26 August 1999
Protocol Stacks
• Layers:
Applications
TCP / UDP
IP
ethernet
token ring
atm
x.25
Transport layer
Network layer
dialup
frame relay
hdlc
6
CEENET Workshop Budapest 16-26 August 1999
Layer Functions
Mail, Web etc.
Application
Presentation
Session
Transport
TCP
Network
IP
End to end reliability
Forwarding
best-effort
Data Link
Packet delivery
Physical
Raw signal
CEENET Workshop Budapest 16-26 August 1999
7
ISO seven layer model
• 1: Physical layer
– moves bits using voltage, current, light, etc.
• 2: Data Link layer
– bundles bits into frames and moves frames
between hosts on the same link
8
CEENET Workshop Budapest 16-26 August 1999
ISO seven layer model
• 3: Network layer (e.g. IP)
– Makes routing decisions
• uses destination address in packet
– Forwards packet hop by hop
• encapsulates network layer packet inside data link
layer frame
• different framing on different underlying network
types
– Unreliable
– Single address space for the entire internetwork
9
CEENET Workshop Budapest 16-26 August 1999
ISO seven layer model
• 4: Transport layer (e.g. TCP)
– end to end transport of datagrams
– encapsulates datagrams in network layer
packets
– adds reliability by detecting and retransmitting
lost packets
• uses acknowledgements and sequence
numbers to keep track
10
CEENET Workshop Budapest 16-26 August 1999
ISO seven layer model
• 5: Session layer
– not used in the TCP/IP network model
• 6: Presentation layer
– not used in the TCP/IP network model
• 7: Application layer
– Uses the underlying layers to carry out work
11
CEENET Workshop Budapest 16-26 August 1999
Layer interaction
Application
Presentation
Application
Session
Session
Transport
Transport
Presentation
Network
Network
Network
Link
Link
Link
Physical
Physical
Network
Link
Physical
12
CEENET Workshop Budapest 16-26 August 1999
INTERNET PROTOCOLS
• Internet protocols
–
–
–
–
•
can be used for communications between heterogeneous systems;
can be used for communications between systems connected in a LAN;
can be used for communications between systems connected in a WAN;
can be used for communications between a set of interconnected networks;
Documents called RFCs (Requests For Comments), which are reviewed and
analyzed by the IETF community; improvements, additions and refinements of
protocols are published in new RFCs (see ftp://ftp.rs.internic.net.,
ftp://ftp.ripe.net/).
• Looking at all RFCs, you can see the history of the development of
Internet protocols, people and companies that have contributed to this
• TCP and IP are the best known of the Internet protocols and very
often the term TCP/IP refers to the whole family of protocols.
13
CEENET Workshop Budapest 16-26 August 1999
TCP/IP Model
Application
Message
Segment
Datagram
UDP
TCP
ICMP
3
IP
ARP
Frame
Bit
5
4
Datalink
Physical
RARP
2
1
TCP/IP is a 5 Layered model
• Layers 1 and 2 are not actually defined by
TCP/IP , as TCP/IP was defined to be
independent of physical media .
15
CEENET Workshop Budapest 16-26 August 1999
• Layer 3 is the Internet Protocol (IP) layer
This provides a basic datagram service
– ICMP (Internet Control Message Protocol) is
normally provided in this layer
ICMP reports problems in transmission of
datagrams
– ARP (Adress Resolution Protocol)
– RARP (Reverse Address Resolution Protocol)
• In layer 4 are 2 possible protocols : TCP (Transport
Control Protocol) and UDP (User Datagram
Protocol) .
– TCP provides a reliable service with error correction
and flow control .
The cost of providing a reliable service is more
overhead in connection setup and closedown, processing
power for correcting errors and data transmission, but
some applications need reliability irrespective of cost.
– UDP just extends IP’s connectionless datagram service
to applications that do not require reliability .
UDP datagrams can be sent to a network without the
overhead of creating and maintaining a connection
• Layer 5 is the Application layer
This layer provides services suitable for the
different types of application that might wish to
use the network .
It does not provide the application itself .
For example : SMTP , FTP , Telnet ...
18
CEENET Workshop Budapest 16-26 August 1999
TCP/IP
19
CEENET Workshop Budapest 16-26 August 1999
Internet Protocols
FTP RFC 959
Telnet
RFC 854
NFS RPC
SNMP
SMTP
RFC 821
TCP
DNS
RFC 1035
RFC 793
RIP
Routing protocols
RFC 1058
BGP OSPF IGRP EIGRP
UDP RFC 768
IP
ARP
ICMP
RFC 792
RFC 791
RFC 826
X.25
PPP
Ethernet/IEEE 802.3
HDLC
SLIP
LAPB
LAN
Public telephone network
20
CEENET Workshop Budapest 16-26 August 1999
SMTP mail exchange as an example
•
There is a protocol for mail that defines a set of commands and messages that one machine
sends to the other, for example, a conversation between machines linkguide.ici.ro and mail.iob.ro:
Linkguide:
Mail.iob.ro:
Linkguide:
Mail.iob.ro:
Linkguide:
Mail.iob.ro:
Linkguide:
Mail.iob.ro:
Linkguide:
Linkguide:
Linkguide:
Linkguide:
Linkguide:
Linkguide:
Mail.iob.ro:
Linkguide:
Mail.iob.ro:
•
HELO linkguide.ici.ro
250 mail.iob.ro - HELO Linkguide.ici.ro
MAIL From:<[email protected]>
250 MAIL accepted
RCPT To:<[email protected]>
250 Recipient accepted
DATA
354 Start mail input; end with <CTRL>,<CRLF>
Date: Sat, 26 Jul 96 14:23:34 +02
From: [email protected]
To: [email protected]
Subject: helo
text of the message
.
250 OK
QUIT
221 mail.iob.ro Service closing transmission channel
The protocol assumes that we have a reliable way of command and message communication
21
CEENET Workshop Budapest 16-26 August 1999
TCP/IP Architecture Terms
Host A
Host B
FTP client
FTP server
TCP
TCP
router
IP
Ethernet Driver
IP
IP
eth
drv
t.r.
drv
Token Ring Driver
22
CEENET Workshop Budapest 16-26 August 1999
Encapsulation
• Lower layers add headers (and sometimes
trailers) to data from higher layers
Application
Transport
Data
Header
Data
Header Header
Data
Network Access Header Header Header
Data
Internet
23
CEENET Workshop Budapest 16-26 August 1999
IP Addresses
•
•
•
•
Purpose
Basic Structure
Network mask
Special addresses
24
CEENET Workshop Budapest 16-26 August 1999
Purpose of an IP address
• Unique Identification of
– Source
Sometimes used for security or policy-based filtering of
data
– Destination
So the networks know where to send the data
• Network Independent Format
– IP over anything
25
CEENET Workshop Budapest 16-26 August 1999
Basic Structure of an IP Address
• 32 bit / 4 byte number:
(e.g. 204.152.8.1)
• Decimal Representation:
204
152
8
1
• Binary Representation:
1100110010011000 00001000 00000001
26
CEENET Workshop Budapest 16-26 August 1999
Address Structure Revisited
• Hierarchical Division in IP Address:
– Network Part (Prefix)
• describes which physical network
– Host Part (Host Address)
• describes which host on that network
205
.
154
.
8
11001101 10011010 00001000
Network
1
00000001
Host
– Boundary can be anywhere
• not necessarily at a multiple of 8 bits
CEENET Workshop Budapest 16-26 August 1999
27
Network Masks
• Define which bits are used to describe the
Network Part
• Different Representations:
– decimal dot notation: 255.255.248.0
– number of network bits: /19
• Binary AND of 32 bit IP address with 32 bit
netmask yields network part of address
28
CEENET Workshop Budapest 16-26 August 1999
Subnetting
• One class address (either B or C) space could be too large for a
given organization, or for a certain site of the organization.
• Subnetting divides a single network address into many subnet
addresses, so that each subnetwork can have its own unique
address.
• A subnet is defined by applying a bit mask (the subnet mask) to
the IP address.
• If a bit is 1 in the mask, the equivalent bit in the address is
interpreted as a network bit.
• If a bit in the mask is 0, the bit belongs to the host part of the
address.
• Ex: mask to divide the 193.226.2.0 address into 4 subnets:
11111111 11111111 11111111 11000000
29
CEENET Workshop Budapest 16-26 August 1999
Example Prefixes
• 137.158.128.0/17
(netmask 255.255.128.0)
11111111 11111111 1 0000000 00000000
10001001 10011110 1 0000000 00000000
• 198.134.0.0/16
(netmask 255.255.0.0)
11111111 11111111 00000000 00000000
11000110 10000110 00000000 00000000
• 205.37.193.128/26 (netmask 255.255.255.192)
11111111 11111111 11111111 11 000000
11001101 00100101 11000111 10 000000
30
CEENET Workshop Budapest 16-26 August 1999
Old-Style Classes of Address
• Different classes used to represent different sizes of
network (small, medium, large)
• Class A networks: x.0.0.0 - 16.777.215 host addresses
– 8 bits network, 24 bits host (/8, 255.0.0.0)
– First byte in range x=1-127
• Class B networks: x.y.0.0 - 65.536 host addresses
– 16 bits network, 16 bits host (/16 ,255.255.0.0)
– First byte in range x=128-191 y=0-254
• Class C networks: x.y.z.0 - 256 host address
– 24 bits network, 8 bits host (/24, 255.255.255.0)
– First byte in range x=192-223 y,z=0-254
31
CEENET Workshop Budapest 16-26 August 1999
IP Address Structure - Class-full
Address format
32 bits
Class A
network=8 bits
Class B
network=16 bits
Network address
Host address
0
1 0
Class C
network=24 bits
1 1 0
Class D
(multicast)
1 1 1 0
Class E
(reserved)
1 1 1 1
32
CEENET Workshop Budapest 16-26 August 1999
Special Addresses
• All 0’s in host part: Represents Network
– e.g. 193.0.0.0/24
– e.g. 138.37.128.0/17
• All 1’s in host part:
Broadcast
– e.g. 137.156.255.255 (137.156.0.0/16)
– e.g. 134.132.100.255 (134.132.100.0/24)
– e.g. 190.0.127.255 (190.0.0.0/17)
• 127.0.0.0/8: Loopback address (127.0.0.1)
• 0.0.0.0: Various special purposes
33
CEENET Workshop Budapest 16-26 August 1999
TCP/IP Basics: Physical & Datalink
34
CEENET Workshop Budapest 16-26 August 1999
The Physical and Datalink layer
•
•
•
•
•
•
•
Ethernet
IEEE and ISO
Token Ring
FDDI
SLIP
PPP
ISDN
35
CEENET Workshop Budapest 16-26 August 1999
Ehernet
•
•
•
•
•
•
Network access protocol
– The medium for communication between two machines directly connected can be: coax,
twisted cable, telephone link, radio link, satellite link, etc. The lowest layer of protocols
provides functions that manage the data transmission specific to a certain physical
medium.
Classes of links
– Point to point
– Broadcast
– Non-broadcast multi-access
Ethernet/IEEE 802.3 is a coaxial based bus cabling system developed by Digital Equipment
Corporation, Intel, Xerox (DIX)
Ethernet was the technological basis for the IEEE 802.3 specification
Both of them specify the CSMA/CD (Carrier Sense Multiple Access with Collision
Detection), also referred as “listen while talk” (LWT)
Both are broadcast networks
36
CEENET Workshop Budapest 16-26 August 1999
Ethernet Topologies
Transceivers on
boards in
computers
Transceivers
10 Base 5
Thick Wire
10 Base 2
Thin Wire
Fiber
concentrator
Twisted Pair
concentrator
10/100/1000
Base F
10/100/1000 Base T
On Board
Transceivers
Transceivers
The Ethernet frame
8 Octets 6 Octets
6 Octets
2 Octets 46-1500 Octets 4 Octets
Preamble Destination address Source address Type
Data
CRC
• This Ethernet frame encapsulates the
TCP/IP protocol and is responsible for
transporting it across the cabling system to
layer 2 of the destination device , whether
it’s a Router , Gateway or end node .
38
CEENET Workshop Budapest 16-26 August 1999
MAC addressing
• The ethernet frame uses addresses referred
to as MAC (Medium Access Control)
• MAC addresses identify the specific
network cards
• These are 48 bits long
• Each network card has a unique address
configured by its manufacturer
39
CEENET Workshop Budapest 16-26 August 1999
• The LAN card will accept only 3 types of MAC
address .
– Unicast - Frames with destination to the exact MAC
address .
– Broadcast - Has all 48 bits set to binary 1
(or Hex FF FF FF FF FF FF) .
This type of frame is used when the sender does not
know the destination MAC address it tries to
communicate , so we broadcast to all .
– Multicast - Addressing to groups of LAN cards that
are related in some way .
The LAN cards have to be configured to know they
are part of a multicast group .
The type field
Type
Protocol
0x0800 IP
0x0806 ARP
0x8035 RARP
• The Type field identifies
different protocols .
• A computer running multiple
protocols can easily
differentiate between them , and
path the contents to the relevant
layer .
• TCP/IP Generally uses 3
Ethernet types registered in
IEEE .
41
CEENET Workshop Budapest 16-26 August 1999
CRC - Cyclic Redundancy Check
• At the end of the frame is a CRC .
• This is a 32 bit value that is calculated from all the
bits of the Ethernet frame and its contents , but
ignoring the preamble and the CRC itself .
• The remote node does the same calculation and
compares the CRC .
If the value is different , the LAN card will not pass
the Frame to the network layer .
42
CEENET Workshop Budapest 16-26 August 1999
The service provided by Ethernet
• The medium access mechanism used by
Ethernet is CSMA/CD (Carrier Sense
Multiple Access with Collision Detection) .
– This allows nodes on the network to manage
shared access to the cable , but it restricts the
length of the cabling , and the number of nodes
that use it .
– They are not specific to Protocol , therefore for
TCP/IP .
43
CEENET Workshop Budapest 16-26 August 1999
Ethernet Packet size
• Minimum packet size - 64 octets
• Maximum packet size - 1518 octets
• The sizes above include all the frame apart from
the preamble .
• Because of the frame header fields , the CRC and
the overhead of the IP and TCP or UDP higher
layer protocols , the amount left for useful
application data is less then 1518 .
44
CEENET Workshop Budapest 16-26 August 1999
• To give an example :
The Ethernet frame overhead consists of 18
octets and the higher layer protocols often
need 40 octets .
That leaves 1460 (1518-40-18=1460) octets
for application data .
IEEE and ISO systems
• IEEE 802.3 uses CSMA/CD .
• IEEE 802.4 uses a token mechanism on a
bus .
• IEEE 802.5 and FDDI (IS9314) use a token
passing mechanism on a ring .
46
CEENET Workshop Budapest 16-26 August 1999
LLC (Logical Link Layer)
• For LAN’s , layer 2 is split to 2 sublayers .
• The lower is MAC and above we have the
LLC , which has the standard number IEEE
802.2 .
• One of the major functions of LLC is to
differentiate between the different types of
network layer protocols , in a similar way to
the type field of Ethernet .
47
CEENET Workshop Budapest 16-26 August 1999
Ethernet
Application
Presentation
Session
Transport
Network
IEEE 802.2
IEEE 802.3
Application
Presentation
Session
Transport
Network
IEEE 802.2
IEEE 802.3
48
CEENET Workshop Budapest 16-26 August 1999
Token Ring
Application
Presentation
Session
Transport
Network
IEEE 802.2
IEEE 802.5
Application
Presentation
Session
Transport
Network
IEEE 802.2
IEEE 802.5
49
CEENET Workshop Budapest 16-26 August 1999
FDDI
Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Network
Network
IEEE 802.2
IEEE 802.2
IEEE 802.5
IEEE 802.5
IS 9314
IS 9314
50
CEENET Workshop Budapest 16-26 August 1999
Encapsulation
•
•
•
The type field specifies the upper-layer protocol to receive the data after Ethernet processing is
complete
The CRC (Cyclic Redundancy check) is created by the sender and recalculated by the receiver
The frame length (header, data, and CRC) 64-1518 bytes
Application
TCP
IP
Ethernet
Application
Data
T Data
T
I T Data
E I T
Data
TCP
Data
I T Data
C
E I T Data
IP
C
Ethernet
Ethernet
51
CEENET Workshop Budapest 16-26 August 1999
The IEEE 802.3 frame
• The IEEE 802.3 frame has the same general format as DIX Ethernet
(Ethernet_II) frame .
• The Type field in Ethernet DIX is the Length field in IEEE 802.3
• THE FCS (Frame Check Sequence) is instead of CRC
• As there is no Type field , it is not possible to detect which network
layer protocol is carried in the MAC layer
The MAC frame consists of only addresses , length and FCS.
It is the function of LLC to separate the different network layer
protocols .
52
CEENET Workshop Budapest 16-26 August 1999
IEEE 802.3 frame
7 octets
Preamble
1
6 octets
octet
6 octets 2 octets
Destination Source Length
address
address
46-1500
Octets
LLC Data
4
octets
FCS
53
CEENET Workshop Budapest 16-26 August 1999
Bridging TCP/IP
• Bridging between IEEE LAN’s is often promoted as
transparent to any protocol above the MAC layer .
This will bring expectations that there are no particular
problems with TCP/IP .
• There are 4 issues that need consideration :
–
–
–
–
The length field for the 802.3 bus.
Encapsulation on bus networks.
The maximum frame sizes.
The representation of MAC addresses.
54
CEENET Workshop Budapest 16-26 August 1999
Length fields
• The IEEE 802.3 CSMA/CD network has a
length field immediately before the LLC .
Other IEEE networks do not .
• Bridging will at least involve changing the
content of the frame and recalculating the
FCS .
This action will be totally transparent to the
network planners .
55
CEENET Workshop Budapest 16-26 August 1999
Frame size
• For TCP/IP , the transmitted frame size is determined by
the Maximum Transfer Unit (MTU) set in the driver
software for the LAN interface .
• It is possible on most TCP/IP implementations to modify
the MTU to match the number of data octets carried by
the Link Layer protocol .
Setting the MTU’s of each interface on a Token Ring to
1492 will prevent its frames from being to large for
bridging to IEEE 802.3 .
This reduction will limit Token Ring efficiency .
56
CEENET Workshop Budapest 16-26 August 1999
Representation of MAC addresses
• The IEEE 802.1 committee defined how LAN’s should
represent 48 bit MAC addresses as a bit stream on the
cable .
IEEE 802.3 and 802.5 committee chose to represent these
addresses higher in the protocol .
• IEEE 802.3 and 802.5 represent differently the MAC
address .
• Bridges now have to be wise and not only reverse the
address but also to calculate the FCS .
57
CEENET Workshop Budapest 16-26 August 1999
Example of vendor-dependant Ethernet addresses
Prefix
Manufacturer
00:00:0C
00:00:95
00:00:A2
00:00:C0
00:AA:00
02:60:8C
08:00:09
08:00:10
08:00:0B
08:00:20
08:00:2B
08:00:46
08:00:5A
AA:00:03
AA:00:04
Cisco
Proteon
Wellfleet
Western Digital
Intel
3Comm
Hewlett-Packard
AT&T
Unisys
Sun
DEC
Sony
IBM
DEC
DEC
CEENET Workshop Budapest 16-26 August 1999
58
TCP/IP Basics: Serial Connections
59
CEENET Workshop Budapest 16-26 August 1999
SLIP - Serial Line Internet Protocol
• In some situations , it is advantageous to use
asynchronous Serial lines to carry TCP/IP
protocols , either by :
–
–
–
–
Dialup modems
Modems on private wires
through an asynchronous network
Direct connection between 2 computers
60
CEENET Workshop Budapest 16-26 August 1999
SLIP functionality
Direct
connection
PC’s
with
SLIP
Asynchronous
connections
V.24/RS232C
Modem
link
LAN
Host
Dialup
modem
link
61
CEENET Workshop Budapest 16-26 August 1999
SLIP frame format
• SLIP defines 2 special characters :
– SLIP END - 0xC0
– SLIP ESC - 0xDB
• Datagrams sent using SLIP are framed SLIP
END characters .
62
CEENET Workshop Budapest 16-26 August 1999
SLIP frame format
0xC0
IP
datagram
Data before
SLIP
SLIP detects
C0 and
inserts DB
0xC0
21 31 32 C0 5F
21 31 32 DB C0 5F
63
CEENET Workshop Budapest 16-26 August 1999
PPP - Point to Point Protocol
• PPP came to overcome a number of limitations
of SLIP .
• PPP has been designed to operate over both :
asynchronous (start/stop) connections , and bit
oriented synchronous systems .
64
CEENET Workshop Budapest 16-26 August 1999
• PPP provides more then just a simple
connection between hosts .
It also defines several management and
testing functions to deal with line quality ,
option negotiation and the setup of IP
addresses .
65
CEENET Workshop Budapest 16-26 August 1999
The service provided by PPP
• PPP provides a Point to Point connection
between 2 TCP/IP systems for the transfer
of IP datagrams .
• PPP can operate over virtually any serial
link interface .
• The only limitation is that it requires a full
duplex connection .
66
CEENET Workshop Budapest 16-26 August 1999
• It does not need serial interface control
signals , but the standard recommends it for
performance improvements .
• There is no restriction for the speed used for
PPP .
67
CEENET Workshop Budapest 16-26 August 1999
The PPP frame
Flag
A ddress
C ontrol
01111110 11111111 00000011
P rotocol Inform ation FC S
Flag
16 bits
16 bits 01111110
• The address field is all 1’s.
• The control octet contains the value 0x03.
• The protocol field defines the protocol carried by this frame :
– Link Control Protocol - 0xC021
– Network Control Protocol - 0x8021
– Internet Protocol - 0x0021
68
CEENET Workshop Budapest 16-26 August 1999
• PPP can multiplex data from many sources,
which makes it practical for high speed
connections between bridges or routers.
69
CEENET Workshop Budapest 16-26 August 1999
TCP/IP Basics: Network Layer
70
CEENET Workshop Budapest 16-26 August 1999
Why do we need IP protocol layer?
• Although the services provided by TCP protocol are needed by many
applications, there are still some kind of applications that don’t need
them;
• However, there are some services that every application needs.
• The services that every application needs are put together into the IP
protocol layer;
• IP protocol provides the basic service for the transmission of a
datagram from one machine to another machine which do not need to
be connected directly;
• As a result, TCP calls on the services of IP;
• Like TCP, IP protocol layer can be viewed as a library of routines
that TCP calls on, but which is also available to applications that don’t
use TCP
71
CEENET Workshop Budapest 16-26 August 1999
IP - Internet Protocol
•
•
•
•
•
IP is described as a “connectionless datagram service” .
Datagrams are packets of information that can be destined for one , many or all
stations (unique , multicast or broadcast) - provide addressing.
There is no requirement for the intended recipient/s to acknowledge whether
the datagram was received (no flow control, no end-to-end data reliability).
As IP is connectionless , no specific route is defined between 2 communicating
nodes , so datagrams traveling can travel through different routes and reach
destination in a different order (no sequencing and allow for fragmentation).
One of the major roles of IP layer is to make it unnecessary for higher layer
protocols to understand anything about the physical capabilities of the media
supporting them .
Note : This is important for application developers writing programs on top of
the transport layer with no variations because of the different kind of media
used .
72
CEENET Workshop Budapest 16-26 August 1999
The IP Architecture
Application
Message
Segment
Datagram
UDP
1
Frame
Bit
TCP
ICMP
()
()
5
4
3
IP
0800
ARP
Datalink
Physical
()
8035
RARP
()
0806
2
1
Encapsulation
• Both the header and data of the IP datagram become the datalink frame
of whichever network they happen to be on.This is called
encapsulation .
• Protocol number identifies the protocol in the layer above
IP to which the data is passed (/etc/protocols)
–
–
–
–
0 IP pseudo protocol number
1 ICMP
6 TCP
17 UDP
74
CEENET Workshop Budapest 16-26 August 1999
Fragmentation and Reassemble
• IEEE 802.3 and Ethernet systems have maximum data
sizes of 1492 and 1500 octets respectively .
IEEE 802.5 frames is not defined , but in practice it is
usually no greater then 8192 octets .
• This size limit seen by IP is known as the Maximum
Transfer Unit (MTU) .
• The MTU can be adjusted for each interface , but it’s not
necessary unless bridging different LAN technologies .
75
CEENET Workshop Budapest 16-26 August 1999
IP datagram Format
Version
IHL
TOS
Identification
TTL
Total length
Flags Fragment Offset
Protocol
Header Checksum
Source IP address
Destination IP address
Options
Padding
Data
76
CEENET Workshop Budapest 16-26 August 1999
• Version - 4 bits
• Total length - 16 bits
Version of the IP protocol
The total length of the IP datagram
Current version is 4
The size of data is computed from
the total length field and IHL .
• Internet Header Length - 4
bits
• Identification - 16 bits
For easy finding of
This is an integer value used to
beginning of data .
help identify all fragments of a
Normally the value is 5
datagram .
indicated no options are
This field is unique for each new
used .
datagram .
• Type Of Service - 8 bits
The first of 3 bits are used to
indicate 1 of 8 levels of
priority .
Some Routers Ignore these
flags .
• Flags - 3 bits
The 2 low order bits are
used as flags to control
fragmentation .
The low order bit , if 0 ,
indicates the last fragment
of a datagram - MF (More
Flag) .
The middle bit is used to
indicate that the datagram
should not be fragmented DF (Do not Fragment) .
• Fragment Offset - 13 bits
Used in a fragmented
datagram to indicate the
position that the fragment
occupies .
• Time To Live (TTL) - 8 bits
This prevents datagrams to get
routed in a loop .
If it’s set to 0 , a router should
discard the datagram .
The recommended value is 32 ,
but it can be set to a maximum of
255 too .
• Protocol - 8 bits
The transport layer protocol
carried by this datagram .
It tells the IP layer where to path
the datagram .
17 - UDP
6 - TCP
1 - ICMP
• Header checksum - 16 bits
It protects only the header and not the data .
The reason is because the checksum must be
recalculated every time it passes through a router .
Other parameters change too .
• Source IP address - 32 bits
• Destination IP address - 32 bits
• Data variable
This includes the headers of higher layer protocols and
user’s data .
Routing IP Datagrams
Internet
Target H
N
G
Where do I send
that datagram?
N
G
G
N
H
Source
80
CEENET Workshop Budapest 16-26 August 1999
IP Routing
Subnet
Default
Gateway
Direct
Connection
•local host
•default gateway
SubNet
•local host
•same subnet
•next-hop
•local host
•same subnet
•default gateway
81
CEENET Workshop Budapest 16-26 August 1999
IP algorithm
1. Search the routing table for an entry that matches the
complete destination IP address (network ID or host ID). If
found, send the packet to the indicated next-hop router or
to the directly connected interface. (second interface or ppp)
2. Search the routing table for an entry that matches just the
destination network ID. If found, send the packet to the
indicated next-hop router or to the directly connected
interface. (local networks)
3. Search the routing table for an entry labeled “default”. If
found, send the packet to the indicated next-hop router
82
CEENET Workshop Budapest 16-26 August 1999
ARP - Address Resolution Protocol
• If we wish to connect to a remote computer we must
know it’s IP address , but we do not need to know it’s
MAC address .
• ARP was invented for this reason .
It relates IP’s to MAC addresses only on media that
supports broadcasts .
• Each node maintains a cache called the ARP cache ,
which holds a table of IP’s against MAC addresses .
83
CEENET Workshop Budapest 16-26 August 1999
How ARP works
• When IP is requested to send a datagram to
another IP address , it first looks in the ARP cache
to find the corresponding MAC address .
If there is no entry it then attempts to look for it
using ARP .
• In order to do this ARP sends an ARP request
datagram to all LAN cards using a broadcast
address .
84
CEENET Workshop Budapest 16-26 August 1999
• ARP uses its own Ethernet type 0x0806 for these
requests , so they are passed to the ARP software
in all nodes within the broadcast area .
• All cards on a network read this request datagram
and any that discover a match between their IP
and the requested IP reply with an ARP response .
• If a response is received , the answer is entered to
the ARP cache for future use .
If none is received , the request is repeated .
ARP datagrams are not passed through routers , as a router
operates at the IP layer and will not relay MAC broadcast
traffic .
This makes routers a good buffer between broadcast domains
and prevent flooding networks .
ARP commands
• arp command can be used to display the content
of the ARP table;
• Formats:
– arp -a ! displays all the entries in the ARP table;
– arp <hostname>! displays the entry for <hostname>
specified
– arp -d <hostname> ! deletes an entry for <hostname>
– arp -s <hastname> <ether-address> ! adds a new entry
86
CEENET Workshop Budapest 16-26 August 1999
RARP - Reverse ARP
• RARP is intended for use with devices that cannot store
their IP address , usually diskless workstations.
• RARP , like ARP , operates directly over the datalink layer
and has an Ethernet type 0x8035 .
• Nodes acting as RARP servers that find a match for the
MAC address in their RARP tables will reply with the
corresponding IP address in a RARP response .
87
CEENET Workshop Budapest 16-26 August 1999
• This system requires that at least one server
is present and that the server has a table
defining which IP addresses should be used
by each MAC address .
88
CEENET Workshop Budapest 16-26 August 1999
ICMP - Internet Control Message Protocol
• Even though IP is a datagram service and
there is no delivery guarantee , ICMP is
provided within IP and can generate error
messages regarding datagram delivery .
• ICMP uses IP datagrams to carry its
messages back and forth between relevant
nodes .
89
CEENET Workshop Budapest 16-26 August 1999
• ICMP error messages are generated by a
node recognizing there is a transmission
problem and they are sent back to the
originating address of the datagram that
caused the problem .
90
CEENET Workshop Budapest 16-26 August 1999
Frame header
Frame data
IP header
IP data
Type Code
…
91
CEENET Workshop Budapest 16-26 August 1999
General format of ICMP message
Type (8 bits)
Code (8 bits)
Checksum (16 bits)
Parameters (32 bits)
Information (variable)
Type (8): specifies the type of ICMP message
Code (8): used to specify parameters of the message that can be encoded in a few bits
Checksum (16): checksum of the entire ICMP message
Parameters (32): used to specify more lengthy parameters
Information (variable):provides additional information related to the message
–
–
ECHO and ECHO REPLY - mechanism for testing if communication is possible between two
entities. A host can send the ICMP ECHO message to see if a remote IP is up and operational.
When a system receives an echo message, it send the same packet back to the source host in an
ICMP ECHO REPLY message. The ping command uses this message.
A TIME EXCEEDED message is sent by a gateway if the ttl value of a datagram expires
92
(becomes zero). This facility is used by the traceroute command.
CEENET Workshop Budapest 16-26 August 1999
Type field
•
•
•
•
•
•
•
•
•
•
•
•
•
CEENET Workshop Budapest 16-26 August 1999
0
3
4
5
8
11
12
13
14
15
16
17
18
Message Type
Echo reply
Destination unreachable
Source quench
Redirect
Echo request
Time exceeded for datagram
Parameter problem on datagram
Time stamp request
Time stamp reply
Information request
Information reply
Address mask request
93
Address mask response
The ping command
ping
• it is a simple function, extremely useful for testing the network connection;
• it allows the network administrator to determine whether further testing should be directed
toward the network (the lower layers) or the application (the upper layers)
• if ping shows that packets can travel to the destination system and back, the problem is probably
in the upper layers
• If packets can’t make the round-trip, lower protocol layers are probably at fault
Basic format
ping <host> [<packetsize>] [<count>]
<host>
The host name or IP address of the remote host being testyed.
<packetsize>
Defines the size in bytes of the test packets. This field is only required if the
count field is going to be used. Default packet size is 56 bytes.
<count>
The number of packets to be sent in the test. Default number is usually 5.
94
CEENET Workshop Budapest 16-26 August 1999
ping example
Examples
#ping ftp.ripe.net
info.ripe.net is alive
# ping -s ftp.ripe.net 100 10
PING info.ripe.net: 100 data bytes
108 bytes from info.ripe.net (39.13.5.97): icmp_seq=0. time=1070. ms
108 bytes from info.ripe.net (39.13.5.97): icmp_seq=1. time=990. ms
108 bytes from info.ripe.net (39.13.5.97): icmp_seq=2. time=990. ms
108 bytes from info.ripe.net (39.13.5.97): icmp_seq=3. time=990. ms
108 bytes from info.ripe.net (39.13.5.97): icmp_seq=4. time=990. ms
108 bytes from info.ripe.net (39.13.5.97): icmp_seq=5. time=990. ms
108 bytes from info.ripe.net (39.13.5.97): icmp_seq=6. time=990. ms
108 bytes from info.ripe.net (39.13.5.97): icmp_seq=7. time=980. ms
----info.ripe.net PING Statistics---8 packets transmitted, 8 packets received, 0% packet loss
round-trip (ms) min/avg/max = 980/998/1070
95
CEENET Workshop Budapest 16-26 August 1999
traceroute - Tracing routes
• is the program that can help the network administrator locate the
problem when something is down between the local host and a
remote destination
• traces the route of UDP packets from the local host to a remote
host
• prints the name (if it can be determined) and IP address of each
gateway along the route to the remote host
• uses two techniques: small ttl values and invalid port number
96
CEENET Workshop Budapest 16-26 August 1999
traceroute - Tracing routes
Operation
• traceroute sends out 3 UDP packets with ttl value set to one
• the first gateway decrement ttl and gets the value zero.
• The first gateway will send back to the source host an ICMP TIME EXCEEDED
message as error message
• traceroute displays one line of output for each gateway from which it receives an
ICMP TIME EXCEEDED message
• traceroute will then increment by one the ttl value and sends again 3 UDP packets
• the flow of packets tracing to a host three hops away is illustrated below
• When the destination host receives a packet from traceroute, it returns back an ICMP
“Unreachable Port” message. This happens because traceroute intentionally uses an
invalid port number (33434) to force this error.
• When traceroute receives the “Unreachable Port” message, it knows that it has
reached the destination host, and it terminates the trace.
• In this way, traceroute is able to develop a list of the gateways, starting at one hop
away and increasing one hop at a time, until the remote host is reached.
97
CEENET Workshop Budapest 16-26 August 1999
traceroute example
# traceroute ftp.ripe.net
traceroute to info.ripe.net (39.13.5.97), 30 hops max, 40 byte packets
1 agsici1.ici.ro (192.162.16.25) 20 ms 10 ms 0 ms
2 Vienna-EBS1.Ebone.NET (192.121.159.97) 870 ms 870 ms 870 ms
3 Paris-EBS2.Ebone.net (192.121.156.17) 900 ms 890 ms 890 ms
4 Stockholm-ebs.ebone.net (192.121.154.21) 920 ms 930 ms 960 ms
5 Amsterdam-ebs.Ebone.NET (192.121.155.13) 970 ms 990 ms 970 ms
6 Amsterdam.ripe.net (193.0.15.130) 1000 ms 970 ms 970 ms
7 info.ripe.net (39.13.5.97) 1040 ms 970 ms 990 ms
98
CEENET Workshop Budapest 16-26 August 1999
Flow of traceroute packets
ping program
ttl=1
ttl=2
First router
Second router
Third router
decrements ttl to 0
return error “TIME EXCEEDED”
decrements ttl to 1
forward
decrements ttl to 0
return error “TIME EXCEEDED”
ttl=3
decrements ttl to 2
forward
decrements ttl to 1
forward
Return error “port unreachable”
CEENET Workshop Budapest 16-26 August 1999
received at destination
port unreachable
99
• ICMP has it’s own IP protocol number (1) so
the IP layer knows when it receives them.
• Even though ICMP uses the IP layer, it is
considered as being within IP, because it does
not necessarily provide any service to the
layers above.
ICMP types 0 and 8 - echo
• The most common ICMP messages used for
diagnostics are type 0 and 8.
• These are generated by Ping.
Ping sends ICMP type 8 datagrams to a node
and expects an ICMP type 0 reply, returning
the data sent in the request.
101
CEENET Workshop Budapest 16-26 August 1999
ICMP echo datagram (0 or 8)
Type
Code
Identifier
Checksum
Sequence number
Optional data
…
102
CEENET Workshop Budapest 16-26 August 1999
Note :
• How can Ping generate ICMP echo requests if ICMP
does not provide a service to Ping ?
• A Ping implementation does not use ICMP to generate the
request.
It merely mimics what ICMP would do as a program that
operates over the IP layer.
Ping generates an IP datagram with a data field that
equates to ICMP echo request (protocol number 1 and the
first octet of data is 8 - ICMP echo request).
It then adds the rest of the fields including the data
pattern that it expects to be echoed.
103
CEENET Workshop Budapest 16-26 August 1999
ICMP type 3 - destination unreachable
• If a router is unable to deliver a datagram, it
can return the destination unreachable
ICMP datagram to indicate why.
• The code field is used to identify the cause
of failure.
• The values in the code field help to pinpoint
the reason for the datagram failure to arrive
its destination.
104
CEENET Workshop Budapest 16-26 August 1999
ICMP type 3 - Destination Unreachable
Type
Code
Checksum
Unused (must be 0)
Internet header +64 bits of datagram prefix
…
105
CEENET Workshop Budapest 16-26 August 1999
Code value
Meaning
•
•
•
•
•
Network unreachable
Host unreachable
Protocol unreachable
Port unreachable
Fragmentation needed and
the do not fragment bit set
Source route failed
0
1
2
3
4
• 5
106
CEENET Workshop Budapest 16-26 August 1999
• If a router is unable to deliver a datagram , it can
return the destination unreachable ICMP
datagram to indicate why .
– Network unreachable - The network specified in the IP
address cannot be found .
• The IP address and routing tables should be checked .
• This error message is only generated by a router .
• We can find where the error occurred , from the source
address in IP header that carried the ICMP message .
– Host unreachable - The datagram reached the router
which is directly connected to the destination network,
but failed to communicate with the host.
This message is generated by a router only .
– Protocol unreachable - The datagram reached the
destination host , but the particular protocol carried in
the datagram is not available .
– Port unreachable - A host sends the message that the
particular application layer service is not available .
– Fragmentation needed and the do not fragment bit set Normally comes from a router , indicating that it needs
to fragment the datagram , but is instructed not to by
the do not fragment (DF) bit in the flags field of the IP
header .
This fault is uncommon , DF is normally used on
diskless workstations booting via TFTP .
– TFTP has only 512 octets of user data .
• Check MTU size .
– Source route failed - If we specified a route and
the datagram failed to complete the route , we
will get this error .
The point of failure will be the router that
generated the ICMP message .
ICMP type 4 , code 0 - Source Quench
• The format of the datagram is the same as
destination unreachable , but with a type of 4 and
a code of 0 .
• Source quench gives a router or a host the ability
to request that a source of datagrams will slow
down .
• Source quench will occur if a node is running low
on buffer resources and is unable to process
datagrams quickly enough .
110
CEENET Workshop Budapest 16-26 August 1999
If you don’t slow
down , your datagrams
will be discarded .
ICMP type 5 - route change request
• It is used only by routers .
• A router that knows that it is not the optimum
router for a particular destination , uses the relevant
field of a route change request to suggest a more
Type
Code
Checksum
suitable router .
Internet address of a more suitable router
Internet header +64 bits of datagram prefix
…
112
CEENET Workshop Budapest 16-26 August 1999
ICMP type 11 - time exceeded for datagram
• The format is the same as destination unreachable .
• It can be sent in 2 situations :
– From a router - Indicating that the TTL in the IP header
has been decremented to 0 .
It indicates that the original Time To Live was not
suitable to the number of hops needed .
– From a node - An attempt to recreate the original
datagram by reassembly of fragments failed .
The code value is 1 .
113
CEENET Workshop Budapest 16-26 August 1999
ICMP type 12 - Parameter problem message
• Indicates that a wrong argument has been used with an
option field in the IP header .
It can also indicate an error in the implementation of IP .
• It’s sent only if the datagram has been discarded .
• The pointer field indicates the position of the octet
Type
Code
Checksum
position of the suspect field .
Pointer
Unused (must be 0)
Internet header +64 bits of datagram prefix
…
114
CEENET Workshop Budapest 16-26 August 1999
ICMP types 13,14 - Time stamp request & reply
• This message is used to obtain the time
from a clock in a distant machine .
• It is rarely used today .
115
CEENET Workshop Budapest 16-26 August 1999
ICMP types 15,16 - information request
• This message is used to obtain the network
number of the requesting host if it’s
unknown .
• It can be used in dial in systems using SLIP,
as a method for allocating the appropriate
network addresses for each end of the link .
116
CEENET Workshop Budapest 16-26 August 1999
ICMP types 17,18 - Address mask request
• Used to allow a node to discover the subnet
mask of the network it is connected to .
• The node can send the request to a known
address or to broadcast .
117
CEENET Workshop Budapest 16-26 August 1999
Transport Protocol Ports
The address of an
application within a host
Application
Application
Application
Application
HOST
•
•
•
•
•
Port 0
Ports 1 - 255
Ports 256 - 1023
Ports 1024 - 4999
Ports 5000 - 65,535
- Special use
- Well-known ports
- Reserved ports
- Dynamic client ports
- Fixed server ports
118
CEENET Workshop Budapest 16-26 August 1999
User Datagram Protocol
•
•
•
•
Connectionless delivery service
Uses the IP layer service
Does not add reliability to the IP protocol
Enables distinguishing among multiple
destinations within a host computer
End point
119
CEENET Workshop Budapest 16-26 August 1999
UDP Protocol Header Format
UDP Source Port
UDP Destination Port
UDP Message Length
UDP Checksum
Data
0
16
31
• Fragmentation
– What if the packet size is larger then 1500?
• It is divided to 1500xN frames.
• fragmentation flags are set
120
CEENET Workshop Budapest 16-26 August 1999
Flow using Datagrams (UDP)
Server
Client
socket()
bind()
sendto()/recvfrom()
closesocket()
socket()
sendto()/recvfrom()
closesocket()
121
CEENET Workshop Budapest 16-26 August 1999
Transmission Control Protocol
•
•
•
•
Connection based communication
Uses the IP layer service
Provides reliable service
Enables distinguishing among multiple
destinations within a host computer
122
CEENET Workshop Budapest 16-26 August 1999
TCP - Transmission Control Protocol
•
•
•
•
•
•
•
•
•
TCP is the protocol layer responsible for making sure that the commands and messages
are transmitted reliably from one application program running on a machine to another
one on the other machine
A message is transmitted and then a positive acknowledgement is being waited for
If the positive acknowledgement does not arrive in a certain period of time, the message
is retransmitted
Messages are numbered in sequence so that no one is being lost or duplicated;
Messages are delivered at the destination in the same order they were sent by the
source
If the text of a mail is too large, the TCP protocol will split it into several fragments
called “datagrams” and it makes sure that all the datagrams arrive correctly at the other
end where they are reassembled into the original message
The TCP protocol layer provides all the functions that are needed for many
applications and it is better to put them together on a separate protocol rather than
being part of each application
TCP can be viewed as forming a library of routines that many applications can use
when they need reliable network communication with an application on another computer
TCP provides also flow control and congestion control
123
CEENET Workshop Budapest 16-26 August 1999
TCP Protocol Format
Source Port
Destination Port
Sequence Number
Acknowledgment Number
Offset
Reserv
Flags(6)
Window (16 bits)
Checksum (16)
Urgent Pointer
Options(If any)
Padding
Data (variable length)
0
4
10
16
24
31
124
CEENET Workshop Budapest 16-26 August 1999
Establishing and closing TCP Connections
FIN
SYN
time
SYN+ACK
FIN
ACK
ACK
Open
ACK
Three-way
handshake
Close
125
CEENET Workshop Budapest 16-26 August 1999
Sliding Windows
segment 1
ack1
segment 2
segments
1 2 3 4
time
acks
ack2
1 2 3 4
Positive
acknowledgment
with retransmission
Sliding window
transmission
126
CEENET Workshop Budapest 16-26 August 1999
Application Addresses: Sockets
•
•
•
•
•
•
•
On a network server, normally several application programs are running at the same time:
FTP server, telnet server, mail server, www server, gopher server, etc.;
TCP must know to which program to deliver the received message;
If you want to connect to the FTP server it is not enough to know the IP address of the server, you
have to specify that you want to talk to the FTP server program;
This is done by having “the well-known sockets” - TCP ports - (see the file /etc/services on a
UNIX machine):
In a file server session, e.g., two different applications are involved: FTP server and FTP client
– The client program gets commands from the user and passes them to the FTP server program;
– There is no need for the client FTP program to use a well know socket number, because nobody
is trying to find it, as opposed to the FTP server program which have to have a well-known
socket number, so that people can open connections to it and start sending commands;
– The client FTP program asks the network software to assign it a port number that is guarantee
to be unique, for example 1236 if that number was free;
A connection is identified by four numbers:
connection 1:
192.162.16.2, 1236
193.230.3.120, 21
connection 2:
192.162.16.2, 1237
193.230.3.120, 21
Two connections are different if at least one number is different
127
CEENET Workshop Budapest 16-26 August 1999
Application Addresses: Sockets
Socket = IP address + port #
App 1
App 2
Port
Port
Address Address
IP Address
Physical Address
Message
Segment
Datagram
Frame
App 1
App 2
Port
Port
Address Address
IP Address
Physical Address
128
CEENET Workshop Budapest 16-26 August 1999
Well-known TCP ports
21
23
25
53
109
110
-
FTP server
telnet server
SMTP mail server
domain nameserver
POP2 server
POP3 server
129
CEENET Workshop Budapest 16-26 August 1999
Flow using Streams (TCP)
Server
socket()
Client
bind()
listen()
socket()
connect()
accept()
send()/recv()
send()/recv()
closesocket()
closesocket()
130
CEENET Workshop Budapest 16-26 August 1999
ROUTING
The source and the destination hosts are on the same LAN
•
•
•
•
There is no decisions for routing;
The packet is transmitted on the cable (coax, twisted cable, optical fiber);
Every computer connected to the LAN will receive it.
That computer which finds that the destination Ethernet address in the header is equal to
his Ethernet address will get the message, the others will discard it.
•
Note that the address of each computer on the LAN begins with the same network
number
•
Routing table for host A:
NETWORK
192.162.16
GATEWAY
none
INTERFACE
eth0
131
CEENET Workshop Budapest 16-26 August 1999
Example of complex configuration
A .1
eth0
ec0 .4
.1
ec
0 .2
sl0 .1
ec
1
192.162.16.
sl0
L
.4
K
.3
193.230.5.
sl0
M
G
.4 193.230.3.
eth0
D
J
.2
H
193.230.4.
.2
.1
eth0
.5
.1
193.230.6.
sl0
N
.2
backbone
network with
Internet
connectivity
CEENET Workshop Budapest 16-26 August 1999
I
Routing tables
net
gw
int.
M: 193.230.5 none
eth0
193.230.6.2
sl0
193.230.4 193.230.5.1 eth0
193.230.3 193.230.5.1 eth0
192.162.16 193.230.5.1 eth0
default
193.230.6.2 sl0
I 193.230.5
none
eth0
193.230.4.1
sl0
193.230.3 193.230.4.1 sl0
192.162.16 193.230.4.1 sl0
default
193.230.5.5 eth0
H 193.230.3
none
ec0
193,230.4.2
sl0
192.162.16 193.230.1 ec0
default
193.230.4.2 sl0
A 192.162.16 none
eth0
default
192.162.16.4 eth0
132
Routing table initialization and updating
•
Initialization of routing table
– Normally at startup time by executing script command files;
– Static routes
•
•
•
•
•
route add <network-address> <gw-address> <metric>
route add 192.162.16.0 192.162.16.4 1
route add 193.230.3.0 192.162.16.4 1
route add default
192.162.16.4 1
netstat -rn displays the routing table on a UNIX machine
Static routes have the disadvantage that they do not adapt to the changes in the network
topology
Dinamic routing protocols are run to update the routing table so that they reflect the changes in
topology
Router classes
– dedicated routers - special purpose equipment
• Cisco, Wellfleet, Proteon, Telebit
– cheap router sollution: - public domain software for PCs
• ka9q, PCROUTE, Linux, Free BSD, etc.
133
CEENET Workshop Budapest 16-26 August 1999
Routing protocols
•
Types of routing protocols
– Interior Gateway Protocol (IGP): RIP, IGRP, OSPF, Hello
– Exterior routing Protocol (EGP): BGP, EGP
AS1
IGP
AS2
EGP
IGP
134
CEENET Workshop Budapest 16-26 August 1999
Autonomous System Number
•
•
•
•
•
•
An Autonomous System Number (AS) is a set of routers under a single
technical administration, using an interior gateway protocol and an
exterior gateway protocol to route packets to other ASs.
An AS is a connected group of IP networks run by one or more network
operators which has a single and defined routing policy.
AS number is a 16 bit number (65535 unique AS numbers).
It is a finite amount of address space.
Sometimes, the term AS is misunderstood and used for grouping
together a set of prefixes which belong under the same administrative
umbrella.
AS number are assigned by RIPE in Europe
135
CEENET Workshop Budapest 16-26 August 1999
Example for routing
static
IGRP
IGRP
National
Network
IGRP
BGP4
IGRP
BGP4
EBONE
EUROPANET
Access to Internet
136
CEENET Workshop Budapest 16-26 August 1999
CIDR - Classless Inter-Domain Routing
Internet
customers
193.230.0.0
Internet Service Provider
193.230.3.0
193.230.1.0
Class-full representation
193.230.02.0
host
network
193.230.0.0
11000001
11100110 00000000
00000000
193.230.1.0
11000001
11100110 00000001
00000000
193.230.2.0
11000001 11100110
00000010
00000000
193.230.3.0
11000001
1110010
00000011
00000000
Classless representation
CEENET Workshop Budapest 16-26 August 1999
Prefix
Host
137
Example of CIDR configuration (supernetting)
• Using BGP4 routing protocol, all the 4 C class addresses (193.230.0.0,
193.230.1.0, 193.230.2.0, 193.230.3.0) can be advertised like one entry in the
routing table:
router bgp 3233
agregate-address 193.230.0.0 255.255.252.0 summary-only
neighbor 192,121,159,97 remote-as 1755
neighbor 193.226.27.86 remote-as 2614
• Using BGP4 routing protocols, all the 256 C addresses of the block 193.230.0.0
- 193.230.255.255 can be advertised like one entry in the routing table:
router bgp 3233
agregate-address 193.230.0.0 255.255.0.0 summary-only
neighbor 192,121,159,97 remote-as 1755
neighbor 193.226.27.86 remote-as 2614
138
CEENET Workshop Budapest 16-26 August 1999
IPng Features/Functionality
• Expanded Address Space
• Autoconfiguration
• Real-time/Multimedia support
• Integrated Security support
• IPv4
IPv6 Transition Strategy
139
CEENET Workshop Budapest 16-26 August 1999
IP Version 6 - So what’s really changed ?!
IPv4 Header:
Version
IHL
Type of Service
Identification
Time to Live
Flags
Protocol
Total
Length
Fragment Offset
Header Checksum
Destination Address
IPv6 Header:
Version Priority
Padding
Next Header
Source Address
• Fixed Length
• No Check sum
(Done by Link Layer)
• No hop-by-hop
segmentation
Flow Label
Payload Length
quadrupled to 16 bytes
(optional headers daisy-chained)
Source Address
Options
• Address space
Hop Limit
(Path MTU discovery)
• Flow Label/Priority
(Integrated QoS support)
Destination Address
140
CEENET Workshop Budapest 16-26 August 1999
IPv6 Autoconfiguration
• Stateless
Host autonomously configures
its own address
Link Local Addressing
• Stateful
SUBNET PREFIX + MAC
ADDRESS
SUBNET
PREFIX
SUBNET PREFIX + MAC
ADDRESS
(single subnet scope, formed from
reserved prefix and link layer
address)
•DHCPng
• Addressing Lifetime
• Facilitates graceful renumbering
• Addresses defined as valid, deprecated or invalid
141
CEENET Workshop Budapest 16-26 August 1999
IPv6 Real Time/Premium Services support
•
Flow based, defines ‘flow label’ and ‘priority’
•
Can be combined with Source Routing header options
•
Integration with Tag Switching/MPLS:
Insertion into IPv6 Flow Label Field:-
Version
Flow Label
Tag
•••
CoS
(Reference/Draft RFC:- draft-baker-flow-label-00.txt)
142
CEENET Workshop Budapest 16-26 August 1999
IPv6 Security
•
•
•
•
–
IPSec Architecture
Export restrictions recently relaxed
Authentication - MD5 based
Confidentiality - DES
Encrypt entire datagram or IP payload
• Retain existing use of (packet filtering based)
firewalls
143
CEENET Workshop Budapest 16-26 August 1999
IPv6 Transition Strategy - Approaches
• Hosts - Dual Stack
APPLICATION
TCP/UDP
(IPv6 API defined)
IPv4
IPv6
DRIVER
• Networks - Tunneling
DATA
Transport Layer
Header
IPv6 Header
DATA
Transport Layer
Header
IPv6 Header
IPv4 Header
More efficient than building new IPv6 topology
144
CEENET Workshop Budapest 16-26 August 1999
IPv6 Tunneling
• Configured tunnels - manual point-2-point links
• Automatic tunnels - via IPv4 compatible IPv6 addresses
(96 bits of zeros prefix - 0:0:0:0:0:0/96)
Driver
IPv IPv
4
6
IPv4 Backbone
IPv IPv
6Driver
4
IPv6
IPv6
IPv6
• Instrumental in building existing ‘6-Bone’
(http://www.6bone.net)
• Network Address Translation IPv4
IPv6
CEENET Workshop Budapest 16-26 August 1999
145
IPv6 Routing
• Hierarchy is key
• Test address space allocation available:-
(RFC 1897)
Registry ID Provider ID Subscriber ID Subnetwork ID Interface ID
5 bits
16 bits
24 bits
16 bits
48 bits
• Existing routing protocols extensions for IPv6
RIPv6
Multiprotocol BGP4+
Integrated IS-IS
EIGRPv6
OSPFv3
-
Same destination/mask/metric information as RIPv2
Currently Draft
20 byte NSAP support facilitates IPv6 address/routing
Reflects Cisco’s future proofing commitment
Packet formats changed to reflect 128 bits
• Neighbour Discovery - dynamic host
router
Combination of ES-IS, ARP and ICMP Redirect
146
CEENET Workshop Budapest 16-26 August 1999
IPv6 Current Status - Standardization
• Several key components now Standards/Proposed
Standards
Basic Specification
Neighbor Discovery
RIP/OSPF
ICMPv6/IGMPv6
• Issues remaining open
Addressing Registries
DHCP
Extension Headers
Interoperability
IPv6 over all media
147
CEENET Workshop Budapest 16-26 August 1999
IPv6 Current Status - Customers/Vendors
• Request for IPv6 support
•Academic Community
•ISP
•Enterprise
• Vendor support:BAY Networks
Digital
Merit
3Com
Cisco
Ipsilon
Telebit
(the usual suspects!)
Apple
Hitachi
Linux
Siemens Nixdorf
FTP Software
IBM
NRL
Sun
… etc.
148
CEENET Workshop Budapest 16-26 August 1999
REFERENCES
•
•
•
•
•
•
•
•
Christian Huitema, Routing in the Internet, Prentice Hall, ISBN 013-132192-7,
1996
Kevin Dowd, “Getting Connected, Internet at 56K and Up”, O’Reilly &
Associates, Inc., Bonn, 1996
Booktexts of Network Technology Workshop, National Network Management
Track, Honolulu, June 1995
Craig Hunt, “TCP/IP Network Administration, O’Reilly & Associates, Inc.,
Sebastopol, 1993
Internetworking Technology Overview, Cisco Systems, Inc., 1993
Booktexts of the 4th Network Seminar and Intensive Course for Scientists and
Network Managers from Central Europe, Feb. 1993, Vienna University
Computer Center
E. Comer, “Internetworking with TCP/IP”, Vol I, Principles, Protocols and
Architecture, Prentice Hall, Englewood Cliffs, New Jersey, 1991.
William Stallings, Data and Computer Communications, Macmillan
Publishing Company, New York, 1985.
149
CEENET Workshop Budapest 16-26 August 1999