raspberry pi part 22
TRANSCRIPT
www.techvilla.org.in
TECHVILLA
www.techvilla.org.in
www.techvilla.org.in
Networking in linux
OSI and TCP/IP
Linux networking layers.
Inet socket interface.
Linux networking commands
www.techvilla.org.in
OSI Overview
OSI (Open Systems Interconnection)
See Figures…
www.techvilla.org.in
TCP/IP Model
OSI TCP/IP
ApplicationPresentatio
nSession
Transport
Network
Data Link
Physical
Application
Transport
Internet
Host-to-Network
7
6
5
4
3
2
1
Not present
TCP
IP
www.techvilla.org.in
TCP Overview
TCP (Transmission Control Protocol) Connection-Oriented
Reliable Protocol
UDP (User Datagram Protocol) Connectionless
Unreliable Protocol
www.techvilla.org.in
IP Overview
32-bit Unique IP Address Network Address
Subnet Address
Host Address
140.112.28.XX 140.112.30.XX
Gateway(Router)
www.techvilla.org.in
IP Overview (cont.)
IP Header
www.techvilla.org.in
Ethernet Layer
48-bit Unique Device Address
ARP (Address Resolution Protocol)
multicastmulticast
multicast
multicast
www.techvilla.org.in
Linux Networking Layers
Support Mechanism Various Networking
Inter-Process Communication
A Special Kind of Pipe
Support Several Address Family…
Support Several Socket Type…
Addr Family
Description
UNIX Unix domain sockets
INET Internet address family support TCP(UDP)/IP
AX25 Amateur radio X25
IPX Novell IPX
APPLETALK Appletalk DDP
X25 X25
Socket Type Description
Stream Reliable, Sequenced, Like TCP
Datagram Unreliable, Not sequenced, Like UDP
Reliable Delivered Messages
Like datagram but reliable
Sequenced Packet
Like Stream but fixed size packet
BSD Sockets
INET Sockets
TCP UDP
IP
PPP SLIP Ethernet
ARP
User
Kernel
Network Applications
Socket Interface
Protocol Layers
Network Devices
Client/Server Communication
Client
1. Create a socket
2. Bind an addr
3. Listen the client
4. Create a socket
Server
Connect
Accept
SendRecv