| View previous topic :: View next topic |
| Author |
Message |
Ozdemon
Joined: 10 Jun 2009 Posts: 64
|
Posted: Sun Mar 07, 2010 12:36 pm Post subject: How to assign static ip address in R6 |
|
|
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 |
|
 |
tjc
Joined: 25 Mar 2004 Posts: 9120 Location: Arlington, MA
|
Posted: Sun Mar 07, 2010 4:20 pm Post subject: |
|
|
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 |
|
 |
mihanson
Joined: 25 Sep 2005 Posts: 972 Location: Los Angeles
|
Posted: Fri Mar 12, 2010 6:56 pm Post subject: |
|
|
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 you should see your static address associated with your eth0 interface. _________________ Mike
My Hardware Profile |
|
| Back to top |
|
 |
Girkers
Joined: 22 Mar 2005 Posts: 1193 Location: Brisbane, Queensland, Australia
|
Posted: Fri Mar 12, 2010 11:41 pm Post subject: |
|
|
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 |
|
 |
Ozdemon
Joined: 10 Jun 2009 Posts: 64
|
Posted: Sat Mar 13, 2010 5:13 pm Post subject: Static IP woes |
|
|
| 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 |
|
 |
Girkers
Joined: 22 Mar 2005 Posts: 1193 Location: Brisbane, Queensland, Australia
|
Posted: Sun Mar 14, 2010 5:22 pm Post subject: |
|
|
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 |
|
 |
|