Tài liệu TCP/IP Network Administration- P13 docx

50 254 0
Tài liệu TCP/IP Network Administration- P13 docx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[Appendix B] A gated Reference Traces the list of interfaces read from the kernel. Use this to determine what interfaces are detected by the kernel interface scan. The advantage of placing a trace option on the command line is that it can trace activities that happen before the configuration file is processed. For the two options listed above, this is an essential advantage. For other options it is not very important. Most trace options are specified in the configuration file. See the traceoptions command later in this appendix for more details. B.1.1 Signal Processing gated processes the following signals: SIGHUP Tells gated to reread the configuration file. The new configuration replaces the one that gated is currently running. SIGHUP loads the new configuration file without interrupting gated service. SIGHUP is available for quick configuration changes. At most sites, the routing configuration changes infrequently. The few times you need to change to a new configuration, terminate gated and rerun it with the new configuration. This is a more accurate test of how things will run at the next boot. SIGINT Tells gated to snapshot its current state to the file /usr/tmp/gated_dump. SIGTERM Tells gated to shut down gracefully. All protocols are shut down following the rules of that protocol. For example, EGP sends a CEASE message and waits for it to be confirmed. SIGTERM removes from the kernel routing table all routes learned via the exterior routing protocols. If you need to preserve those routes while gated is out of operation, use SIGKILL. SIGKILL Tells gated to terminate immediately and dump core. Routes are not removed from the routing table, and no graceful shutdown is attempted. SIGUSR1 Tells gated to toggle tracing. If no trace flags are set, SIGUSR1 has no effect. But if tracing is enabled, the first SIGUSR1 causes gated to toggle off tracing and to close the trace file. The next SIGUSR1 turns tracing back on and opens the trace file. When the trace file is closed, it can be moved or removed without interfering with the operation of gated. Use this to periodically empty out the trace file to prevent it from becoming too large. SIGUSR2 Tell gated to check for changes in the status of the network interfaces. file:///C|/mynapster/Downloads/warez/tcpip/appb_01.htm (3 of 4) [2001-10-15 09:19:11] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix B] A gated Reference The following is an example of gated signal handling. First, the SIGUSR1 signal is passed to the gated process using the process ID obtained from the gated.pid file (/var/run/gated.pid in this case). # kill -USR1 `cat /var/run/gated.pid` Next, the old trace file (/usr/tmp/gated.log in this case) is removed, and gated is passed another SIGUSR1 signal. # rm /usr/tmp/gated.log # kill -USR1 `cat /etc/gated.pid` After receiving the second signal, gated opens a fresh trace file (still named /usr/tmp/gated.log). An ls shows that the new file has been created. # ls -l /usr/tmp/gated.log -rw-rw-r-- 1 root 105 Jul 6 16:41 /usr/tmp/gated.log Previous: A.3 chat TCP/IP Network Administration Next: B.2 The gated Configuration Language A.3 chat Book Index B.2 The gated Configuration Language [ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ] file:///C|/mynapster/Downloads/warez/tcpip/appb_01.htm (4 of 4) [2001-10-15 09:19:11] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix B] B.2 The gated Configuration Language Previous: B.1 The gated Command Appendix B A gated Reference Next: B.3 Directive Statements B.2 The gated Configuration Language The gated configuration language is a highly structured language similar to C in appearance. Comments either begin with a #, or they begin with /* and end with */. gated configuration statements end with a semicolon, and groups of associated statements are enclosed in curly braces. The language structure is familiar to most UNIX system administrators, and the structure makes it easy to see what parts of the configuration are associated with each other. This is important when multiple protocols are configured in the same file. The configuration language is composed of nine types of statements. Two statement types, directive statements and trace statements, can occur anywhere in the gated.conf file and do not directly relate to the configuration of any protocol. These statements provide instructions to the parser and control tracing from within the configuration file. The other seven statement types are options statements, interface statements, definition statements, protocol statements, static statements, control statements, and aggregate statements. These statements must appear in the configuration file in the correct order, starting with options statements and ending with aggregate statements. Entering a statement out of order causes an error when parsing the file. The remainder of this appendix provides a description of all commands in the gated configuration language, organized by statement type. Previous: B.1 The gated Command TCP/IP Network Administration Next: B.3 Directive Statements B.1 The gated Command Book Index B.3 Directive Statements [ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ] file:///C|/mynapster/Downloads/warez/tcpip/appb_02.htm [2001-10-15 09:19:12] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix B] B.3 Directive Statements Previous: B.2 The gated Configuration Language Appendix B A gated Reference Next: B.4 Trace Statements B.3 Directive Statements Directive statements provide direction to the gated command language parser about "include" files. An include file is an external file whose contents are parsed into the configuration as if it were part of the original gated.conf file. Include files can contain references to other include files, and these references can be nested up to 10 levels deep. The two directive statements are: %include filename Identifies an include file. The contents of the file are "included" in the gated.conf file at the point in the gated.conf file where the %include directive is encountered. filename is any valid UNIX filename. If filename is not fully qualified, i.e., does not begin with a /, it is considered to be relative to the directory defined in the %directory directive. %directory pathname Defines the directory where the include files are stored. When it is used, gated looks in the directory identified by pathname for any include file that does not have a fully qualified filename. Unless you have a very complex routing configuration, avoid using include files. In a complex environment, segmenting a large configuration into smaller, more easily understood segments can be helpful, but most gated configurations are very small. One of the great advantages of gated is that it combines the configuration of several different routing protocols into a single file. If that file is small and easy to read, segmenting the file unnecessarily complicates things. Previous: B.2 The gated Configuration Language TCP/IP Network Administration Next: B.4 Trace Statements B.2 The gated Configuration Language Book Index B.4 Trace Statements file:///C|/mynapster/Downloads/warez/tcpip/appb_03.htm (1 of 2) [2001-10-15 09:19:12] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix B] B.3 Directive Statements [ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ] file:///C|/mynapster/Downloads/warez/tcpip/appb_03.htm (2 of 2) [2001-10-15 09:19:12] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_04.htm Previous: B.3 Directive Statements Appendix B A gated Reference Next: B.5 Options Statements B.4 Trace Statements Trace statements allow you to control the trace file and its contents from within the gated.conf file. The trace statement is: traceoptions ["trace_file" [replace] [size bytes[k|m] files n]] [nostamp] trace_options [except trace_options] ; Its components are as follows: trace_file Identifies the file that receives the trace output. It has exactly the same function as the trace_file argument on the gated command line. replace Replaces the existing trace file. If you do not use this keyword, the trace output is appended to the current contents of the file. size bytes[k|m] [files n] Limits the trace file to a maximum size of bytes. The optional k or m indicates thousands (k) or millions (m) of bytes. Thus 1000000 and 10m are equivalent entries. The size of the trace file cannot be less than 10k bytes. n defines the maximum number of trace files that should be saved. When the trace file reaches the maximum size, it is saved as trace_file.0, trace_file.1, trace_file.2 up to trace_file.n. The next save then overwrites trace_file.0. The value for n must be at least 2. nostamp Specifies that trace lines should not begin with a timestamp. Timestamping each line of trace data is the default. trace_options Define the events to be traced by gated. Each trace option is specified by a keyword name. The available trace options are: file:///C|/mynapster/Downloads/warez/tcpip/appb_04.htm (1 of 3) [2001-10-15 09:19:13] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_04.htm none Turns off all tracing. all Turns on all types of global tracing. general Turns on both normal and route tracing. state Traces state machine transitions for protocols such as OSPF and BGP. The RFCs describe these protocols using finite state machine (FSM) diagrams or tables. The protocols transition from one state to another based on the occurrence of certain events. For example, the state might change from idle to connect when a connection open event occurs. This is a highly specialized trace flag, useful only to those who have a thorough understanding of the protocols involved. Use this option within the protocol statement to trace a specific protocol's transitions. normal Traces normal protocols interactions. Errors are always traced. policy Traces the application of routing policies. Use this to check that you have properly configured your routing policy. task Traces system-level processing. timer Traces the various timers used by a protocol or peer. route Traces routing table changes. Use this to check that routes are properly installed by the protocol. detail Traces the contents of the packets exchanged by the router. Must be specified before send or recv. send Limits the detail trace to packets sent by this router. recv file:///C|/mynapster/Downloads/warez/tcpip/appb_04.htm (2 of 3) [2001-10-15 09:19:13] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_04.htm Limits the detail trace to packets received by this router. Without these two options, all packets are traced when detail is specified. symbols Traces the symbols read from the kernel at startup. See the -t command-line argument. iflist Traces the kernel interface list. See the -t command-line argument. parse Traces the lexical analyzer and parser. adv Traces the allocation and release of blocks. except trace_options Disables specific trace options. Must be used in conjunction with trace_options that enable a wide variety of tracing. For example: traceoptions all except state turns on all traces except for finite state machine tracing. gated provides the flexibility for you to choose where you want to control tracing - on the command line or in the configuration file. By and large, the same trace options can be set on the gated command line or in the configuration file. detail, send and recv can be set only in the configuration file. Two others, symbols and iflist, are primarily used on the command line. Refer to the section on the gated command line for a description of setting trace options with -t. Some trace options are only useful for protocol developers and other experts. For most of us, general, which enables normal and route tracing, is an appropriate level of information for debugging routing problems. Occasionally policy is useful for testing a routing policy. Most of the time, however, no tracing is needed. Previous: B.3 Directive Statements TCP/IP Network Administration Next: B.5 Options Statements B.3 Directive Statements Book Index B.5 Options Statements [ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ] file:///C|/mynapster/Downloads/warez/tcpip/appb_04.htm (3 of 3) [2001-10-15 09:19:13] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix B] B.5 Options Statements Previous: B.4 Trace Statements Appendix B A gated Reference Next: B.6 Interface Statements B.5 Options Statements Options statements define parameters that direct gated to do special internal processing. Options statements appear before any other configuration statements in the gated.conf file. The options statement syntax is: options [nosend] [noresolv] [gendefault [preference preference] [gateway gateway]] [syslog [upto] log_level] [mark time] ; An options statement can contain: nosend Instructs system not to send any packets. This option tests gated without actually sending out routing information. Use for RIP and HELLO. It is not yet implemented for BGP and is not useful for OSPF. noresolv Instructs system not to use the Domain Name System (DNS) to resolve hostnames and addresses. DNS failures can cause gated to deadlock during startup. Use this to prevent deadlock. gendefault [preference preference] [gateway gateway] Generates a default route, with a preference of 20, when gated peers with an EGP or BGP neighbor. If gateway is not defined, the gateway in the generated route is the system itself; the default route is not installed in the kernel table; and it is used only to advertise this system as a default gateway. If gateway is specified, the default route is installed in the kernel table with the specified router as the next hop. This option can be overridden with the nogendefault file:///C|/mynapster/Downloads/warez/tcpip/appb_05.htm (1 of 2) [2001-10-15 09:19:13] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [Appendix B] B.5 Options Statements option. syslog [upto] log_level Tells system to use the setlogmask facility to control gated logging. See the setlogmask(3) manpage if this facility is available on your system. mark time Sends a periodic timestamp message to the trace file. time defines how frequently the timestamp should be issued. Use this to determine if gated is running. Previous: B.4 Trace Statements TCP/IP Network Administration Next: B.6 Interface Statements B.4 Trace Statements Book Index B.6 Interface Statements [ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ] file:///C|/mynapster/Downloads/warez/tcpip/appb_05.htm (2 of 2) [2001-10-15 09:19:13] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. [...]... into the stub area networks Defines the range of networks contained within this area The specified ranges are advertised into other areas as summary network LSAs and not as inter-area routes If restrict is specified, the summary network LSAs are not advertised The entries in the networks list are either specified as host addresses by using the host keyword before the address, or as a network address by... the neighbor does not share a network with the local system This option is rarely needed lcladdr address Defines the address of the local interface used to communicate with the neighbor sourcenet network Changes the network queried in EGP POLL packets By default, this is the shared network However, if the neighbor does not share a network with your system, the neighbor's network address should be specified... RIP update packets even if the system has only one network interface By default, RIP updates are not broadcast if the system has only one network interface and are broadcast if it has more than one network interface; i.e., hosts do not broadcast updates and routers do Forces gated to not broadcast RIP update packets even if the system has more than one network interface If a sourcegateways clause is present,... routes to the private IP addresses in the range 192.168.0.0 to 192.168.255.255 Previous: B.6 Interface Statements B.6 Interface Statements TCP/IP Network Administration Book Index Next: B.8 Protocol Statements B.8 Protocol Statements [ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ] Please purchase PDF Split-Merge on www.verypdf.com to remove this... Defines the subnet mask multicast Specifies that the interface supports multicasting Previous: B.5 Options Statements B.5 Options Statements TCP/IP Network Administration Book Index Next: B.7 Definition Statements B.7 Definition Statements [ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ] Please purchase PDF Split-Merge on www.verypdf.com to remove this... [nobroadcast] [cost cost] Defines the interfaces used by OSPF If the keyword nobroadcast is specified, the interface connects to a non-broadcast multi-access (NBMA) network If nobroadcast is not used, the interface connects to a broadcast or a point-to-point network Specify the cost of the interface with the cost keyword, e.g., cost 5 The default cost is 1 Two options are specific to NBMA interfaces: pollinterval... le2) A hostname can be used if it resolves to only one address Most system administrators prefer to use the IP address to identify an interface After all, IP addresses are inherently a part of TCP/IP, and it's TCP/IP routing that this file configures Additionally, remote systems know this interface by its IP address, not its interface name Finally, DNS may provide more than one address for a hostname,... default, all gateways on the shared network are trusted to supply routing information But if the trustedgateways statement is used, only updates from the gateways in the list are accepted sourcegateways gateway_list ; Defines a list of gateways to which RIP sends packets directly By default, RIP packets are broadcast or multicast to several systems on the shared network - but if this statement is used,... command allows changes to the list of martian addresses A martian address can be specified as a host address by using the host keyword before the address, or as a network address by simply specifying the address An address mask can be defined for a network address The mask can be defined in dotted decimal notation using the mask keyword or as a numeric prefix length using the masklen keyword The address... exportlimit routes Defines the maximum number of ASE LSAs that will be flooded at one time The default is 100 exportinterval time Defines how frequently ASE link-state advertisements are flooded to the network The default is once per second traceoptions trace_options Defines the tracing used to debug OSPF In addition to the standard trace flags, OSPF supports: lsabuild Traces construction of link-state . stub area. networks Defines the range of networks contained within this area. The specified ranges are advertised into other areas as summary network LSAs. configuration language, organized by statement type. Previous: B.1 The gated Command TCP/IP Network Administration Next: B.3 Directive Statements B.1 The gated Command

Ngày đăng: 14/12/2013, 16:15

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan