The Network Access Layer
Application
Services--OSI 5, 6, 7
Network Access
Layer--(undefined) OSI 1, 2--in other words, any network connection can be
used; Ethernet, token Ring, FDDI, ATM, Frame Relay, X.25, PPP, …..
TCP/IP Protocol Suite
diagram showing the interactions between layers & the Service Access Points
· Provides Connectionless Service(Datagram Service)
· IP forms and Delivers IP packets
· Unreliable, Best-effort Delivery System
· Packets may be
· Lost--hit by noice
· Duplicated--TCP timeout occurs and a packet is resent
· Delayed--taking long time to reach destination
· Delivered out-of-order--packets taking different routes
· Routes packets
An example of WAN connections:
Connection structure in terms of protocols for the above network
IP datagram format(From RFC 791--IPv4)
http://www.csl.sony.co.jp/cgi-bin/hyperrfc?rfc791.txt
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Version| IHL |Type of Service| Total Length |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Identification |Flags| Fragment Offset |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Time to Live | Protocol | Header Checksum |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Source Address |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Destination Address |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Options | Padding |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Example Internet Datagram Header
Current version is 4. Supposed to be replaced by version 6(IPv6 or IPng=IP Next Generation)
Indicates how many 4-byte words for the header portion--Header can be between 20bytes to 60 bytes depending upon the length of the Options field
Bits 0-2: Precedence.Bit 3: 0 = Normal Delay, 1 = Low Delay.Bits 4: 0 = Normal Throughput, 1 = High Throughput.Bits 5: 0 = Normal Relibility, 1 = High Relibility.Bit 6-7: Reserved for Future Use. 0 1 2 3 4 5 6 7 +-----+-----+-----+-----+-----+-----+-----+-----+ | | | | | | | | PRECEDENCE | D | T | R | 0 | 0 | | | | | | | | +-----+-----+-----+-----+-----+-----+-----+-----+ Precedence111 - Network Control110 - Internetwork Control101 - CRITIC/ECP100 - Flash Override011 - Flash010 - Immediate001 - Priority000 - Routine The use of the Delay, Throughput, and Reliability indications may increase the cost (in some sense) of the service. In many networksbetter performance for one of these parameters is coupled with worseperformance on another. Except for very unusual cases at most twoof these three indications should be set.The type of service is used to specify the treatment of the datagramduring its transmission through the internet system. Examplemappings of the internet type of service to the actual serviceprovided on networks such as AUTODIN II, ARPANET, SATNET, and PRNETis given in “Service Mappings” [8].
D bit = low delay request
T bit = high throughput
R bit = high reliability
These requests are hints to routing algorithm but
not as demands
A router tries to closely accommodate the request(in choosing alternatives among possible routes) but it is not guaranteed
Typical usages of TOS
-------------------------------------------------------------------------
Protocol TOS Bits Description
-------------------------------------------------------------------------
ICMP 0000 Normal
NNTP 0001 Minimize cost
IGP 0010 Maximum reliability
TELNET 1000 Minimize delay
FTP(data) 0100 Maximize throughput
FTP(control) 1000 Minimize delay
……
……
Total length in bytes including the Header
(Length of data = Total length - Length of Header)
Unique number(16 bits) for a datagram—generated by the host and incremented for each datagram
This field and Fragment Offset field are used for fragmentation & reassembly of datagrams.
Maximum Transfer Unit(MTU)—Each data link(LAN connection) has its own frame format and a maximum allowed size:
Protocol MTU(Bytes)
Hyperchannel 65,536
Token
ring(16Mbps) 17,914
Token
ring(4Mbps) 4,464
FDDI 4,352
Ethernet 1,500
X.25 576
PPP 296
When a datagram travels through different networks, the original size can not be accommodated on some paths, so Fragmentation occurs
· In Internet, once DG fragmented, it stays fragmented(intermediate routers do not reassemble fragments)
· At destination host, fragments are assembled using (Identification + Offset) with reassembly timer(if timer expires, drop the DG-->lost DG)
· Identification=unique DG ID(same for all fragments) set by sending computer
· Fragment Offset=used for reassembly at destination
· A datagram can be fragmented by the source host or any router in the path
· First bit is not used
· D bit =Do not fragment
(ex. a computer runs small bootstrap sequence to use internet to get initial bootstrap program., then responder sends a memory image which must not be fragmented)
· If a router has to fragment for a packet with D=1, it drops the DG and notify sender
· M bit =More fragments(more coming)
· Can a fragment be fragmented again? Yes
Set to a maximum by sender and each router
decrements by 1 or #of seconds
If becomes 0, drop and notify source(by a router)
Usually TTL is set for 32 or 64
This field specifies the high-level protocol that uses IP’s service(ex. TCP, UDP, ICMP, IGMP). Using this field, the receiving IP module knows to which protocol the datagram should be delivered.
Value Protocol
1
ICMP
2
IGMP
6
TCP
8
EGP
17
UDP
41
IPv6
89
OSPF
1’s complement of sum(in 1’s comp arithmetic) of 16
bits--Checks only hearder
Adv=Usage of simple error checking reduces router
overhead
Disadv=corrupted data will pass undetected
IP addresses for source host and destination host
·
Primarily
for network testing & debugging
·
COPY
bit=Option must be copied to all fragments
·
OPTION
CLASS
· 0=DG/Network control
· 1=Reserved for future
· 2=Debugging & Measurement
·
3=Reserved for future
Option Op# Desc
0 2 Security Restrictions
0 3 Loose source routing
0 7 Trace route
0 9 Strict source routing
2 4 Timestamp along route
IP Addresses
and Subnet Masks
IP ADDRESSES are used
to route information (packets) through the Internet
Each packet contains
both the source IP address and the destination IP address of a specific
computer (host)--A computer on Internet must have a unique IP address during
its connection
An IP address is 32
bits (4 bytes) long, and consists of two parts:
* netid
* hostid
MSB LSB -------------------------------------- | netid | host id | --------------------------------------
32 bit binary numbers
are written in decimal form--called Dotted Decimal Notation--e.g 132.241.158.33
IP Address
Classes--5 Classes A, B, C, D, E
(This
classification is sometimes called as “Classful Internet Addresses--
in contrast to
“CIDR”(Classless Interdomain Routing))
* class A
·
a small number of huge networks (up to 16,777,214 hosts)
·
first octet is 0-127 (i.e. first bit is 0)
·
example: 26.104.0.19
* class B
·
a large number of large networks (up to 65,534 hosts)
·
first octet is 128-191 (i.e. first two bits are 10)
·
example: 129.82.100.64
* class C
·
a huge number of small networks (up to 254 hosts)
·
first octet is 192-223 (i.e. first three bits are 110)
·
example: 192.178.16.1
* class D
·
first octet is 224 or greater
·
used for “multicast” address--group address
·
first octet is 224-239(i.e. first four bits are 1110)
* class E
·
first octet is 240 or greater
·
not given to the general public--Reserved for special use
·
first octet is 240-255(i.e. first four bits are 1111)
Host computers and
routers must have IP addresses to communicate over Internet
(Except for the
routers that are connected as point-to-point)
Some host computers
may have more than one IP addresses--called “Multihomed”
Special
Addresses
Some parts of the
addresses in class A, B, C are used for special addresses
---------------------------------------------------------------------------------------------------------------
Special Address Netid Hostid Source or Destination
---------------------------------------------------------------------------------------------------------------
Network address Specific All 0s None
(e.g. 132.241.158.0 is the subnet’s
address for the LAN in OCNL340 lab)
---------------------------------------------------------------------------------------------------------------
Direct broadcast address Specific All 1s Destination
(This is used by a router to send a
packet to all hosts in a subnet)
---------------------------------------------------------------------------------------------------------------
Limited broadcast address All 1s All
1s Destination
(A broadcast address for a
subnet--It is used when a host wants to send a message to
all the hosts in the local
subnet--routers will not pass this to other subnets)
---------------------------------------------------------------------------------------------------------------
This host on this network All 0s All
0s Source
(All 0s designate “this host on
this network”--used by a host when it does not know
it’s own IP address)
---------------------------------------------------------------------------------------------------------------
Specific host on this network All 0s Specific Destination
(It is used by a host to send a
message to another host on the same subnet-- Routers will
not
process this kind)
---------------------------------------------------------------------------------------------------------------
Loopback address 127 Any Destination
(It is used to test IP software on
the machine)
Depending upon their
usage, IP addresses can be classified into 3 categories:
Unicast Address:
One-to-one
Multicast Address:
One-to-many
Broadcast Address:
One-to-all
IP Addresses
are depleted(running out)
4bytes = 4.3
billion--much less than human population(6 billion)
Class A and Class B IP
addresses are no longer being given out--Internet Address space is running out!
At current rate the entire
address space will be exhausted around 2008
(Vinton
Cerf is known as “Father of Internet”)
Solutions:
·
CIDR(Classless
Internet Domain Routing)
http://www.csl.sony.co.jp/cgi-bin/hyperrfc?rfc1519.txt
·
NAT(Network
Address Translation)
http://www.csl.sony.co.jp/cgi-bin/hyperrfc?rfc1631.txt
·
IPng(IPv6)
http://www.csl.sony.co.jp/cgi-bin/hyperrfc?2460
A class C address can
have only 254 IP addresses, so for an organization which needs more than 254
addresses, one class C space is not enough.
For this purpose,
class C addresses are being given in (CIDR) contiguous blocks, to ease the
burden on routers of looking up addresses
* also, a single class C can be used to
span multiple domains (sites), with a sum of hosts less than or equal to 254
IPv6
(version 6) contains an expanded address space (128 bits) - a huge
number of network addresses
Current solutions such as CIDR & NAT have
problems:
CIDR: Limited
space from the beginning, complexity in routers
NAT:
Unidirectional communication--Stations in enclosed network can initiate
connections but computers outside the NAT cannot
initiate the connection---no bi-directional
connections
Some technologies demand unique IP addresses for
bi-directional connections such as IpSec
* Uses 128 bits -- 3.4*10**38---Class A address
space for all sites
* Uses Hexadecimal notation: EX. 3FF3:0008:1234:0248:97EF:FE40:CFAB:0501
* IPv6 is NAT-free--end-to-end Bi-directional
connections
*Transition from IPv4 to IPv6
zz18