Thursday, March 20, 2008

Hubs, Switches And Routers - What's The Difference?

The backbone of a computer network uses 3 types of devices to interconnect computers -- hubs, switches and routers. Each is important and serves a different role in facilitating communication between networked computers. From the outside these devices may look similar -- small, metal boxes with multiple connectors or ports where ethernet cables are attached (routers may also expose other types of connectors). The terms 'hub', 'switch', and 'router' are often used interchangeably and misused -- in fact, the devices are quite different. Hubs are used to simply interconnect individual computers. Switches do the same (but more efficiently). However, routers interconnect different networks (as opposed to individual machines).

Network Hub:
Compared to switches and routers, hubs are the least expensive, simplest device on the network. All data that enters one port of the hub is sent out all the other ports. Hence, all computers connected to the same hub see each other's network communications. The hub doesn't pay any attention to the transmitted data, it simply passes it along to its other ports. A hub's value lies in the fact it is inexpensive and offers a quick and easy way to connect computers in a small network.

Network Switch:
The job of a switch is similar to a hub's -- but it does it more efficiently. Each packet of data (ethernet frame) that is transmitted on the network has a source and destination mac address. A switch has the ability to remember the address of each computer attached to its ports and will act as a traffic cop -- only passing transmitted data to the destination machine and not all the others. This can have a significant positive affect on network performance because it eliminates unnecessary transmissions and frees-up network bandwidth. A switch can be thought of as the central component of a single network. It is used to interconnect devices on the network and to deliver layer 2 (OSI model) frames. A switch differs from a hub in that it does not retransmit frames to all other devices -- rather, a switch makes a direct link between the transmitting and receiving devices.

Network Router:
Compared to switches, routers are slow and relatively expensive. A router is an intelligent device that interconnects two or more networks for the purpose of delivering layer 3 (OSI model) packets. Since there may be more than one possible path, a router takes into account multiple criteria when determining which path to send the data packets. The fact that switches and routers operate at different layers of the OSI model indicates they rely on different information (contained in the frames or packets) to send data from a source to a destination.

An important difference between switched and routed networks is switched networks do not block broadcasts. As a result, switches can be overwhelmed by broadcast storms. Routers block LAN broadcasts, so a broadcast storm only affects the broadcast domain from which it originated. Since routers block broadcasts, they also provide a higher level of security than switches.

Analogy
Here's an analogy to help explain the difference between a router and switch -- a corporation's mail room. When an employee sends a letter it may (a) be delivered to its final destination by the company's internal mail delivery system or, (b) taken to the local Post office (if the recipient resides outside the company). A switch represents the corporation's mail room, and a router the local Post office.

A switch does not look inside the mail or examine the type of mail being delivered. The only logic behind a switch is a table of mac addresses (one for each computer on the network) and which port a destination mac is connected. That is, the switch stores a table of company employees and their office numbers and is responsible for delivering internal mail directly to employees. So, if mail arrives at the switch that is destined for an employee then a switch knows how to deliver it. A router, on the other hand, is responsible for delivering mail destined for individuals outside the company. In addition, routers can look inside the mail and delivery rules can be applied based on the mail's contents. This feature allows routers to play an important role in network security.

How a Switch Operates:
Switches are essentially multi-port bridges. They were designed to reduce the size of collision domains. In addition to faster CPUs and memory, two other technological advances made switches possible -- Content Addressable Memory (CAM) and application-specific integrated circuits (ASIC). CAM is memory that works backward compared to conventional memory -- that is, given a data value the memory returns the associated address. This allows a switch to directly find the port associated with a mac address (the data value). An ASIC is a device that can be programmed to perform functions at logic speeds in hardware. The use of CAM and ASIC technologies greatly reduced the delays caused by software processing and enabled a switch to keep pace with the demands of high data rates in Ethernet networks.

Switches can operate in one of three modes -- store-and-forward, cut-through and fragment-free. The trade-offs are performance versus reliability. In store-and-forward switching the switch reads the entire frame and checks for errors. In cut-through switching the switch reads the beginning of the frame up through the destination mac address. In fragment-free switching the first 64 bytes of a frame are read -- enough to determine whether or not it is a collision fragment (which account for the majority of frame errors).

The Layer 2 switch builds its forwarding table using mac addresses. When a host has data for a non-local IP address, it sends the frame to the closest router (also known as its default gateway). The host uses the mac address of the router as the destination mac address.

How a Router Operates:
Just as a switch keeps a table of known mac addresses, a router keeps a table of IP addresses known as a routing table. An important function of a router is to maintain these tables and make sure other routers are notified of changes in the network topology. This function is performed using routing protocols to communicate with other routers. When packets arrive at a router's interface it applies various criteria and protocols to determine the best path on which to transmit the packet to its next destination.

A router can be programmed to apply sophisticated rules based on the contents of the data packets that it sees. For example, routers can be programmed to act as hardware firewalls, can implement network address translation (NAT) and provide DHCP services to the network.

Because of their built-in intelligence, routers are generally considered the most complex devices on a network. In addition to directing packet traffic, routers can be configured to monitor network traffic, adapt to changes in the network that they detect dynamically, and protect networks by filtering packets and determining which packets will be blocked or allowed through.

Steve Leytus is a senior software engineer and develops applications for NutsAboutNets.com. For more information about AirSleuth 2.4 GHz Spectrum Analyzer and other low cost, PC-based diagnostic tools for installing, optimizing and trouble-shooting 802.11 (Wi-Fi) wireless networks please visit www.NutsAboutNets.com.

Yoga Zone And Pilates

Tips for International Travel

International travel has a few extra rules to follow. To insure a quality travel experience and to avoid trouble, know these tips.

Always bring your ATM card with you. You will be charged a transaction fee by your bank each time you withdraw cash from an ATM machine, but this is your best bet. Just remember to withdraw a few larger amounts as opposed to daily, smaller amounts to avoid numerous bank charges. most banks charge $1.50 - $5.00 per transaction. Also, depending on the kind of ATM card you have, you may be able to use it in restaurants/stores if the place of business accepts Visa or Mastercard.

When used as a credit card, it will automatically come out of your checking account. In this case, you won't be charged the bank's normal transaction fee. You must remember that many small villages do not have ATM machines, so plan accordingly. Never go to the exchange store fronts on the street or you will be charged a hefty fee. Also, you should bring the name and phone number (the direct line) of your banker just in case you need funds made available while abroad.

credit cards are another good option since you will get that current day's exchange rate when you receive your bill upon your return home. credit cards are widely accepted at hotels, restaurants and shops. It is a good idea to bring two different types (Visa or MasterCard and American Express) in case one is not accepted. Keep in mind that most credit card companies charge an additional fee for using credit cards internationally which is usually between 2-3% so check with your credit card company prior to your departure.

Bring more film than you think you will need since film is usually more expensive overseas. Always check the expiration of any film bought overseas.

Bring your passport and make sure it hasn't expired. Before departure, make a copy of your passport and airline tickets and keep in a separate place.

In Italy, you can also change money in the Italian Post Office. They often have better exchange rates and are open Saturday mornings.

I do not advise bringing traveler's checks. I have found that many restaurants and stores do not accept them because of currency fluctuation but you can exchange them at hotel front desks and banks.

Always bring comfortable, "already-broken in" footwear. Don't make the mistake of bringing brand new shoes! Never bring high heels - they will certainly get stuck in the cobblestones in the small villages. Remember, many of these European villages are very hilly with rocky textures.

Before I pack, I make a habit of checking the weather forecast of the country to which I will be traveling. Also, I bring a light jacket and a small umbrella.

For those die hard shoppers, always bring an extra, collapsible suitcase for those precious purchases. You dont want to break your new possessions by placing smashing them into your packed suitcase.

Expanding on the previous note, if you wish to purchase art/home decor while away, always bring the measurements of that area of your home (i.e. table measurements for tablecloths, bed measurements for linens, etc.)

Don't forget your laptop hardware, chargers (for cell phone, digital camera, etc.) and converters (hairdryer, electric shaver, etc.).

If you don't have a cell phone, remember to bring your home telephone company's Access codes to be sure you get the best rate in calling home. (Each country has a different access code so call your phone company).

If you want to check your email while away and don't have a laptop, remember to bring your email access website information (i.e. www.mail2web.com - you will need your username and password). I always bring my Blackberry to Europe since the service provider has international access. Also, bring your address book - you may want to send postcards!

Laundry services are very expensive overseas so if you want to pack lightly, bring some Woolite to rinse out clothes in the sink. Also, make sure you bring an extra pair of sunglasses.

To avoid over packing, check with your hotel to see if they have a hairdryer and an iron/ironing board.

Always pack a swimsuit - even if it's winter, you'll never know if there might be a heated pool or Jacuzzi!

Use village names as landmarks as opposed to route numbers. By taking these precautions and preparations, you can spend your international vacation enjoying yourself and the surroundings without worrying about the little things.

Jo-Ann Gaidosz is the founder of Active Gourmet holidays, LLC,(http://www.activegourmetholidays.com) which specializes in European Wine Tours, Italian Culinary Tours, french Culinary Tours, Cooking Classes in Italy, and Italian Cooking Schools.

Cleaner