Senin, 14 Februari 2011

5. Internet Protocol version 4 (IPv4)

Internet Protocol version 4 (IPv4) adalah revisi keempat dalam pengembangan Internet Protocol (IP) dan merupakan versi pertama protokol yang akan banyak digunakan. Together with IPv6 , it is at the core of standards-based internetworking methods of the Internet . Bersama dengan IPv6 , itu merupakan inti dari internetworking berdasarkan metode-standar dari Internet . IPv4 is still by far the most widely deployed Internet Layer protocol. IPv4 masih yang paling banyak digunakan Layer Internet protokol. As of 2011 [update] , IPv6 deployment is still in its infancy. Pada tahun 2011 [update] , IPv6 masih dalam masa pertumbuhan.

IPv4 is described in IETF publication RFC 791 (September 1981), replacing an earlier definition ( RFC 760 , January 1980). IPv4 digambarkan dalam IETF publikasi RFC 791 (September 1981), menggantikan definisi sebelumnya ( RFC 760 , Januari 1980).

IPv4 is a connectionless protocol for use on packet-switched Link Layer networks (eg, Ethernet ). IPv4 adalah protokol connectionless untuk digunakan pada paket-switched Link Layer jaringan (misalnya, Ethernet ). It operates on a best effort delivery model, in that it does not guarantee delivery, nor does it assure proper sequencing or avoidance of duplicate delivery. Beroperasi di pengiriman upaya terbaik model, dalam hal ini tidak menjamin pengiriman, juga tidak menjamin urutan yang tepat atau menghindari duplikasi pengiriman. These aspects, including data integrity, are addressed by an upper layer transport protocol (eg, Transmission Control Protocol ). Aspek-aspek, termasuk integritas data, semua ditangani oleh lapisan atas protokol transportasi (misalnya, Transmission Control Protocol ).

3. IGMPI

Internet Group Management Protocol (disingkat menjadi IGMP) adalah salah satu protokol jaringan dalam kumpulan protokol Transmission Control Protocol/Internet Protocol (TCP/IP) yang bekerja pada lapisan jaringan yang digunakan untuk menginformasikan router-router IP tentang keberadaan group-group jaringan multicast. Sekali sebuah router mengetahui bahwa terdapat beberapa host dalam jaringan yang terhubung secara lokal yang tergabung ke dalam group multicast tertentu, router akan menyebarkan informasi ini dengan menggunakan protokol IGMP kepada router lainnya dalam sebuah internetwork sehingga pesan-pesan multicast dapat diteruskan kepada router yang sesuai. IGMP kemudian digunakan untuk memelihara keanggotaan group multicast di dalam subnet lokal untuk sebuah alamat IP multicast.

Versi-versi IGMP

Hingga saat ini, terdapat dua versi dari protokol IGMP, yakni IGMPv1 (yang didefinisikan dalam RFC 1112) serta IGMPv2 (yang didefinisikan dalam RFC 2236). IGMPv1 hanya mendukung dua jenis pesan IGMP:

  • Host membership report (laporan keanggotaan sebuah host): host akan mengirimkan pesan dengan jenis ini untuk menginformasikan router lokal bahwa host tersebut hendak menerima lalu lintas IP multicast yang ditujukan ke sebuah alamat group multicast tertentu.
  • Host membership query (permintaan keanggotaan sebuah host): router akan mengirimkan pesan dengan jenis ini untuk memberi tahu kepada segmen jaringan lokal tertentu untuk menentukan apakah ada host dalam segmen yang sedang "mendengarkan" (listening) terhadap lalu lintas multicast atau tidak.

IGMPv2 merupakan pembaruan yang dilakukan terhadap IGMPv1, yang menawarkan beberapa jenis pesan IGMP yang baru:

  • Leave group: digunakan oleh host untuk menginformasikan sebuah router bahwa host tersebut merupakan anggota terkhir yang hendak meninggalkan sebuah group multicast sehingga router mengetahui bahwa router tersebut tidak perlu lagi meneruskan lalu lintas multicast IP ke subnet yang bersangkutan.
  • Group-specific query: mirip seperti pesan IGMPv1 Host membership query, kecuali jenis ini akan melakukan pengecekan keanggotaan di dalam sebuah group multicast tertentu.
  • Multicast querier election: pesan yang mengizinkan sebuah router untuk dipilih untuk mengeluarkan pesan IGMPv1 Host membership query kepada sebuah segmen jaringan tertentu.

IGMPv2 kompatibel secara penuh dengan IGMP v1.

2. IPSEC

IPSec (singkatan dari IP Security) adalah sebuah protokol yang digunakan untuk mengamankan transmisi datagram dalam sebuah internetwork berbasis TCP/IP. IPSec mendefiniskan beberapa standar untuk melakukan enkripsi data dan juga integritas data pada lapisan kedua dalam DARPA Reference Model (internetwork layer). IPSec melakukan enkripsi terhadap data pada lapisan yang sama dengan protokol IP dan menggunakan teknik tunneling untuk mengirimkan informasi melalui jaringan Internet atau dalam jaringan Intranet secara aman. IPSec didefinisikan oleh badan Internet Engineering Task Force (IETF) dan diimplementasikan di dalam banyak sistem operasi. Windows 2000 adalah sistem operasi pertama dari Microsoft yang mendukung IPSec.

IPSec diimplementasikan pada lapisan transport dalam OSI Reference Model untuk melindungi protokol IP dan protokol-protokol yang lebih tinggi dengan menggunakan beberapa kebijakan keamanan yang dapat dikonfigurasikan untuk memenuhi kebutuhan keamanan pengguna, atau jaringan. IPSec umumnya diletakkan sebagai sebuah lapsian tambahan di dalam stack protokol TCP/IP dan diatur oleh setiap kebijakan keamanan yang diinstalasikan dalam setiap mesin komputer dan dengan sebuah skema enkripsi yang dapat dinegosiasikan antara pengirim dan penerima. Kebijakan-kebijakan keamanan tersebut berisi kumpulan filter yang diasosiasikan dengan kelakuan tertentu. Ketika sebuah alamat IP, nomor port TCP dan UDP atau protokol dari sebuah paket datagram IP cocok dengan filter tertentu, maka kelakukan yang dikaitkan dengannya akan diaplikasikan terhadap paket IP tersebut.

Dalam sistem operasi Windows 2000, Windows XP, dan Windows Server 2003, kebijakan keamanan tersebut dibuat dan ditetapkan pada level domain Active Directory atau pada host individual dengan menggunakan snap-in IPSec Management dalam Microsoft Management Console (MMC). Kebijakan IPSec tersebut, berisi beberapa peraturan yang menentukan kebutuhan keamanan untuk beberapa bentuk komunikasi. Peraturan-peraturan tersebut digunakan ntuk memulai dan mengontrol komunikasi yang aman berdasarkan sifat lalu lintas IP, sumber lalu lintas tersebut dan tujuannya. Peraturan-peraturan tersebut dapat menentukan metode-metode autentikasi dan negosiasi, atribut proses tunneling, dan jenis koneksi.

Untuk membuat sebuah sesi komunikasi yang aman antara dua komputer dengan menggunakan IPSec, maka dibutuhkan sebuah framework protokol yang disebut dengan ISAKMP/Oakley. Framework tersebut mencakup beberapa algoritma kriptografi yang telah ditentukan sebelumnya, dan juga dapat diperluas dengan menambahkan beberapa sistem kriptografi tambahan yang dibuat oleh pihak ketiga. Selama proses negosiasi dilakukan, persetujuan akan tercapai dengan metode autentikasi dan kemanan yang akan digunakan, dan protokol pun akan membuat sebuah kunci yang dapat digunakan bersama (shared key) yang nantinya digunakan sebagi kunci enkripsi data. IPSec mendukung dua buah sesi komunikasi keamanan, yakni sebagai berikut:

  • protokol Authentication Header (AH): menawarkan autentikasi pengguna dan perlindungan dari beberapa serangan (umumnya serangan man in the middle), dan juga menyediakan fungsi autentikasi terhadap data serta integritas terhadap data. Protokol ini mengizinkan penerima untuk merasa yakin bahwa identitas si pengirim adalah benar adanya, dan data pun tidak dimodifikasi selama transmisi. Namun demikian, protokol AH tidak menawarkan fungsi enkripsi terhadap data yang ditransmisikannya. Informasi AH dimasukkan ke dalam header paket IP yang dikirimkan dan dapat digunakan secara sendirian atau bersamaan dengan protokol Encapsulating Security Payload.
  • protokol Encapsulating Security Payload (ESP): Protokol ini melakukan enkapsulasi serta enkripsi terhadap data pengguna untuk meningkatkan kerahasiaan data. ESP juga dapat memiliki skema autentikasi dan perlindungan dari beberapa serangan dan dapat digunakan secara sendirian atau bersamaan dengan Authentication Header. Sama seperti halnya AH, informasi mengenai ESP juga dimasukkan ke dalam header paket IP yang dikirimkan.

Beberapa perangkat keras serta perangkat lunak dapat dikonfigurasikan untuk mendukung IPSec, yang dapat dilakukan dengan menggunakan enkripsi kunci publik yang disediakan oleh Certificate Authority (dalam sebuah public key infrastructure) atau kunci yang digunakan bersama yang telah ditentukan sebelumnya (skema Pre-Shared Key/PSK) untuk melakukan enkripsi secara privat.

1. ICMP

Internet Control Message Protocol (ICMP) adalah salah satu protokol inti dari keluarga protokol internet. ICMP utamanya digunakan oleh sistem operasi komputer jaringan untuk mengirim pesan kesalahan yang menyatakan, sebagai contoh, bahwa komputer tujuan tidak bisa dijangkau.

ICMP berbeda tujuan dengan TCP dan UDP dalam hal ICMP tidak digunakan secara langsung oleh aplikasi jaringan milik pengguna. salah satu pengecualian adalah aplikasi ping yang mengirim pesan ICMP Echo Request (dan menerima Echo Reply) untuk menentukan apakah komputer tujuan dapat dijangkau dan berapa lama paket yang dikirimkan dibalas oleh komputer tujuan.


Rabu, 26 Mei 2010

TekomC...!!!!!

Judul : Rangkuman sesi 1 - 9
Nama : lukman kamaludin
kelas : 1 ti 1
NRP : 6309074
Prodi : MI
Jurusan : TI
Dosen : dadan nurdin bagenda
Kampus : PKN LPKIA

class

Classes (I)
A class is an expanded concept of a data structure: instead of holding only data, it can hold
both data and functions.
An object is an instantiation of a class. In terms of variables, a class would be the type, and an
object would be the variable.
Classes are generally declared using the keyword class, with the following format:
class class_name {
access_specifier_1:
member1;
access_specifier_2:
member2;
...
} object_names;
Where class_name is a valid identifier for the class, object_names is an optional list of
names for objects of this class. The body of the declaration can contain members, that can be
either data or function declarations, and optionally access specifiers.
All is very similar to the declaration on data structures, except that we can now include also
functions and members, but also this new thing called access specifier. An access specifier is
one of the following three keywords: private, public or protected. These specifiers
modify the access rights that the members following them acquire:
• private members of a class are accessible only from within other members of the
same class or from their friends.
• protected members are accessible from members of their same class and from their
friends, but also from members of their derived classes.
• Finally, public members are accessible from anywhere where the object is visible.
By default, all members of a class declared with the class keyword have private access for all
its members. Therefore, any member that is declared before one other class specifier
automatically has private access. For example:
class CRectangle {
int x, y;
public:
void set_values (int,int);
int area (void);
} rect;
Declares a class (i.e., a type) called CRectangle and an object (i.e., a variable) of this class
called rect. This class contains four members: two data members of type int (member x
and member y) with private access (because private is the default access level) and two
member functions with public access: set_values() and area(), of which for now we have
only included their declaration, not their definition.
Notice the difference between the class name and the object name: In the previous example,
CRectangle was the class name (i.e., the type), whereas rect was an object of type
CRectangle. It is the same relationship int and a have in the following declaration:
int a;
where int is the type name (the class) and a is the variable name (the object).
After the previous declarations of CRectangle and rect, we can refer within the body of the
program to any of the public members of the object rect as if they were normal functions or
normal variables, just by putting the object's name followed by a dot (.) and then the name
of the member. All very similar to what we did with plain data structures before. For example:
rect.set_values (3,4);
myarea = rect.area();
The only members of rect that we cannot access from the body of our program outside the
class are x and y, since they have private access and they can only be referred from within
other members of that same class.
Here is the complete example of class CRectangle:
// classes example
#include
using namespace std;
class CRectangle {
int x, y;
public:
void set_values (int,int);
int area () {return (x*y);}
};
void CRectangle::set_values (int a,
int b) {
x = a;
y = b;
}
int main () {
CRectangle rect;
rect.set_values (3,4);
cout << "area: " << rect.area();
return 0;
}
area: 12
The most important new thing in this code is the operator of scope (::, two colons) included
in the definition of set_values(). It is used to define a member of a class from outside the
class declaration itself.
You may notice that the definition of the member function area() has been included directly
within the definition of the CRectangle class given its extreme simplicity, whereas
set_values() has only its prototype declared within the class, but its definition is outside it.
In this outside declaration, we must use the operator of scope (::) to specify that we are
defining a function that is a member of the class CRectangle and not a regular global
function.
The scope operator (::) specifies the class to which the member being declared belongs,
granting exactly the same scope properties as if this function definition was directly included
within the class definition. For example, in the function set_values() of the previous code,
we have been able to use the variables x and y, which are private members of class
CRectangle, which means they are only accessible from other members of their class.
The only difference between defining a class member function completely within its class and
to include only the prototype and later its definition, is that in the first case the function will
automatically be considered an inline member function by the compiler, while in the second it
will be a normal (not-inline) class member function, which in fact supposes no difference in
behavior.
Members x and y have private access (remember that if nothing else is said, all members of a
class defined with keyword class have private access). By declaring them private we deny
access to them from anywhere outside the class. This makes sense, since we have already
defined a member function to set values for those members within the object: the member
function set_values(). Therefore, the rest of the program does not need to have direct
access to them. Perhaps in a so simple example as this, it is difficult to see an utility in
protecting those two variables, but in greater projects it may be very important that values
cannot be modified in an unexpected way (unexpected from the point of view of the object).
One of the greater advantages of a class is that, as any other type, we can declare several
objects of it. For example, following with the previous example of class CRectangle, we could
have declared the object rectb in addition to the object rect:
// example: one class, two objects
#include
using namespace std;
class CRectangle {
int x, y;
public:
void set_values (int,int);
int area () {return (x*y);}
};
void CRectangle::set_values (int a,
int b) {
x = a;
y = b;
}
int main () {
CRectangle rect, rectb;
rect.set_values (3,4);
rectb.set_values (5,6);
cout << "rect area: " <<
rect.area() << endl;
cout << "rectb area: " <<
rectb.area() << endl;
return 0;
}
rect area: 12
rectb area: 30
In this concrete case, the class (type of the objects) to which we are talking about is
CRectangle, of which there are two instances or objects: rect and rectb. Each one of
them has its own member variables and member functions.
Notice that the call to rect.area() does not give the same result as the call to
rectb.area(). This is because each object of class CRectangle has its own variables x and
y, as they, in some way, have also their own function members set_value() and area()
that each uses its object's own variables to operate.
That is the basic concept of object-oriented programming: Data and functions are both
members of the object. We no longer use sets of global variables that we pass from one
function to another as parameters, but instead we handle objects that have their own data
and functions embedded as members. Notice that we have not had to give any parameters in
any of the calls to rect.area or rectb.area. Those member functions directly used the
data members of their respective objects rect and rectb.
Constructors and destructors
Objects generally need to initialize variables or assign dynamic memory during their process of
creation to become operative and to avoid returning unexpected values during their execution.
For example, what would happen if in the previous example we called the member function
area() before having called function set_values()? Probably we would have gotten an
undetermined result since the members x and y would have never been assigned a value.
In order to avoid that, a class can include a special function called constructor, which is
automatically called whenever a new object of this class is created. This constructor function
must have the same name as the class, and cannot have any return type; not even void.
We are going to implement CRectangle including a constructor:
// example: class constructor
#include
using namespace std;
class CRectangle {
int width, height;
public:
CRectangle (int,int);
int area () {return
(width*height);}
};
CRectangle::CRectangle (int a, int
b) {
width = a;
height = b;
}
int main () {
CRectangle rect (3,4);
CRectangle rectb (5,6);
cout << "rect area: " <<
rect.area() << endl;
cout << "rectb area: " <<
rect area: 12
rectb area: 30
rectb.area() << endl;
return 0;
}
As you can see, the result of this example is identical to the previous one. But now we have
removed the member function set_values(), and have included instead a constructor that
performs a similar action: it initializes the values of x and y with the parameters that are
passed to it.
Notice how these arguments are passed to the constructor at the moment at which the objects
of this class are created:
CRectangle rect (3,4);
CRectangle rectb (5,6);
Constructors cannot be called explicitly as if they were regular member functions. They are
only executed when a new object of that class is created.
You can also see how neither the constructor prototype declaration (within the class) nor the
latter constructor definition include a return value; not even void.
The destructor fulfills the opposite functionality. It is automatically called when an object is
destroyed, either because its scope of existence has finished (for example, if it was defined as
a local object within a function and the function ends) or because it is an object dynamically
assigned and it is released using the operator delete.
The destructor must have the same name as the class, but preceded with a tilde sign (~) and
it must also return no value.
The use of destructors is especially suitable when an object assigns dynamic memory during
its lifetime and at the moment of being destroyed we want to release the memory that the
object was allocated.
// example on constructors and
destructors
#include
using namespace std;
class CRectangle {
int *width, *height;
public:
CRectangle (int,int);
~CRectangle ();
int area () {return (*width *
*height);}
};
CRectangle::CRectangle (int a, int
b) {
width = new int;
height = new int;
*width = a;
*height = b;
}
rect area: 12
rectb area: 30
CRectangle::~CRectangle () {
delete width;
delete height;
}
int main () {
CRectangle rect (3,4), rectb
(5,6);
cout << "rect area: " <<
rect.area() << endl;
cout << "rectb area: " <<
rectb.area() << endl;
return 0;
}