Wednesday, July 7, 2010

MAC Address

MAC Address is also known as the Physical Address.
This address is assigned to a NIC (Network Interface Card) during its manufacture by the manufacturing company  itself.

Its 48 bit address represented in Hexa decimal.
It cannot be changed by the user.
Its Unique.

To see your PCs MAC Address.

Start> Run> cmd
c:\> ipconfig  /all

To See Ip Address

C:\>ipconfig


Eg:  Let A1B2-C3D4-E5F6 be a MAC Address

Here single digit represents 4 bits. Total 12 digits. Hence 48 bit address.
First 24 bits is called as the OUI - Organisational Unique Identifier
OUI is to represent an organistion.
Its also called as Vendor Specific or Device ID or Vendor Assigned.
So with the 24 bits we can identify the manufacturer of the NIC.

The rest 24 bits will be unique for each OUI.

Address

There are two types of Addresses

1. Internet Protocol - IP Address (Logical Address)

2. Media Access Control - MAC Address (Physical Address)


1. IP Address

    32 bit Address

    Can be changed.

    2 Types:

    1. Static IP - IP given by a user to the computer.
    2. Dynamic IP - IP attained by a PC from a DHCP Server

2. MAC Address
   
     48 bit address

     Given by the manufacturer to the NIC (Network Interface Card)

     Cannot be changed.

Frame

A frame is the PDU of layer2 datalink layer.
Frame consists of a header called Preamble just to represent its a frame.
Source MAC
Destination MAC
Data Length
Data
FCS - Frame Check Sequence. A value created by CRC (Cyclic Redundancy Check ) Algorithm

CRC is run on both Source and destination Layer 2.
If the FCS values are same in both, then the frame is accepted by the destination.
If not same it means it has errors and it it is rejected.
SOurce will heve to retransmit the frame again.

Tuesday, July 6, 2010

OSI Model Simplified

Source
Data flows from layer 7 to layer 1
7 - Username and password given - Data
6 - Encrypted and compressed - Formatted Data
5 - Session created with destination PC - Formatted Data
4 - Data simlified as many Segments and send in an order,
      Protocols used to represent application - Segments
3 - Source IP & Destination IP is set on packets - Packets
2 - Source MAC & Destination MAC is set on Frames - Frames
1 - Bits in the format of 0s and 1s - Bits

Destination
Data flows from layer 1 to layer 7
1 - Receives Bits -Bits
2 - Converts to Frames, Verifies the destination MAC address is correct. If not correct its rejected
3 - Frames converted to Packets and verifies the destination IP.
4 - Receives the segments in the order transmitted. If TCP used Acknowledgement send, UDP no acknowledgement.
5 - Session is ended after data transmission and reception is finished.- Formatted Data
6 - Formatted data is decrypted and decompressed.
7 - Original Data received

OSI Model

Layer                                             PDU (Protocol Data Unit)

7 - Application Layer                   Data
                  
6 - Presentation Layer                 Formatted Data

5 - Session Layer                         Formatted Data

4 - Transport Layer                      Segments

3 - Network Layer                       Packets

2 - Datalink Layer                        Frames

1 - Physical Layer                        Bits


These are the7 layers of OSI Model. Data flows from layer 7 to layer 1 in the source and from layer 1 to layer 7 on the destination side.  Data is represented in each layer with each name known as PDU(Protocol Data Unit)

Application layer is the application used by the user such as Internet Explorer or Mozilla firefox or any web browser.
Consider an eg : i am logging to my mail using my user id and password.
Let the user name be "abc" and password be "123"
The username and passsword given is the data which is the PDU of layer 7 Application Layer.

The data should not be sent as clear text to prevent hacking of your accounts.
So the data is formatted by the physical layer. Hence formatted data is the PDU in layer 6.
Physical layer does the functions like compression and encryption.

