📄 tyt13fi.htm
字号:
<PRE>
<FONT COLOR="#000080"># @(#)snmpd.comm 6.5 9/9/93 - STREAMware TCP/IP source
accnting 0.0.0.0 READ
r_n_d 147.120.0.1 WRITE
public 0.0.0.0 READ
interop 0.0.0.0 READ</FONT></PRE>
<P>Each line in the snmpd.comm file has three fields: the community name, the IP address of the remote machine, and the privileges the community has. If the IP address is set to 0.0.0.0, any machine can communicate with that community name. The privileges can be READ for read-only, WRITE for read and write, and NONE to prevent access by that community. Read and write access are references to capabilities to change MIB data, not filesystems.
<BR>
<P>The snmpd.trap file specifies the name of hosts to whom a trap message must be sent when a critical event is noticed. A sample snmpd.trap file looks like this:
<BR>
<PRE>
<FONT COLOR="#000080"># @(#)snmpd.trap 6.4 9/9/93 - STREAMware TCP/IP source
superduck 147.120.0.23 162</FONT></PRE>
<P>Each line in the snmpd.trap file has three fields: the name of the community, its IP address, and the UDP port to use to send traps.
<BR>
<BR>
<A ID="E69E173" NAME="E69E173"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>SNMP Commands</B></FONT></CENTER></H4>
<BR>
<P>UNIX offers several SNMP-based commands for network administrators to obtain information from an MIB or an SNMP-compliant device. The exact commands vary a little depending on the implementation, but most SNMP systems support the commands shown in Table 13.2.
<BR>
<BR>
<P ALIGN=CENTER>
<CENTER>
<FONT COLOR="#000080"><B>Table 13.2. SNMP commands.</B></FONT></CENTER>
<BR>
<CENTER><TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3 >
<TR>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P><B><I>Command</I></B>
</FONT>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P><B><I>Description</I></B>
</FONT>
<TR>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>getone
<BR>
</FONT>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>Uses the SNMP get command to retrieve a variable value
<BR>
</FONT>
<TR>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>getnext
<BR>
</FONT>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>Uses the SNMP getnext command to retrieve the next variable value
<BR>
</FONT>
<TR>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>getid
<BR>
</FONT>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>Retrieves the values for sysDescr, sysObjectID, and sysUpTime
<BR>
</FONT>
<TR>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>getmany
<BR>
</FONT>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>Retrieves an entire group of MIB variables
<BR>
</FONT>
<TR>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>snmpstat
<BR>
</FONT>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>Retrieves the contents of SNMP data structures
<BR>
</FONT>
<TR>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>getroute
<BR>
</FONT>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>Retrieves routing information
<BR>
</FONT>
<TR>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>setany
<BR>
</FONT>
<TD BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<P>Uses the SNMP set command to set a variable value</FONT>
</TABLE></CENTER><BR>
<P>Most of the SNMP commands require an argument that specifies the information to be set or retrieved. The output from some of the commands given in Table 13.2 is shown in the following extract from an SNMP machine on a small local area network:
<BR>
<PRE>
<FONT COLOR="#000080">$ getone merlin udpInDatagrams.0
Name: udpInDatagrams.0
Value: 6
$ getid merlin public
Name: sysDescr.0
Value: UNIX System V Release 4.3
Name: sysObjectID.0
Value: Lachman.1.4.1
Name: sysUpTime.0
Value: 62521</FONT></PRE>
<P>None of the SNMP commands can be called user-friendly, because their responses are terse and sometimes difficult to analyze. For this reason, many GUI-based network analyzers are becoming popular, offering menu-based access to many SNMP functions and better presentation of data. The use of a GUI-based SNMP tool can present full-color graphical displays of network statistics in a real-time manner. However, these GUI tools tend to cost a considerable amount.
<BR>
<BR>
<A ID="E68E119" NAME="E68E119"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Network Topologies</B></FONT></CENTER></H3>
<BR>
<P>I briefly examined both LAN and WAN topologies on Day 1, looking at bus and ring networks and the connections between LANs to make a WAN, so that material should be somewhat familiar to you. You can now extend your attention from the LAN topology to the larger internetworked topology by using TCP/IP. To do that, I must tie the role of routers, bridges, and similar devices into the network topology and show their role in a TCP/IP system.
<BR>
<P>One useful concept to keep in mind is the 80/20 rule, which states that 80 percent of most network traffic is for local machines, and 20 percent needs to move off the LAN. In reality, the ratio of local traffic is usually much higher, but planning for an 80/20 split helps establish workable limits for connections to network backbones.
<BR>
<P>LANs are tied to a larger network backbone (either a WAN or an internetwork such as the Internet) through a device that handles the passage of datagrams between the LAN and the backbone. In a simple setup, a router performs this function. This is shown in Figure 13.1. Routers connect networks that use different link layer protocols or Media Access Control (MAC) protocols. Routers examine only the headers of datagrams that are specifically sent to them or are broadcast messages, but there is a lot of processing involved within the router.
<BR>
<P><B><A HREF="13tyt01.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/13tyt01.gif">Figure 13.1. A router connects a LAN to the </B><B>backbone.</A></B>
<BR>
<P>If two or more LANs are involved in one organization and there is the possibility of a lot of traffic between them, it is better to connect the two LANs directly with a bridge instead of loading the backbone with the cross-traffic. This is shown in Figure 13.2. Bridges can also connect two WANs using a high-speed line, as shown in Figure 13.3.
<BR>
<P><B><A HREF="13tyt02.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/13tyt02.gif">Figure 13.2. Using a bridge to connect two </B><B>LANs.</A></B>
<BR>
<P><B><A HREF="13tyt03.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/13tyt03.gif">Figure 13.3. Using a bridge to connect two </B><B>WANs.</A></B>
<BR>
<P>You might recall that bridges are used when the same network protocol is on both LANs, although the bridge does not care which physical media is used. Bridges can connect twisted-pair LANs to coaxial LANs, for example, or act as an interface to a fiber optic network. As long as the Media Access Control (MAC) protocol is the same, the bridge functions properly.
<BR>
<P>Many high-end bridges available today configure themselves automatically to the networks they connect and learn the physical addresses of equipment on each LAN by monitoring traffic. One problem with bridges is that they examine each datagram that passes through them, checking the source and destination addresses. This adds overhead and slows the routing through the bridge. (As mentioned earlier, routers don't examine each datagram.)
<BR>
<P>In a configuration using bridges between LANs or WANs, traffic from one LAN to another can be sent through the bridge instead of onto the backbone, providing better performance. For services such as Telnet and FTP, the speed difference between using a bridge and going through a router onto a heavily used backbone can be appreciable. If the backbone is not under the direct administration of the LAN's administrators (as with the Internet), having a bridge also provides a method for the corporation or organization to control the connection.
<BR>
<P>The use of a bridge has one other advantage: if the backbone fails, communications between the two LANs are not lost. The same applies, of course, if the bridge fails, because the backbone can be used as a rerouting path. For critical networks, backbones are usually duplicated for redundancy. In the same manner, most organizations have duplicate routers and bridges in case of failure.
<BR>
<P>Bridges can be used when splitting a large LAN into smaller networks. This is often necessary when a LAN continues to expand as new equipment is added. Eventually the network traffic becomes bottlenecked. A useful and relatively easy solution is to divide the larger LAN into smaller LANs connected over a backbone. This helps conform to the 80/20 rule, while simplifying the traffic and administration overhead. This is shown in Figure 13.4. If the backbone is carefully chosen with lots of excess capacity, this type of topology can account for sizable future growth.
<BR>
<P><B><A HREF="13tyt04.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/13tyt04.gif">Figure 13.4. Dividing a large LAN into several </B><B>smaller LANs.</A></B>
<BR>
<P>Routers, too, can be used to control large networks. This is an advantage when broadcasts are frequently used, because the router can filter out broadcasts that apply only to a specific LAN. (Most bridges propagate broadcasts across the network.) The use of a single <I>switching </I><I>router </I>or <I>hub router</I> is becoming popular for joining different LANs within an organization, as shown as in Figure 13.5.
<BR>
<P><B><A HREF="13tyt05.gif" tppabs="http://www.mcp.com/817948800/0-672/0-672-30885-1/13tyt05.gif">Figure 13.5. Using a hub router to connect </B><B>LANs.</A></B>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -