CSMA /CD Carrier sense multiple access/collision detection (CSMA /CD) is one of the most popular access methods in use today. With CSMA /CD, every host has equal access to the wire and can place data on the wire when the wire is free from traffic. If a host wishes to place data on the wire, it will “sense” the wire and determine whether there is a signal already on the wire. If there is, the host will wait to transmit the data; if the wire is free, the host will send the data, as shown in Figure .
The problem with the process just described is that, if there are two systems on the wire that “sense” the wire at the same time to see if the wire is free, they will both send data out at the same time if the wire is free. When the two pieces of data are sent out on the wire at the same time, they will collide with one another, and the data will be destroyed. If the data is destroyed in transit, the data will need to be retransmitted. Consequently, after a collision, each host will wait a variable length of time before retransmitting the data (they don’t want the data to collide again) thereby preventing a collision the second time. When a system determines that the data has collided and then retransmits the data, it is known as collision detection.
To summarize, CSMA /CD provides that before a host sends data on the network it will “sense” (CS) the wire to ensure that the wire is free of traffic. Multiple systems have equal access to the wire (MA), and if there is a collision, a host will detect that collision (CD) and retransmit the data
Carrier sense multiple access/collision avoidance (CSMA /CA) is not as popular as CSMA /CD and for good reason. With CSMA /CA, before a host sends data on the wire it will “sense” the wire as well to see if the wire is free of signals. If the wire is free, it will try to “avoid” a collision by sending a piece of “dummy” data on the wire first to see whether it collides with any other data. If it does not collide, the host in effect assumes “If my dummy data did not collide, then the real data will not collide,” and it submits the real data on the wire.
With both CSMA /CD and CSMA /CA, the possibility of collisions is always there, and the more hosts that are placed on the wire, the greater the chances of collisions, because you have more systems “waiting”’ for the wire to become free so that they can send their data.
Token passing takes a totally different approach to deciding on how a system can place data on the wire. With token passing, there is an empty packet running around on the wire — the “token.” In order to place data on the wire, you need to wait for the token; once you have the token and it is free of data, you can place your data on the wire. Since there is only one token and a host needs to have the token to “talk,” it is impossible to have collisions in a token-passing environment.
For example, if Workstation 1 wants to send data on the wire, the workstation would wait for the token, which is circling the network millions of times per second. Once the token has reached Workstation 1, the workstation would take the token off the network, fill it with data, mark the token as being used so that no other systems try to fill the token with data, and then place the token back on the wire heading for the destination host.
Network architecture is something that came about one day when someone sat down and said “We are going to design a network architecture; let’s use CAT 3 cabling, a star topology, and CSMA /CD as an access method. Let’s call this architecture 10BaseT” In this example, 10BaseT was the name assigned to the architecture because 10 Mbps is the transfer rate of the network, Baseband communication is the technique used to transmit the signal, and the T means our cable type —in this case twisted pair. We know different types of twisted-pair cabling, but CAT 3 is the one that runs at 10 Mbps, so it is the cable used in 10BaseT.
The first types of network architecture to look at are the different Ethernet architectures. When designing networks, one of the first decisions we usually make is “Do we want to use Ethernet or the competing network architecture called Token Ring? we want to use Ethernet. What flavor of Ethernet?” In this discussion you will understand what the different flavors of Ethernet are. Ethernet is defined as the IEEE 802.3 standard.
The 10Base2 Ethernet architecture is a network that runs at 10 Mbps and uses baseband transmissions. 10Base2 typically is implemented as a bus topology, but it could be a mix of a bus and a star topology. The cable type that we use is determined by the character at the end of the name of the architecture —in this case a 2. The 2 implies 200 meters. Now, what type of cable is limited to approximately 200m? Thinnet is limited to approximately 200m (185m to be exact). The only characteristic we have not mentioned is the access method that is used.
All Ethernet environments use CSMA /CD as a way to put data on the wire.
The following list summarizes features of 10Base2:
Ø Baseband communication
Ø 10 Mbps transfer rate
Ø Maximum distance of 185 meters per network segment
Ø 30 hosts per segment
Ø 0.5 meters minimum distance between hosts
The 10Base5 Ethernet architecture runs at 10 Mbps and uses baseband transmission as well. It was also implemented as a bus topology. The cable it uses is limited to approximately 500 meters, which is thicknet, and it uses CSMA /CD as the access method. The thicker copper core in the wire allows the signal to travel further than is possible with thinnet.
The following list summarizes features of 10Base5:
Ø Baseband communication
Ø 10 Mbps transfer rate
Ø Maximum distance of 500 meters per network segment
Ø 100 hosts per segment
Ø 2.5 meter minimum distance between hosts
The 10BaseT Ethernet architecture runs at 10 Mbps and uses baseband transmission. It uses a star topology with a hub or switch at the center, allowing all systems to connect to one another. The cable it uses is CAT 3 UTP, which is the UTP cable type that runs at 10 Mbps. Keep in mind that most cable types are backward compatible, so you could have CAT 5 UTP cabling in a 10BaseT environment. But because the network cards and hubs are running at 10 Mbps, that is the maximum transfer speed you will get, even though the cable supports more.
Like all Ethernet environments, 10BaseT uses CSMA /CD as the access method.
The 10BaseFL Ethernet architecture allows for a 10-Mbps Ethernet environment that runs on fiber-optic cabling. The purpose of the fiber-optic cabling is to use it as a backbone to allow the network to reach greater distances.
Fast Ethernet (100BaseTX and 100BaseFX)
These two standards are part of the 100BaseX family, which is known as fast Ethernet. The different fast Ethernet flavors run at 100 Mbps, use a star topology, use CSMA / CD as an access method, and differ in the type of cabling used. 100BaseTX uses two pairs (four wires) in the CAT 5 cabling, whereas 100BaseFX uses two strands of fiber instead of twisted-pair cabling.
Gigabit Ethernet is becoming the de facto of network architectures today. With Gigabit Ethernet we can reach transfer rates of 1000 Mbps (1 Gbps), using traditional media such as coaxial, twisted-pair, and fiber-optic cabling. There are two standards for Gigabit: IEEE 802.3z and IEEE 802.3ab.
The IEEE 802.3z standard defines Gigabit Ethernet that runs over fiber-optic cabling or coaxial cabling. There are three types of Gigabit Ethernet that fall under this standard:
1000Base-SX is the Gigabit Ethernet architecture that runs at 1000 Mbps over multimode fiber (MMF) optic cabling. This architecture is designed for short distances of up to 550 meters.
1000Base-LX is the Gigabit Ethernet architecture that runs at 1000 Mbps over single-mode fiber (SMF) optic cabling. This architecture supports distances up to 3 kilometers.
1000Base-CX is the Gigabit Ethernet architecture that runs at 1000 Mbps over coaxial cable and supports distances of up to 25 meters.
The IEEE 802.3ab standard, known as 1000BaseTX, defines Gigabit Ethernet that runs over twisted-pair cabling and uses characteristics of 100BaseTX networking, including the use of RJ-45 connectors and the access method of CSMA /CD. Like 100BaseTX, 1000BaseTX uses CAT 5, CAT 5e, and even CAT 6 unshielded twisted-pair, the difference being that 100BaseTX runs over two pairs (four wires) while 1000BaseTX runs over four pairs (all eight wires).
There are standards for 10-Gigabit Ethernet (10,000 Mbps) that have been developed that use fiber-optic cabling:
10GbaseSR runs at 10 Gbps and uses “short-range” multimode fiber-optic cable, which has a maximum distance of 100 meters.
10GBaseLR runs at 10 Gbps and uses “long-range” single-mode ?ber-optic cable, which has a maximum distance of 10 kilometers.
10GbaseER runs at 10 Gbps and uses “extra-long-range” single-mode ?ber- optic cable which has a maximum distance of 40 kilometers.
using namespace std;
cout<<"Type number to search ";
cout<<"\nNumber "<<input<<" is located at index "<<i<<"\n";
cout<<"\nNumber "<<input<<" is not present in the list\n\n";
A big competitor to Ethernet in the past was Token Ring, which runs at 4 Mbps or 16 Mbps. Token Ring is a network architecture that uses a star ring topology (a hybrid, looking physically like a star but logically wired as a ring) and can use many forms of cables.
IBM Token Ring has its own proprietary cable types, while more modern implementations of Token Ring can use CAT 3 or CAT 5 UTP cabling. Token Ring uses the token-passing access method.
Looking at Token Ring networks today, you may wonder where the “ring” topology is, because the network appears to have a star topology. The reason why it appears that this network architecture is using a star topology is that all hosts are connected to a central device that looks similar to a hub, but with Token Ring, this device is called a multistation access unit (MAU or MSAU). . The ring is the internal communication path within the wiring.
Token Ring uses token passing; it is impossible to have collisions in a token-passing environment, because the MAUs do not have collisions lights like an Ethernet hub does (remember that Ethernet uses CSMA /CD and there is potential for collisions).
We can divide data connections through a telecommunications network into different categories based on the principle of how the communications circuit is built between the communicating devices. Data communications through the telecommunications network may use three basic different types of circuits:
Leased or dedicated: The cost of a leased line is fixed per month and depends on the capacity and length of the connection.
Circuit switched or dial-up: The cost of switched service depends on the time the service is used, the data rate, and the distance.
Packet switched: The cost is often fixed and depends on the interface data rate. In some packet-switched networks cost may depend on the amount of transferred data. Agreements with the service provider may specify other parameters that influence the cost, such as the maximum data rate or average data rate.
For corporate data networks, the leased-line solution is often attractive when the LANs of offices in a region need to be interconnected. The network operator provides a permanent circuit and the monthly cost is fixed and depends only on the agreed-on data rate. Over long distances, however, leased lines become expensive and switched service is often preferred. In such a service, several corporate networks share transmission capacity and the cost of the backbone of the telecommunications network operator. Within the switched category there are two subcategories, circuit and packet-switched networks as shown in Figureboth of which are used for data transmission.
Circuit-switched networks provide fixed bandwidth and very short and fixed delay. It is the primary technology for voice telephone, video telephone and video conferencing. The disadvantage is that it is inflexible for data communications where the demand for transmission data rate is far from constant but varies extensively over short time scales. Some older generation data networks used the circuit switching principle. In the beginning a circuit-switched connection is dialed up by the data source. The routing is based on the destination subscriber number given when the circuit is established. The connection is released after the communication is over. During a conversation, the data capacity of the connection is fixed and it is reserved only for this conversation regardless of whether the data capacity is used or not. At the end of the call, the circuit is released. ISDN as well as the telephone network use the circuit-switching principle.
Packet-switched networks are specially designed for data communication. The source data are split into packets containing route or destination identifications. The packets are routed toward the destination by packet-switching nodes on the path through the network. The major drawback of the packet-switched technology is that it usually cannot provide a service for applications that require constant and low delay. There are two basic types of packet-switched networks.
virtual circuits and datagram transmission. In the case of virtual circuits, the virtual connection is established at the beginning of each conversation or it is permanently set up and every packet belonging to a certain connection is transmitted via the same established route. The main difference between circuit-switched physical circuits and virtual circuits is that many users share the capacity of the transmission lines and channels between network nodes if virtual instead of physical circuits are used. At a certain moment active users may use all the available capacity if other users are not transmitting anything. The complete address information is not needed in the packets when the connection is established. Only a short connection identifier is included in each packet to define the virtual circuit to which the packet belongs.
Another method for packet-switched data communications is connectionless datagram transmission in which routing devices perform routing procedures, and each packet contains a full destination address. We discuss this layer 3 (network layer) routing principle next.
Every device connected to a TCP/IP network requires at least one IP address and must be unique within that network. An IP address is commonly represented in dotted decimal notation. Here are some examples of IP addresses shown in dotted decimal form.
As in these examples, all IP addresses are 32 bits long and are comprised of four 8-bit segments known as octets. Representing IP addresses in dotted decimal notation makes them a lot easier to read than in the machine friendly binary format. As you will see in the next section, however, the capability to convert IP addresses to-and-from binary format is required for configuring your TCP/IP network and for the exam. The following is an example of an IP address shown in dotted decimal and its equivalent binary notation.
Dotted Decimal Binary
18.104.22.168 11001111 00010101 00100000 00001100
Network ID and Host ID
Although an IP address is a single value, it is divided into two pieces of information: the network ID and the host ID of the networked device.
The network ID identifies the systems that are located on the same physical network. All systems on the same physical network must have the same network ID, and the network ID must be unique to the local segment. In this case, local is defined as being on one side of a router.
The host ID identifies a workstation, server, router, or other TCP/IP device within a network. The host address for each device must be unique to the network ID. A computer connected to a TCP/IP network uses the network ID and host ID to determine which
packets it should receive or ignore and to determine which devices are to have the opportunity of receiving its transmissions.
Throughout the world, TCP/IP networks vary greatly in size and scope. In order to accommodate the wide range of network design needs, IP addresses have been divided into classes.
IP Address Classes Defined
The IP address is 32 bits in length and is used to identify both the host address and the address of the network in which the host resides. An address class is defined to allocate the minimum number of bits that are to be used as the network ID. The remaining bits can be used to further subdivide the network using subnet masks and to define the host ID.
Reasons for Using Specific Address Classes
If you are new to TCP/IP, you may be asking yourself “Why are there different classes of IP addresses, and how can I use them?” First of all, the Internet community has defined the different types of IP addresses in order to accommodate the needs of networks of different sizes. A network with less than 255 devices (workstations, routers, printers, and so) can be assigned a Class C network address. However, a large organization with up to 65,534
devices will need at least a Class B address.
Second, as long as you are not connecting your internal network directly to the public Internet, you can use any valid Class A, B, or C address you want. However, any device that is connected directly to the Internet, must be assigned a network ID from the Internet
community. The organization responsible for administering the assignment of the network ID portions of IP addresses for network devices directly connected to the Internet is the Internet Network Information Center (InterNIC).
Class A addresses are assigned to networks with extremely large numbers of hosts (networked devices). The MSB is set to 0, and is combined with the remaining seven bits of the first octet to complete the network ID. This leaves the last 3 octets, or 24 bits to be assigned to subnet masking and to hosts. As we saw in table 3.3, this allows for 126 (27-2) networks with up to 16,777,214 (221-2) hosts per network. An example of a Class A address is 10.1.2.34 where 10.0.0.0 is the network and 0.1.2.34 is the host.
Class B addresses are assigned to networks with no more than 65,534 (216-2) hosts (networked devices). The MSBs are set to 10, and are combined with the remaining 14 bits of the first two octets to complete the network ID. This leaves the last 2 octets, or 16 bits to be assigned to subnet masking and to hosts and allows for 16,384 (214) networks. Each of these networks can have as many as 65+ thousand hosts. An example of a Class B address is 22.214.171.124 here the network is
126.96.36.199 and the host is 21.253.
Class C addresses are assigned to small networks with a more limited number of hosts. The MSBs are set to 110, and are combined with the remaining 21 bits of the first three octets
to complete the network ID. This leaves the last octet available to be assigned to subnet masking and to hosts, allowing for 2,097,152 (221) networks with up to 254 (28-2) hosts per
network. An example of a Class B address is 188.8.131.52 which is a network of 184.108.40.206 with a host ID of 0.0.0.12.
Class D addresses are reserved for multicast groups. Multicast addresses are assigned to groups of hosts that are cooperating, or are related in some manner. Each host in a multicast group has to be configured to accept multicast packets. The MSBs of a class D address are set to 1110. The remaining bits are uniquely assigned to each group of hosts. Microsoft NT supports class D addresses for applications such as Microsoft Net-Show.
Class E addresses are an experimental class of IP addresses reserved for use in the future. The MSBs for class E address
Assuming that a text file named FIRST.TXT contains some text written into it, write a function named copyupper ( ), that reads the file FIRST.TXT and creates a new file named SECOND.TXT contains all words from the file FIRST.TXT in uppercase.
using namespace std;