knoppmyth.net Forum Index knoppmyth.net
The home of KnoppMyth.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to assign static ip address in R6

 
Post new topic   Reply to topic    knoppmyth.net Forum Index -> Usage/HowTo
View previous topic :: View next topic  
Author Message
Ozdemon



Joined: 10 Jun 2009
Posts: 64

PostPosted: Sun Mar 07, 2010 12:36 pm    Post subject: How to assign static ip address in R6 Reply with quote

I have tried to do this using Linhes service menu/Network settings, but it does not work. Keep getting dhcp address.

From other posts it seems that there has to be a change in the one of the /etc/runit/ files.

Could someone please post an example of the code to get a fixed ip for the Linhes box?

Tks.

BTW is the /24 that appears before the subnet mask the port number?
_________________
Asus M3N78-EM, AMD 5050e, Nvidia 8300 IGP, QNAP TS-439 Pro II, Linhes R6
Back to top
View user's profile Send private message
tjc



Joined: 25 Mar 2004
Posts: 9120
Location: Arlington, MA

PostPosted: Sun Mar 07, 2010 4:20 pm    Post subject: Reply with quote

No. Number of leading bits. 255.255.255.255 is 32, 255.255.255.0 is 24, 255.255.0.0 is 16, ... Typically used to specify a subnet, for example 192.168.1.0/28 would be the range 192.168.1.0 -:192.168.1.15 and 10.1.0.0/16 would be the range 10.1.0.0 - 10.1.255.255.
_________________
KnoppMyth Wiki
Troubleshooting guides
R5.5 Hints
Back to top
View user's profile Send private message
mihanson



Joined: 25 Sep 2005
Posts: 972
Location: Los Angeles

PostPosted: Fri Mar 12, 2010 6:56 pm    Post subject: Reply with quote

Well, I'm not sure why the service menu is not doing it for you, but here's how to do this manually assuming eth0 is your network interface...

Code:
$ sudo nano /etc/net/ifaces/eth0/ipv4address

Change it to your desired static ip/netmask.
i.e. 192.168.1.2/24

Code:
$ sudo nano /etc/net/ifaces/eth0/ipv4route

Change it to your default gateway, usually your router's ip.
i.e. default via 192.168.1.1

Code:
$ sudo nano /etc/net/ifaces/default/options

ensure the following:
Code:
DISABLED=no
BOOTPROTO=static
ONBOOT=yes
...
CONFIG_IPV4=yes
...

There are other options in there, but they should be ok.

Finally, execute the following:
Code:
sudo /etc/net/scripts/network.init restart

If you then issue
Code:
$ sudo ifconfig
you should see your static address associated with your eth0 interface.
_________________
Mike
My Hardware Profile
Back to top
View user's profile Send private message
Girkers



Joined: 22 Mar 2005
Posts: 1193
Location: Brisbane, Queensland, Australia

PostPosted: Fri Mar 12, 2010 11:41 pm    Post subject: Reply with quote

I think I had found a bug in that window (have reported it on flyspray), what you might need to do is try and change the interface and then you will see the details come up. Then you should be able to set the details.

I had to do this when I was installing 6.02 the other night.
_________________
Girkers

www.gkcomputerservices.com
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Ozdemon



Joined: 10 Jun 2009
Posts: 64

PostPosted: Sat Mar 13, 2010 5:13 pm    Post subject: Static IP woes Reply with quote

Girkers wrote:
I think I had found a bug in that window (have reported it on flyspray), what you might need to do is try and change the interface and then you will see the details come up. Then you should be able to set the details.


Girkers, what do you mean by "change the interface"?

I tried the above steps but they did not work for me (thanks anyway Mihanson). It may be the bug you mentioned.
_________________
Asus M3N78-EM, AMD 5050e, Nvidia 8300 IGP, QNAP TS-439 Pro II, Linhes R6
Back to top
View user's profile Send private message
Girkers



Joined: 22 Mar 2005
Posts: 1193
Location: Brisbane, Queensland, Australia

PostPosted: Sun Mar 14, 2010 5:22 pm    Post subject: Reply with quote

What I mean is in navigate to the field where you can pick the interface to use and then try and change the selection. In my case I used the up and down arrow keys to navigate to the field and then used the right arrow to change the option, whilst the option did not change the screen underneath did.

I hope that clears it up.
_________________
Girkers

www.gkcomputerservices.com
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    knoppmyth.net Forum Index -> Usage/HowTo All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group