Professional Documents
Culture Documents
E-mail: rahul@pilani.bits-pilani.ac.in
Interaction Points
Simple basics that go into programming for the network-based applications: Generic and Socket APIs Briefly revisiting the TCP/IP Architecture Current State-of-the-art and Evolving Research Directions
From Clusters and Grids to Clouds Wearable Computing Ubiquitous or Pervasive Computing
Lets next see the way things get done in real systems!
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Overall:
Connect <blocks> Send Receive <blocks> . Close
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
The Internet Layer The Host-to-Network Interface Link-Layer as per OSI Reference Model LLC Sub-layer MAC Sub-layer Physical layer
Application Layer
Upper
Layer-to-
Lower
Layer
Interface
Host-1
Host-2
31
Identification 16-bit
Flags 3-bit
TTL 8-bit
10
Byte
Ordering
Example
2:
int
x
=
0xAABBCCDD
This
4
byte
long
integer
can
be
represented
in
the
same
2
orderings:
Big
Endian:
Byte
Value:
[0xAA]
[0xBB]
[0xCC]
[0xDD]
Memory:
[
0
]
[
1
]
[
2
]
[
3
]
Li^le
Endian:
Byte
Value:
[0xDD]
[0xCC]
[0xBB]
[0xAA]
Memory:
[
0
]
[
1
]
[
2
]
[
3
]
All
Network
data
is
sent
in
Big
Endian
format.
In
the
networking
world
we
call
this
representaAon
as
Network
Byte
Order
and
naAve
representaAon
on
the
host
as
Host
Byte
Order.
Where
needed,
we
convert
all
data
into
Network
Byte
Order
before
transmission.
Example:
struct sockaddr_in my; my.sin_family = PF_INET; my.sin_port = htons(80); my.sin_addr.s_addr = INADDR_ANY; bzero(&my, 8) bind(sock, (struct sockaddr *)&my, sizeof(my));
May
involve:
A
Special
Kind
of
Pipe Support
for
required
Address Family Support
for
required
Protocol
Family
&
Socket Type
Description Unix domain sockets Internet address family support TCP(UDP)/IP Amateur radio X25 Novell IPX Appletalk DDP Internet address family support TCP(UDP)/ IPv6
Description Reliable, Sequenced, Like TCP Unreliable, Not sequenced, Like UDP Like datagram but reliable Like Stream but fixed size packet
Network Applications
User Kernel
UDP
ARP
Ethernet
Lets look at some C code that was used for creaAon of a TCP-based Echo Server program!
Lets look at some more C code that was used for creaAon of a TCP-based Echo Client program!
Interaction Points
Briefly revisiting the TCP/IP Architecture Current State-of-the-art and Evolving Research Directions
From Clusters and Grids to Clouds Wearable Computing Ubiquitous or Pervasive Computing
Interaction Points
Current State-of-the-art and Evolving Research Directions From Clusters and Grids to Clouds Wearable Computing Ubiquitous or Pervasive Computing Select References to the literature Summary
Networks: A set of autonomous compute/communicaAon nodes interconnected for the purpose of meaningful resource sharing, require supporAng protocol stacks, not transparent to the users Clusters Homogeneous (plaxorm / OS), all involved nodes o_en belong to a single enAty and frequently designed for high-performance compuAng, may be limited to one or more racks within the same room (example: HPC clusters), easiest to deploy and manage Grids O_en heterogeneous (plaxorm / OS), Frequently spread over mulAple networks and network types, may involve single or mulAple organizaAons, require greater eort in deployment and administraAon Clouds May be public, private and hybrid, support mulAple levels of abstracAons / virtualizaAon, typically spread over wide areas, expected to be transparent to the user, oer the highest levels of redundancy / availability,
VirtualizaAon is the underlying common technology involved in all the three paradigms Networking is the key enabler ingredient in each of these cases Cost-eecAveness, robustness and scalability improve as we move from cluster to cloud but overheads and internal complexity add up
References
Larry L. Peterson & Bruce S. Davie: Computer Networks: A Systems Approach, Fifth Edition, Morgan Kaufmann / Elsevier, New Delhi, 2011. <System design approach> S. Keshav: Computer Networking: An Engineering Approach, Pearson Education, New Delhi, 1997. A. S. Tanenbaum: Computer Networks, Fifth Edition, Pearson Education, New Delhi, 2012. <Conceptual Approach> Y. Zheng and S. Akhtar: Networks for Computer Scientists and Engineers, Oxford University Press, New York, 2002. <Structural approach> A. Leon Garcia and I. Widjaja: Communication Networks: Fundamental Concepts and Key Architectures, Second Edition, Tata McGraw-Hill, New Delhi, 2004. Mohammed G. Gouda: Elements of Network Protocol Design, Wiley Student Edition, John Wiley & Sons (Pte.) Ltd., Singapore, 2004. Thomas G. Robertazzi: Computer Networks and Systems: Queuing Theory and Performance Evaluation, Third Edition, Springer-Verlag, New York, 2000. <Analytical approach>
30/01/13
52
What is next?
Subsequent
lectures
shall
introduce
you
to
the
following
topics:
<not
in
the
same
order
necessarily>
Topologies
involved
Performance
Quality
of
Service
Reliability
Security
Protocols and Mechanisms involved Methods of SimulaAon Se}ng up a physical system and conguring it Network Analysis
30/01/13
53
References
Larry L. Peterson & Bruce S. Davie: Computer Networks: A Systems Approach, Fifth Edition, Morgan Kaufmann / Elsevier, New Delhi, 2011. <System design approach> S. Keshav: Computer Networking: An Engineering Approach, Pearson Education, New Delhi, 1997. A. S. Tanenbaum: Computer Networks, Fifth Edition, Pearson Education, New Delhi, 2012. <Conceptual Approach> Y. Zheng and S. Akhtar: Networks for Computer Scientists and Engineers, Oxford University Press, New York, 2002. <Structural approach> A. Leon Garcia and I. Widjaja: Communication Networks: Fundamental Concepts and Key Architectures, Second Edition, Tata McGraw-Hill, New Delhi, 2004. Mohammed G. Gouda: Elements of Network Protocol Design, Wiley Student Edition, John Wiley & Sons (Pte.) Ltd., Singapore, 2004. Thomas G. Robertazzi: Computer Networks and Systems: Queuing Theory and Performance Evaluation, Third Edition, Springer-Verlag, New York, 2000. <Analytical approach>
30/01/13
(c) Dr. Rahul BRahul anerjee, BITS Pilani, INDIA Dr. Banerjee, BITS, Pilani (India)
54
Rahul Banerjee
files_struct
count close_on_exec open_fs fd[0] fd[1]
file
f_mode f_pos f_flags f_count f_owner f_op f_inode f_version
fd[255]
inode
socket
type protocol data (sk)
BSD Socket File Operations lseek read write select ioctl close fasync
SOCK_STREAM
sock
type protocol socket
Binding
an
Address
Only
for
Server:
Int
bind(int
sockfd,
const
struct
sockaddr
*address,
size_t
add_len)
Port
Number
is
opAonal
for
binding
socket.socket_state
=
TCP_CLOSE;
The
bound
socket
cant
be
used
for
other
communicaAon
Listening
Only
for
server:
int
listen(int
sockfd,
int
queue_size)
socket.socket_state
=
TCP_LISTEN;
Adds
the
sock
to
tcp_bound_hash
and
tcp_listening_hash
ConnecAng
Only
for
client:
Before
connecAng,
socket.socket_state
=
SS_UNCONNECTED;
Int
connect(int
csockfd,
const
struct
sockaddr
*address,
size_t
add_len)
Adds
the
sock
to
tcp_listening_hash
waiAng
for
servers
response
AccepAng
Only
for
server:
int
accept(int
sockfd,
struct
sockaddr
*address,
size_t
*add_len)
A
new
socket
gets
cloned
from
the
listening
socket
If
there
are
no
incoming
connecAon
to
accept
Non-Blockingaccept
operaAon
failed
and
throw
away
the
new
socket
Blockingaccept
operaAon
was
added
to
the
wait
queue
next
sk_buer structure
prev dev
truesize
len
Packet to be transmitted
30/01/13
64
Current Status:
It is loosely hierarchical. Has no single body that owns it or rigidly controls it. --Mostly run through volunteer efforts and by consensus. Runs several services, in a distributed manner, including the immensely popular World-Wide Web. Is helped by global cooperation including those from governments and corporates apart academia 30/01/13 (c)
Dr.
Rahul
Banerjee,
BITS
Pilani,
from INDIA
65
Currently, the TCP/IP stack is the dominant protocol stack over which the Internet runs. Keeping the needs of expansion and improvement, this protocol family has continually evolved over last 30+ years.
Current version of IP is IPv6, although IPv4 is still dominant in use.
(c)
Dr.
Rahul
Banerjee,
BITS
Pilani,
INDIA
30/01/13
66
SHARED BUS
N1
N2
N3
N4
70
The original Ethernet protocol proposed and implemented by Robert Metcafe was actually based on 1-p CSMA/CD protocol It did have a scheme that allowed greedy access to the channel by a station which led to lower efficiency Schemes like Random Back-off / Exponential Backoff were devised to improve the efficiency to a certain extent
30/01/13
71
An
Ethernet
LAN
Personal
Computer
WorkstaAon
Workstation WorkstaAon
72
N4
S
N3
N2
Switch
C
73
Fixed Lasers
1 2
Optical Electronic Receivers Switches Linecard 1 MxL Crossbar Linecard 2 Linecard L Group 1 2
1 2 3
LxM Crossbar
GxG MEMS
LxM Crossbar
3 M
GxG MEMS 3
1 2 3 M
GxG MEMS M
75
NC22
NR
76
C
C
77
C
C
78
Frames
can
take
dierent
formats
and
sizes
depending
upon
the
protocol
in
quesAon
Frames
do
include
elds
like
synchronizaAon,
addressing,
payload,
control-informaAon
etc.
Frame
Forwarding
The
process
of
moving
frames
from
one
port
to
another
in
a
bridge
or
switch.
80 (c) Dr. Rahul Banerjee, BITS, Pilani, India
82
h^p://www.javvin.com/pics/10GigE.gif&imgrefurl=h^p://www.javvin.com/protocol10GigE.html&usg=__VuNx4T-UphUAzm- _AEsDqMqvzLQ=&h=374&w=576&sz=34&hl=en&start=10&um=1&itbs=1&tbnid=JlvKsLiP2xuOfM:&tbnh=87&tbnw=134&prev=/images%3Fq%3Dgigabit%2Bethernet%26hl%3Den%26safe%3Do%26um%3D1
h^p://www.ovislinkcorp.co.uk/linkd.GIF
Summary
of
Dierences
Between
L-2
Switches,
Routers
(L-3)
and
L-3
Switches
Bridges
and
Layer-2
switches
divide
the
network
into
segments
or
micro-segments
(apart
from
helping
in
Layer-2
protocol
translaAon,
management,
security
etc.)
In
eect,
we
can
say
that
Layer-2
Switches
/
Bridges
separate
collision
domains
Layer-2
Switches
/
Bridges
can
carry
out
protocol
translaAons
30/01/13
(c)
Dr.
Rahul
Banerjee,
SDET
Unit,
BITS- Pilani,
INDIA
84
Summary
of
Dierences
Between
L-2
Switches,
Routers
(L-3)
and
L-3
Switches
Routers
are
Layer-3
devices
who
handle
Layer-3
packet
rouAng
within
and
outside
the
local
network
/
internetwork
and
therefore
eecAvely
separate
broadcast
domains
which
end
at
its
dierent
network
interfaces
each
of
which
carries
a
separate
Subnet-idenAer
/
Subnet-address
(apart
from
Layer-3
protocol
translaAon,
monitoring,
security
and
management)
Thus,
in
eect,
we
can
say
that:
Routers
Separate
broadcast
domains
(each
of
such
broadcast
domains
which
end
at
its
dierent
network
interfaces
each
of
which
carries
a
separate
Subnet-idenAer
/
Subnet-address
)
Routers
can
carry
out
interior
rouAng
and
/
or
exterior
rouAng,
depending
upon
their
locaAon
in
the
network
Routers
can
carry
out
protocol
translaAons
(in
terms
of
protocol-specic
packet
formats
as
well
as
in
terms
of
allowing
appropriately
forma^ed
selecAve
data
specic
to
rouAng
protocols
they
may
support).
30/01/13
(c)
Dr.
Rahul
Banerjee,
SDET
Unit,
BITS- Pilani,
INDIA
85
Summary
of
Dierences
Between
L-2
Switches,
Routers
(L-3)
and
L-3
Switches
Layer-3
switches
are
devices
which
can
handle
all
funcAonaliAes
of
Layer-2
Switches
as
well
as
fast
(o_en
based
on
header/tag/label
switching)
Layer-3
packet
rouAng
within
but
not
outside
the
local
network
/
internetwork;
and
therefore,
eecAvely
separate
broadcast
domains
which
end
at
its
dierent
LAN
interfaces
each
of
which
carries
a
separate
Subnet-idenAer
/
Subnet- address
(apart
from
opAonal
Layer-3
protocol
translaAon,
monitoring,
security
and
management)
Thus,
in
eect,
we
can
say
that:
L-3
Switches
Separate
broadcast
domains
(each
of
such
broadcast
domains
which
end
at
its
dierent
LAN
interfaces
each
of
which
carries
a
separate
Subnet- idenAer
/
Subnet-address
)
L-3
Switches
can
carry
out
fast
interior
rouAng
/
packet-switching
o_en
based
on
header/tag/label
switching
Layer-3
Switches,
opAonally,
can
carry
out
protocol
translaAons
(in
terms
of
protocol-specic
packet
formats).
30/01/13
(c)
Dr.
Rahul
Banerjee,
SDET
Unit,
BITS- Pilani,
INDIA
86
87
TCP/IP
Model
OSI
TCP/IP
7 6 5 4 3 2 1 Application Presentation Session Transport Network Data Link Physical Transport Internet Host-toNetwork
TCP
IP
Application
TCP
Overview
TCP
(Transmission
Control
Protocol)
ConnecAon-Oriented
Reliable
Protocol
IP
Overview
32-bit
Unique
IP
Address
Network
Address
Subnet
Address
Host
Address
Gateway
(Router)
140.112.28.XX
140.112.30.XX