Sunday, September 11, 2011

Networking


IP Addressing

So what’s a TCP/IP Address?
TCP/IP address works on the Network and Transport layer of the OSI-ISO reference model and Internet model. To understand IP addressing, Let’s take a look at the postal addresses. Every house or building must have its own postal address in order for mail to be delivered. An address consists of house number, street, and city. Every device such as (printers, routers, servers, gateways) needs a unique IP address to be identified in the network.

IP address is a 32-bit of binary number.
00001010 00000111 00000101 00000001
Lots of zeroes and ones are very difficult to remember for humans. In order to understand these zeroes and ones, we have to divide them into octets.
00001010000001110000010100000001
Then, we will convert these binaries into decimal value to obtain 10 . 7 . 5 . 1 as dotted decimal.
Other layer 3 protocols
ProtocolsNetworkNode(hosts)
Novell IPX32 bits48 bits
AppleTalk16 bits8 bits
DECNET6 bits10 bits
Classes of IP Address
ClassesNetworkNode(hosts)
Class A8 bits24 bits
Class B16 bits16 bits
Class C24 bits8 bits
Class Dmulticast addressbits
Class Ereservedbits
To compute for number of networks and hosts:
for Class A
2⁸ = 256 networks
2²⁴ = 16,777,216 hosts
Multicast address – is used for single device transmitting to a group of hosts. Ex. Like video conferencing with single video server sending to multiple hosts.
What class of IP address am I using?
If we going to add all the binaries below of each table, we may be able to distinguish what class of IP address we are using.
Class A
1286432168421…..1286432168421
00000000…..01111111
0 – we cannot use zero because zero is reserved.
127 – as well as this decimal because this is a Loopback address.
Range for Class A : 1 – 126
Class B
1286432168421…..1286432168421
10000000…..10111111
Range for Class B : 128 – 191
Class C
1286432168421…..1286432168421
11000000…..11011111
Range for Class C : 192 – 223
Class D
1286432168421…..1286432168421
11100000…..11101111
Range for Class D : 224 – 239
Host Addressing
Class C
110000001010100000000001xxxxxxxx
1921681?
Number of hosts. For class C, we will use the last octet.
1286432168421
000000000
000000011
000000102
00000000.
11111110254
11111111255
Again, we cannot use zero and 255 as our hosts. Because zero(0) is a network and 255 is the broadcast address. We can understand this later on IP subnetting.
So, the range is 1 – 254.
Subnet masking
Class A255.0.0.0
Class B255.255.0.0
Class C255.255.255.0
A subnet mask is used to show which portion of the IP address identifies the network and which portion identifies a specific host on the network. This seems to be unnecessary since it always identifies the network and hosts. However, this is not true for other networks. That’s why subnet masking is used to differentiate the network portion of the address from the host portion. Can we subnet an existing network? IP subnetting is discussed in next section.

Subnetting

Why do we need to subnet? With subnetting, we can borrow bit/s from host bits as network bits to expand and reduced the traffic in our network. Another reason is SECURITY.
Suppose XYZ company has 5 devices in one of their department that need IP addresses, and the network is 192.168.1.0. The IP address could be assign as follows:
Router: 192.168.1.1
Comp1: 192.168.1.2
Comp2: 192.168.1.3
Comp3: 192.168.1.4
Server: 192.168.1.5
Hosts: 1, 2, 3, 4, 5 are all on the same network 192.168.1.0
Let’s try to look at this class C address of 192.168.1.0 with subnet mask of 255.255.255.0.
The problem:
XYZ company has obtained a class C IP address of 192.168.1.0 and they need four different subnets. How can we do that?
Here are the steps:
Step 1 : We will going to borrow bits from the host bits as network bits.
IP address 192.168.1.0
Subnet mask 255.255.255.0
Let’s try to borrow 1 bit from the host portion. We only have 0 and 1 combination.
0
1286432168421
00000000
1
1286432168421
10000000
So, we obtained a subnet mask of 255.255.255.128 and we now have 2 new networks which is 192.168.1.0 and 192.168.1.128. But, the company needs four subnets. Let’s try to borrow 2 bits at this time. We have four combinations 00, 01, 10, and 11.
00
1286432168421
00000000
01
1286432168421
01000000
10
1286432168421
10000000
11
1286432168421
11000000
This time we can have four subnets:
192.168.1.0
192.168.1.64
192.168.1.128
192.168.1.192
Here’s the table:
Subnet mask: 255.255.255.192
SubnetsNetwork addressHost addressBroadcast address
First subnet192.168.1.0192.168.1.1 – 62192.168.1.63
Second subnet192.168.1.64192.168.1.65 – 126192.168.1.127
Third subnet192.168.1.128192.168.1.129 – 190192.168.1.191
Fourth subnet192.168.1.192192.168.1.193 – 254192.168.1.255
If we need 5 subnets and more, we can always borrow bits from the host bits as a network bits depending the numbers of subnet we want to obtain.
Note: as the number of subnet increases, the number of hosts will decrease in each subnet in the network.

(Cabling) What are Straight and Crossover cable?

Common Ethernet network cable are straight and crossover cable. This Ethernet network cable is made of 4 pair high performance cable that consists twisted pair conductors that used for data transmission. Both end of cable has a connector called RJ45(Registered Jack).
The cable can be categorized as Cat 5, Cat 5e, Cat 6 UTP cable. Cat 5 UTP cable can support 10/100 Mbps Ethernet network, whereas Cat 5e and Cat 6 UTP cable can support Ethernet network running at 10/100/1000 Mbps.
Straight Cable
You usually use straight cable to connect different type of devices. This type of cable will be used most of the time and can be used to:
1) Connect a computer to a switch/hub’s normal port.
2) Connect a computer to a cable/DSL modem’s LAN port.
3) Connect a router’s WAN port to a cable/DSL modem’s LAN port.
4) Connect a router’s LAN port to a switch/hub’s uplink port. (normally used for expanding network)
5) Connect 2 switches/hubs with one of the switch/hub using an uplink port and the other one using normal port.
Straight through cable
Both side (side A and side B) of cable have wire arrangement with same color.
Crossover cable
Sometimes you will use crossover cable, it’s usually used to connect same type of devices. A crossover cable can be used to:
1) Connect 2 computers directly.
2) Connect a router’s LAN port to a switch/hub’s normal port. (normally used for expanding network)
3) Connect 2 switches/hubs by using normal port in both switches/hubs.
Crossover cable
Both side (side A and side B) of cable have wire arrangement with following different color.
If you want to configure a straight or crossover cable, you will need the following tools and materials:
1. UTP cable (probably Cat5, Cat5e or Cat6)
2. RJ45 (connector for both ends of UTP cable)
3. Crimper
4. Wire stripper
5. LAN tester

Peer-to-Peer configuration

P2P is a computer networks in which each computer can act as a server/client for the others, allowing shared access to files and peripherals without the need for a central or dedicated server. Configuring a P2P is simpler than dedicated server network. This type of network is appropriate for home or small businesses with a maximum of 10 computers/devices on the network.
This step-by-step tutorial will guide you on how to configure a P2P network:
How to Set Computer Name and Workgroup in Windows XP
It’s better for you to set computer name and workgroup in Microsoft Windows network in order to identify the computers easier.
Computer name is used to identify your computer in Windows network. It’s especially useful to be used for file sharing.
Each computer must belong to a workgroup also. A workgroup is a group of computers on your network that share common resources. Default workgroup in Windows XP isWORKGROUP.
Follow the instructions here to set computer name and workgroup.
1) Go to Start and right click on My Computer. Click Properties.
2) System Properties window will appear. Select Computer Name tab and click Change to change computer name and workgroup. You can key in computer description as an option also.
3) In this Computer Name Changes window, key in Computer Name and also Workgroup. The Computer name I entered is Carlo and workgroup is WORKGROUP. Click OK at last.
Note: Please make sure computer name is unique in your network, not more then 15 characters and avoid from using this characters for naming your computer name: * “ . , @ /
4) System will prompt you to restart computer. Click OK and restart your computer for the changes to take effect.
5) After computer is restarted, go to System Properties window again and you will see the computer name Carlo and Workgroup WORKGROUP.
How to assign unique IP address to each device in a network?
In this tutorial, we will use a private class C IP address. This tutorial assumes that you have already knowledge in IP addressing and Subnetting. IP addressing is dicussed in this section IP Addressing
1) Go to My Network Places, right click and choose properties.
2) Right click Local Area Connection and tick properties.
3) Local Area Connection dialog box will appear. Double click TCP/IP connection and enter the IP address for that computer.
4) Clicking the subnet mask will automatically gives you a subnet mask. Accept the defualt subnet mask.
That’s it! Follow instructions for your second PC, third PC, and so on. You are now ready to share files and share printer

Simple File Sharing in Windows XP

The reason we want to configure a LAN is Information and Resource sharing. One of the best example of Information sharing is sharing your folder or file in the network. You can do folder and file sharing in your home network, so that they can be read or written by other users. However it’s not advisable to share your folder with write permission, unless it’s really needed.
There are users who prefer to share the drive (C:, D:, E:, etc) in the network, but it’s not recommended. Sharing drive is dangerous, if your computer is not patched, configured and secured properly, your computer will be attacked by virus/trojan easily by sharing the drive. So, the best way is, only share the folder which you need to share. Only assign write permission to folder if really needed.
To make file sharing work better in your network, it’s better to assign all computers to the same workgroup.
Here is how to do it:
Note: Before you start, make sure you’ve enabled File and Printer Sharing for Microsoft Networks on network card’s properties. If not you won’t be able to do file sharing.
1) Let’s start! Open the folder which you plan to share, go to Tools and click Folder Options…. After that go to Viewtab, scroll down in Advanced settings section and make sureUse simple file sharing is enabled (default is enabled). Click OK and close the window.
2) Proceed to right click the folder you wish to share and click Sharing and Security.
Note: If you are logged on as a guest (a guest account provides access to the computer for any user who does not have a user account on the computer), you cannot create a shared folder.
Note: The Sharing option is not available for the Documents and Settings, Program Files, and WINDOWS system folders. In addition, you cannot share folders in other user’s profile.
Note:When you share a folder, you also share all of its subfolders unless you make them private.
3) Your folder Properties will appear. Select Sharing tab and tick Share this folder on the network to share the folder. You can type in a new name in the Share name text box to change your folder name on the network, however this will not change the folder name on your computer. Click Apply.
Note: Don’t tick Allow network users to change my files (give write permission to other users) unless it’s needed.
Note: If the sharing options are grayed out as shown below, this is because the folder is in another folder that is private (don’t allow folder/file sharing). Just click the another folderto disable the private option.
4) Once you have shared the folder, you will see there is a hand supporting your folder. You have successfully shared your folder.

How to Share Printer in Windows XP

Another reason why we want to configure a LAN is resource sharing. One of the best example for this is a printer sharing. Follow this step-by-step instructions to share printer in Windows XP.
1) Go to Start and click Control Panel. Control Panel Window will appear, then double clickPrinters and faxes.
2) Printers and Faxes window will appear. Right click the printer you want to share, then click Sharing…
Note: Make sure you’ve enabled File and Printer Sharing for Microsoft Networks on network card’s properties.
3) Select Sharing tab and tick Share this printer to share the printer. You can type in a new name in the Share name text box to change your printer name on the network, however this will not change the printer name on your computer. Click Apply.
Note: If the other users using different version of Windows to access your printer, they will need to install printer driver themselves. You can help by installing additional printer drivers on your Windows XP, so that the printer driver will be installed when other users access the shared printer with different version of Windows. Click Additional Drivers, tick additional driver you would like to install. You will be prompted to install those additional drivers after clicking OK.
4) Once you have shared the printer, you will see there is a hand supporting your printer.
How to connect to a shared printer?
1) Click Start, and then click Printers and Faxes.
Note: Depending on your computer settings or your version of Microsoft Windows XP, you may have to access the Printers and Faxes option through the Control Panel.
2) In the Printers and Faxes window, click File, and then click Add Printer.
3) On the Welcome to the Add Printer Wizard page, click Next.
4) On the Local or Network Printer page, click A network printer, or a printer attached to another computer, and then click Next.
5) On the Specify a Printer page, click Browse for a printer, and then click Next.
6) On the Browse for Printer page, under Microsoft Windows Network, expand any groups you see by clicking the plus sign next to the group name. Then select your printer. Click Next.
7) In the Connect to Printer dialog box, click Yes.
8) On the Completing the Add Printer Wizard page, click Finish.
You are now ready to print to the network printer, just as you would to a printer that is attached directly to your computer. Repeat these steps for each computer on your home network to connect them to the shared printer.

Networking

IP Addressing So what’s a TCP/IP Address? TCP/IP address works on the Network and Transport layer of the OSI-ISO reference model and Intern...