2009/9/2 Bruce Dubbs <[email protected]>:
> Benjamin John wrote:
>> xinglp schrieb:
>>> I use "route add -net 192.168.3.0/24 gw 192.168.0.3" to add it. After
>>> reboot, it lost.
>>> Add it to "/etc/rc.d/xxxxx" or some where else?
>>
>> Create a file in /etc/sysconfig/network-devices/ifconfig.XXX where XXX
>> is your network interface
>> The name of this file should be alphabetically after the network startup
>> file (in LFS ipv4), so let name it "route" with the following contents
>>
>> ONBOOT=yes
>>
>> SERVICE=ipv4-static-route
>>
>> TYPE=network
>>
>> GATEWAY=192.168.3.0
>
> 192.168.3.0 is the network address for a /24 network.  Make it 192.168.3.1.
>
>> IP=192.168.0.3
>
> The IP address needs to be on the same network as the gateway.  Make it 
> 192.168.3.3.
>
>> PREFIX=24
>
>   -- Bruce
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
>
my config file like below,it works well.

SERVICE=ipv4-static-route
TYPE=network
IP=192.168.3.0
PREFIX=24
GATEWAY=192.168.0.3
ONBOOT=yes
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to