# TCP/IP Network Administration- P13

Chia sẻ: Thanh Cong | Ngày: | Loại File: PDF | Số trang:50

0
73
lượt xem
19

## TCP/IP Network Administration- P13

Mô tả tài liệu
Download Vui lòng tải xuống để xem tài liệu đầy đủ

Tham khảo tài liệu 'tcp/ip network administration- p13', công nghệ thông tin, quản trị mạng phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả

Chủ đề:

Bình luận(0)

Lưu

## Nội dung Text: TCP/IP Network Administration- P13

1. [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. Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_01.htm (3 of 4) [2001-10-15 09:19:11]
2. [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 Next: B.2 The gated Administration 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 ] Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_01.htm (4 of 4) [2001-10-15 09:19:11]
3. [Appendix B] B.2 The gated Configuration Language Previous: B.1 The gated Appendix B Next: B.3 Directive A gated Reference Command 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 TCP/IP Network Next: B.3 Directive Command Administration Statements B.1 The gated Command Book Index B.3 Directive 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 watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_02.htm [2001-10-15 09:19:12]
4. [Appendix B] B.3 Directive Statements Previous: B.2 The gated Appendix B Next: B.4 Trace Statements A gated Reference Configuration Language 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 TCP/IP Network Next: B.4 Trace Statements Configuration Language Administration B.2 The gated Configuration Book Index B.4 Trace Statements Language Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_03.htm (1 of 2) [2001-10-15 09:19:12]
5. [Appendix B] B.3 Directive 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 watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_03.htm (2 of 2) [2001-10-15 09:19:12]
6. file:///C|/mynapster/Downloads/warez/tcpip/appb_04.htm Previous: B.3 Directive Appendix B Next: B.5 Options A gated Reference Statements 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: Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_04.htm (1 of 3) [2001-10-15 09:19:13]
7. 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 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_04.htm (2 of 3) [2001-10-15 09:19:13]
8. 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 TCP/IP Network Next: B.5 Options Statements Administration Statements B.3 Directive Statements Book Index B.5 Options 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 watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_04.htm (3 of 3) [2001-10-15 09:19:13]
9. [Appendix B] B.5 Options Statements Previous: B.4 Trace Appendix B Next: B.6 Interface A gated Reference Statements 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 Please purchase PDF Split-Merge on www.verypdf.com to remove this watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_05.htm (1 of 2) [2001-10-15 09:19:13]
10. [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 TCP/IP Network Next: B.6 Interface Statements Administration Statements B.4 Trace Statements Book Index B.6 Interface 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 watermark. file:///C|/mynapster/Downloads/warez/tcpip/appb_05.htm (2 of 2) [2001-10-15 09:19:13]