The function of Session layer is to create a session with the destination. That is like,
you have a doctor and u have to fix the appointment.
Just create a virtual circuit. So here data is not changed at all. So here also PDU is formatted data.
The 3 modes are there for PCs to establish connection. Simplex. Half Duplex And Full Duplex which i have posted earlirer.
http://networkselfstudy.blogspot.com/2010/04/transmission-modes.html


Next comes the transport layer. Transport layer converts the formatted data into segments.
Hence PDU is segments.
There are two types of communication - Reliable, Unreliable.
In transport layer port numbers are used to represent the application.
Consider you have Yahoo on Internet explorer and Google on Firefox.
Your PC represent explorer with a port number and represent firefox with another port number.
Even if you open  a new tab, that will be representedby another port number.
So from the servers reply is sent to the same PCs using the port numbers, thats why you get the yahoo and google on the correct page itself.
There are two protocols for communication.
1. TCP -  Transmission Control Protocol for Reliable communication
2. UDP -  User Datagram Protocol for Un reliable Communication
This layer has the function of sending segments in an order and to receive the segments in the transmitted order itself.

Network Layer converts segments into packets.
So PDU is packets.
 In network layer logical address (IP Address) is used.
Packet forwarding and filtering is the function of this layer.
Source IP and Destination IP is set to the packets which is not changed unless the packet reaches the destination.
Layer 3 device - Router

Datalink layer which is the second layer converts packets into frames. SO PDU is frames.
In data link layer physical address (MAC Address) is used, which is changed during communication.
Layer 2 device - Switch
Frames will be explained in upcoming posts.


In physical layer frames are converted into bits. So PDU is bits.
Bits are transmitted through cables to the destination.
Device - Hub and cables.

Thursday, April 22, 2010

Collision Domain And Broadcast Domain

Collision Domain is the area where the collision occurs during transmission of 2 ports at same time.


When a Broadcast message is send, the devices which all receives that broadcast message is collectively called as a Broadcast Domain.

Wednesday, April 21, 2010

Networking Devices

1. Hub
2. Bridge
3. Switch
4. Router
5. NIC - Network Interface Card.

Crossover & Straight Through

2 types of wires depending on color codes.

Crossover wires have one end configured with 568 A and other end with 568 B.

Straight through wires have both ends configured with either 568 A or both ends with 568 B.

Crossover cables are used to connect same type of devices.
ie; to connect between a DTE and a DTE device.
or to connect between DCE and DCE device.

Straight through cables are used to connect different types of devices.
ie; to connect between a DTE and a DCE device.




* DTE and DCE is explained in one of the older post of the blog.

Color Codes

CAT 6 twisted pair cables contain 4 pairs of wires in it;  ie; 8 wires.

Orange pair - Orange & Orange White.
Green pair - Green & Green White.
Blue pair - Blue & Blue White.
Brown pair - Brown & Brown White.


2 Color Codes


568 - A
Green White
Green
Orange White
Blue
Blue White
Orange
Brown White
Brown

568 - B
Orange White
Orange
Green White
Blue
Blue White
Green
Brown White
Brown

Twisted Pair Cables

2 types of Twisted pair cables.

1. Shielded Twisted Pair (STP)
2. Unshielded Twisted Pair (UTP)

Since shielded twisted pair has an external metal shield and is costly, unshielded twited pairs is used.

UTP
Different categories based on Bandwidth.

Category 1 or CAT 1 - Used for telephone communication, not for data transmission.
Category 2 or CAT 2 - 4 Mbps
Category 3 or CAT 3 - 10 Mbps
Category 4 or CAT 4 - 16 Mbps
Category 5 or CAT 5 - 100 Mbps
Category 5e or CAT 5e - Enhanced model of CAT 5.
Category 6 or CAT 6 - 1 Gbps

Thursday, April 15, 2010

DTE & DCE

Data Terminal Equipment (DTE)

Equipment where a data terminates or originates.
Used in user end devices.
We can terminate or edit data.
Eg: PC, Router.

Data Communication Equipment (DCE)

Equipment which is used for data to communicate to destnation.
Eg: Switch, Modem.

Transmission Modes

There are 3 different transmission modes

1. Simplex
    Message transmission only in one direction. No backward transmission.
    Eg: Radio.

2. Duplex
    Message transmission in both directions; one direction at a time.
    Eg: Wireless walkie talkie (one way transmisson).
    Specified one way transmission because now there is two way transmission wireless walkie talkie.
   
3. Full Duplex
    Message transmission in both directions simultaneously; both directions at a time.
    Eg: Mobile Phone.

Communication Types

3 types :-

1. Unicast
      One to one point.

2. Multicast
      One to many points.

3. Broadcast
      One to all points.

To make it simpler consider a class as an example :
A teacher is a point and each student is a point.
A teacher teaching in class is heard by all students, one to all - Broadcast.
A student was sleeping in class, teacher told that student to stand up, one to one - Unicast.
Some students failed in a test, teacher advicing the failed students to improve, one to many - Multicast.

Classification Based on Topology

Topology is a physical and logical structure of a Network
1. Bus Topology 
     Cable runs from one PCto another.
     One PC sends data. All hosts receives it and accepts only whose network address matches.
     Only one PC can send data at a time.
     The network doesnot fail if one PC fail.
     Break connector or loose connector can make whole network failed.
     Difficult to troubleshoot
     Easy to extend the network; means easy to add or install a new PC to the network.

2. Ring Topology
     All PC have same priority.
     Only one direction.
     Each PC connected to other and finally last PC conected to the first PC.
     Improved version of Bus topology.
     Each PC sends what it receives until final destination arrives.
     Whole network fails if one PC fails.

3. Star Topology
          Cable runs from PC to centralised device.
          Centralised device may be Hub or Switch.
          Easy to add a new PC thus extend network.
          Whole network doesnot fail if a PC fails.
          Major disadvantage is if central device fails whole network fails.

4. Mesh Topology
         Topology in which each node of the network is connected to each of the other nodes in the  network with a point to point link.
         This makes it possible for data to be simultaneously transmitted from a single node to all other.
         Network never goes down.

         Disadvantage : Too costly, complex for practical networks.

5. Tree Topology
         Known as hierarchial network.
         A network based upon physical hierarchial topology must have atleast three levels in hierarchy of the tree, since a network with central root node and only one level would exhibit a star topology.
     
6. Hybrid Topology
         More than one topology comes in a single network.


For images click IMAGE

Tuesday, April 13, 2010

Network Classification Based On AREA

1. Local Area Network (LAN)

    - Network within a single building or single area.
    - A group of computers connected at a single geographic location.
    - eg: Computers connected in a single building or different cabins of single floor are considered to be in a LAN.

2. Metropolitian Area Network (MAN)

   - 2 definitions can be given:

   - Network within a city.
      -OR-
   - Network between two or more cities.

3. Wide Area Network (WAN)

   - Network which contains different gegraphical areas is called as WAN.
     eg: Internet

4. Campus Area Network (CAN)
   - A network within a campus.
   - This connection never go beyond the campus.

5. Personal Area Network (PAN)
   - Introduced befor LAN.
   - If your personal Laptop and your personal mobile connected via bluetooth or through cable, it can be called as a PAN.

6. Storage Area Network (SAN)
   - Architecture to attach many computer storage devices.

Network And Its Classification

Interconnection of computers is called a Network.
Interconnection of 2 or more computers can be called as a Network.

Network Classification

1. Based on Area:

LAN - Local Area Network
MAN - Metropolitian Area Network
WAN - Wide Area Network
PAN - Personal Area Network
CAN - Campus Area Network
SAN - Storage Area Network

2. Based on Connectivity:

Wired
Wireless

3. Based on Topology

Bus Topology
Ring Topology
Star Topology
Tree Topology
Mesh Topology
Hybrid Topology