Monday, April 18, 2011

Data Communication & Networking

Fiber Distributed-Data Interface (FDDI) : 
 
FDDI (Fiber-Distributed Data Interface) is a standard for data transmission on fiber optic lines in that can extend in range up to 200 km (124 miles). The FDDI protocol is based on the token ring protocol. In addition to being large geographically, an FDDI local area network can support thousands of users.
An FDDI network contains two token rings, one for possible backup in case the primary ring fails. The primary ring offers up to 100 Mbps capacity. If the secondary ring is not needed for backup, it can also carry data, extending capacity to 200 Mbps. The single ring can extend the maximum distance; a dual ring can extend 100 km (62 miles).
FDDI is a product of American National Standards Committee X3-T9 and conforms to the open system interconnect (OSI) model of functional layering. It can be used to interconnect LANs using other protocols. FDDI-II is a version of FDDI that adds the capability to add circuit-switched service to the network so that voice signals can also be handled. Work is underway to connect FDDI networks to the developing Synchronous Optical Network.
Function of FDDI
FDDI uses a dual-ring architecture with traffic on each ring flowing in opposite directions (called counter-rotating). The dual-rings consist of a primary and a secondary ring. During normal operation, the primary ring is used for data transmission, and the secondary ring remains idle. The primary purpose of the dual rings, as will be discussed in detail later in this chapter, is to provide superior reliability and robustness. Figure 1 shows the counter-rotating primary and secondary FDDI rings.
 
Figure 1: FDDI uses counter-rotating primary and secondary rings.
FDDI uses counter-rotating primary and secondary rings
FDDI Specifications FDDI specifies the physical and media-access portions of the OSI reference model. FDDI is not actually a single specification, but it is a collection of four separate specifications each with a specific function. Combined, these specifications have the capability to provide high-speed connectivity between upper-layer protocols such as TCP/IP and IPX, and media such as fiber-optic cabling.
FDDI's four specifications are the Media Access Control (MAC), Physical Layer Protocol (PHY), Physical-Medium Dependent (PMD), and Station Management (SMT). The MAC specification defines how the medium is accessed, including frame format, token handling, addressing, algorithms for calculating cyclic redundancy check (CRC) value, and error-recovery mechanisms. The PHY specification defines data encoding/decoding procedures, clocking requirements, and framing, among other functions. The PMD specification defines the characteristics of the transmission medium, including fiber-optic links, power levels, bit-error rates, optical components, and connectors. The SMT specification defines FDDI station configuration, ring configuration, and ring control features, including station insertion and removal, initialization, fault isolation and recovery, scheduling, and statistics collection.
FDDI is similar to IEEE 802.3 Ethernet and IEEE 802.5 Token Ring in its relationship with the OSI model. Its primary purpose is to provide connectivity between upper OSI layers of common protocols and the media used to connect network devices. Figure 3 illustrates the four FDDI specifications and their relationship to each other and to the IEEE-defined Logical-Link Control (LLC) sublayer. The LLC sublayer is a component of Layer 2, the MAC layer, of the OSI reference model.
 
Figure 2: FDDI specifications map to the OSI hierarchical model.
FDDI specifications map to the OSI hierarchical model
FDDI Station-Attachment Types
One of the unique characteristics of FDDI is that multiple ways actually exist by which to connect FDDI devices. FDDI defines three types of devices: single-attachment station (SAS), dual-attachment station (DAS), and a concentrator.
An SAS attaches to only one ring (the primary) through a concentrator. One of the primary advantages of connecting devices with SAS attachments is that the devices will not have any effect on the FDDI ring if they are disconnected or powered off. Concentrators will be discussed in more detail in the following discussion.
Each FDDI DAS has two ports, designated A and B. These ports connect the DAS to the dual FDDI ring. Therefore, each port provides a connection for both the primary and the secondary ring. As you will see in the next section, devices using DAS connections will affect the ring if they are disconnected or powered off. Figure 3 shows FDDI DAS A and B ports with attachments to the primary and secondary rings.
Figure 3: FDDI DAS ports attach to the primary and secondary rings.
FDDI DAS ports
An FDDI concentrator (also called a dual-attachment concentrator [DAC]) is the building block of an FDDI network. It attaches directly to both the primary and secondary rings and ensures that the failure or power-down of any SAS does not bring down the ring. This is particularly useful when PCs, or similar devices that are frequently powered on and off, connect to the ring. 
Figure 4: A concentrator attaches to both the primary and secondary rings.

A concentrator attaches to both the primary and secondary rings
FDDI Fault Tolerance
FDDI provides a number of fault-tolerant features. In particular, FDDI's dual-ring environment, the implementation of the optical bypass switch, and dual-homing support make FDDI a resilient media technology.
Dual Ring
FDDI's primary fault-tolerant feature is the dual ring. If a station on the dual ring fails or is powered down, or if the cable is damaged, the dual ring is automatically wrapped (doubled back onto itself) into a single ring. When the ring is wrapped, the dual-ring topology becomes a single-ring topology. Data continues to be transmitted on the FDDI ring without performance impact during the wrap condition. Figure 5 and Figure 6 illustrate the effect of a ring wrapping in FDDI.
Figure 5: A ring recovers from a station failure by wrapping.

A ring recovers from a station failure by wrapping

Figure 6: A ring also wraps to withstand a cable failure.


A ring also wraps to withstand a cable failure
When a single station fails, as shown in Figure 5, devices on either side of the failed (or powered down) station wrap, forming a single ring. Network operation continues for the remaining stations on the ring. When a cable failure occurs, as shown in Figure 6, devices on either side of the cable fault wrap. Network operation continues for all stations.
It should be noted that FDDI truly provides fault-tolerance against a single failure only. When two or more failures occur, the FDDI ring segments into two or more independent rings that are unable to communicate with each other.
Optical Bypass Switch
An optical bypass switch provides continuous dual-ring operation if a device on the dual ring fails. This is used both to prevent ring segmentation and to eliminate failed stations from the ring. The optical bypass switch performs this function through the use of optical mirrors that pass light from the ring directly to the DAS device during normal operation. In the event of a failure of the DAS device, such as a power-off, the optical bypass switch will pass the light through itself by using internal mirrors and thereby maintain the ring's integrity. The benefit of this capability is that the ring will not enter a wrapped condition in the event of a device failure. Figure 7 shows the functionality of an optical bypass switch in an FDDI network.

Figure 7: The optical bypass switch uses internal mirrors to maintain a network.

The optical bypass switch
Dual Homing
Critical devices, such as routers or mainframe hosts, can use a fault-tolerant technique called dual homing to provide additional redundancy and to help guarantee operation. In dual-homing situations, the critical device is attached to two concentrators. Figure 8 shows a dual-homed configuration for devices such as file servers and routers.

Figure 8: A dual-homed configuration guarantees operation.

dual-homed configuration
One pair of concentrator links is declared the active link; the other pair is declared passive. The passive link stays in back-up mode until the primary link (or the concentrator to which it is attached) is determined to have failed. When this occurs, the passive link automatically activates.
FDDI Frame Format
The FDDI frame format is similar to the format of a Token Ring frame. This is one of the areas where FDDI borrows heavily from earlier LAN technologies, such as Token Ring. FDDI frames can be as large as 4,500 bytes. Figure 9 shows the frame format of an FDDI data frame and token.

Figure 9: The FDDI frame is similar to that of a Token Ring frame.

FDDI frame is similar to that of a Token Ring frame.
FDDI Frame Fields
The following descriptions summarize the FDDI data frame and token fields illustrated in Figure 9.
Preamble---A unique sequence that prepares each station for an upcoming frame.
Start Delimiter---Indicates the beginning of a frame by employing a signaling pattern that differentiates it from the rest of the frame.
Frame Control---Indicates the size of the address fields and whether the frame contains asynchronous or synchronous data, among other control information.
Destination Address---Contains a unicast (singular), multicast (group), or broadcast (every station) address. As with Ethernet and Token Ring addresses, FDDI destination addresses are 6 bytes long.
Source Address---Identifies the single station that sent the frame. As with Ethernet and Token Ring addresses, FDDI source addresses are 6 bytes long.
Data---Contains either information destined for an upper-layer protocol or control information.
Frame Check Sequence (FCS)---Filed by the source station with a calculated cyclic redundancy check value dependent on frame contents (as with Token Ring and Ethernet). The destination address recalculates the value to determine whether the frame was damaged in transit. If so, the frame is discarded.
End Delimiter---Contains unique symbols, which cannot be data symbols, that indicate the end of the frame.
Frame Status---Allows the source station to determine whether an error occurred and whether the frame was recognized and copied by a receiving station.






 

Wednesday, March 30, 2011

IEEE 802.3 Standards


While connecting computers through networks we need to have set of rules/standards for the data to travel from one computer to other computer. The right example for this can be road traffic rules. It's self understood, why we need traffic rules while driving, in same sense for the data packets to travel from one computer terminal to other terminal they should also follow set of rules and regulations.
One such set of rules for the networking traffic to follow is IEEE802 standards. Its developed by IEEE (Institute of Electrical and Electronics Engineers, Inc.) The IEEE is the world's leading professional association for the advancement of technology. It's a non- profit organization offering its members immense benefits.
The standards such as IEEE 802 helps industry provide advantages such as, interoperability, low product cost, and easy to manage standards.
IEEE standards deal with only Local Area Networks (LAN) and Metropolitan Area Networks (MAN). See in the figure below, to know where exactly the IEEE802 standards are used in a OSI layer.
tcp/ip stack_ieee
The IEEE 802 standards are further divided into many parts.
They are,

IEEE 802.1 Bridging (networking) and Network Management
IEEE 802.2 Logical link control (upper part of data link layer)
IEEE 802.3 Ethernet (CSMA/CD)
IEEE 802.4 Token bus (disbanded)
IEEE 802.5 Defines the MAC layer for a Token Ring (inactive)
IEEE 802.6 Metropolitan Area Networks (disbanded)
IEEE 802.7 Broadband LAN using Coaxial Cable (disbanded)
IEEE 802.8 Fiber Optic TAG (disbanded)
IEEE 802.9 Integrated Services LAN (disbanded)
IEEE 802.10 Interoperable LAN Security (disbanded)
IEEE 802.11 Wireless LAN & Mesh (Wi-Fi certification)
IEEE 802.12 demand priority (disbanded)
IEEE 802.13 Not Used
IEEE 802.14 Cable modems (disbanded)
IEEE 802.15 Wireless PAN
IEEE 802.15.1 (Bluetooth certification)
IEEE 802.15.4 (ZigBee certification)
IEEE 802.16 Broadband Wireless Access (WiMAX certification)
IEEE 802.16e (Mobile) Broadband Wireless Access
IEEE 802.17 Resilient packet ring
IEEE 802.18 Radio Regulatory TAG
IEEE 802.19 Coexistence TAG
IEEE 802.20 Mobile Broadband Wireless Access
IEEE 802.21 Media Independent Handoff
IEEE 802.22 Wireless Regional Area Network

Here we discuss most popular and key parts of above list
IEEE 802.3 Ethernet (CSMA/CD)
A method called Carrier Sense Multiple Access with Collision Detection (CSMA/CD) was used to send data over shared single co-axial cable connected to all computers on a network. In this method, the computer terminals (also called as stations) transmits the data over cable whenever the cable is idle, If more than one station transmit at same time and if they collide, the transmission will be stopped by such stations. They will wait for some random time and restart transmission.
The concept of sharing single cable or wire between multiple stations was used for first time in Hawaiian Islands. It was called ALOHA systems; built to allow radio communication between machines located at different places in Hawaiian Islands. Later Xerox PARC built a 2.94 mbps CSMA/CD system to connect multiple personal computers on a single cable. It was named as Ethernet.
Ethernet or IEEE802.3 standards only define MAC (Data link) and Physical layer of standard OSI model.
Don't confuse TCP/IP with Ethernet. TCP/IP defines Transport and network layers.




Wiring and cabling standards of 802.3
There are four cabling standards as per 802.3, each one has evolved over the time for their special advantages.
The four types of cables are,
1. 10Base5
2. 10Base2
3. 10Base-T
4. 10Base-F
The table below compares all four types of cables
Technical NameCable/Wire typeMax. Segment/wire LengthMaximum number of Nodes/SegmentAdvantages
10Base5Thick coaxial500 meters100Long cable length
10Base2RG58 (thin) coaxial185 meters30Low cost
10BaseTTwisted pair (like telephone wire)100 meters1024Easy to maintain
10BaseFFiber-optic2,000 meters1024No noise interference

The 10 in the technical name refer to data speed of 10Mbits/sec.
"Link Integrity" and "Auto-partition" are part of the 10BaseT specification. This means that all network equipment claiming compliance with 10BaseT must support Link Integrity and Auto-partitioning.
10Base5
10 Base5 is also called as ThickNet or thick Ethernet. It uses RG-8 thick coaxial trunk cable, which looks like orange colored garden hose. The cable is tapered with taps called vampire taps in which a pin is carefully forced halfway into the cable's core. The connection can be made to the desired computer network interface card (NIC) from these vampire taps. ThickNet can travel 500 meters per segment, and it can have a maximum of 100 taps per segment. Each tap requires a minimum distance of 2.5 meters before the next tap and has a maximum drop distance of 50 meters. The cable must be terminated with a 50-ohm terminator resistor.
Due to its complex and slow nature 10Base5 is no more preferred. The severe drawback is entire line will fail for any single failure on the trunk. This cable can be termed as obsolete/outdated technology.
The one plus point of ThickNet is that, once it's up and running, it will continue to do so until you tell it otherwise. Although it is slow and unwieldy, 10Base5 technology is very reliable.
Here is the figure showing how the cables are connected to Network Interface Cards inside the computer using 10base5.
10base5 wiring

10Base2
10Base2 is not very different from 10 Base5. The most notable physical difference between 10Base2 and 10Base5 is the size of the co-axial cable. 10Base2 is thinner than the 10Base5 and so is called as ThinNet or thin Ethernet. Another difference is that 10Base2 is set up in a daisy chain. Daisy chain is a wiring scheme in which, for example, device A is wired to device B, device B is wired to device C, device C is wired to device D, et cetera.
10Base2 uses BNC connectors attached to a thin coaxial cable. The maximum segment length of 10Base2 is 185 meters, and the maximum number of devices per segment is 30.
10Base is also outdated/obsolete technology. In rare cases it could be deployed as a backbone for a network.
Here is the figure showing how the cables are connected to Network Interface Cards inside the computer using 10base5.
10base2 wiiring

10Base-T
10Base-T is the most popular cabling method. Its also called Standard Ethernet, or twisted pair, 10Base-T works on a star topology connecting all computers to a hub. It is best used with Category 5 cable (so it can be upgraded to Fast Ethernet) and can have a maximum of three hubs daisy-chained together.
Since it is simple and cheap to implement it is most opted one. The specifications of Standard Ethernet include the following:
It uses RJ45 connectors on unshielded twisted-pair (UTP) cable.
The maximum cable length is 100 meters (before a repeater is needed).
The maximum number of devices per segment is 1,024 (although performance will become quite poor before that number is ever reached).
The 10Base-T standard is best employed within a LAN where cost is a factor-and speed and distance are not.
Link Integrity is concerned with the condition of the cable between the network adapter and the hub. If the cable is broken, the hub will automatically disconnect that port.
Auto partitioning occurs when an Ethernet hub port experiences more than 31 collisions in a row. When this happens, the hub will turn off that port, essentially isolating the problem.

