الأحد، 16 يونيو 2013

Ethernet Cabling

Ethernet cabling is an important discussion, especially if you are planning on taking the Cisco exams. Three types of Ethernet cables are available:
  1. Straight-through cable
  2.  Crossover cable
  3.  Rolled cable
We will look at each in the following sections.

Straight-Through Cable
The straight-through cable is used to connect
1- Host to switch or hub
2-Router to switch or hub
Four wires are used in straight-through cable to connect Ethernet devices. It is relatively simple to create this type; Figure  shows the four wires used in a straight-through Ethernet cable. Notice that only pins 1, 2, 3, and 6 are used. Just connect 1 to 1, 2 to 2, 3 to 3, and 6 to 6 and you’ll be up and networking in no time. However, remember that this would be an Ethernet-only cable and wouldn’t work with voice, Token Ring, ISDN, and so on.

Crossover Cable
The crossover cable can be used to connect
  1.  Switch to switch
  2.  Hub to hub
  3.  Host to host
  4.  Hub to switch
  5.  Router direct to host
The same four wires are used in this cable as in the straight-through cable; we just connect different pins together. Figure 1.23 shows how the four wires are used in a crossover Ethernet cable.Notice that instead of connecting 1 to 1, 2 to 2, and so on, here we connect pins 1 to 3 and 2 to 6 on each side of the cable.





Rolled Cable
Although rolled cable isn’t used to connect any Ethernet connections together, you can use a rolled Ethernet cable to connect a host to a router console serial communication (com) port. If you have a Cisco router or switch, you would use this cable to connect your PC running HyperTerminal to the Cisco hardware. Eight wires are used in this cable to connect serial devices, although not all eight are used to send information, just as in Ethernet networking. Figure  shows the eight wires used in a rolled cable.

Half- and Full-Duplex Ethernet

Half-duplex Ethernet is defined in the original 802.3 Ethernet; Cisco says it uses only one wire pair with a digital signal running in both directions on the wire. Certainly, the IEEE specifications discuss the process of half duplex somewhat differently, but what Cisco is talking about is a general sense of what is happening here with Ethernet.
It also uses the CSMA/CD protocol to help prevent collisions and to permit retransmitting if a collision does occur. If a hub is attached to a switch, it must operate in half-duplex mode because the end stations must be able to detect collisions. Half-duplex Ethernet—typically 10BaseT—is only about 30 to 40 percent efficient as Cisco sees it because a large 10BaseT network will usually only give you 3 to 4Mbps, at most.But full-duplex Ethernet uses two pairs of wires instead of one wire pair like half duplex.And full duplex uses a point-to-point connection between the transmitter of the transmitting device and the receiver of the receiving device. This means that with full-duplex data transfer, you get a faster data transfer compared to half duplex. And because the transmitted data is sent on a different set of wires than the received data, no collisions will occur.
The reason you don’t need to worry about collisions is because now it’s like a freeway with multiple lanes instead of the single-lane road provided by half duplex. Full-duplex Ethernet is supposed to offer 100 percent efficiency in both directions—for example, you can get 20Mbps with a 10Mbps Ethernet running full duplex or 200Mbps for Fast Ethernet. But this rate is something known as an aggregate rate, which translates as “you’re supposed to get” 100 percent efficiency. No guarantees, in networking as in life.Full-duplex Ethernet can be used in three situations:
  1.  With a connection from a switch to a host
  2.  With a connection from a switch to a switch
  3. With a connection from a host to a host using a crossover cable.
Now, if it’s capable of all that speed, why wouldn’t it deliver? Well, when a full-duplex Ethernet port is powered on, it first connects to the remote end and then negotiates with the other end of the Fast Ethernet link. This is called an auto-detect mechanism. This mechanism first decides on the exchange capability, which means it checks to see if it can run at 10 or 100Mbps. It then checks to see if it can run full duplex, and if it can’t, it will run half duplex. 

Lastly, remember these important points:
  1.  There are no collisions in full-duplex mode.
  2.  A dedicated switch port is required for each full-duplex node.
  3. The host network card and the switch port must be capable of operating in full-duplex mode.

Ethernet Networking

Ethernet is a contention media access method that allows all hosts on a network to share the same bandwidth of a link. Ethernet is popular because it’s readily scalable, meaning that it’s comparatively easy to integrate new technologies, such as Fast Ethernet and Gigabit Ethernet, into an existing network infrastructure. It’s also relatively simple to implement in the first place, and with it, troubleshooting is reasonably straightforward. Ethernet uses both Data Link and Physical layer specifications, and this section of the chapter will give you both the Data Link layer and Physical layer information you need to effectively implement, troubleshoot,and maintain an Ethernet network.
Ethernet networking uses Carrier Sense Multiple Access with Collision Detection (CSMA/CD),a protocol that helps devices share the bandwidth evenly without having two devices transmit at the same time on the network medium. CSMA/CD was created to overcome the problem of those collisions that occur when packets are transmitted simultaneously from different nodes. And trust me—good collision management is crucial, because when a node transmits in a CSMA/CD network, all the other nodes on the network receive and examine that transmission. Only bridges and routers can effectively prevent a transmission from propagating throughout the entire network!
So, how does the CSMA/CD protocol work? Let’s  start by taking a look at Figure When a host wants to transmit over the network, it first checks for the presence of a digital signal on the wire. If all is clear (no other host is transmitting), the host will then proceed with its transmission. But it doesn’t stop there. The transmitting host constantly monitors the wire to make sure no other hosts begin transmitting. If  the host detects another signal on the wire, it sends out an extended jam signal that causes all nodes on the segment to stop sending data (think
busy signal). The nodes respond to that jam signal by waiting a while before attempting to transmit again. Backoff algorithms determine when the colliding stations can retransmit. If collisions keep occurring after 15 tries, the nodes attempting to transmit will then timeout. Pretty clean!
When a collision occurs on an Ethernet LAN, the following happens:
1- A jam signal informs all devices that a collision occurred. 
2-The collision invokes a random backoff algorithm
3- Each device on the Ethernet segment stops transmitting for a short time until the timers expire.
4- All hosts have equal priority to transmit after the timers have expired.

The following are the effects of having a CSMA/CD network sustaining heavy collisions:
1-Delay
2-Low throughput
3- Congestion

السبت، 15 يونيو 2013

Public and Private IP Addresses

Some networks connect to each other through the Internet, whereas others are private.Public and private IP addresses are required, therefore, for both of these network types.Internet stability depends directly on the uniqueness of publicly used network addresses.Therefore, some mechanism is needed to ensure that addresses are, in fact, unique. This responsibility originally rested within an organization known as the InterNIC (Internet Network Information Center). This organization was succeeded by the Internet Assigned
Numbers Authority (IANA). IANA carefully manages the remaining supply of IP addresses to ensure that duplication of publicly used addresses does not occur. Such duplication would cause instability in the Internet and compromise its capability to deliver datagrams to networks using the duplicated addresses.To obtain an IP address or block of addresses, you must contact an Internet service provider (ISP). The ISP allocates addresses from the range assigned by their upstream registry or their appropriate regional registry, which is managed by IANA, as follows:
■ Asia Pacific Network Information Center (APNIC)
■ American Registry for Internet Numbers (ARIN)
■ Réseaux IP Europens Network Coordination Centre (RIPE NCC)
With the rapid growth of the Internet, public IP addresses began to run out, so new
addressing schemes such as classless interdomain routing (CIDR) and IPv6 were developed
to help solve the problem. CIDR and IPv6 are discussed later in this chapter in the “Address
Exhaustion” section.
Although Internet hosts require a globally unique IP address, private hosts that are not connected to the Internet can use any valid address, as long as it is unique within the private network. Because many private networks exist alongside public networks, grabbing “just any address” is strongly discouraged. Therefore, the IETF defined 3 blocks of IP addresses (1 Class A network, 16 Class B networks, and 256 Class C networks) in RFC 1918 for private, internal use. Addresses in this range are not routed on the Internet backbone, as shown in Table 1-2. Internet routers are configured to discard private addresses as defined
by RFC 1918.
If you are addressing a nonpublic intranet, these private addresses can be used instead of globally unique addresses. If you want to connect a network using private addresses to the Internet, however, it is necessary to translate the private addresses to public addresses. This translation process is referred to as Network Address Translation (NAT). A router is often the network device that performs NAT.
Address Exhaustion The growth of the Internet has resulted in enormous demands for IP addresses. This section describes the capabilities of IPv4 in relation to that demand.When TCP/IP was first introduced in the 1980s, it relied on a two-level addressing scheme,which at the time offered adequate scalability. The architects of TCP/IP could not havepredicted that their protocol would eventually sustain a global network of information,commerce, and entertainment. Twenty years ago, IPv4 offered an addressing strategy that,although scalable for a time, eventually resulted in an inefficient allocation of addresses.

The Class A and B addresses make up 75 percent of the IPv4 address space, but a relative handful of organizations (fewer than 17,000) can be assigned a Class A or B network number. Class C network addresses are far more numerous than Class A and B addresses, although they account for only 12.5 percent of the possible 4 billion IP addresses.
Unfortunately, Class C addresses are limited to 254 hosts, which does not meet the needs of larger organizations that cannot acquire a Class A or B address.
Table 1-2 Private IP Addresses
Class RFC 1918 Internal Address Range
A 10.0.0.0 to 10.255.255.255
B 172.16.0.0 to 172.31.255.255
C 192.168.0.0 to 192.168.255.255

IP Address Classes

When IP was first developed, no classes of addresses existed, because it was assumed that 254 networks would be more than enough for an internetwork of academic, military, and research computers.As the number of networks grew, the IP addresses were broken into categories called classes to accommodate different sizes of networks and to aid in identifying them.
Assigning IP addresses to classes is known as classful addressing. The allocation of addresses is managed by a central authority, the American Registry for Internet Numbers (ARIN), which you can go to at http://www.arin.net for more information about network numbers.
Five IP address classes are used, as follows:

■ Class A: The Class A address category was designed to support extremely large networks. A Class A address uses only the first octet to indicate the network address. The remaining three octets are used for host addresses. The first bit of a Class A address is always 0; therefore, the lowest number that can be represented is 00000000 (decimal 0), and the highest number that can be represented is 01111111 (decimal 127). However, these two network numbers, 0 and 127, are reserved and cannot be used as a network address. Any address that starts with a value between 1 and 126 in the first octet, then, is a Class A address.
■ Class B: The Class B address category was designed to support the needs of moderateto large-sized networks. A Class B address uses two of the four octets to indicate the network address. The other two octets specify host addresses.
 The first 2 bits of the first octet of a Class B address are always binary 10. The remaining 6 bits might be populated with either 1s or 0s. Therefore, the lowest number that can be represented with a Class B address is 10000000 (decimal 128), and the highest number that can be represented is 10111111 (decimal 191). Any address that starts with a value in the range of 128 to 191 in the first octet is a Class B address.

■ Class C: The Class C address category is the most commonly used of the original address classes. This address category was intended to support a lot of small networks.A Class C address begins with binary 110. Therefore, the lowest number that can be represented is 11000000 (decimal 192), and the highest number that can be represented is 11011111 (decimal 223). If an address contains a number in the range of 192 to 223 in the first octet, it is a Class C address.
■ Class D: The Class D address category was created to enable multicasting in an IP address. A multicast address is a unique network address that directs packets with that destination address to predefined groups of IP addresses. Therefore, a singlestation can simultaneously transmit a single stream of datagrams to multiple recipients.
The Class D address category, much like the other address categories, is mathematically constrained. The first 4 bits of a Class D address must be 1110. Therefore, the first octet range for Class D addresses is 11100000 to 11101111, or 224 to 239. An IP address that starts with a value in the range of 224 to 239 in the first octet is a Class D address. As illustrated in Figure 1-30, Class D addresses (multicast addresses) include the following range of network numbers: 224.0.0.0 to 239.255.255.255.

■ Class E: Although a Class E address category has been defined, the Internet Engineering Task Force (IETF) reserves the addresses in this class for its own research. Therefore, no Class E addresses have been released for use in the Internet. The first 4 bits of a Class E address are always set to 1111. Therefore, the first octet range for Class E addresses is 11110000 to 11111111, or 240 to 255.

IP Network Addressing

Just as you use addresses to identify the specific locations of homes and businesses so that mail can reach them efficiently, you use IP addresses to identify the location of specific devices on a network so that data can be sent correctly to those locations. IP addressing has various aspects, including the calculations for constructing an IP address, the classes of IP addresses designated for specific routing purposes, and public versus private IP addresses.
Learning how IP addresses are structured and how they function in the operation of a network provides an understanding of how data is transmitted through Layer 3 internetworking devices using TCP/IP. To facilitate the routing of packets over a network, the TCP/IP protocol suite uses a 32-bit logical address known as an IP address. This address must be unique for each device in the internetwork.
The header of the Internet layer of TCP/IP is known as the IP header.Note that each IP datagram carries this header, which includes a source IP address anddestination IP address that identify the source and destination network and host.
An IP address is a hierarchical address, and it consists of two parts:
■ The high order, or leftmost, bits specify the network address component (network ID) of the address.
■ The low order, or rightmost, bits specify the host address component (host ID) of the address.

Every physical or virtual LAN on the corporate internetwork is seen as a single network that must be reached before an individual host within that company can be contacted.Each LAN has a unique network address. The hosts that populate that network share those same bits, but each host is identified by the uniqueness of the remaining bits. Like a group of houses along the same road, the street address is the same, but the house number is unique.

Understanding TCP/IP’s Internet Layer

Among the protocols included in the TCP/IP protocol stack are a network layer protocol and a transport layer protocol. The internetworking layer handles the routing of packets of data by using IP addresses to identify each device on the network. Each computer, router, printer, or any other device attached to a network has its own unique IP address that routes packets of data.

Each IP address has a specific structure, and various classes of IP addresses exist. In addition, subnetworks and subnet masks play a role in IP addressing schemes, and different routing functions and protocols are involved in transmitting data from one network node to another using IP addresses.

The various aspects of IP addressing include calculations for constructing an IP address, classes of IP addresses designated for specific routing purposes, and public versus privateIP addresses. Also, two different types of IP addresses exist: IP version 4 (IPv4) andIP version 6 (IPv6). The 32-bit IPv4 address type is currently the most common, but the128-bit IPv6 address is also in use and will probably become the more common addresstype over time. This lesson describes 32-bit IPv4 addressing, except where IPv6 is
explicitly identified.

How do end systems initially obtain their IP address information? Although manual assignment of IP address information is possible, it does not scale and is a barrier to deployment and maintenance of networks. Therefore, protocols for the automatic assignment of IP address information have evolved and now provide this essential function without end user intervention. This lesson describes how IP address protocols function.