Comm / Networking slides
Download
Report
Transcript Comm / Networking slides
What’s going on here?
Leo Koppel
Jan 22 2015
The OSI Model
Layers
Data unit
Function
Examples
7. Application
High-level APIs, including resource sharing, remote file
access, directory servicesand virtual terminals
HTTP, FTP, SM
TP
6. Presentation
Translation of data between a networking service and an
application; includingcharacter encoding, data
compression and encryption/decryption
ASCII, EBCDIC,
JPEG
5. Session
Managing communication sessions, i.e. continuous exchange
of information in the form of multiple back-and-forth
transmissions between two nodes
RPC, PAP
4. Transport
Segments
Reliable transmission of data segments between points on a
network,
includingsegmentation, acknowledgement and multiplexing
TCP, UDP, L2TP
3. Network
Packet/Dat Structuring and managing a multi-node network,
agram
including addressing, routing andtraffic control
Data
Host
layers
Media
layers 2. Data link
1. Physical
Bit/Frame
Bit
Reliable transmission of data frames between two nodes
connected by a physical layer
Transmission and reception of raw bit streams over a physical
medium
http://en.wikipedia.org/wiki/OSI_model
IPv4, IPv6, IPs
ec, AppleTalk
PPP, IEEE
802.2
DSL, USB
What’s the point?
• Encapsulation: Each layer only uses the
service provided by the layer below. It
doesn’t need to be aware of lower layers.
• Each layer provides a service through a
specified interface. The service is
implemented using a protocol – the rules
for communication on that layer.
Ion Stoica: http://www.cs.berkeley.edu/~istoica/classes/cs194/05/notes/2NetRPC.pdf
Example: physical layer
This is one transmission medium
for the Ethernet physical layer.
• The physical layer specifies voltage
levels, timings, coding scheme, etc.
This is the protocol.
• The service it provides is sending bits
between two systems. The interface
says how to send the bit.
http://www.cablera.org/cat5-cable/
http://www.ti.com/product/DP83848C/description
Cat5
RJ45/
8P8C
Ethernet PHY transceiver
Data link layer
The data link layer starts caring about the meaning of
the bits sent.
• The service is sending data units
between two nodes sharing a
physical connection.
• The protocol includes addresses and
frame structure (added bits around
the payload you want to send).
• Also does low-level error detection,
access control and some other things
http://commons.wikimedia.org/wiki/File:Ethernet_NIC_100Mbit_PCI.jpg
Cat5
Ethernet Network
Interface Controller
Network layer
Now we can think of machines not physically connected to
each other.
• This layer puts information in packets
and moves it between destinations
on different networks.
• One protocol: IPV4
• Defines addresses, more headers
This router actually combines tasks of all 3 media layers
http://www.tp-link.com/
By the way..
.
• A hub is a signal repeater. Layer 1
• A switch handles MAC addresses. Layer
2
• A router handles IP addresses to connect
different networks. Layer 3
A “router” is a router, switch, and
access point (sometimes
combined with a modem)
Transport layer
Only at the fourth level we can talk about reliable, end-toend connections.
• Most common: TCP, UDP
• Includes acknowledgement of received messages,
guaranteed arrival (in the case of TCP)
• Can be message (UDP) or stream (TCP) oriented
The service TCP provides to us is a stream of bytes: we know
they will (eventually) arrive, in order. We don’t have to worry
about lower levels.
Application Layer
• Includes protocols used directly by software applications,
e.g. HTTP.
• What happened to Session & Presentation layers?
They’re not present in the IP suite’s (TCP/IP - which we
use) model - so I won’t talk about them.
http://www.hardwaresecrets.com/article/The-OSI-Reference-Model-for-Network-Protocols/431/4
So….
The point is, we don’t have to care about
everything, all at once!
http://www.tcpipguide.com
Our rover: TCP/IP over Wi-fi
• Physical layer: 802.11g “Wi-fi”
– Specifies physical medium (2.4 Ghz radio)
– Specifies signal modulation (frequencydivision multiplexing) and encoding
• New concerns: interference, attenuation,
directional antennas – concerns for comm
team
• Ethernet on board the rover.
See http://www.scs.stanford.edu/08sp-cs144/notes/l12.pdf
Our rover: software
• The computers on the rover and base
station already have network controllers
built in, which take care of layers 1-3. The
operating system gives us an interface to
the Transport Layer.
• So we only use the interface to the
transport layer, and have to use a
protocol at the application layer.
Our rover: software
Does not care
about wired vs.
wireless. Does
not even know!
• Currently we use JSON as
an application protocol.Example:
{‘motor_fl’:12,
‘motor_fr’:0}