这是我的/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
}
我的主机上有两个接口:
- 洛:127.0.0.1
- virbr1:192.168.122.1
我分别通过2个接口连接tftp服务器。
tftp 127.0.0.1
get somefile
该文件是从 /tftpboot 获取的
tftp 192.168.122.1
get somefile
该文件是从获取的/var/lib/tftp
我不知道这个/var/lib/tftp
配置来自哪里。或者也许通过 192.168.122.1,tftp 服务器会回退到某些默认配置?
提到我也没有修改 /etc/xinetd.conf:
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
答案1
我自己找到了答案,在我的配置中virbr1 interface
,我为我的虚拟网络接口指定了 tftp 根。
<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>
虽然我还是很迷茫
为什么有tftp配置为网络接口。
我也看到了tftp配置为了DHCP服务器。
PXE 安装受益于这些功能。
但我还是觉得奇怪,有什么意见吗?