Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configuring DNS and TFTP Packet Forwarding

You can configure the router or switch to support Domain Name System (DNS) and Trivial File Transfer Protocol (TFTP) packet forwarding for IPv4 traffic, which allows clients to send DNS or TFTP requests to the router or switch. The responding DNS or TFTP server recognizes the client address and sends a response directly to that address. By default, the router or switch ignores DNS and TFTP request packets.

To enable DNS or TFTP packet forwarding, include the helpers statement at the [edit forwarding-options] hierarchy level:

To set domain packet forwarding, include the domain statement.

To set the description of the DNS or TFTP service, include the description statement.

To set TFTP packet forwarding, include the tftp statement.

To set a DNS or TFTP server (with an IPv4 address), include the server statement. Use one address for either a global configuration or for each interface.

To set the routing instance of the server to forward, include the routing-instance statement. You can include as many routing instances as necessary in the same statement.

To disable recognition of DNS or TFTP requests on one or more interfaces, include the no-listen statement. If you do not specify at least one interface with this statement, the forwarding service is global to all interfaces on the router or switch.

The following sections discuss the following:

Tracing BOOTP, DNS, and TFTP Forwarding Operations

BOOTP, DNS, and TFTP forwarding tracing operations track all BOOTP, DNS, and TFTP operations and record them in a log file. The logged error descriptions provide detailed information to help you solve problems faster.

By default, nothing is traced. If you include the traceoptions statement at the [edit forwarding-options helpers] hierarchy level, the default tracing behavior is the following:

  • Important events are logged in a file called fud located in the /var/log directory.

  • When the file fud reaches 128 kilobytes (KB), it is renamed fud.0, then fud.1, and so on, until there are 3 trace files. Then the oldest trace file (fud.2) is overwritten. (For more information about how log files are created, see the System Log Explorer.)

  • Log files can be accessed only by the user who configures the tracing operation.

You cannot change the directory (/var/log) in which trace files are located. However, you can customize the other trace file settings by including the following statements at the [edit forwarding-options helpers] hierarchy level:

These statements are described in the following sections:

Configuring the Log Filename

By default, the name of the file that records trace output is fud. You can specify a different name by including the file filename statement at the [edit forwarding-options helpers traceoptions] hierarchy level:

Configuring the Number and Size of Log Files

By default, when the trace file reaches 128 kilobytes (KB) in size, it is renamed filename.0, then filename.1, and so on, until there are three trace files. Then the oldest trace file (filename.2) is overwritten.

You can configure the limits on the number and size of trace files by including the following statements at the [edit forwarding-options helpers traceoptions] hierarchy level:

For example, set the maximum file size to 2 MB, and the maximum number of files to 20. When the file that receives the output of the tracing operation (filename) reaches 2 MB, filename is renamed filename.0, and a new file called filename is created. When the new filename reaches 2 MB, filename.0 is renamed filename.1 and filename is renamed filename.0. This process repeats until there are 20 trace files. Then the oldest file (filename.19) is overwritten by the newest file (filename.0).

The number of files can be from 2 through 1000 files. The file size of each file can be from 10 KB through 1 gigabyte (GB).

Configuring Access to the Log File

By default, log files can be accessed only by the user who configures the tracing operation.

To specify that any user can read all log files, include the world-readable option with the file statement at the [edit forwarding-options helpers traceoptions] hierarchy level:

To explicitly set the default behavior, include the no-world-readable option with the file statement at the [edit forwarding-options helpers traceoptions] hierarchy level:

Configuring a Regular Expression for Lines to Be Logged

By default, the trace operation output includes all lines relevant to the logged events.

You can refine the output by including the match option with the file statement at the [edit forwarding-options helpers traceoptions] hierarchy level and specifying a regular expression (regex) to be matched:

Example: Configuring DNS Packet Forwarding

Enable DNS packet request forwarding to all interfaces on a router except t1-1/1/2 and t1-1/1/3: