Tuesday, 15 November 2016

10-Types Of IP address

IP address types :

1-Private IP Address
2-Public IP Address


Private IP Address Ranges  :(NO money required to buy, free ip )
There are three ranges of addresses that can be used in a private network (e.g. your home LAN,offices ). These addresses are not rout-able through the Internet.but you can't be able to use the internet using this ip address exceptionally , Because These ip's are not rout-able over the internet .
So in such kind of cases you need to use translation mechanism , which will be translated your private IP address to public IP.

Class A – 10.0.0.0 to 10.255.255.255 (1 network)
Class B – 172.16.0.0 to 172.31.255.255 (16 networks)
Class C – 192.168.0.0 to 192.168.255.255 (256 networks)
Public  IP Address Ranges  :

I have already discussed in my previous blog for  every host on a network requires a unique IP address. This is easily manageable in a small network but not a network as large as the Internet. The Internet Assigned Numbers Authority (IANA) is responsible for managing and distributing IP addresses. The IANA has created 5 address registrars in five locations of the world. ISPs and large organizations purchase the addresses from these registrars. The end user in turn gets the IP address from the ISP. These purchasable IP addresses are called public addresses and are routable on the Internet. Every host on the Internet has one of these addresses, This is the IP you need to purchage from the service provider or directly from IANA.and also it's very costly to you

Loop Back Ip address:

If you will talk about For IPv4, the loopback interface is assigned all the IPs in the 127.0.0.0/8 address block. That is, 127.0.0.1 through 127.255.255.254 all represent your computer. For most purposes, though, it is only necessary to use one IP address, and that is 127.0.0.1. This IP has the hostname of localhost mapped to it.


Sunday, 13 November 2016

9-IP Address

IP address divided into 5 classes :


1-Class A   Ranges from   (0-127)
2-Class B  
Ranges from   (128-191)
3-Class C  Ranges from   (192-223)
4-Class D   Ranges from  (224-239)
5-Class E   Ranges from   (240-255)



1-Class A   Ranges from   (0-127).

This IP series is basically user for LAN and WAN as well for purpose of communication between
the networking devices . 


2-Class B  Ranges from   (128-191)

This IP series is also basically user for LAN and WAN as well for purpose of communication between the networking devices .

3-Class C  Ranges from   (192-223)

This IP series is also  basically user for LAN and WAN as well for purpose of communication between the networking devices .


4-Class D   Ranges from  (224-239)

This Address is used for to communicate with multiple device at at time within a group In multi casting data is not destined for a particular host, that is why there is no need to extract host address from the IP address, and Class D does not have any sub net mask


5-Class E   Ranges from   (240-255)

This Address is used by IANA for experiment purpose. This IP Class is reserved for experimental purposes only for R&D or Study. IP addresses in this class ranges from 240.0.0.0 to 255.255.255.254. Like Class D, this class too is not equipped with any subnet mask.



8-Types Of Communications.

In an IPv4 Network , The hosts can communicate one of three different ways.


(1)Uni-cast Communication 
(2)Broadcast Communication
(3)Multicast Communication 




Uni-cast Communication :

This types of communication represents a single LAN interface, It means . A uni-cast frame will be sent to a specific destination address only , It does not send anything  a group of devices on the network.


(2)Broadcast Communication:

This types of communication represents all device on the LAN.A broadcast  Frames sent to a broadcast address will be delivered to all devices on the network .


If you will talk about switch network then , The broadcast address has the value of FFFF.FFFF.FFFF (all binary ones). The switch will flood broadcast frames out all ports except the port that it was received on.



(3)Multicast Communication :

This types of communication represents a group of devices in a LAN. A multicast frame sent to a multicast address will be forwarded to a group of devices in the network .


I hope this picture will make you understand much more in details.









Thursday, 10 November 2016

7-Media Types.

Media Types


1-Copper cables(UTPcables &Co-axial )
2-Fiber Optic Cables
3-Wireless (RF Signals)





1-Copper cables(UTP Cables)


This cable is used for connecting the devices in LAN basically . and It can support up to 100 mts. there are two types of alignment in this type of cables 

(i)Straight cable
(ii)Cross Cable




(i)Straight cable

UTP straight cable to connect two dis-similar device like, switch to router ,router to PC , PC to switch etc..

(i)Straight cable Color Coding




(ii)Cross Cable

UTP straight cable to connect two similar device like, switch to switch ,router to router , PC to PC etc..



Co-axial Cable


This Cable is basically used in television . And sometimes it's used in LAN and WAN.
It supports in between 200-500 mts.


Fiber Optics:-

This Cable is mostly  used in WAN for longer distances  . And sometimes it's used in LAN and WAN.

It uses light signal and also it can send signal over long distances at higher bandwidth .

Wireless LAN:-

This device uses the Rf signal to connecting the devices in the LAN With out having

any physical wire.





6-Encapsulation

The method “encapsulation” is used to describe a process of adding headers and trailers around some data. For example, when you send something over the internet and how the data is forwarding from Application layer to the Transport layer. The Transport layer encapsulates the data and adds its own header (with its own information, such as which port will be used) and passes the data to the Internet layer, which again encapsulates the received data and adds its own header, usually with information about the source and destination IP addresses. The Internet layer than passes the data to the Network Access layer. This layer is the only layer that adds both a header and a trailer. The data is then sent through a physical network link.

Each layer adds its own information:
encapsulation

The term “decapsulation” refers to the process of removing headers and trailers as data passes from lower to upper layers. This process happens on a computer that is receiving data.
Frame, packet, segment

Frame – the term “frame” refers to the encapsulated data defined by the Network Access layer. A frame can have a header and a trailer that encapsulate a data section.

Packet – the term “packet” is used to describe the encapsulated data defined by the Internet layer. A packet can have a header with the source and destination IP addresses.

Segment – the term “segment” describes encapsulated data defined by the Transport layer. A segment can have a header with informations such as source and destionation port numbers, sequence and acknowledgment numbers, etc.

Wednesday, 9 November 2016

5-TCP/IP Model

Introduction:

----------------


Tcp/IP is the common protocol used between computers and network devices for communication.
And if you will talk about the internet , This is the correct example of this model. Internet work
based on TCP/IP.



Application Layer:-

This layer of the TCP/IP model consists various protocol This includes interaction with the application, data translation and encoding, dialogue control and communication coordination between systems

The following are few of the most common Application Layer protocols used today:

TELNET:-

Telnet is a terminal emulation protocol used to access the resources of a remote host.
It is a text-based connection and usually provides access to the command line interface of the host. Remember that the application used by the client is usually named telnet also in most operating systems. You should not confuse the telnet application with the Telnet protocol.


HTTP:-

The Hypertext Transfer Protocol is foundation of the World Wide Web. It is used to transfer Webpages and such resources from the Web Server or HTTP server to the Web Client or the HTTP client. When you use a web browser such as Internet Explorer or Firefox, you are using a web client. It uses HTTP to transfer web pages that you request from the remote servers


FTP –

File Transfer Protocol is a protocol used for transferring files between two hosts. Just like telnet and HTTP, one host runs the FTP server application (or daemon) and is called the FTP server while the FTP client runs the FTP client application. A client connecting to the FTP server may be required to authenticate before being given access to the file structure. Once authenticated, the client can view directory listings, get and send files, and perform some other file related functions. Just like telnet, the FTP client application available in most operating systems is called ftp. So the protocol and the application should not be confused.

SMTP –

Simple Mail Transfer Protocol is used to send e-mails. When you configure an email client to send e-mails you are using SMTP. The mail client acts as a SMTP client here. SMTP is also used between two mails servers to send and receive emails. However the end client does not receive emails using SMTP. The end clients use the POP3 protocol to do that.

TFTP –

Trivial File Transfer Protocol is a stripped down version of FTP. Where FTP allows a user to see a directory listing and perform some directory related functions, TFTP only allows sending and receiving of files. It is a small and fast protocol, but it does not support authentication. Because of this inherent security risk, it is not widely used.

DNS –

Every host in a network has a logical address called the IP address (discussed later in the chapter). These addresses are a bunch of numbers. When you go to a website such as www.cisco.com you are actually going to a host which has an IP address, but you do not have to remember the IP Address of every WebSite you visit. This is because Domain Name Service (DNS) helps map a name such as www.cisco.com to the IP address of the host where the site resides. This obviously makes it easier to find resources on a network. When you type in the address of a website in your browser, the system first sends out a DNS query to its DNS server to resolve the name to an IP address. Once the name is resolved, a HTTP session is established with the IP Address.

DHCP –

As you know, every host requires a logical address such as an IP address to communicate in a network. The host gets this logical address either by manual configuration or by a protocol such as Dynamic Host Configuration Protocol (DHCP). Using DHCP, a host can be provided with an IP address automatically. To understand the importance of DHCP, imagine having to manage 5000 hosts in a network and assigning them IP address manually! Apart from the IP address, a host needs other information such as the address of the DNS server it needs to contact to resolve names, gateways, subnet masks, etc. DHCP can be used to provide all these information along with the IP address.

Transport Layer-

segments great chunks of data received from the upper layer protocols. Establishes and terminates connections between two computers. Used for flow control and data recovery


Two protocols available in this layer are Transmission Control Protocol (TCP) and User Datagram Protocol  (UDP). TCP is a connection oriented and reliable protocol that uses windowing to control the flow and provides ordered delivery of the data in segments. On the other hand, UDP simply transfers the data without the bells and whistles. Though these two protocols are different in many ways, they perform the same function of transferring data and they use a concept called port numbers to do this. The following sections cover port numbers before looking into TCP and UDP in detail.

Port Numbers

A host in a network may send traffic to or receive from multiple hosts at the same time. The system would have no way to know which data belongs to which application. TCP and UDP solve this problem by using port numbers in their header. Common application layer protocols have been assigned port numbers in the range of 1 to 1024. These ports are known as well-known ports. Applications implementing these protocols listen on these port numbers. TCP and UDP on the receiving host know which application to send the data to based on the port numbers received in the headers.

On the source host each TCP or UDP session is assigned a random port number above the range of 1024. So that returning traffic from the destination can be identified as belonging to the originating application. Combination of the IP address, Protocol (TCP or UDP) and the Port number forms a socket at both the receiving and sending hosts. Since each socket is unique, an application can send and receive data to and from multiple hosts. Figure 1-10 shows two hosts communicating using TCP. Notice that the hosts on the left and right are sending traffic to the host in the center and both of them are sending traffic destined to Port 80, but from different source ports. The host in the center is able to handle both the connections simultaneously because the combination of IP address, Port numbers and Protocols makes each connection different.


Reliable Delivery with Error recovery – When the destination receives the last segment in the agreed window, it has to send an acknowledgement to the source. It sets the ACK flag in the header and the acknowledgement number is set as the sequence number of the next byte expected. If the destination does not receive a segment, it does not send an acknowledgement back. This tells the source that some segments have been lost and it will retransmit the segments. Figure 1-13 shows how windowing and acknowledgement is used by TCP. Notice that when source does not receive acknowledgement for the segment with sequence number 2000, it retransmits the data. Once it receives the acknowledgement, it sends the next sequence according to the window size.

 Ordered Delivery – TCP transmits data in the order it is received from the application layer and uses sequence number to mark the order. The data may be received at the destination in the wrong order due to network conditions. Thus TCP at the destination orders the data according to the sequence number before sending it to the application layer at its end. This order delivery is part of the benefit of TCP and one of the purposes of the Sequence Number.

Connection Termination – After all data has been transferred, the source initiates a four-way handshake to close the session. To close the session, the FIN and ACK flags are used.


User Datagram Protocol (UDP)


The only thing common between TCP and UDP is that they use port numbers to transport traffic. Unlike TCP, UDP neither establishes a connection nor does it provide reliable delivery. UDP is connectionless and unreliable protocol that delivers data without overheads associated with TCP. The UDP header contains only four parameters (Source port, Destination Port, Length and Checksum) and is 8 bytes in size.

At this stage you might think that TCP is a better protocol than UDP since it is reliable.  However you have to consider that networks now are far more stable than when these protocols where conceived. TCP has a higher overhead with a larger header and acknowledgements. The source also holds data till it receives acknowledgement. This creates a delay. Some applications, especially those that deal with voice and video, require fast transport and take care of the reliability themselves at the application layer. Hence in lot of cases UDP is a better choice than TCP.

Internet Layer

Once TCP and UDP have segmented the data and have added their headers, they send the segment down to the Network layer. The destination host may reside in a different network far from the host divided by multiple routers. It is the task of the Internet Layer to ensure that the segment is moved across the networks to the destination network.

 The Internet layer of the TCP/IP model corresponds to the Network layer of the OSI reference model in function. It provides logical addressing, path determination and forwarding.

The Internet Protocol (IP) is the most common protocol that provides these services. Also working at this layer are routing protocols which help routers learn about different networks they can reach and the Internet Control Message Protocol (ICMP) that is used to send error messages across at this layer.

Almost half of the book is dedicated IP and Routing protocols so they will be discussed in detail in later chapters, but the following sections discuss these protocols in brief.

 Internet Protocol (IP)


The Internet layer in the TCP/IP model is dominated by IP with other protocols supporting its purpose. Each host in a network and all interfaces of a router have a logical address called the IP address. All hosts in a network are grouped in a single IP address range similar to a street address with each host having a unique address from that range similar to a house or mailbox address. Each network has a different address range and routers that operate on layer 3 connect these different networks.

As IP receives segments from TCP or UDP, it adds a header with source IP address and destination IP address amongst other information. This PDU is called a packet. When a router receives a packet, it looks at the destination address in the header and forwards it towards the destination network. The packet may need to go through multiple routers before it reaches the destination network. Each router it has to go through is called a hop.

 There are various versions of the Internet Protocol. Version 4 is the one used today and version 6 is slowly starting to replace it which is why it’s presence has increased on the CCNA Routing & Switching 200-120 exam compared to previous CCNA exam versions. Figure 1-15 shows the header structure of IPv4. The following fields make up the header:

Version – IP version number. For IPv4 this value is 4.

 Header Length – This specifies the size of the header itself. The minimum size is 20 bytes. The figure does not show the rarely used options field that is of a variable length. Most IPv4 headers are 20 bytes in length.

DS Field – The differentiated Services field is used for marking packets. Different Quality-Of-Service (QoS) levels can be applied on different markings. For example, data belonging to voice and video protocols have no tolerance for delay. The DS field is used to mark packets carrying data belonging to these protocols so that they get priority treatment through the network. On the other hand, peer-to-peer traffic is considered a major problem and can be marked down to give in best effort treatment.

 Total Length – This field specifies the size of the packet. This means the size of the header plus the size of the data.

 Identification – When IP receives a segment from TCP or UDP; it may need to break the segment into chucks called fragments before sending it out to the network. Identification fields serves to identify the fragments that make up the original segment. Each fragment of a segment will have the same identification number.

 Flags – Used for fragmentation process.

 Fragment Offset – This field identifies the fragment number and is used by hosts to reassemble the fragments in the correct order.

 Time to Live – The Time to Live (TTL) value is set at the originating host. Each router that the packet passes through reduces the TTL by one. If the TTL reaches 0 before reaching the destination, the packet is dropped. This is done to prevent the packet from moving around the network endlessly.

 Protocol – This field identifies the protocol to which the data it is carrying belongs. For example a value of 6 implies that the data contains a TCP segment while a value of 17 signifies a UDP segment. Apart from TCP and UDP there are many protocols whose data can be carried in an IP packet.

 Header Checksum – This field is used to check for errors in the header. At each router and at the destination, a cyclic redundancy check performed on the header and the result should match the value stored in this field. If the value does not match, the packet is discarded.

 Source IP address – This field stores the IP address of the source of the packet.

 Destination IP address – This field stores the IP address of the destination of the packet.

Monday, 7 November 2016

4-OSI & TCP/IP models

OSI Model:-


This model was created to communicate with between the devices over the network.This model was created bt ISO (International Organization for Standardization  ) . This is the reference model of communication systems over the network.This model has 7 layers . And the traffic from source to 
destination goes on different stages and based on the layers of OSI model , They are taking care of 
of the data based on the stages of OSI model.


And also these are the set of rule to follow to have proper communication over the network.
Here is the below 7 layers of OSI model.



Physical Layer:-
-----------------

This layer defines that how to moves the data bits  from one device another.Based on this layer
the cables and connectors are sending the data bits over the network from source to destination .And it converts digital data in to bits format.Essentially this layers puts the data in physical media as bits and receives it in the same way.


Exp-Hub,Cables are working in this layers


Data Link Layer

------------------

This layers encapsulate the data in to frame. And this frame contains of the header and trailer of
source and destination to move on the packet over the network.Most commonly It contains the source and destinations MAC(media Access Control ) inside the frame.

It has two sub layers inside the datalink layer .


MAC(Media Access Control)
----------------------------------
This sub layer is used for to error correction in the frame and for flow control as well.

LLC(Logical Link Control) 
-----------------------------------
This sub layer is used for to control the access method.

Example:--Switches function at this layer.



Network Layer

-----------------------
This layer is responsible to forward the packet based on IP address of the source and destination as well.And this layers count the data as a packet .This layer is using the logical address to forward the packet over the network.There is two types of protocols are used in this layer.

1-Routed protocol--It's forwarding the packet using logical address(Ex-IP,IPX,Novel)
2-Routing Protocol--It's used for finding the path from source to destination.(Ex-RIP,EIGRP,OSPF.etc)

Exp--Routers , firewall are functions at this layers.

Transport Layer

-------------------:

This layer is going to establish the logical connection between source and destinations used for 
flow control and data recovery.the transport layer is connected with the actual end-to-end transfer
the data of  across the network . Typically the layer 4 examples are TCP(transmission control Protocol) and UDP(User Datagram Protocol). please go through the below examples.



Session layer

----------------:

This layer is responsible to create the session between source and destination . And it also
defines that how to terminate the session between two hosts .And also it's going to separate 
the session when the user is trying to accomplish the multiple task at a time  . So the session layer 
is defining some value to each and every session to idintify and also to make separate the session .
    

         It also provides the dialog controls and coordinate communication between the systems.

Presentation Layer

-----------------------:

This layer is responsible for to make compression and encryption to the data.It will take the data from  application layer and translate in to a generic format to forward the data across the network. An example of this is an EBCDIC,ASCII translation .And also this layer present the data to application layer .



Application Layer

----------------------:

For simplification you can say this layer is closet to user for communication . This layer enables the 
network application to communicate with another network application.below protocols are used in
application layer .