TFTP server
To accommodate PXE boot scenarios, SR Linux provides a TFTP server. The SR Linux TFTP server can supply boot images to PXE clients.
You can specify one or more IP addresses for the TFTP server to use, as well as the root directory for the TFTP server on the SR Linux device.
Configuring the TFTP server
To configure the SR Linux TFTP server, you configure the device to accept TFTP traffic, enable the TFTP server and configure it to use a specified IP address, and optionally change the source directory.
Configure an ACL to allow TFTP traffic
The following example configures an ACL to accept TFTP read-request and write-request messages:
--{ +* candidate shared default }--[ ]--
A:root@srl1# info with-context acl acl-filter cpm type ipv4 entry 30
acl {
acl-filter cpm type ipv4 {
entry 30 {
description "Accept incoming TFTP read-request and write-request messages"
match {
ipv4 {
protocol udp
}
transport {
destination-port {
operator eq
value 69
}
}
}
action {
accept {
}
}
}
}
}
Enable the TFTP server
The following example enables the TFTP server for the management network-instance and configures the IP address of the TFTP server.
--{ + candidate shared default }--[ ]--
# info with-context system tftp-server network-instance mgmt
system {
tftp-server {
network-instance mgmt {
admin-state enable
source-address [
172.20.20.2
]
}
}
}
Set root directory for the TFTP server
The default root directory for the SR Linux TFTP server is
/srv/tftpboot. The following example changes the SR Linux TFTP server
root directory to /opt/bootimages.
--{ +* candidate shared default }--[ ]--
# info with-context system tftp-server network-instance mgmt root-directory
system {
tftp-server {
network-instance mgmt {
root-directory /opt/bootimages
}
}
}