10Base-F
In 10BaseF the twisted copper wires are replaced by a optical fiber. 10Base-F uses a higher quality cabling technology, multimode (or single-mode) fiber-optic cable, to transport data. The particular technology has two subdivisions that must be addressed: the newer 10Base-FL and 10BaseFOIRL.
Because it is older, the 10BaseFOIRL (Fiber-optic Inter-repeater Link) technology doesn't have quite the capabilities of the newer 10Base-FL. With 10BaseFOIRL, you have the following specs:
It's based on IEEE 802.3.
The segment length is 1,000 meters.
There are three sizes of duplex multimode fiber: 50-, 62.5-, or 100-micron. Of these three, 62.5-micron is the most common.
ST or SMA 905 connectors are used by 10BaseFOIRL.
It must be used in a star configuration.
AUI connectors have to be connected to fiber transceivers.
The much-improved 10Base-FL technology offers a different set of specs:
It's based on the 10Base-F IEEE 802.3 spec.
It's able to interoperate with FOIRL and is designed to replace the FOIRL specification.
The segment length is 2,000 meters (if exclusively using 10Base-FL).
The maximum number of devices per segment is two; one is the station and the other is the hub.
The maximum number of repeaters that may be used between devices is two.
NICs with standard AUI ports must use a fiber-optic transceiver.
The benefits of optical fiber are,
No radio or magnetic interference.
Transmissions are safe from electronic bugging,
Cable is extremely lightweight,
10Base-FL fiber-optic technologies are best implemented in long runs where reliability and security are critical.
For More details Visit: http://www.gurukpo.com/




Hash Function

A hash function H is a transformation that takes a variable-size input m and returns a fixed-size string, which is called the hash value h (that is, h = H(m)). Hash functions with just this property have a variety of general computational uses, but when employed in cryptography the hash functions are usually chosen to have some additional properties.
The basic requirements for a cryptographic hash function are:
  • the input can be of any length,
  • the output has a fixed length,
  • H(x) is relatively easy to compute for any given x ,
  • H(x) is one-way,
  • H(x) is collision-free.
A hash function H is said to be one-way if it is hard to invert, where "hard to invert" means that given a hash value h, it is computationally infeasible to find some input x such that H(x) = h.

If, given a message x, it is computationally infeasible to find a message y not equal to x such that H(x) = H(y) then H is said to be a weakly collision-free hash function.

A strongly collision-free hash function H is one for which it is computationally infeasible to find any two messages x and y such that H(x) = H(y).

For more details Visit: http://www.gurukpo.com/

Digital Signature

A digital signature is an electronic signature that can be used to authenticate the identity of the sender of a message or the signer of a document, and possibly to ensure that the original content of the message or document that has been sent is unchanged. Digital signatures are easily transportable, cannot be imitated by someone else, and can be automatically time-stamped. The ability to ensure that the original signed message arrived means that the sender cannot easily repudiate it later. A digital signature can be used with any kind of message, whether it is encrypted or not, simply so that the receiver can be sure of the sender's identity and that the message arrived intact. A digital certificate contains the digital signature of the certificate-issuing authority so that anyone can verify that the certificate is real.

How It Works

Assume you were going to send the draft of a contract to your lawyer in another town. You want to give your lawyer the assurance that it was unchanged from what you sent and that it is really from you.
  1. You copy-and-paste the contract (it's a short one!) into an e-mail note.
  2. Using special software, you obtain a message hash (mathematical summary) of the contract.
  3. You then use a private key that you have previously obtained from a public-private key authority to encrypt the hash.
  4. The encrypted hash becomes your digital signature of the message. (Note that it will be different each time you send a message.)
At the other end, your lawyer receives the message.
  1. To make sure it's intact and from you, your lawyer makes a hash of the received message.
  2. Your lawyer then uses your public key to decrypt the message hash or summary.
  3. If the hashes match, the received message is valid.
For more details Visit: http://www.gurukpo.com/

Network Security

                                                                      Encryption

Encryption is the conversion of data into a form, called a cipher text, that cannot be easily understood by unauthorized people. Decryption is the process of converting encrypted data back into its original form, so it can be understood.
The use of encryption/decryption is as old as the art of communication. In wartime, a cipher, often incorrectly called a code, can be employed to keep the enemy from obtaining the contents of transmissions. Simple ciphers include the substitution of letters for numbers, the rotation of letters in the alphabet, and the "scrambling" of voice signals by inverting the sideband frequencies. More complex ciphers work according to sophisticated computer algorithms that rearranges the data bits in digital signals.
In order to easily recover the contents of an encrypted signal, the correct decryption key is required. The key is an algorithm that undoes the work of the encryption algorithm. Alternatively, a computer can be used in an attempt to break the cipher. The more complex the encryption algorithm, the more difficult it becomes to eavesdrop on the communications without access to the key.
Encryption/decryption is especially important in wireless communications. This is because wireless circuits are easier to tap than their hard-wired counterparts. Nevertheless, encryption/decryption is a good idea when carrying out any kind of sensitive transaction, such as a credit-card purchase online, or the discussion of a company secret between different departments in the organization. The stronger the cipher -- that is, the harder it is for unauthorized people to break it -- the better, in general.
for more details visit : http://www.gurukpo.com/

Thursday, February 24, 2011

Cohen-Sutherland Line Clipping Algorithm

Cohen-Sutherland Line-Clipping Algorithm

First we test whether both endpoints are inside (and hence draw the line segment) or whether both are left of , right of , below , or above (then we ignore line segment). Otherwise we split the line segment into two pieces at a clipping edge (and thus reject one part). Now we proceed iteratively.
A rather simple accept-reject test is the following:
Divide the plane into 9 regions and assign a 4 bit code to each:
1000
...above top edge
0100
...below bottom edge
0010
...right of right edge
0001
...left of left edge
                            
                                              Codes for the 9 regions associated to clipping rectangle

If both codes are zero then the line segment is completely inside the rectangle. If the bitwise-and of these codes is not zero then the line does not hit since both endpoints lie on the wrong side of at least one boundary line (corresponding to a bit equal to 1). Otherwise take a line which is met by the segment (for this find one non-zero bit), divide the given line at the intersection point in two parts and reject the one lying in the outside half plane
.

                   

Figure of Cohen-Sutherland line clipping







Wednesday, January 26, 2011

Projection

1.   A 3D projection is a mathematical process to project a series of 3D shapes to a 2D surface, usually a computer monitor.
2.   Projection of a solid object is just like getting a shadow of the object on a plane.


There are two basic Projection Method:
  1. Parallel Projection.
  2. Perspective Projection.

Parallel Projection: In Parallel Projection, coordinate positions are transformed to the view plane along parallel lines. A parallel projection preserves relative proportion of objects, and this is the method used in drafting to produce scale drawing of three-dimensional objects.
Accurate views of the various sides of an object are obtained with a parallel projection, but this does not give us realistic representation of the appearance of a three dimensional object.
     
Perspective Projection: In Perspective Projection object positions are transformed to the view plane along lines that converge to a point called the projection reference point or center of projection. A perspective projection produces realistic views but does not preserve relative proportions. Projection of distant objects are smaller than the projection of objects of the same size that are closer to the projection plane.

                                    
For more details visit: http://www.gurukpo.com/