Credits:
prtablegm[HF]
This guide is not meant to be all encompassing. It is a reference to
give someone who is interested in network security, but does not know
where to start, some guidance of how to begin learning about the vast
field of network security and where to look for information. The
important thing to keep in mind is stay focused and learn little by
little. It is easy to become intimidated when looking at the big picture
and all that it entails. Focus on each section and gradually increase
your knowledge base.
OSI Layers Explained
The Open Systems Interconnection model
(OSI model) is a product of the Open Systems Interconnection effort at
the International Organization for Standardization. It is a way of
sub-dividing a communications system into smaller parts called layers. A
layer is a collection of similar functions that provide services to the
layer above it and receives services from the layer below it. (That part is a direct quote from Wikipedia for I could not say it better my self)
Physical Layer:
The physical layer is at the bottom of this data networking model. It
deals with crude data that is in the form of electrical signals. The
data bits are sent as 0's and 1's. 0's correspond to low voltage signals
and 1's correspond to high voltage signals. The mechanical aspects of
communication, such as wires or connectors come under this layer. The
physical layer also deals with how these wires, connectors, and voltage
electrical signals work. Also, the process that is required for these
physical aspects are taken into account in this layer itself. Read more
on ethernet cable wiring.
The Data Link Layer:
The transmission of the data over the communication medium is the
responsibility of this layer. The 0's and 1's that are used in the
communication are grouped into logical encapsulation. This encapsulation
is called frames. The data is transported in frames. The responsibility
of these frames is that of the data link layer.
Network Layer:
All over the world, there are many different types of ethernets. These
networks are connected to each other through various media. When a data
packet wants to reach a particular destination, it has to traverse
through these networks. Essentially, there are lot of operations that
are taking place between the connected networks. Also, the packet data
which is traversing, has to choose an optimum route, and the addressing
of these packets has to be proper. The various operations between the
networks, packet data issues, addressing and routing are handled by this
network layer.
Transport Layer:
The transport layer ensures quality and reliability of the
communication. The data packet switching is entirely handled by the
transport layer. There are basically two types of packet switching. They
are connectionless packet switching and connection oriented packet
switching. In connectionless packet switching, the packet data is
allowed to choose the route in which it is going to reach the
destination. Obviously, the packet in itself cant do this. Physical
devices like routers are mainly responsible for the behavior of packets,
but the packets formed from the same datum can reach their destination
in different ways. Whereas, in connection oriented packet switching,
once the route is decided, then all the packets have to follow the same
route. Examples of connectionless packet switching are text messages in
mobile phones, and the example of connection oriented switching is a
direct voice call.
The Sessions Layer:
The sessions layer is mainly responsible for creating, maintaining and
destroying the communication link. PDU (Protocol Data Unit), in which
various protocols are defined, that have to be followed during
communication, are the responsibility of the sessions layer. The
applications that use RPC's (remote procedure calls) are taken care of
by the sessions layer.
Presentation Layer:
There are various techniques of data compression which are used to send
and receive the optimized data. For example, if certain data is
repeating itself for a number of times, then it is logical to send the
data only once, and specify the number of times it is repeated. This
bundling of the repeated data is one of the techniques of compressions.
The compression and decompression of the data is handled by the
presentation layer. Also, encryption and decryption techniques used to
thwart malicious attacks on data are handled by the presentation layer.
Application Layer:
This is the topmost layer of the OSI reference model. This layer comes
into picture when there is a process to process communication. Whenever a
user invokes any application, all the associated processes are run.
Many a times, when an application wants to communicate with another
application, then there has to be communication between these associated
processes. The application layer is responsible for this interprocess
communication.
Thank you Keith Barker for this story.
Title:
King invites King to lunch.
Once upon a time, there were two Kings. King A and King B. They lived in separate kingdoms, kingdom A and kingdom B.
One day, King A, decided to invite King B to a lunch. No telephones were
available, and King A doesn't have to ride a horse all the way over to
kingdom B to personally invite King B, as both kings have a huge staff
of 7 workers. So here is what happens for the invitation.
King A calls for staff member 7, the scribe (
application layer),
and the scribe writes down the message indicating that the local King
A, wants to invite the remote King B to a lunch. The scribe puts this
message into a container, such as an envelope. Staff member 7, the
scribe, then hands it to the next staff member 6, the translator.
Staff member 6, the translator (
presentation layer),
simply ensures that the language that the scribe used, is appropriate
for the language understood by King B?s staff on remote side. The
translator puts the results in another envelope, and hands it to staff
member 5, the negotiator.
Staff member 5, the negotiator (
session layer),
knows how to deal with people, and the rules for engagement for
communicating with other kingdoms. He adds his 2 cents, and puts the
results in yet another envelope. He hands this envelope to staff member
4, to the middle manager.
Staff member 4, the middle manager (
transport layer)
is very concerned about making sure that the envelope it received makes
it all the way to kingdom B. In fact, if the envelope is quite large,
the middle manager, staff member 4, may divide the envelope into 2, and
label them 1 of 2, and 2 of 2 with the intent of getting an
acknowledgment from the middle manager on the remote side (kingdom b),
to verify that all the pieces got there. If the messages are not too
important, the middle manager may just send the information, and not
even ask for an acknowledgment. Depends on the rules for the specific
message. Either way, the middle manager, hands the envelope(s) down to
staff member 3, which is Google maps guy, who only has the ability to
the world from a 5,000 foot view, and no closer.
Staff member 3, looking at the view of the countryside from 5,000 feet (
network layer),
and seeing that the envelope is to be delivered to kingdom b, sees
that kingdom b is absolutely remote, (not local), and adds information
regarding whether the message needs to travel North, South, East or
West. In this example, lets say that staff member 3 made the decision
that the message needs to go east. After adding that, he hands the
envelope to staff member 2, which is the mail room guy.
Staff member 2, the mail room guy (
data link layer),
knowing that the message needs to go east, takes a look at all of his
carriers, (FedEx, UPS, USPS, Carrier Pigeon, etc), and if there is only
1 that is going east, he prepares the message for that carrier. It if
is FedEx, staff member 2 puts the message in the appropriate FedEx
envelope (frame), and puts it in the pile for FedEx pickup.
FedEx isn't really a staff member, but if they were, they would be staff member 1 (
physical layer), who takes the data and causes it to actually leave kingdom A, on its way (finally) to kingdom B.
Now, let's go on a road trip, and see what happens in Kingdom B, when the message arrives there.
The package, finally arrives at kingdom b, and is received at kingdom B's mail room and follows this process:
Mail room receives
L1 via FedEx, or possibly another carrier that FedEx handed off to in transit.
Mail room (
L2)verifies that the package is for us, at this castle based on the house (castle) number, and hands it to google maps guy at L3.
Google maps guy (
L3), looks at the
map and says, yup, this envelope doesn't need to be forwarded to any
remote location, as it is destined to us. I will just remove the google
map info, and hand it up to
L4.
(Note, if the message needed to go to a different street , the google
maps guy would add new information, such as north, south, east or west,
and push it back down to the mail room to be sent.)
Middle manager, (
L4) is nervous, as
the envelope says 1 of 2, and he wants to keep his job. He puts a
sticky note on his monitor, that says look for envelope labeled 2 of 2,
and if that second envelope doesn't arrive, he may take the initiative
to send a little message back to the middle manager at kingdom A,
asking for a resend of that information. As data does arrive, middle
manager removes any information applied by the remote middle manager,
(such as information regarding 1 of 2, and 2 of 2), and pushed the info
up to
L5.
The negotiator, (
L5), understanding
the politics and rules for engagement, accepts the contents of the
envelope, using any special rules that the negotiator on the remote side
may have imposed or recommended. Removing any L5 specific
information, he pushes the rest of the data to
L6.
The translator (
L6) sees that the
sender used English, and our local kingdom understands English. He also
noticed that there was some short hand used by
L6 on the remote side, so the local side decompresses that, and hands the results up to
L7.
The scribe (
L7) takes the message, approaches King B, and reads? King A, invites you to lunch!?
All that for a lunch invitation!
Any ideas on what process happens if King B responds?
Same logic on virtually all media types.
Ways to remember the OSI Model
Please
Do
Not
Trouble
Steve's
Pet
Alligator
Please
Do
Not
Throw
Sausage
Pizza
Away
All
People
Seem
To
Need
Dominos
Pizza
American
Pu**y
Seems
To
Need
Deeper
Penetration
All
People
Seem
To Need
Data
Processing
All
Prostitutes
Seem
To
Need
Double
Penetration
Yes it just keeps going. Whatever it takes to remember the OSI model.
Enjoy...