View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 10 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Oct 28, 2007 4:02 pm 
Offline
Joined: Thu Aug 24, 2006 1:30 pm
Posts: 23
Hi all... I just upgraded to R5F27, and when I was going through the setup, accidentally chose to use DHCP broadcast instead of giving it a static IP address. It still works, but just to ensure that the IP address doesn't change, I'd like to assign it one. Is there any way to change it away from DHCP broadcast without rebuilding the machine? Can I rerun that script?

Thanks!


Top
 Profile  
 
PostPosted: Sun Oct 28, 2007 4:46 pm 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
aravenel wrote:
Hi all... I just upgraded to R5F27, and when I was going through the setup, accidentally chose to use DHCP broadcast instead of giving it a static IP address. It still works, but just to ensure that the IP address doesn't change, I'd like to assign it one. Is there any way to change it away from DHCP broadcast without rebuilding the machine? Can I rerun that script?

Thanks!
Try running netcardconfig as root...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 28, 2007 5:56 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
You may need to use the --force option to get it to reconfigure the card. E.g.
Code:
netcardconfig --force


Top
 Profile  
 
PostPosted: Sun Oct 28, 2007 6:04 pm 
Offline
Joined: Sun Aug 28, 2005 7:07 pm
Posts: 821
Location: Melbourne, Australia
aravenel wrote:
Hi all... I just upgraded to R5F27, and when I was going through the setup, accidentally chose to use DHCP broadcast instead of giving it a static IP address.


Why don't you 'fix' the ip address to your myth box using the router config? This way you get the exact same ip address regardless of whether you upgrade, rebuild or whatever. It ties the ip address to the MAC (hardware) address of your network card. No static config required, and dhcp is really a lot easier.

Mike

_________________
*********************
LinHES 7.4
Australian Dragon
*********************


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 29, 2007 8:34 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
His router may not be able to do that. I know that mine (a relatively old Linksys model) won't for example, and frankly I'm more than comfortable enough with networking configuration to not make it worth replacing.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 10, 2008 8:50 am 
Offline
Joined: Wed Jan 04, 2006 10:20 am
Posts: 387
Location: South New Jersey, USA
My new router seems to have a problem remembering static IP rules. It is an Actiontec and the problem seems well documented on the web but no solutions so I thought to set it up with netcardconfig as descibed above.

I pointed all the questiones (except for the desired IP adress) back to the router but could not get any communication inside (or outside) on the network.

Is there a way to use DHCP and then lookup the IPs that are being used (gateway, DNS server, etc). I could then use netcardconfig with the same info but with my static IP.

Thanks.

_________________
LINHES 8.6.1 BE/FE - MSI K9N6SGM-V with AMD A64 X2 4600+, 4GB Ram. 1.5TB WD. HDHR Prime. Nvidia GT210. MCE remote.
FrontEnd - Dell Vostro 400 3.0GHz Core2Duo NVidia GeForce210. MCE Remote


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 10, 2008 9:34 am 
Offline
Joined: Thu Mar 02, 2006 5:42 pm
Posts: 410
Location: middleton wi usa atsc
Usually the gateway and DNS servers can point to the router address, but the netmask should usually be set to 255.255.255.0 for linksys and the like. The broadcast address is the same as the router address except the last group should be 255. Make sure you have the correct router address. Knoppmyth seems to suggest something ending in 254, but most home routers are preconfigured to end in 1.

When picking a static IP make sure you pick one that isn't in the range of dynamic ones that the router will be handing out. Linksys defaults to dynamic IPs starting at 100 and above, so if you have a linksys, pick a static ip ending in below 100 (but not the same as the router).

for instance:
192.168.0.33 Static IP address of Myth Box (user selected)
192.168.0.1 gateway (determined by router setup)
192.168.0.255 broadcast address (always ends in 255)
255.255.255.0 netmask (same for all class C networks)
192.168.0.1 DNS server (usually same as router, but can be set to other DNS servers)


another for instance:
192.168.1.22 IP address of Myth Box
192.168.1.1 gateway (router)
192.168.0.255 broadcast address
255.255.255.0 netmask
192.168.1.1 DNS server


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 10, 2008 10:07 am 
Offline
Joined: Wed Jan 04, 2006 10:20 am
Posts: 387
Location: South New Jersey, USA
Thanks jzig, I hadn't thought about the overlap between the ip address that i was picking and the ones in the DHCP pool. I will try to have the router give me one outside the pool and see it that sticks. Otherwise I will try the netcardconfig again with your suggestions.

_________________
LINHES 8.6.1 BE/FE - MSI K9N6SGM-V with AMD A64 X2 4600+, 4GB Ram. 1.5TB WD. HDHR Prime. Nvidia GT210. MCE remote.
FrontEnd - Dell Vostro 400 3.0GHz Core2Duo NVidia GeForce210. MCE Remote


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 10, 2008 3:44 pm 
Offline
Joined: Fri Sep 15, 2006 12:16 pm
Posts: 292
I always answer yes to "Use DHCP" during setup, but immediately change
my /etc/network/interfaces to make it static. It looks like this when I am done:
Code:
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo
iface lo inet loopback

auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
        address 192.168.0.252
        netmask 255.255.255.0
        broadcast 192.168.0.255
        network 192.168.0.0
        metric 1
        gateway 192.168.0.1


I changed the above to show a standard 24 bit netmask as I actually use
a 23 bit netmask.

Didn't even know whether or not there was an option besides DHCP in the setup.

I prefer static addresses as some boxes don't remember their leases like
they should and my router/firewall is an old 200mhz pentium that takes
longer to come up after power fail than my other boxes.

Cliff


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 10, 2008 7:07 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,

As much as I diddle with my KM boxes I gave up on static quite some time ago. I may have one box that falls into the "I forget mode" and will give it a static.

However that leaves the issue of what the heck is the address of box x,y or z?

Again being lazy, I cheat and add a couple items that are easily put back on an upgrade or add on an install.
First I tweak Cecil's ver.sh script:
nano -w /usr/local/bin/ver.sh
Code:
#!/bin/bash
killall osd_cat
lsmod |grep "ivtvfb "|cut -b1-6 >/tmp/tv
if [ "$(cat /tmp/tv)" = "ivtvfb" ]; then
fontsize="25"
fontcolor="lightyellow"
else
fontsize="34"
fontcolor="yellow"
fi
export FONT="-adobe-helvetica-bold-*-*-*-$fontsize-*-*-*-*-*-*-*"
export DISPLAY=:0
cat /etc/KnoppMyth-version > /tmp/ver
date >> /tmp/ver
/sbin/ifconfig |grep eth |cut -b1-4 >/tmp/net
/sbin/ifconfig "$(cat /tmp/net)" | sed -n -e '/inet addr:\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*/s//\1/p' | cut -c11-26 >/tmp/ip
echo -n  "IP $(cat /tmp/ip) _._ MythTV  - " >> /tmp/ver
cat /etc/hostname >> /tmp/ver
cat /etc/mythtv/version >> /tmp/ver
cat /home/mythtv/lbu.txt>>/tmp/ver
cat /tmp/ver | osd_cat --l=8 --delay=12 --font=$FONT --shadow=2 --color=$fontcolor --pos=middle --align=centre&


Then I mess with the backup script a little, since there was some space left between the #!/bin/bash & the #--- line, I add:
nano -w /usr/local/bin/mythbackup
#!/bin/bash
echo -n "Backed up ">/home/mythtv/lbu.txt
date >>/home/mythtv/lbu.txt

#----------------------------------------------------------------------------

and now when you run backup, you have a stamp of when it was started. so when you select the version in the menu...... but that was unhandy so:
nano -w /etc/X11/fluxbox/keys
Mod1 v :ExecCommand ver.sh

Restart x server and when you Hit alt + v and all the important stuff is handy :)

Gotchas:
More than one nic card, may have to manually set script to be card needed :(
Extra stuff just adjusts display for tv out on 350 card.

Mike
Edit once, Sorry, noticed a copy error, too busy writing and not paying attention to detail :oops:


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu