Am Sonntag, 8. Juli 2007 schrieb Dan Farrell:
> On Sun, 8 Jul 2007 15:08:11 +0200
>
> Eduard Bachmakov <[EMAIL PROTECTED]> wrote:
> > I want to run a webserver on my PC. Since I am using a NAT-router for
> > internet connection I need the server to have the same ip everytime.
> > That's why I tried to use static routes.
>
> You mean the inside computer needs to get the same IP every time?  Why
> not have the NAT-router assign it the same ip via DHCP?  Most
> commercial routers can do so -- try putting its IP in a web browser.
That's what I tried at first. But my (very old) router just doesn't have such 
stuff.
> > The problem is that I get timeouts for about 25-75% of the time. DHCP
> > works without any problems (but I get different ips). The static
> > address is 192.168.2.50, DHCP starts at 192.168.2.100 so there should
> > be no problems of two pcs having the same ip.
> >
> > Here is my /etc/conf.d/net:
> > > config_eth0="'192.168.2.50 netmask 255.255.255.0 broadcast
> > > 192.168.2.255'" routes_eth0="'default via 192.168.2.1'"
> > > fallback_config_eth0="'dhcp'"
> > >
> > > dns_servers="192.168.2.1"
> > > dhcpcd="'-t 10'"
> > > dns_domain="'outer_space'"
> >
> > The timeouts also happen if I use my wlan (with static routes; same
> > pc).
> >
> > So what went wrong?
>
> You've double-quoted all those strings in /etc/conf.d/net -- I would
> recommend removing one of the pairs of quotes, and adding parenthases
> as shown in /etc/conf.d/net.example

The double quotation is the new style as described in the net.example (at 
least at baselayout 2.0.0_alpha3). Quote:

# VARIABLES
#
# We've changed from using arrays to evaluated strings.
# This has the benefit of being slightly more readable but more importantly it
# works across all shells.
# OLD
# config_eth0=( "192.168.0.24 netmask 255.255.255.0" "192.168.0.25/24" )
# NEW
# config_eth0="'192.168.0.24 netmask 255.255.255.0' 192.168.0.25/24"
# INVALID
# config_eth0='192.168.0.24 netmask 255.255.255.0'
#
# As the 1st value has spaces in it, it needs additional quoting. The 2nd
# value has no spaces, therefore no additional quoting is required.
# The last statement is invalid because when it is evaluated, it only has one
# set of quotes.
-- 
[EMAIL PROTECTED] mailing list

Reply via email to