OzTiVo Networking Concepts

You need to have your OzTiVo configured so that it can download weekly program guide information from the Internet, and also to do the initial Guided Setup. This document explains the basic concepts of OzTiVo networking.

Table of Contents

These other documents tell you how to connect your OzTiVo to your other home equipment.

Introduction

Setting up OzTiVo networking can be tricky, but if you understand the basic concepts, then when things go wrong you will have some idea of what to look for.

There are two main style of connecting your OzTiVo to the Internet. The first style is to use the OzTiVo's internal modem to dial up an ISP:

    TiVo ----------------------------------------- ISP

This is not technically difficult; you need to configure your OzTiVo with the ISP's phone number, your username and password, and you need to remember to plug the OzTiVo into the phone socket a few times a week. Details on this style of networking are covered in the NetworkingWithBuiltinModem document [anybody want to write this?].

The second style of networking your OzTiVo is the one we will concentrate on here. In this style, you connect your OzTiVo to an existing device which can already connect to the Internet:

    TiVo --------------------- Box --- modem ---------------- ISP

The box in question can be an XP, Linux, OSX or FreeBSD box, or it could even be a modem/hub combination. The modem here is irrelevant: it can be a 'phone, cable or ADSL modem.

The Physical Network Between the OzTiVo and the Box

There are several possibilities of connecting the OzTiVo and the Box together. If you bought the OzTiVo without any network cards, then you will need to configure PPP over a serial link between the OzTiVo and the Box. If you bought a TurboNet or OzTiVoNet card for your OzTiVo, then you can use CAT-5 cables between your OzTiVo and the Box. Finally, if you bought an AirNet card for the OzTiVo, then you can do wireless networking between your OzTiVo and the Box.

If you bought a TurboNet Ethernet card see TurboNet installation which give some details of one persons install. Most people don't bother with installing the jack, they usually just run a cable from the card out the back of the box through one of the fan mounting holes. Then either direct to a hub/switch or with a joiner in between. The OzTivo image already has the TurboNet drivers installed. Please DO NOT USE THE INSTALLER FROM SILICON DUST! It may damage our software.

If you are going to use PPP over a serial link, you will need to build or buy a serial cable for your OzTiVo.

If you are going to use Ethernet over CAT-5 cable, then you need to buy the correct cables. The type of cable depends on how the OzTiVo and the Box are connected. If there is a hub or a switch between the OzTiVo and the Box, then you need a straight-through Ethernet cable from the OzTiVo to the hub/switch and another straight-through Ethernet cable from the hub/switch to the Box. On the other hand, if the OzTiVo is going to be connected directly to the Box, then you need a cross-over Ethernet cable to connect the two; in a cross-over cable, the transmit wires at one end come out as the receive wires at the other end, and vice versa.

If you are going to use a wireless link, then we need someone to write some words here to explain any gotchas etc.

Tivo and firewalls

With more ADSL modems having firewalls built in, you need to make sure that your Tivo can talk to the outside world to get information such as program guides and time information. The following list has just been started and is incomplete!

  • Port 37 (UDP), outbound from Tivo. This is used to synchronise your Tivo's clock to time servers on the internet.
  • Port XXX for Daily call to obtain program guide information.
  • Port 80 (TCP) inbound to Tivo. This allows access to Tivoweb. Your firewall should be set to only allow access to this port from other addresses within your own secured network. It should not allow access to port 80 inbound from the Internet or other insecure network.
  • Port 23 (TCP) inbound to Tivo. This provides Telnet access. Your firewall should be set to only allow access to this port from other addresses within your own secured network. It should not allow access to port 80 inbound from the Internet or other insecure network. Note that many telnet clients don't work with Tivo telnet, for Windows putty is a good choice (using telnet protocol).
  • Port 873 outbound is used for update_oztivo- it may be blocked by firewalls (normally 873 is used for rsync).

DHCP, PPP and IP Addresses

Everything that wants to connect to the Internet needs its own IP address, and that includes our OzTiVo. This is true regardless of the network link: PPP, Ethernet or wireless.

The OzTiVo is configured to use Dynamic Host Configuration Protocol, or DHCP, to obtain its IP address. When the OzTiVo boots, it sends out a DHCP request over its network connection asking "Can someone give me an IP address?". If there is a DHCP server connected to the OzTiVo, then the server will send back an unused IP address to the OzTiVo for it to use.

Of course, it's the Box in our scenario which is going to do this, and it means that you will need to setup a DHCP server on your Box. The Box-specific HowTos cover how to do this.

DHCP is more complicated as we need to have a list of unused IP addresses, and we need to choose a netmask, and we need to tell the OzTiVo who is the default gateway. Let's explore these concepts.

Allocating IP Addresses

You can't just pluck any old IP address out of the air and send it to the OzTiVo, as every IP address is unique. If you hand out someone else's IP address, then this could cause havoc on the Internet. The solution here is to use a "private" IP address: these are addresses which anybody can use as long as they keep them hidden away on private networks. In this case, the network between the OzTiVo and the Box is a private network. The most commonly used private IP address range is 192.168.X.X, where you can use any numbers for X.X.

The Netmask

Going along with an IP address range is its netmask. A netmask simply indicates which part of an IP address is the network part (i.e the section that stays constant), and which part is unique for every host on that network. In the case of 192.168.X.X, the first 16 bits are constant, and the last 16 bits can be changed. Here, we would normally use a netmask of 255.255.0.0.

The Default Gateway

Finally, the default gateway or default router. Let's look at the physical diagram again.

    TiVo --------------------- Box --- modem ---------------- ISP

If you think about it, you will see that the Box is on two physical networks: the PPP/Ethernet/wireless private network, and the ISP's network. In the Internet world, a Box needs an IP address for every network that it is connected to. In this scenario, the Box is going to have 2 IP addresses. It will have the normal IP address that it gets from the ISP. But it will also have one of the 192.168.X.X addresses on the private network.

When the OzTiVo needs to send some data out to the Internet, it knows that the Internet is not the private network. It needs to know the identity of the machine that will relay the data for it: the default gateway, or default router. Obviously, our Box is going to be the default gateway.

Example: let's set up our Box to have the private IP address 192.168.1.1 and the netmask of 255.255.0.0 on the private network. Let's also set up a DHCP server on the Box, and tell it to advertise the range 192.168.1.10 to 192.168.1.30.

When the OzTiVo boots, it sends out a DHCP request, which the Box receives. The box might send this information back to the OzTiVo:

  • Your IP address for now is 192.168.1.10
  • The netmask on this network is 255.255.0.0
  • To get out to the Internet, use 192.168.1.1 as the default gateway

What about PPP?

You thought you had this all down pat, didn't you? Well, if you are using PPP then PPP doesn't use DHCP to get its addresses; it has its own way of doing it. But the result is the same. In this case, you still set up your Box with its own private IP address and private netmask, but you list only a single IP address which is what the OzTiVo will use at the other end of the serial link. Ok, so no DHCP, but PPP does something very similar.

Network Address Translation

In Australia, when the Box connects to the ISP, the ISP gives out a single IP address to the Box. This IP address is visible to all other Internet devices, which is why it's a good idea to have a firewall at home.

The OzTiVo would like to communicate with the Internet so that it can do the Guided Setup and collect weekly program data, but we've given it a private IP address, and nobody on the Internet will talk to these private addresses.

The solution here is to also run Network Address Translation, or NAT, on the Box with the modem. This is how NAT works. When the OzTiVo tries to communicate with Internet devices, it will send them packets with the return address of, say, 192.168.1.10. Now we know that nobody on the Internet can talk to this address. We also know that the Box is going to get this packet and send it out to the Internet for us.

If the Box is running NAT, it replaces the private IP address of 192.168.1.10 in the outbound packet with the public IP address that the Box obtained from the ISP, say 203.76.5.43. Then when the reply packets come back for the OzTiVo, they will be marked as going to 203.76.5.43, i.e. the Box. The Box again converts the IP address in these return packets from 203.76.5.43 to 192.168.1.10, and sends them on to the OzTiVo.

The effect is that the OzTiVo thinks it can communicate with outside Internet devices, and the Internet devices think that it is the Box which is sending all of this traffic.

NAT is very clever and also transparent; the devices on the private network won't even know that NAT is happening, and this allows you to have a number of private Internet boxes hidden away behind your public Box.

It doesn't matter if you are using PPP, Ethernet or wireless. If you want your OzTiVo to use your Box as a relay to connect to the Internet, then you will need to configure NAT on the Box to make it work.

Standalone Modem/Hubs with DHCP and NAT

There is also another solution which still uses DHCP and NAT, but can make it easier for you. This is to buy a cable or ADSL modem with a built-in hub or wireless access point, and with DHCP and NAT built-in.

In this solution, you connect your OzTiVo and your own PC to the modem/hub. The modem/hub is going to do the Internet connection for you, and also do DHCP and NAT. So all you need to do is to set your PC up to "Obtain IP Address Automatically" (i.e. to do DHCP), and it should all work!

    TiVo------------------------Modem/-----------------------ISP
           PC--------------------Hub

It would be nice to have another external HowTo with a list of such modem/hubs and where to get them. Anybody?

Nope, but you can get a lot of information and good prices from http://www.ozcableguy.com/ and his commercial site http://www.oztechnologies.com/ (Charlie Franklin 1/2/04)

Configuration and Diagnostics

Now you know how you can connect your OzTiVo to the Internet, and now you know why you will need DHCP and NAT if you use your existing Box as a relay to connect to the Internet. You're ready to read the HowTos for your type of Box.

If you are going to use Ethernet or wireless, then I would still recommend that you still build or buy a serial cable. You can use this cable to login to your OzTiVo via Hyperterm (or some other terminal program), and diagnose network problems from the OzTiVo side as well as the Box side.

If you are going to do PPP over serial, then unfortunately the serial link will be doing PPP, and you then can't use it from Hyperterm. However, if the PPP connection works but there is some other networking problem, then you will be able to Telnet in to your OzTiVo over the PPP link, and run some diagnostics from there.

OzTiVo Diagnostics

What can go wrong? Here's a partial list:

  • The Ethernet or wireless card on the OzTiVo fails to start up.
  • The PPP connection from the OzTiVo to the Box fails to start up.
  • The OzTiVo doesn't get an IP address from DHCP.
  • The OzTiVo doesn't get an IP address from PPP.
  • The IP address that the OzTiVo does get is wrong.
  • The netmask that the OzTiVo does get is wrong.
  • The default gateway that the OzTiVo does get is wrong.
  • The OzTiVo doesn't learn about the default gateway.
  • The OzTiVo sends out packets, but no packets get back to the OzTiVo.

This first thing to always check are your cables. If you are using Ethernet, did you get straight-through cables or cross-over cables? Are the link lights on your PC's Ethernet card and on the hub/switch on or off? If they are off, the physical connection is bad.

If you are using PPP over a serial cable and it isn't working, then turn PPP off on your Box, reboot the OzTiVo and use Hyperterm (or some other terminal program) to login. If this works, then you know that the serial cable is ok and it must be your PPP configuration.

If you can login to the OzTiVo (Hyperterm, Telnet over PPP etc.), then here are some OzTiVo commands to try.

Ifconfig

[TiVo [p0] ~]# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0 coll:0

eth0      Link encap:Ethernet  HWaddr 00:0B:AD:69:69:69  
          inet addr:192.168.1.10  Bcast:192.168.255.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34074 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47617 errors:0 dropped:0 overruns:0 carrier:0 coll:0
          Interrupt:29

Ifconfig show the configuration of your network interfaces. You should have a loopback interface called lo0 and another interface called either eth0 (Ethernet/wireless) or ppp0 (the PPP interface).

The output of the command will show you the IP address being used: eth0 is using 192.168.1.10 here, and the netmask: eth0 is using 255.255.255.0. You want to see the word UP which says that the card is working.

Route

[TiVo [p0] ~]# route
route_info, afname=inet, options=33
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     32767  0        0 eth0
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0

The route command shows you where your OzTiVo will send IP packets. You should have at least 2 entries. One will be your private network. For the OzTiVo above, 192.168.X.X is the private network with netmask 255.255.255.0; the Flags show that the route is being used and packets will be sent by eth0.

There should be a default route with a default gateway listed: here the default gateway is 192.168.1.1. Remember that the default gateway must be a private IP address.

Ping

[TiVo [p0] ~]# ping -c 5 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=0.969 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.277 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.620 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.690 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=1.024 ms

--- 192.168.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.620/0.916/1.277 ms

Ping sends test packets out to another IP host, and expects a reply to each packet. The ping command above is sending 5 packets to host 192.168.1.1. You can leave the "-c 5" option out, and the ping command will keep sending ping packets until you type control-C.

The results show each return packet, how long it took to reach the host and get back, and there is a summary of the results at the bottom.

You should be able to ping your default gateway. If you can't, then either the physical link isn't working, or your Box isn't responding to the pings: perhaps your Box hasn't been set up with its private IP address.

Once you can ping your Box, try to ping an Internet computer. This one is for our server Maxie 65.49.60.197.

[TiVo [p0] ~]# ping -c 5 204.176.49.1
PING 204.176.49.1 (204.176.49.1): 56 data bytes
64 bytes from 204.176.49.1: icmp_seq=0 ttl=238 time=226.1 ms
64 bytes from 204.176.49.1: icmp_seq=1 ttl=238 time=227.3 ms
64 bytes from 204.176.49.1: icmp_seq=2 ttl=238 time=227.4 ms
64 bytes from 204.176.49.1: icmp_seq=3 ttl=238 time=228.1 ms
64 bytes from 204.176.49.1: icmp_seq=4 ttl=238 time=227.9 ms

--- 204.176.49.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 226.1/227.3/228.1 ms
[TiVo [p0] ~]#

Note that the round-trip time is much longer, as expected. If you cannot ping an outside Internet computer, then your Internet link is down, or NAT isn't working on your Box.

Wget

Not all Internet computers will responds to a ping; that's because paranoid network admins block them for security reasons. The computer you will be getting the TV guide data from, minnie.tuhs.org, falls into this category. Fortunately, there is another way of checking network connectivity to this machine: you can fetch a web page from her.

[TiVo [p0] ~]# wget http://65.49.60.197/index.html
--22:29:12--  http://65.49.60.197/index.html
           => `index.html'
Connecting to 65.49.60.197:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7,388 [text/html]

100%[====================================>] 7,388         54.25K/s             

22:29:13 (54.25 KB/s) - `index.html' saved [7388/7388]

The wget tools allows you to fetch and save a web page if you know its URL. The OzTiVo can't use textual domain names, so instead of fetching http://www.oztivo.net/index.html, we fetched http://65.49.60.197/index.html. If the wget worked, you will see 200 Ok and you will find the file index.html on your OzTiVo's hard disk.

Checking your Dial Prefix

If you are using PPP, Ethernet or wireless, the OzTiVo has to know not to use the built-in modem. This is done by the setting of the Dial Prefix in the OzTiVo's MFS database. Check this setting by doing this command from the OzTiVo command line:

[TiVo [p0] ~]# dbget /State/PhoneConfig DialPrefix
,#401

You should see the result ,#401. If you don't, then you will be able to ping and wget but a Daily call will still fail. This is easily fixed by doing this command:

[TiVo [p0] ~]# dbsetx /State/PhoneConfig DialPrefix ',#401'

changing your network configuration

Run the Network Configuration program
At the prompt, type in:

  • [TiVo [p0] ~]# nic_config_tivo

Configure the network settings as required
You will be presented with options similar to below:
NOTE: In ozTivo 1.6.2, the menu is considerably different, but the same settings apply.

Current/New Configuration:
        timing setting = optimal
        mac address    = 00:0B:AD:10:10:13
        ip address     = 192.168.1.13
        ip subnet mask = 255.255.255.0
        ip gateway     = 192.168.1.1
        debug level    = off

Options
        1: Change timing setting
        2: Change MAC address
        3: Change IP address/gateway
        4: Change debug logging option
        9: View/extract log file
        0: Apply and exit
        !: Exit without saving

[0..6]?

The main options you need to worry about are (2)Change MAC Address and (3)Change IP Address

Change MAC Address
If this is not your only OzTiVo on your network then it is a good idea to alter the MAC address of the network card, otherwise it is most likely your router will have problems assigning a network address to the OzTiVo and you will have connection issues. This is because by default all turbonets, terbonets, x-factor and TV-LAN1.0 cards have the same MAC address, all cachecards have the same MAC address and all AirNet cards have the same MAC address (note that means all three types have different MAC address from one another). Even if this is your one and only OzTiVo on the network you may consider doing this step anyway just in case you ever need to plug in another OzTiVo onto your network and forget about the MAC conflict.

Change IP Address
Here, you can modify the IP settings of your Tivo:

  • New IP address [x.x.x.x dhcp]? Here you can specify a static IP address, or use dynamic (DHCP) IP. If you choose to go with the Static IP option, specify an IP in the same range as the router you run. So if your router's IP address is 10.0.0.1, then a sensible IP address for your Tivo is 10.0.0.5

  • New subnet mask [x.x.x.x]? You can leave this empty

  • New gateway address [x.x.x.x]? This is the IP address of your router. If you are unsure, then leave it empty.

(5) Save Settings and Reboot your Tivo
Once you have finished configuring the network settings of your Tivo, press "0" for "Apply and Exit". You will be asked to clear the log files of your Tivo. Select "Y" for yes. At the prompt, type "reboot" and the Tivo will reboot.

Troubleshooting

If your OzTiVo networking seems to work intermittently, try the following.

Timing

Try setting the the network card driver timing to 'failsafe' as described here Change Network Configuration

Alternatively you can do this by connecting via telnet and editing the file /etc/oztivo.conf and add or change the line to

timing=16

16 is 'failsafe'

4 is 'optimal'

3 is 'turbo'

RF Output channel

If you have a PAL tuner in your OzTiVo the RF output channel might be on the same frequency as a broadcast channel. You can test this quickly by unplugging the aerial cable from your TiVo RF In socket. You may need to reboot with it unplugged for your TiVo to get a valid IP address from your DHCP server (router).

You can change the RF output channel by connecting to your TiVo with telnet, and run the command palmod_config then select 'tuner settings'.

Back to: Howto

-- WarrenToomey - 20 Jan 2004
-- PetesTrash - 21 Apr 2005
-- IndulisBernsteins - 08 Jan 2007

Edit | Attach | Watch | Print version | History: r23 < r22 < r21 < r20 < r19 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r23 - 2010-10-22 - MartynNash
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright (c) 2001-2018 OzTiVo - The information in this website may be accessed for individual non-commercial use only. The information cannot be used for commercial purposes. Please refer to the full copyright notice.