YOMEDIA
ADSENSE
Networking With Vista P2
86
lượt xem 10
download
lượt xem 10
download
Download
Vui lòng tải xuống để xem tài liệu đầy đủ
The switch then forwards data from one network node to another. On basic switches such as the type used in homes or small offices, the switch usually reads the MAC address of the destination node in each ethernet frame and sends the frame directly to that device. Most switches maintain a switching table, a record of the MAC addresses and network port numbers used by each device on the network.
AMBIENT/
Chủ đề:
Bình luận(0) Đăng nhập để gửi bình luận!
Nội dung Text: Networking With Vista P2
- CHAPTER 1 Understanding Ethernet Networking 23 network segment, a collection of network devices connected to a single switch. (If this network segment comprises your entire network, you can call it a switched network.) 1 Switch Computer Computer Computer FIGURE 1.9 You can use a switch as the central connection point for your network. The switch then forwards data from one network node to another. On basic switches such as the type used in homes or small offices, the switch usually reads the MAC address of the destination node in each ethernet frame and sends the frame directly to that device. Most switches maintain a switching table, a record of the MAC addresses and network port numbers used by each device on the network. As you use your network, the switch makes note of each new MAC address and adds it to the switching table, which improves overall switch performance. You can also use a switch to send data across multiple network segments. For example, you might have a network segment in one room or office and a sec- ond segment in the room or office next door. Similarly, if your network out- grows your original switch, you might add a second switch to the network instead of upgrading to a switch with more ports. To join the two segments, you have three choices: ■ Many older switches come with a special uplink port that’s designed to connect two switches by running a network cable from the uplink port of one switch to the uplink port of note The network config- uration shown in Fig- the other switch. On some of these ure 1.9—that is, multiple network nodes joined to a central connec- switches, a button controls whether tion point—is called the star the port is used as a regular RJ-45 topology. port or an uplink port.
- 24 Networking with Microsoft® Windows Vista™ ■ Use an ethernet crossover cable to link two switches by running the cable from any port in the first switch to any port in the second switch. 1 ■ Get switches where the ports support Auto Crossover (also called Auto MDI/MDI-X crossover detection; MDI stands for Medium-Dependent Interface). This enables you to connect two switches without using an uplink port or a crossover cable. As with NICs and cables, all switches support one or more of the ethernet standards. For example, a Fast Ethernet switch will almost always support 10/100 connections, whereas a Gigabit Ethernet switch will usually support 10/100/1000 connections. Make sure you match your switch to the ethernet standard you’re using on your network. Understanding Routers You saw in the previous section that a switch forwards ethernet packets according to the device MAC address in the frame header. This works extremely well, and most modern switches are high-performance devices. However, the inherent limitation of a switch becomes obvious when you want to add an Internet connection to your network: ■ When you want to request data from a web server, it’s impossible to know the MAC address of the remote server computer, so the switch has no way to forward the data request. ■ When a web server wants to send data to your computer, it’s impossi- ble for the remote machine to know your computer’s MAC address, so the switch cannot get the data to your computer. In other words, the MAC address-based forwarding performed by a switch is limited to LAN traffic and cannot be used to handle WAN (wide area network) data. To solve this problem, you need to add a router to your network (see Figure 1.10). A router is a device that makes decisions about where to send the net- work packets it receives. So far, this sounds suspiciously similar to a switch. The major difference is that while a switch uses a note A wide area network is network that cov- MAC address-based switching table to for- ers a wide geographical area. Some corporations use wide area ward data, a router uses a routing table networks, but the Internet is the that tracks IP addresses, unique addresses wide area network. assigned to every Internet host and to
- CHAPTER 1 Understanding Ethernet Networking 25 every computer on your network. For example, this is useful when the com- puters share a high-speed Internet connection, because the router ensures that the Internet data goes to the computer that requested it. To make this work, 1 you plug your high-speed modem directly into the special WAN port in the back of the router. FIGURE 1.10 You add a router to your network when you want to add Internet access. Understanding IP Addresses An IP address is a 32-bit value assigned to a computer by a network adminis- trator or, if you’ve signed up for an Internet account, by your Internet service provider (ISP). As you’ll see in a minute, these addresses are designed so that every host and router on the Internet or within a network has a unique address. That way, when an application needs to send data to a particular locale, it knows that the destination address it plops into the packet header will make sure that everything ends up where it’s supposed to. The problem with IP addresses is their “32-bitness.” Here’s an example: 1100110111010000111000100000010
- 26 Networking with Microsoft® Windows Vista™ Not very inviting, is it? To make these numbers easier to work with, you use dotted-decimal notation (also known in the tip You can convert a value from binary to decimal 1 using Windows Vista’s Calculator. trade as dotted-quad notation). This notation Select Start, All Programs, Acces- divides the 32 bits of an IP address into sories, Calculator, and then, in the four groups of 8 bits each (each of these Calculator window, select View, groups is called a quad), converts each Scientific. Click the Bin (binary) option, use the text box to type group into its decimal equivalent, and then the 1s and 0s of the binary value separates these numbers with dots. you want to convert, and click the Let’s look at an example. Here’s the previ- Dec (decimal) option. ous IP address grouped into four 8-bit quads: 11001101 11010000 01110001 00000010 Now you convert each quad into its decimal equivalent. When you do, you end up with this: 11001101 11010000 01110001 00000010 205 208 113 2 Now you insert dots between each decimal number to get the dotted-decimal form of the address: 205.208.113.2 The Router and Dynamic IP Addressing The MAC addresses of network devices are assigned in advance by the device manufacturer. How, then, are IP addresses assigned? For the servers and other remote machines you deal with on the Internet, each network that wants on the Internet must sign up with a domain registrar (such as VeriSign.com or Register.com). In turn, the registrar assigns that network a block of IP addresses that the administrator can then dole out to each computer (or, in the case of an ISP, to each customer). For your own network, however, the IP addresses are assigned as follows: ■ Your router is given its own IP address—called the public IP address— from the pool of addresses controlled by your ISP. Internet data sent to any computer on your network is first sent to the router’s external IP address. ■ The computers on your network are assigned IP addresses. In other words, when a computer logs on to the network, it is assigned an IP
- CHAPTER 1 Understanding Ethernet Networking 27 address from a pool of available addresses. When the computer logs off, the address it was using is note When a device such as a router is set up 1 as the sole connection point returned to the pool. The system between a network and the that manages this dynamic alloca- Internet, that device is called a tion of addresses is called the gateway. Dynamic Host Configuration Protocol (DHCP), and the computers or devices that implement DHCP are called DHCP servers. In most home networks, the router acts as a DHCP server. In most cases, the range of addresses is from 192.168.1.1 to 192.168.1.254. (On some routers, the range is from 192.168.0.1 to 192.168.0.254.) The router itself usually takes the 192.168.1.1 address (this is called its private IP address), and the pool of possible addresses is usually some subset of the total range, such as between 192.168.1.100 and 192.168.1.150. The big advantage of this setup is that your network is never exposed to the Internet. All communication goes through the router’s public IP address; so as far as, say, a web or email server is concerned, it’s communicating with a device at that address. The router is able to get the correct data to your com- puter because when you initially request data, it adds your computer’s private IP address and the number of the communications port your computer is using and stores this data in a routing table. When data comes back from the Internet, the router converts the public destination IP address of the data to the private address of your computer, a process known as network address translation (NAT). The Router as Firewall On a small network, the main function of a router is to be used as a gateway between your network and the Internet. Through the magic of NAT, your net- work cannot be seen from any device attached to the Internet; as far as the Internet is concerned, your network is nothing but a router. (For this reason, an Internet-connected router that performs NAT duties is sometimes called an edge router.) NAT, therefore, acts as a kind of simple firewall, a technology that prevents unwanted data from reaching a network. However, most modern routers go one step further and come with separate firewall software. This gives you an interface for controlling and managing the firewall, which mostly means opening and closing specific software ports used by applications. For example, you’ll see in Chapter 19, “Setting Up a Website,” that to successfully use a web server on your network you need to configure the router’s firewall to allow incoming connections on port 80.
- 28 Networking with Microsoft® Windows Vista™ The Router as Switch You’ve seen that a router can act as a gateway device and a firewall device, 1 but there’s a third hat that’s worn by most modern routers: a switch device. A typical router has a few RJ-45 ports (usually four; see Figure 1.11); so, as with a dedicated switch, you can create ethernet connections for computers and other devices by running ethernet cable from each device to a router port. WAN port (for broadband modem) RJ-45 ports FIGURE 1.11 Most routers have built-in switches, meaning you can use the router’s ports to connect devices to your network. This means that if you have a small ethernet network, you might be able to get away with using just a router as your network’s connection point. Figure 1.12 shows this network configuration. On the other hand, if your network is larger or if you have a number of other devices you need to connect, your router might not have enough ports. Similarly, you may be upgrading your network to Gigabit Ethernet and your router only comes with Fast Ethernet (or 10/100) ports. In both cases, the easiest solution is to leave your existing router in place and add to the network a dedi- cated switch that meets your needs. In this scenario, you connect the broad- band modem to the router’s WAN port, you run a network cable from one of the router’s RJ-45 ports to an RJ-45 port on the switch, and you connect your network devices to the switch. Figure 1.13 shows this network configuration.
- CHAPTER 1 Understanding Ethernet Networking 29 Internet 1 Cable/DSL Modem Router Computer Computer Computer FIGURE 1.12 A small ethernet network can use a single router as both the gateway and the switch. Internet Cable/DSL Modem Router Switch Computer Computer Computer FIGURE 1.13 Larger ethernet networks may require a dedicated switch as the central network connection point.
- 30 Networking with Microsoft® Windows Vista™ Understanding Other Ethernet Devices To round out your look at ethernet hardware, the next few sections give you a 1 quick overview of a few other devices you can connect to your ethernet net- work. Network Attached Storage A network attached storage (NAS) device contains one or more hard drives and plugs into a switch or router. This enables the client computers on the network to store files on the device rather than on a network share. If you have one or two internal hard drives lying around, you can purchase just the NAS enclo- sure and attach the drives yourself. In this case, make sure that the NAS enclosure’s interface supports your hard drive type (for example, ATA versus SATA). Many NAS devices also come with one or more USB ports, which means you can expand the device’s storage space by attaching one or more external USB hard drives. Figure 1.14 shows a typical NAS enclosure. FIGURE 1.14 With a NAS enclosure, you attach one or more internal and external hard drives that a network computer can then access directly.
- CHAPTER 1 Understanding Ethernet Networking 31 Print Server To print over the network, you normally share a printer that’s attached to one of the network computers. However, this requires that the computer with the 1 printer share that printer, it requires each person who wants to use the printer to connect to it, and it requires that the network computer always be on. These aren’t onerous demands, but they sometimes create enough of a hassle to make network administrators turn to dedicated print servers, devices that connect printers directly to the network. In some cases, a printer comes with a built-in RJ-45 port, so you need only run ethernet cable from the printer to an RJ-45 port in the switch or router. However, most consumer-grade printers don’t have a built-in NIC. In that case, you can get a print server that’s a separate box with either a parallel port or a USB port (or both), as well as an RJ-45 port (see Figure 1.15). You connect the printer to the print server’s parallel or USB port, and then connect the print server’s RJ-45 port to the switch or router. FIGURE 1.15 A print server device enables you to connect a printer directly to the network without having to share it through a network computer.
- 32 Networking with Microsoft® Windows Vista™ Digital Media Receiver Windows Vista programs such as Windows Media Player and Windows Media 1 Center can broadcast digital media over an ethernet connection. This is called streaming the media, and the data itself is called a stream. Other Windows Vista computers on your network can pick up and play that stream. However, you can also use a device called a digital media receiver (DMR) to access a media stream being sent over an ethernet connection and then play that stream through connected equipment such as speakers, audio receivers, or a TV. Examples of DMRs include the Xbox 360, the Roku SoundBridge, and the D-Link MediaLounge. Other DMR types include certain digital media players (such as MP3 players) and digital picture frames, which display images streamed over a network connection. Powerline Adapter You use a powerline adapter to connect a computer to your network using the AC power lines in your home or office. This device isn’t a NIC per se. Instead, it acts as a kind of bridge that connects a regular ethernet NIC to your net- work without having to connect that NIC directly to a switch or router. You actually need at least two powerline adapters. One adapter plugs into an AC outlet near your switch or router, and you then run ethernet cable from the switch/router to the powerline adapter, which effectively connects your home or office power lines to the network. You then plug a second powerline adapter into an AC outlet near the device you want to network, and you run an ether- net cable from the device’s NIC to the powerline adapter. You can repeat this for any number of devices. A Buyer’s Guide to Ethernet Hardware If you’re looking to purchase new ethernet hardware, whether you’re starting from scratch or looking to upgrade your existing equipment, the buying process is not always easy because you often face a thicket of jargon terms and a list of product specifications that seems to require an advanced degree in electrical engineering to figure out. To make it easier to choose the right ethernet hardware, the next few sections give you a few pointers on what to look for and what to avoid when purchasing the four main hardware types: NICs, cables, switches, and routers.
ADSENSE
CÓ THỂ BẠN MUỐN DOWNLOAD
Thêm tài liệu vào bộ sưu tập có sẵn:
Báo xấu
LAVA
AANETWORK
TRỢ GIÚP
HỖ TRỢ KHÁCH HÀNG
Chịu trách nhiệm nội dung:
Nguyễn Công Hà - Giám đốc Công ty TNHH TÀI LIỆU TRỰC TUYẾN VI NA
LIÊN HỆ
Địa chỉ: P402, 54A Nơ Trang Long, Phường 14, Q.Bình Thạnh, TP.HCM
Hotline: 093 303 0098
Email: support@tailieu.vn