tftp server / dhcp server on trixbox 2.4 problematic [solved]

wtodd
Posts: 339
Member Since:
2007-04-29

2.4 in most ways is much easier than 2.2 to install, although there has been a learinng curve with the trimming down and the new zaptel package etc.

I have done the setup-cisco option for the tftp server in 2.4. I run my internal phones on a second macaddress directly from the mb on the server.

In order to get this working i had to change the /etc/sysconfig/network-scripts/ifcg/eth1 to:

BOOTPROTO=none
HWADDR={mac address}
DEVICE=eth1
MTU=""
NETMASK=255.255.255.0
BROADCAST=10.10.10.255
IPADDR=10.10.10.1
NETWORK=10.10.10.0
ONBOOT=yes

I also have this ifcfg-lo file - which might be the problem as none of these devices match anything for my system:

DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback

My phones are communicating through eth-1 but when one of them powers down and back up, they get stuck on "configuring ip" and dont boot up. All of the remote phones on outside networks do not have this problem; they power up instantly and retrieve their respective data.

As i have been very careful due to the newness of 2.4 and my unfamiliarity with it, i keep the 2.2 version on separate back-up hard drives . When i boot the 2.2, the phones spin up immediately and swiftly to life. Swap the hard drives and they work again on 2.4 (after having "downloaded" on 2.2 hdd's).

Does anyone have any suggestions? I would be grateful if someone can point me in the right direction.

Thanks in advance
wtodd



wtodd
Posts: 339
Member Since:
2007-04-29
12 hours till restart

After reaching exactly 12 hours of operation, the phones reset agian; i presume their lease expired and couldnt find the server. If anyone might have any ideas, id be grateful for some good advice.

Thanks

wtodd



anchor85
Posts: 678
Member Since:
2006-06-07
IP address

Perhaps you could explain your network setup. What have you set for eth0? Normally this will have an IP set for your private subnet and your local phones will communicate with your tb server and atftpd through that.

You quote 100.100.100.1 as the IP address for eth1, this is not an IP address in a private address space as define by IANA, see section 3 here: http://www.faqs.org/rfcs/rfc1597.html See also wikipedia http://en.wikipedia.org/wiki/Classful_network So presumably 100.100.100.1 is a public IP

You seem to imply that you have local phones that don't boot properly and remote phones that do. Your loopback config looks Ok but I can't imagine how this would affect the trixbox tftp server. Perhaps I have misread something in your post .......

--

John
Cat24.net



wtodd
Posts: 339
Member Since:
2007-04-29
corrected my error made insomnia

John - sorry for my mistake and for wasting your time. i corrected the above post. In a state of semi-consciousness i typed too many zeros into the eth.1 ip address which is 10.10.10.1

My eth 0 is fine and has been for my earlier installs.

it is set like this:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR={my ip address}
NETMASK={my mask}
GATEWAY={my gateway}

You are correct - remote phones can connect, provision and even upgrade firmware. The phones (internal) which connect to my eth.1 port via a switch and down the line couple more swtiches (which have not been changed and still work with 2.2.x) can not see the tftp server for some reason.

as i mentioned above they shutdown 12 hours after operating, i am betting they didnt get a renewal on their lease.

If you have any ideas, or need more info - let me know. I am grateful for your cogitative powers on this one - im stumped.

Thanks again.
wtodd



anchor85
Posts: 678
Member Since:
2006-06-07
tftp server problems

So you have a machine with two NICS eth0 and eth1? You have not said what IP address you have used for eth0, so I assume both NICS have private IP addresses and they are on different subnets?

It seems that eth0 is connected to your router or firewall and your remote phones work over this. Your local phones are on the 10.10.10.0 subnet and have problems getting their image files. If this is how you have setup your network (I wonder why) but you will need to make sure that you have set a route to the 10.10.10.0 network

In a shell type 'route -n' I get

route -n

Kernel IP routing table
Destination -- Gateway -- Genmask -- Flags Metric Ref Use -- Iface
192.168.0.0 -- 0.0.0.0 -- 255.255.255.0 -- U 0 0 0 -- eth0
169.254.0.0 -- 0.0.0.0 -- 255.255.0.0 -- U 0 0 0 -- eth0
0.0.0.0 -- 192.168.0.1 -- 0.0.0.0 -- UG 0 0 0 -- eth0

I have added the -- to display the columns more clearly.

You will need two routes one to 192.168.0.0 (or whatever subnet you have for eth0) and another for 10.10.10.0 try these links:

http://www.cpqlinux.com/routes.html
http://www.linux.com/base/ldp/howto/Firewall-Piercing/x296.html
and of course 'man route'. Probably you should run

route add -net 10.10.10.0 netmask 255.255.255.0 dev eth1

then 'route -n' to check the result. If this sorts the problem you will need to add the route command that you have just run to /etc/rc.d/rc.local s that the route is added at boot time.

--

John
Cat24.net



wtodd
Posts: 339
Member Since:
2007-04-29
configurations:

Yes my eth0 is a publicly accessed registered static ip address and does not change -- thus i have no dhcp server, no port forwarding etc., just a little fibre cable that goes to a fibre modem then a switch which connects to the computer. Therefore i have a static eth 0 ip address which is why i didnt mentioned the specific number and gateway, but it is not one of the locally assigned ones.

I ran the route -n and came back with the following:

whereas {xxx.xxx.xxx.65} = my gateway; and
whereas {xxx.xxx.xxx.64} = one number lower than gateway; and
{xxx.xxx.xxx.xxx} = my correct mask

Destination -- Gateway -- Genmask -- Flags Metric Ref Use -- Iface
{xxx.xxx.xxx.64} -- 0.0.0.0 -- xxx.xxx.xxx.xxx -- U 0 0 0 -- eth0
10.10.10.0 -- 0.0.0.0 -- 255.255.255.0 -- U 0 0 0 -- eth1
169.254.0.0 -- 0.0.0.0 -- 255.255.0.0 -- U 0 0 0 -- eth 1
0.0.0.0.--{xxx.xxx.xxx.65}--0.0.0.0 -- UG 0 0 0 -- eth0

I tried your recommendation and the results were identical to the above data.

As you can tell, im rather new at this - and unfamiliar with networking altogether - but glad to be learning. Thank you for your very kind support.
Wtodd



anchor85
Posts: 678
Member Since:
2006-06-07
Your routing table looks

Your routing table looks fine, the line below (from your post) matches my suggestion,

10.10.10.0 -- 0.0.0.0 -- 255.255.255.0 -- U 0 0 0 -- eth1

so the problem, must be elsewhere.

If you are using atftpd, monitor the logs when a local phone boots so that you can see what is happening “live”. To do this you need to watch the atftpd log file. For this run

tail -f /var/log/atftpd.log

This displays the last 10 lines of the log file and automatically refreshes the display. (To exit this ctrl^C). You should be able to see if the files get served up properly as your cisco phones reboot.

--

John
Cat24.net



wtodd
Posts: 339
Member Since:
2007-04-29
tftp log

The tftp log revealed:

03:51:06 my*.com atftpd [3987.-1208195392]: atftpd terminating after 300 seconds
03:51:06 my*.com atftpd [3987.-1208195392]: Main thread exiting
04:08:07 my*.com atftpd [4561.-1209035072]: Advanced Trivial FTP server started (0.7)
04:08:07 my*.com atftpd [4561.-1209037936]: Serving CTLSEP{Macaddress}.tlv to 10.10.10.198:50828
04:08:07 my*.com atftpd [4561.-1209037936]: Serving SEP{Macaddress}.cnf.xml to 10.10.10.198:50829
04:08:07 my*.com atftpd [4561.-1209037936]: Serving SIP{Macaddress}.cnf to 10.10.10.198:50830
04:08:07 my*.com atftpd [4561.-1209037936]: Serving SIPDefault.cnf to 10.10.10.198:50831
04:08:07 my*.com atftpd [4561.-1209037936]: Serving ./SIP{Macaddress}.cnf to 10.10.10.198:50832
04:08:07 my*.com atftpd [4561.-1209037936]: Serving POS3-08-6-00.loads to 10.10.10.198:50833
{i am thinking that what is happening here is the problem - but not sure what that is - only gut feeling. Phone goes through "configuring vlan" for a long then continues to "configuring ip" for a long time; resets and then does same with following result}
04:11:46 my*.com atftpd [4561.-1209037936]: Serving SIPDefault.cnf to 10.10.10.198:50318
04:11:46 my*.com atftpd [4561.-1209037936]: Serving ./SIP{Macaddress}.cnf to 10.10.10.198:50319
04:11:49 my*.com atftpd [4561.-1209037936]: RINGLIST.DAT to 10.10.10.198:50326
04:11:51 my*.com atftpd [4561.-1209037936]: dialplan.xml to 10.10.10.198:50327
04:11:51 my*.com atftpd [4561.-1209037936]: ext.pcm to 10.10.10.198:50327

04:16:51 my*.com atftpd [4561.-1209035072]: atftpd terminating after 300 seconds
04:16:51 my*.com atftpd [4561.-1209035072]: Main thread exiting

looks like its trying to load everything and finally does; except once per day around 17-18.00 GMT - when i have to swap servers to get them back up.

Could there be an incorrect setup in the DHCP server? or does that matter???
For some reason - it is like the lease on the phone runs out after 24 hours and doesnt get renewed.

Thanks again for your continued support.
wtodd



phonebuff
Posts: 445
Member Since:
2007-02-15
Can You post --

Is the phone DHCP or Static and what Address is it looking for TFTP from ?
Option 66 of the DHCP configuration / TFTP Server is you are entering the IP statically by hand.

You did a Cisco-setup which address is in the tftp control files that go to the phone.

Try
cd /tftpboot
grep '10.10.10.1' *

grep '{my Ip Address}' *

Which address is in which files.

Also, you are attempting to load the SIP 8.3.6 code to the phone, do you have all the parts in the /tftpboot directory ?? Be sure the SIP Defual and sip{mac}.cnf reference the POS8.6.3. code...



wtodd
Posts: 339
Member Since:
2007-04-29
Think the problem is my dhcp server

The phone is DHCP and installed correctly (it works on my 2.2.x system fine)

I think in reality (at least i am hoping) that the dhcp server wasnt completely installed on the server (module missing) and i have discovered that and enabled it; set it up and have it delegating leases.

[edit: at this time it seems that this is the case. There are four dhcp modules that need to be installed, then configured with the dhcp manager in order for this to operate. those packages are:
1. dhcdbd
2. dhclient
3. dhcp (all three of these are part of the centos repository)
4. tbm-dhcp which is a trixbox module (the configuration package which makes it REALLY easy - thanks andrew, kerry & co.)

I am going to test this for the next day or so - but if nothing further posted, im gonna consider this one solved with many thanks to John in the UK for his networking experience and his troubleshooting on his site, as well as phonebuff for his input]



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.