Wednesday, October 8, 2008

Static IP

I want to have my mythtv box use a static IP address instead of using DHCP to request a IP from my router every time. This makes it easier to SSH in to the box since it always has the same IP on my network, it also will be helpful in the future when I have multiple frontends talking to the same backend, if the address to the backend changes everytime it restarts then it will be a headache.

sudo vim /etc/network/interfaces

It orgianly looked like

auto lo
iface lo inet loopback

your's may be different. I added to the bottom:

auto eth0
iface eth0 inet static
address 192.168.1.198
netmask 255.255.255.0
gateway 192.168.1.1

I then got kicked out of the SSH terminal so I just restarted it from the computer and then in the future I can SSH in to it at the IP address of 192.168.1.198

No comments: