PDA

View Full Version : [ubuntu] How to setup TFTP server to work on secondary network card?



legendbb
December 14th, 2010, 08:18 PM
a machine with 2+ network cards, need to setup TFTP server on one card and use internet on another.

the tftpd server works on default routing network adaptor with following configuration.

How set the TFTP server on the secondary network adaptor?

Thanks,

TFTP server tftpd by xinetd configuration in: /etc/xinetd.d/tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/bin/in.tftpd
server_args = /tftpboot
disable = no
}

Could not find how to change the post <prefix> I remembered clearly I did before.
Can anyone comment on this please.

Thanks,:biggrin:

legendbb
December 16th, 2010, 04:05 PM
Found solution myself, for note if any one needs:

vim /etc/network/interfaces

td p { margin-bottom: 0cm; }p { margin-bottom: 0.21cm; } # The loopback netwrok interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem

# mapping hotplug
# script grep
# map eth0

# configuration of eth0 with dhcp
iface eth0 inet dhcp
auto eth0

# configuring eth1 device with static settings
iface eth1 inet static
address 192.16.230.1
netmask 255.255.255.0
gateway 192.16.230.1

# add the route for the secondary interface for specific addresses
up route add -net 192.16.230.0/24 gw 192.16.230.1 dev eth1

# starts automatically at boot up
auto eth1

TFTP server works on default route network.
# /etc/init.d/networking restart
you may need reboot the machine.

check $ route to see if the default routing is added for the 2nd NIC.