With the upsurge in broadband Internet access and home networking in general, dealers and integrators are finding themselves and their staff working more frequently with networksespecially as many multi-room AV and home control systems adopt a digital, networked, IP-based approach. As the Internet protocol (IP) has become the networking standard of choice, it pays to gain more familiarity with its in and outs.
To help promote interoperability among networks, the International Standards Organization (ISO) developed a conceptual framework for networking and communications, known as the Reference Model for Open Systems Interconnect, or OSI Model, which classifies networking software and protocols into seven layers (see sidebar). The OSI Model is the conceptual blueprint for the OSI network protocols that the ISO developed, as well as attempts to rationalize the tower of networking Babel that had developed in the early years. If networking software and protocols could be modularized and structured to fit into the OSI Model, it could allow changes in one module of a software stack without having to touch other components in the stack.
While todays networking software and protocols dont all fit perfectly into the OSI Model, it still has had a beneficial effect on network interoperability. For example, its now possible on most computers to swap out an ethernet interface in favor of an IEEE 802.11g (WiFi) interface, without affecting any of the upper-layer software.
Peeling the Onion
The payload, or information carried within a Layer-2 frame, is typically a TCP or UDP packet. The former is considered the standard protocol used on the Internet, while the latter is more free form and user definable. Like Russian dolls, the payload within a TCP or UDP packet can nest within another packet.
Protocol analyzers are specialized computers or software that can decipher the various protocols. They let technicians see precisely what traffic is flowing across network segments. Often, color-coding is used to distinguish between the different protocol layers within the network frame.
It would be difficult to run the U.S. Mail system without addresses. The same applies to networks. In ethernet LANs, the ethernet address is hard-wired into each network adapter by the adapters manufacturer. Its a 48-bit (6-byte) address thats typically written as a series of hexadecimal numbers, separated by colons (for example: 00:aa:01:02:01:fc). The first three bytes are assigned to a manufacturer, while the remaining bytes are assigned by the manufacturer, typically in serial fashion. Each ethernet address is guaranteed to be unique. While each ethernet adapter can read each frame as it arrives, its programmed to only pay attention to frames that are addressed to it.
What about connecting an ethernet LAN to the Internet, or tying a number of LANs together into a larger wide-area network (WAN)? Thats where Layer-3 addressing and the Internet protocol come in. Since youve got to run IP if you want to be on the Internet, most computer manufacturers and networking equipment makers have adopted it as their native networking protocol.
Unlike ethernet and many other Layer-2 addresses, which are hard-wired into the network interface, IP addresses are assigned either administratively or by an automated process. The current IP Version 4 (IPv4) addressing scheme utilizes 32-bit (4-byte) addressing. This allows for approximately 4.3 billion possible addresses. To write and communicate IPv4 addresses, the dotted-decimal format is use (for example: 18.104.22.168). A portion of the 32-bit address is used to denote a network number, while the remaining bits are used to indicate a specific host (computer) on that network segment. Thus, all hosts on a particular network segment will have the same network number, but the host portion of the address will be unique for each host.
Just how much of a given IP address is devoted to the network number depends on the class of network to which a host is assigned. For Class A networks, the first byte is used for the network number; the remaining three bytes (24 bits) are used for the host number. Class B networks use the first two bytes of the IP address as the network number, while for Class C nets, its the first three bytes.
To rout packets correctly, each IP address must be unique. At the highest level, the Internet Assigned Numbers Authority (IANA) assigns blocks of addresses to organizations, according to need. These large blocks are typically doled out to regional authorities who further subdivide them and assign them to Internet service providers. ISPs then assign smaller blocks of numbers to their customers.
With subnetting, one or more of the bits that would normally be used for the host portion of the IP address are taken instead to be added to the network number portion of the address. Each host and router needs to know what portion of the IP address represents a network number and what represents the host number. With classed addressing, thats easily done by examining the three most-significant bits of the address. But in subnetting, that concept falls apart. Therefore, a number known as the subnet mask must be defined. The subnet mask is typically expressed in the same dotted-decimal format used for IP addresses, but to understand how it is used, its better to convert it into binary format, where each 1 bit designates the portion of the IP address thats used for the network number, and 0 bits occupy the host portion of the address.
Currently, the technique of using variable-length subnet masking helps to get around issues of poor IP address utilization. This permits an organization to subdivide a block of network numbers into smaller blocks, which can have varying amounts of host numbers, according to need. This has been formalized as classless inter-domain routing, or CIDR and it greatly reduces the waste of network numbers that arent actively being used. This is a very important consideration under IPv4, which only has a 32-bit wide address space.
Static and Dynamic IP Addresses
Static IP addressing procedures are the simplest in concept. A manual configuration, process, each host is assigned an IP address, based on the number of the networks upon which it resides, with the addition of the host number that uniquely describes that node.
With dynamic IP addressing, the IP address can be dynamically assignedby an ISP, for exampleor generated locally, using the host configuration protocol (DHCP). Dynamic addressing more efficiently utilizes the number of available IP addresses, particularly when many hosts are not always logged onto the network. With dynamic addressing, a pool of IP addresses can be held in reserve and only issued to a particular host when it actually needs it. Thus, a pool of IP addresses can be shared by a larger number of devices. The biggest benefit of dynamic addressing is that it avoids the time and effort of manual configuration. It also reduces human error.
Web servers, mail servers, and other devices and services that must be accessible on the Internet are given static (unchanging) IP addresses, as other hosts need to know the IP address of these servers, to access them. Computers that are used simply as network clients (to browse the Web, or send and receive e-mail, for example) can use dynamically assigned IP addresses.
The simplest example of IP-based forwarding (routing) is when two hosts reside on the same network. The host that wishes to send a packet to the destination host will know that both are on the same network if the network number portion of the recipients IP address matches that of the sender. It will use the subnet mask to determine what bits in the IP address correspond to the network number.
If the two hosts are on different networks, however, then a router is needed. In this case, the sending host addresses an IP packet and places it in an ethernet frame but it addresses the ethernet frame to the IP router (often referred to as a gateway) responsible for that subnet.
When configuring a computer that will reside on an IP network, its necessary to configure it with the following information: its IP address, the subnet mask, and the IP address of the gateway router for that network or subnet. This may be done manually or dynamically.
Switching vs. Routing
Ethernet bridges and switches operate at Layer-2 and are not routers. Bridges merely forward frames from one ethernet segment to another, connecting two or more electrically isolated segments together to form a larger LAN. ethernet switches also forward frames, but they examine the destination ethernet (Layer-2 or MAC-layer) address, and only forward the frame to the port to which the destination device is attached. Routers operate at Layer-3 and examine IP addresses and make forwarding decisions accordingly.
While classic, pure ethernet switches dont route, there is now a class of switches known as Layer-3 switches that know how to examine the IP addresses on IP packets riding in ethernet frames and can make forwarding decisions in the same manner as an IP router. For all practical purposes, they are functionally equivalent to routers. Many home and business networks use Layer-3 switches in place of routers, and they work well in those application.
Static Routes and Dynamic Routing
Under static routing, the route that packets will take from Point A to Point B needs to be defined before it can be used. With dynamic routing, routers learn what hosts are attached to each of their ports by watching the packet traffic and use a discovery process for finding a workable route. There are also established protocols for routers to talk with one another, and exchange or update routing information. The routing information protocol (RIP) is one such routing protocol, and the border gateway protocol (BGP) is another.
Network Address Translation
Network address translation (NAT) permits hosts on a private LAN to have IP addresses that are different from the IP address seen on the Internet side of a gateway. When NAT is used, theres one deviceoften an Internet firewall that has NAT capabilitiesthat handles the translation of IP addresses between the Internet side of the gateway and the private LAN.
NAT is a very useful security technology because no hosts on the Internet can see the IP addresses of the hosts that sit behind the NAT firewall; all they see is the address of the firewall itself. Moreover, the NAT firewall is programmed to block any incoming packets that are direct replies to service requests initiated by one of the hosts on the LAN. But NAT can also conserve a lot of IP addresses, which are scarce under Ipv4, because it makes the private network invisible to the rest of the Internet, allowing you to use IP addresses on the private network that might be duplicates of public IP addresses, thus avoiding address conflicts.
Unicast vs. Multicast
Most sent IP packets are unicast, meaning that the packet originates from a single IP source address, and it is addressed to a specific destination host IP address.
An IP broadcast packet will be read by all hosts on the network from which it is sent, and involves setting all binary ones in the host portion of the destination IP address. Broadcasts can only be used on the local IP network number; routers wont forward a broadcast to another network.
Broadcasts are great for sending information out to every host on a subnet, but there might be a time when you just want to reach a select group of hosts that might reside in different subnets. For this, IP multicast was developed. Here you send packets to a group by addressing them to a multicast address, which is governed by rules of how the group is formed, how hosts join or leave a group, etc. These rules are codified in the Internet group management protocol (IGMP). Network switches and routers play a key role in multicasting and must be IGMP-enabled.
Multicasts come into play in multi-room audio and video distribution systems that utilize networks for signal distribution. Michael Braithwaite, CTO of NetStreams, explained that in the example of a multi-room audio (or video) system that is sending a program feed to a single zone or to multiple zones each using a different source, unicasts work well, as there is a single source and single destination. IP multicasting would be used when two or more zones have selected the same source.
While the simple switch might be fine for a data-only home network, for one thatll be part of a NetStreams audio distribution system, Braithwaite recommends a fully managed, Layer-3 switch thats IGMP v3-compatible. Beyond that, make sure that the switch has enough memory to store a sufficient number of multicast addresses1,000 multicast addresses is his recommendation.
Sometimes youll find on the data sheet that it can store 256 multicast addresses, Braithwaite said. That sounds like a lot for a home, but multicast addresses are not just used for the primary content coming in, but also for metadata, [image] thumbnails, for album artall kinds of stuff. So, in a small system that might have [less than] 20 zones of audio, and under 20 sources, you can easily use 400 to 500 multicast addresses. A single source, depending on what level of Web services are available, can command up to 50 multicast addresses, if youre really doing a lot of stuff with them.
If youre planning to use the switch in a networked video distribution application, be sure the network will support the throughput required. Delivering 1080i HD takes an entire gigabit [1,000 Mbps] on each port, noted Braithwaite.
Simply using any Gigabit ethernet switch doesnt necessarily do the job. The switch should be capable of forwarding packets at the full gigabit wire-rate on all ports simultaneously. For a 24-port switch, Braithwaite recommends looking for a one capable of an aggregate throughput of 40 to 80 Gbps. Even with the biggest switches, Braithwaite said, as soon as you get something like 10 streams of 1080 HD video, itll take down almost any switch, unless you really do look for a switch fabric that can handle the full bandwidth of all the ports…Thats the reason why there is a switch thats $2,000 and another thats $200.
Alan R. Frank ([email protected]) is a networking consultant and