Although analog connections are great for connecting a router to a phone, a PBX, or even to the PSTN, as the need for more connections grows, so does the expense associated with adding more and more interfaces to the router. Digital connections are often a more cost-effective solution when we have more than approximately eight connections, because a single digital connection can carry multiple conversations over a single circuit.
Whereas analog interfaces send and receive analog waveforms that continually vary, digital interfaces send binary 1s and 0s, which are represented on the wire as the presence or absence of voltage. Examples of digital circuits include T1, E1, and ISDN circuits, as shown in Figure 3-8.
Figure 3-8. Digital Connections
The question is, "How can multiple conversations be sent across a single connection?" Just like we learned to do as children, the multiple conversations share and take turns. Specifically, they share the bandwidth by taking turns sending data on the wire.
Consider a T1 circuit, which has 24 separate channels. With a T1, we can do time-division multiplexing (TDM). With TDM, a T1 circuit can send an 8-bit sample from its first channel, followed by an 8-bit sample from its second channel, followed by an 8-bit sample from its third channel, and so on. Each channel, which means each conversation, gets its own time slice in which it can transmit its voice, represented as binary 1s and 0s. In fact, we could say that with TDM, each voice conversation has, to borrow a line from Whitney Houston, one moment in time, as shown in Figure 3-9.
Figure 3-9. Time-Division Multiplexing (TDM)
For years I heard that a T1 had 1.544 Mbps of bandwidth, and I knew a T1 had 24 channels, where each channel had 64 kbps of bandwidth. Then, one day I did the math. I multiplied 24 and 64,000, but to my surprise, I did not get 1,544,000 as a result. Instead, the result was 1,536,000. That really confused me. What happened to the extra 8000 bits?
What I did not consider were the framing bits. A framing bit is a single bit that indicates the end of the frame, and a frame contains an 8-bit sample from each of a T1's 24 channels. Once I accounted for the framing bit, the math worked out beautifully.
Each frame is 193 bits in size:
The Nyquist Theorem requires that we send 8000 samples per second:
The total bandwidth on a T1 is 1.544 Mbps:
However, in a T1 environment, we don't typically send just one frame at a time. Instead, we connect multiple frames together and send them all at once. Two popular approaches to grouping these frames together are:
When configuring a T1 interface (also known as a T1 controller on a Cisco router), the T1 interface defaults to SF as the framing type. The good news is that we do not have to be concerned with selecting a particular framing type. Because our T1 connects to a service provider, the service provider tells us what framing type to use, and we simply configure our router to match the service provider's parameters.
Another piece of T1 configuration information given to us by our service provider is the line coding. A T1 circuit's line coding is the set of rules that dictates how binary 1s and 0s are represented over the wire.
We normally think of binary 1s being the presence of voltage and binary 0s being the absence of voltage. Although that is true, the goal on a T1 line is to keep the average voltage on the line 0 volts, which means when we send a binary one using a positive voltage, the next binary 1 uses a negative voltage. Therefore, on average, the voltage on the wire is 0. Personally, if I put one hand in a bucket of boiling water and the other hand in a bucket of freezing water, on average, I'm not going to be comfortable, but I concede this approach does work for digital circuits.
If two consecutive voltages have the same polarity, an error, called a bipolar violation, occurs. The approach of representing binary 1s as alternating voltages is called alternate mark inversion (AMI), as shown in Figure 3-10.
Figure 3-10. Alternate Mark Inversion (AMI)
Although AMI does meet the goal of maintaining an average of 0 volts on the circuit, it has a major challenge. AMI has issues when it attempts to send a byte containing all 0s (that is, eight binary 0s in a row). Although there are various workarounds that address this issue, errors can occur when sending eight 0s in a row over a T1 circuit using generic AMI line coding.
Due to AMI's limitation, another type of line coding was developed. Bipolar 8-zero substitution (B8ZS) can represent a byte containing all 0s by creating a couple of bipolar violations. If a T1 circuit using B8ZS line coding experiences two bipolar violations at very specific bit positions, as shown in Figure 3-11, the equipment the T1 connects to (for example, a router) knows that a byte containing eight 0s is being transmitted. Therefore, in the case of B8ZS, two wrongs really do make a right. While T1 circuits commonly use B8ZS, you might see something called High Density Binary 3 (HDB3) used on E1 circuits. Like B8ZS, HDB3 overcomes the limitations of AMI.
Figure 3-11. Bipolar 8-Zero Substitution (B8ZS)
Just as an FXS port needs some type of signaling (for example, loop start or ground start) to determine when a phone is on-hook or off-hook, a T1 circuit also needs a signaling mechanism. Two approaches to sending signaling across a T1 circuit include:
Let us consider each of these approaches in a bit more detail. The simplest approach to understand is CCS. As the name suggests, all of the channels used for sending voice, video, or data use the same channel (that is, a "common channel") to send signaling information. A signaling protocol is sent over this dedicated channel.
A popular technology that leverages CCS is ISDN. An ISDN circuit is made up of B-channels and a D-channel. A B-channel is a "bearer" channel, which carries the voice, data, or video. These bearer channels typically carry information at a rate of 64 kbps. The D-channel acts as the "signaling" channel, meaning that the D-channel carries the data necessary to set up and tear down calls on the B-channels. Depending on your bandwidth needs, you might select either the BRI or the PRI flavor of ISDN.
The D-channel in each of these instances uses Q.931 as its signaling protocol. PRI ISDN connections are often used to connect a company's PBX to the PSTN. However, we might see BRI ISDN used in a small office/home office (SOHO) environment.
ISDN was developed during the 1980s and is, therefore, a very mature protocol. When I was first introduced to ISDN, back in 1988, web browsers were not available yet, and the thought of having 128 kbps of bandwidth in a home seemed to be overkill. In fact, we used to say that the acronym ISDN stood for "I Still Don't Need it."
Next, consider how CAS carries signaling information for a T1. Recall that a T1 doesn't send individual frames. Rather, a T1 sends a Super Frame (containing 12 standard frames) or an Extended Super Frame (containing 24 standard frames). Therefore, an Extended Super Frame contains 24 framing bits, one bit from each standard frame it contains. The Extended Super Frame does not need all 24 of these framing bits. So, some of those bits can be used to send signaling information. Specifically, every sixth bit in a Super Frame or an Extended Super Frame can be used as a signaling bit, as shown in Figure 3-12.
Figure 3-12. "Robbed-Bit" Signaling
Because the CAS approach takes these unneeded framing bits and uses them for signaling, this approach is often referred to as "robbed-bit signaling." With CAS, all 24 of a T1's channels can be used for voice, data, or video because none of the channels are dedicated solely to signaling.
Just as T1 circuits are popular in North America, E1 circuits are commonplace in Europe. An E1 circuit has 32 channels, as opposed to the 24 channels available in a T1. The first of those 32 channels is dedicated to framing and synchronization, while the seventeenth channel is dedicated to signaling. Coming off our discussion of how a T1 can free up its signaling channel using CAS, it might be tempting to think we could do the same with an E1 circuit, giving us 31 usable channels to send our voice, video, and data. However, an E1 circuit approaches CAS very differently than a T1.
On a standard E1 circuit, the seventeenth channel is always used for signaling, regardless of whether we are doing CAS or CCS. The good news at this point is that you don't have to relearn how CCS is performed, because like a T1, a signaling protocol (for example, Q.931) is sent over an E1's signaling channel.
We should spend some time, however, delving into how an E1 CAS functions. To begin with, you need to understand that an E1 doesn't use the Super Frames or Extended Super Frames you saw in the T1 world. Rather, an E1 combines 16 frames together in a multiframe. If we examine the first frame in a multiframe and look at its seventeenth channel, we discover that the seventeenth channel indicates the beginning of this multiframe. But then if we take a close look at the second frame in a multiframe, we see that its seventeenth channel is used to send signaling information. Specifically, 4 bits of signaling information for channel number 2 and 4 bits of signaling information for channel number 18 are carried in the seventeenth channel of the second frame in an E1 multiframe. Similarly, the seventeenth channel of the third frame in a multiframe carries 4 bits of signaling information for channel 3 and 4 bits of signaling information for channel 19, as shown in Figure 3-13. This process continues for each of the remaining frames in the multiframe, such that the multiframe sends signaling information for 30 channels, which is exactly the number of channels we use in an E1 to send voice, video, and data.
Figure 3-13. E1 Multiframe
Thus far in this chapter, we examined how an IP WAN can replace a PBX-to-PBX trunk connection and how our Cisco router can connect to various analog and digital ports. Let's put all the pieces together by considering a sample VoIP migration scenario.
In this scenario, our company currently has a main office in Austin, TX and two branch offices, in San Jose, CA and Knoxville, TN. The Austin location has a PBX system, and each branch office has a key system. The key systems each have a dedicated T1 trunk connection back to the PBX in Austin. To support the Austin office's relatively high call volume, an ISDN PRI connection connects the Austin PBX to the local telephone company's CO. The branch offices each have four Plain Old Telephone Service (POTS) telephone lines connecting to their local COs to support local calls, as show in Figure 3-14.
Figure 3-14. Scenario Topology Before Migration
Our goal in this scenario is to replace the key system-to-PBX trunk connections with VoIP connections and, in preparation for removing the PBX, to have the Austin, San Jose, and Knoxville CO connections terminate on a router, as opposed to a PBX or a key system.
As a first step, we can replace the existing trunk connections from the branch offices to the main office with VoIP connections over the IP WAN. Because the PBX and key systems already have T1 interfaces, we can leverage the company's existing investment in these interfaces and purchase T1 interfaces for our Cisco routers. The PBX at the main office (that is, the Austin office) can then connect to a router located at the Austin location via a T1 connection. Similarly, the key systems at the San Jose and Knoxville locations can connect to local routers using T1 connections. The routers at these locations all connect into a service provider's IP WAN. For this scenario, assume the routers connect into a Frame Relay network using a hub-and-spoke topology, where each of the branch offices has a Frame Relay permanent virtual circuit (PVC) connecting back to the main office, as shown in Figure 3-15.
Figure 3-15. Scenario Topology Migration Step 1
Our VoIP migration already eliminated the recurring cost of the dedicated PBX-to-key system trunk connections. However, another requirement was to take the CO connections at each location and terminate those connections on a router. At the main site, the PBX currently connects to the local CO using an ISDN PRI circuit. Therefore, we can install a T1 interface in our Cisco router, and configure that interface to function as an ISDN PRI interface. Then we can move the PRI connection from the PBX to the router. In a similar fashion, we can move the existing POTS telephone lines from the key systems at the branch office locations and terminate those lines on FXO ports in the local routers, as shown in Figure 3-16.
Figure 3-16. Scenario Topology Migration Step 2
Even though this scenario did not involve converting any of the company's phones to IP phones or connecting any phones directly to a router, we did eliminate recurring costs for trunk lines and simultaneously laid the foundation for an IP telephony network that can, in the future, replace the PBX at the headquarters with a Cisco CallManager cluster; and replace the key systems at the branch offices with, perhaps, a CallManager Express (CME) router. Also, this future IP telephony network can replace existing analog and digital phones, currently connecting to the PBX and key systems, with IP phones.
At this point, we have seen how voice ports are used on our voice-enabled routers. However, the routers are not yet trained to reach specific destinations. In order to give our routers call routing intelligence, we create dial peers that inform our routers how to reach specific phone numbers. Consider the topology in Figure 3-17.
Figure 3-17. Dial Peers and Call Legs
Routers R1 and R2 each have a POTS dial peer that points to their locally attached phone, and a VoIP dial peer that points to the IP address of the remote router.
Therefore, when extension 1111 dials extension 2222, router R1 searches for a dial peer that matches a destination pattern of 2222. In this case, R1 has a VoIP dial peer that points to R2's IP address of 184.108.40.206. R1 then forwards the call to R2. R2 then receives the incoming call destined for extension 2222. R2 searches for a dial peer that matches a destination of 2222, and it finds a POTS dial peer that specifies FXS port 1/1/1. The FXS port then sends ringing voltage out port 1/1/1. Extension 2222 rings and goes off-hook, and the end-to-end connection is complete.
Notice that there are a total of four dial peers, which allow a call in the opposite direction. Also, notice that four stages of the call (that is, call legs) are definedtwo call legs from the perspective of each router: