1

Here's my /etc/xinetd.d/tftp

service tftp
{
        socket_type             = dgram
        protocol                = udp 
        wait                    = yes 
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /tftpboot
        disable                 = no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

I have two interfaces on my host:

  1. lo: 127.0.0.1
  2. virbr1: 192.168.122.1

And I connect the tftp server via the 2 interfaces respectively.

tftp 127.0.0.1
get somefile

The file is fetched from /tftpboot

tftp 192.168.122.1
get somefile

The file is fetched from /var/lib/tftp

I have no idea where this /var/lib/tftp configuration comes from. Or maybe via 192.168.122.1, tftp servers fall back to some default configuration?


Mention that I didn't modify /etc/xinetd.conf either:

defaults
{
# The next two items are intended to be a quick access place to
# temporarily enable or disable services.
#
#       enabled         =
#       disabled        =

# Define general logging characteristics.
        log_type        = SYSLOG daemon info 
        log_on_failure  = HOST
        log_on_success  = PID HOST DURATION EXIT

# Define access restriction defaults
#
#       no_access       =
#       only_from       =
#       max_load        = 0
        cps             = 50 10
        instances       = 50
        per_source      = 10

# Address and networking defaults
#
#       bind            =
#       mdns            = yes
        v6only          = no

# setup environmental attributes
#
#       passenv         =
        groups          = yes
        umask           = 002

# Generally, banners are not used. This sets up their global defaults
#
#       banner          =
#       banner_fail     =
#       banner_success  =
}

includedir /etc/xinetd.d
wuyihao
  • 168
  • 11

1 Answers1

1

I found the answer myself that, in the configuration for my virbr1 interface, I specified the tftp root for my virtual network interface.

<network>
<name>pxe_bridge</name>
<uuid>17970555-f3dc-40ee-a2af-16f0898a5ff6</uuid>

<forward mode='nat'/>
<bridge name='virbr1' stp='on' delay='0' />
<ip address='192.168.122.1' netmask='255.255.255.0'>
    <tftp root='/var/lib/tftp' />
    <dhcp>
    <range start='192.168.122.2' end='192.168.122.254' />
    <bootp file='pxelinux.0' />
    </dhcp>
</ip>
</network>

Though I'm still confused,

Why there is tftp configuration for an network interface.

I also saw tftp configuration for dhcp server.

PXE installation benefits from these features.

But I still think it strange, any comments?

wuyihao
  • 168
  • 11