Thursday, February 5, 2009

CROSS CABLE

How To Make a Crossover Cable



Introduction

This document shows how to properly construct a Crossover network cable. This cable can be used to directly connect two computers to each other without the use of a hub or switch. The ends on a crossover cable are different from each other, whereas a normal 'straight through' cable has identical ends. Their uses are shown in the following diagram.









  • Typically the ports on a hub are MDIX ports. This allows the machine at the other end to utilize its MDI Port (which is what typically a NIC card uses) without the need for a crossover cable. When I say that the ports on the hub are MDIX ports, what I mean is that one of the functions of the hub is to automatically perform the crossover functions, which are required to properly align the cables with each other. When no hub or switch is used, your cable itself must physically perform these crossover functions.
    To expand on this a little, when using a hub or switch, the Transmit wires on the workstation need to be connected to the Receive wires on the hub; likewise, the Receive wires on the hub need to be connected to the Transmit wires on the workstation. But if you remember what we stated earlier - cables which are run from PC to Hub are 'straight through' type cables. This is because the hub is providing the required crossover functions internally for you. Thus, when you connect two machines together without the use of a hub or switch, a crossover cable is required - because both 'ends' are essentially the same - a NIC Card. The crossover function must take place somewhere, and since there is no hub or switch to do it for you, the cable must.


  • Now that we know what a crossover cable is for, let's talk for a few about types of cabling. The two most common unshielded twisted-pair (UTP) network standards are the 10 Mbit (10BASE-T Ethernet) and the 100Mbit (100BASE-TX Fast Ethernet). In order for a cable to properly support 100 Mbit transfers, it must be rated Category 5 (or CAT 5). This type of low loss extended frequency cable will support 10 Base T, 100 Base-T and the newer 100VG-AnyLAN applications. Other types of cabling include Category 3 which supports data rates up to 16 Mbps, and Category 1 which only supports speeds up to 1Mbps. The cable we are about to make is considered Category 5, and will work on both 10 Mbit and 100 Mbit systems, assuming all components used (cables and jacks) are rated for Category 5.


What you need Cable




- Be sure the cable(s) you are using is properly rated for CAT 5. It should state clearly on the jacket of the cable, what it is rated at. One option that you have when selecting your cable is to use a pre-made normal 'straight through' cable, and simply whack off one of the ends, and replace with a new "Crossed Over" end. For the purpose of this article, though, we aren't going to go that route. We are going to make the whole thing from scratch - using bulk CAT 5 cable.



Connectors - Crossover cables are terminated with CAT 5 RJ-45 (RJ stands for "Registered Jack") modular plugs. RJ-45 plugs are similar to those you'll see on the end of your telephone cable except they have eight versus four contacts on the end of the plug. Also, make sure the ends you select are rated for CAT 5 wiring. There are also different types of jacks which are used for different types of cabling (such as Solid Core wire). Make sure you buy the correct jacks for your cabling.
Crimper - You will need a modular crimping tool. My advice on what brand to get? Well, I really don't have a preference at this point, but make sure you buy a good one. If you spend about 40 to 50 bucks, you should have one that will last ya a lifetime. Spend 10 to 20 bucks, and you might be able to make a few cables with it if you're lucky. You definitely get what you pay for when it comes to crimpers!
Stripper - No I'm not talking about what Spot had at his bachelor party, I am talking about a tool to strip the ends off the wires you pervert! There are several specialized tools, which can be used to strip the jackets off of cabling. If you do not have access to one of these tools, cautious use of a razor blade or knife should work just fine - but keep in mind if you go the razor blade / knife route, extra special care must be used as to not damage the wires inside the jacket.
Cutters - You need a pair of cutters that will allow you to cut a group of cables in a straight line. It is very important that all the wires are the same lengths, and without proper cutters, this can be a difficult task.


Creating a crossover cable


To make a crossover cable, you use two different wiring orders for each end. On one end use the standard color order: White/Orange-Orange,White/Green-Blue,White/Blue-Green,White/Brown-Brown (See picture on the right).
Clue: It doesn't really matter what you do with the brown and blue pairs since only the orange and green pairs are used for standard network data transmission.
For the other end, switch the location of the orange and green pairs (so you switch white-orange with the white-green, and switch the solid orange with the solid green giving you the color order: White/Green-Green,White/Orange-Blue,White/Blue-Orange,White/Brown-Brown.


Doing the deed


1) - Start by stripping off about 2 inches of the plastic jacket off the end of the cable. Be very careful at this point, as to not nick or cut into the wires, which are inside. Doing so could alter the characteristics of your cable, or even worse render is useless. Check the wires, one more time for nicks or cuts. If there are any, just whack the whole end off, and start over.


2) - Spread the wires apart, but be sure to hold onto the base of the jacket with your other hand. You do not want the wires to become untwisted down inside the jacket. Category 5 cable must only have 1/2 of an inch of 'untwisted' wire at the end; otherwise it will be 'out of spec'. At this point, you obviously have ALOT more than 1/2 of an inch of un-twisted wire, but don't worry - well take care of that soon enough


3) - Up to this point, things have been pretty easy. Things will get a little bit tricky here, but don't worry, we'll get through this together. We are at a point in this article where a decision needs to be made. You need to decide which end of the cable you are making at this point in time. If you are making your cable from scratch like I am doing while writing this article, you have 2 end jacks, which must be installed on your cable. If you are using a pre-made cable, with one of the ends whacked off, you only have one end to install - the crossed over end. Below are two diagrams, which show how you need to arrange the cables for each type of cable end. Decide at this point which end you are making and examine the associated picture below.



Begin to untwist the twisted exposed wires on your cable. Use caution so that you do not untwist them down inside the jacket. Once you have all the wires untwisted begin to arrange them in the proper order based on the pictures above. This stage can be a pain in the ass, especially some of the middle wires. Once you get all the wired arranged in the proper order, make sure your wire cutters are within reach then grasp them right at the point where they enter the jacket. Make sure you keep them in the proper order! Grab your cutters now. Line them up along your prepared wires about 1/2 inch above the jacket. Be sure at this point that you are both 1/2 inch above the jacket, and that your cutters are aligned straight across the wires. You want to make a clean cut here - also make sure you don't let go of that jacket / wires!


4) - Don't worry. From this point forward things get a lot easier. Grab your jack, and begin to slide the wires into the jack. Once you get to the point where the jacket begins to enter the jack things might get a little tough, but just have some patience and hold onto those wires. It will fit in there just fine. Once it is in as far as it will go the wires should extend almost to the front of the jack, and about 3/8 of an inch of the jacket will be inside the jack. Like the pictures below.


5) - Grab those crimpers - because not all crimpers are exactly the same your pictures may not match exactly what you see below. Be sure to keep a good grip on that jack and the cable. Insert the jack into the crimper. It should only go in one way, so you don't have a whole lot to worry about inserting it. Begin to compress those crimpers. You will more than likely hear a clicking sound. Keep squeezing. If you try to let go to early, nothing will happen. They will not release. Keep going until they stop clicking / stop moving all together. At this point, you should be able to let go of the jack, and the crimpers. The crimpers should release now leaving you with a crimped jack. If the crimpers do not release, you probably are a wimp and didn't press hard enough. Go ask your mom to help you at this point. She can probably finish what you started.





6) - It's time to examine what we have done. If you look at the end of the jack (distal), you should see that the copper connectors should not be pressed down into the wires. Toward the back of the jack (where the jacket meets the jack) it should be crimped securely holding the jacket / cable in the jack. If something has gone wrong, don't worry, its not the end of the world. Grab those cutters, and just whack the whole jack off and start back at step 1 (a pain in the ass I know, but its better to have a cable that works, than to spend hours trouble shooting your PC trying to figure out why you can't see the other machine). If everything is cool, all you have to do now is make the other end of the cable (unless you are using a pre-fab cable and have whacked one of the ends off), so go back to step one, and make the other end now.



In closing

You should now have a fully functional CAT 5 Crossover cable. It's a good idea to label it as such, especially if you have a lot of other cables lying around. So what are ya waiting for... install the cable and test it out. If it doesn't work, double-check the ends. There is always a possibility that you have overlooked something. If so just whack the bad end and make new one. Remember the more jacks you install, and the more cables you make, the easier it gets. It's really not that hard to do, the first time is definitely the most difficult.

Here are a few other things to keep in mind...
-Maximum Cable length for including connectors is 100 meters (or about 328 feet).
-Do not allow the cable to be sharply bent, or kinked, at any time. This can cause permanent damage to the cables' interior.
-Do not overtighten cable ties .
-Do not use excessive force when pulling cable through floors, walls or ceilings.
-Do not use staples to secure category-5 cable, use the proper hangers, which can be found at most hardware stores.
















Wednesday, February 4, 2009

DNS

Domain Name Service (DNS)


Setiap host dikenali oleh komputer dengan IP Address-nya. nomer-nomer. Domain Name Serice ditemukan untuk memudahkan manusia dalam mengingat sebuah
hostname.
1. Prinsip Kerja DNS
2. Kenapa Harus Menggunakan DNS?
3. Implementasi Host Table
4. Top Level Domain dan Sub-Domain.
5. Konfigurasi DNS server
· Konfigurasi boot script DNS server
· Konfigurasi Caching-only Server (Konfigurasi minimal)
· Primary dan Secondary server
· Reverse Domain Server
· Konfigurasi Zona File DNS untuk Mapping Host ke IP Address
· Konfigurasi Zona File DNS untuk Reverse Address
· Konfigurasi Cache File
6. Start DNS server
7. Konfigurasi Resolver
8. Menggunakan utility nslookup
9. DNS dan Sendmail
10. Pemeliharaan dan updating data DNS

Prinsip Kerja DNS

Domain Name Service (DNS) merupakan salah satu aplikasi TCP/IP yang dibangun untuk melayaniinformasi tentang semua host yang terhubung dalam jaringan TCP/IP. Aplikasi ini dimplementsikan denganmenggunakan software Berkeley Internet Name Domain (BIND). Software ini merupakan software clientserver. Software client disebut resolver yang berisikan queri-queri informasi tentang suatu domain danmengirimkan queri tersebut ke server. Software server adalah software yang menjawab queri dari clientdan akan memberikan informasi sesuai dengan yang diinginkan. Informasi yang disediakan terdiri dari IPaddress, Canonical Name, Mail Exchanger, Informasi Hardware, Sistem Operasi yang digunakan danNetwork Service yang disediakan oleh masing-masing host.

Sisi client dari DNS adalah resolver. Apabila ada permintaan dari user untuk melakukan hubungandengan remote host maka resolver akan mencari IP address dari host yang akan dituju dan mengirimkanqueri ke DNS server. Apabila DNS server mempunyai data dari remote host tersebut maka DNS serverakan mengirimkannya ke client. Setelah mendapatkan IP address remote host yang dituju, maka hosttersebut akan mencari routing ke remote host dan selanjutnya akan membuka hubungan dengan remotehost. Resolver juga digunakan untuk aplikasi-aplikasi TCP/IP lainnya seperti FTP (File Transfer Protocol),SMTP (Simple Mail Transfer Protocol), RLOGIN (Remote Login), Finger, PING dll.


Kenapa Harus Menggunakan DNS ?
Setiap host pada jaringan TCP/IP dikenali dari IP addressnya. Setiap host mempunyai IP address yang unik dan IP address
tidak tergantung dari antarmuka jaringan dan sistem operasi jaringan.

fungsi nama-nama host di jaringan :
1. Pemeliharaan yang bersifat lokal
2. Data-data host dapat diakses secara global.
3. Manajemen yang bersifat desentralisasi.
4. Updating data bersifat lokal.
5. Tidak ada komputer dengan hostname yang sama di seluruh jaringan.


Konfigurasi DNS Server


DNS Server adalah adalah suatu host yang berfungsi sebagai penyedia informasi tentang seluruh hosthostdi jaringan. Informasi tersebut terdiri dari IP address, Mail server dan Informasi hardware dan sistem operasi masing-masing host.


file-file yang diperlukan untuk menjalankan DNS server adalah :
¨ /etc/named (executable file)
¨ /etc/named.boot (script file) adalah default
¨ zona file.


Konfigurasi boot script DNS Server


  • Pada saat akan menjalankan named maka diperlukan suatu file script untuk menjalankan DNS server. File script ini berisi tentang informasi domain yang ditangani oleh DNS server tersebut. Sebuah DNS server dapat menangani beberapa domain sekaligus. File script default yang digunakan adalah /etc/named.boot.

  • Command yang digunakan pada named.boot ini adalah :
    directory -Mendefenisikan directory tempat penyimpanan zona file
    primary - Mendeklarasikan DNS server sebagai primary untuk domain tertentu
    secondary - Mendeklarasikan DNS server sebagai secondary untuk domain tertentu
    cache - Mendefenisikan cache file
    forwarders - Mendefenisikan daftar server untuk meneruskan queri dari client
    slave - Memfungsikan DNS server hanya menggunakan forwarder


Primary Server dan Secondary Server


Apabila suatu DNS server menangani dan memelihara suatu zona file untuk domain tertentu yang artinya bahwa perubahan host pada domain ini diupdate pada DNS server tersebut, maka DNS server ini disebut sebagai primary server. Misalkan dns.paume.itb.ac.id adalah primary server untuk domain itb.ac.id maka setiap ada penambahan dan perubahan host di domain itb.ac.id harus langsung di update pada zona file itb.ac.id.


Secondary server adalah DNS server yang tidak memelihara langsung zona file dari suatu domain.Secondary server akan mengupdate zona file dari primary server. Proses updating secondary server dari
primary server disebut zona transfer. Secondary server digunakan untuk mengurangi traffic query permintaan ke primary server. Client cukup mengirim query ke secondary server. Setiap ada perubahan pada primary server akan diupdate secara otomatis oleh secondary server.


  1. Reverse Domain Server


Reverse domain biasanya diperlukan untuk menyimpan informasi
ataupun statistik untuk disimpan dalan satu log file. Disamping itu reverse domain juga diperlukan untuk security jaringan (authorization check). Bila menggunakan host table (/etc/hosts) maka pemetaan hostname ke IP address merupakan pemetaan satu ke satu. Resolver akan mencari hostname pada host tabel secara sekuensial.


Konfigurasi Zona File DNS untuk Mapping Host ke IP Address


Zona file menggunakan suatu standard penulisan record untuk penulisan informasi suatu domain. Standard penulisan ini disebut Standard Resource Records.
Standard Resource Records yang digunakan adalah sebagai berikut :


  • Start of Authority Record (SOA)
    Fungsi Mendefenisikan hostname yang merupakan awal dari suatu zone. Untuk setiap zone hanya mempunyai sebuah SOA. SOA biasanya dideklarasikan pada awal zona file.
    Format [zone] IN SOA origin contact (
    serial
    refresh
    retry
    expire
    minimum
    )
  • Komponen SOA record terdiri dari :
    zone
    contact

2.Name Server Record (NS)

Fungsi NS record merupakan identifikasi authoritative server untuk suatu zona. Authoritativeserver untuk suatu zona sebaiknya lebih dari satu sebagai tindakan preventif apabilaprimary master server tidak bisa diakses oleh secondary server.

Format [domain] IN NS server

Komponen Name Server Record

domain Authoritative server untuk domain ini adalah DNS server yang tertulis pada komponenserver.server Hostname dari komputer yang merupakan authoritative DNS server untuk domain yangtercantum pada komponen domain. Komponen ini ditulis secara FQDN.

3. Address Record (A)
Fungsi Untuk memetakan hostname ke IP address.
Format [host] IN A address

4. Mail Exchanger Record (MX)

Fungsi MX record digunakan untuk menredirect mail untuk suatu host ataupun suatu domain ke
host yang berfungsi sebagai mail server. MX record sangat berguna untuk suatu domain yang tidak menjalankan mail software. Mail yang ditujukan untuk host-host yang terdapat pada domain ini akan di redirect ke host yang menjalankan mail software.
Format [name] IN MX preference host

5.Canonical Name Record (CNAME)
Fungsi Mendefenisikan alias name atau nickname untuk suatu host.
Format nickname IN CNAME host

6. Well Known Services Record (WKS)

Fungsi Memberikan informasi tentang layanan-layanan yang disediakan oleh tiap-tiap host.Format [host] IN WKS address protocol services


DNS dan Mail


  • Dalam Standard Resource Record terdapat MX (Mail Exchanger) record yang digunakan dalam proses pengiriman electronic mail. Kegunaan MX record dapat dijelaskan sebagai berikut :
    Bila suatu remote host akan mengirimkan mail dan remote system tersebut dapat menggunakan MX Record maka remote host akan mencari nilai preference terendah (prioritas tertinggi) MX Record dari host tujuan. Remote host akan berusaha mengirim mail tersebut ke mail server dengan prioritas tertinggi.

  • Apabila host dengan prioritas tertinggi tidak memberikan respon maka remote host akan berusaha mengrim ke mail server dengan prioritas kedua. Apabila proses ini masih gagal maka remote host akanm mencari semua mail server yang ada pada MX record untuk host tersebut. Apabila suatu host tidak mempunyai MX record maka remote host akan berusaha mengirimkan mail langsung ke host tujuan. Hal ini tidak disarankan, karena ada kemungkinan suatu host tidak dapat diakses karena link terputus ataupun sedang dalam kondisi perawatan. sebaiknya setiap host mempunyai MX Record.

Kelebihan DNS

1. Mudah, DNS sangat mudah karena user tidak lagi direpotkan untuk mengingat IP address sebuah komputer, cukup host name.

2. Konsisten, IP address sebuah komputer bisa saja berubah, tapi host name tidak harus berubah.

3. Simple, DNS server mudah untuk dikonfigurasikan (bagi admin).

Kekurangan DNS

1. User tidak dapat menggunakan nama banyak untuk mencari nama domain baik di internet maupun di intranet.