problems connecting


Forum: Networking
Topic: problems connecting
started by: bandito9111

Posted by bandito9111 on June 07 2005,21:14
I have DSL 1.1 installed.

I am a noobie but have a little knowledge about linux.

I have no problem connecting to internet as long as i run --
netcarcconfig each time i boot into DSL.

I have been looking around to find an automated solution but nothing works. I have looked up manpages of ifconfig, route and other commands but am thoroughly confused

1. How can i automate at boottime the netcard config or ifconfig.
2. Where do i put the script.
i have tried scripting netcardconfig but dosent work.


Here is my static ip specs
Code Sample
Comp IP   192.168.0.40
netmask   255.255.255.0
Broadcast 192.168.0.255
Router      192.168.0.1
DNS #1     192.168.0.1
DNS #2     216.148.227.68


Any scripts,websites or help is appreciated.

P.S. Dont ask if my card isnt working as it is.... and NO I cant/wont use DCHP for security and other networking aspects. SORRY

Thank You
Dan

Posted by hawki on June 09 2005,02:09
Hi
I use one DSL system as a gateway/firewall.  It has to have the same address every time I boot.  To do that I booted with the nodhcp option.  I used Netcardconfig to set up my ethernet card and got everthing working.  Then I saved the config for the next boot by doing the following.

Add the following lines to the file named /home/dsl/filetool.lst

opt/bootlocal.sh
etc/sysconfig/network-scripts/ifcfg-eth0
etc/network/interfaces

Then added the following line to /opt/bootlocal.sh

ifup eth0

The last thing is to configure the backup/restore location using the DSL control panel.

Now I boot a frugal install with the nodhcp option and the configuration is restored and the interface started every time.

I hope this makes sense and good luck.

Posted by hawki on June 09 2005,12:50
Hi
I just thought of something else.  If you are using static dns addresses you may have to add the following line to /home/dsl/filetool.lst

/etc/resolv.conf

That should backup/restore the nameserver addresses.

good luck

Posted by b1ackmai1er on June 19 2005,09:17
Hi. That works great and was exactly what I was looking for, except
the /etc/resolv.conf step does not  get restored.

Any suggestions for that?

regards b1m1

Posted by ke4nt1 on June 19 2005,11:17
just add it to your /opt/bootlocal.sh as well ..
Here's an example I use on a static connected server.

ifconfig eth0 xxx.xxx.xxx.xxx netmask yyy.yyy.yyy.yyy
route add default gw zzz.zzz.zzz.zzz
echo nameserver aaa.aaa.aaa.aaa > /etc/resolv.conf
echo nameserver bbb.bbb.bbb.bbb >> /etc/resolv.conf
ifup eth0

you could also map your nic address in your router config,
then still use DHCP on your lan, AND have a static IP.

73
ke4nt

Posted by hawki on June 20 2005,15:09
Hi again
It really looks to me like putting /etc/resolv.conf in the filetool.lst file should backup/restore your nameserver addresses.
1. After you run the netcardconfig script are the addresses listed in /etc/resolv.conf?  
2.  After you reboot are they still there?
Maybe it's a timing problem with what happens first.
good luck

Posted by b1ackmai1er on June 20 2005,16:29
@hawki

Would it be that it is not working because the /etc/resolv.conf  file is a symbolic link to /knoppix/etc/dhcpc/resolv.conf?

i will try putting that in my filetool.lst

@ke4nt

Thanks I understand that. Will give it a try

regards b1m1

Posted by b1ackmai1er on June 20 2005,16:38
@hawki @ke4nt1

Thankyou. Changing it from/etc/resolv.conf to etc/dhcpc/resolv.conf fixed it.
DNS is now restored on bootup.

Regards b1m1

Edit: typed filename wrong. now correct

Posted by iluntasun on June 30 2005,18:45
wow, this thread is worth a how-to! Now... how could I make DSL run with the nodhcp option by default?
Posted by b1ackmai1er on July 09 2005,18:22
I am sure this worked in v1.1, but i damn well cant get it to work in 1.21.

ifup eth0 gives an error - cant find interface now.

running the netcard script works every time.

if I type ifup eth0 after running the script it says file exists,

so we must be missing something.

All the files seem to get restored fine... there must be something we are missing...

regards b1m1

Posted by ke4nt1 on July 09 2005,23:17
iluntasun,

There are many ways to make "nodhcp" a default at boottime.
What type of DSL are you running?
( HDinstall, frugal, LiveCD, Pendrive )

Each has it's own way of setting options..

73
ke4nt

Posted by juan on July 13 2005,00:51
for an hd install can you say howto please
Posted by iluntasun on Aug. 18 2005,18:35
in my case it's a LiveCD
Posted by caturok on Sep. 03 2005,12:20
Hi...!!!  i'm from indonesia :P and have a problem with my DSL machine :
why mydsl 1.40 server still have dhcp IP if i restart and i ready try that all scripts in this forum but not work very well.
i put this script at my /opt/bootlocal.sh
##
ifconfig eth0 192.168.0.1 netmask 255.255.255.0
echo nameserver 202.93.40.53
echo nameserver 202.152.165.36
ifup eth0
##
the problem is :
dsl login :                      <<<<< first boot login is work if i ping from my client machine to my dsl server (ping reply 192.168.0.1 is good)
but if my dsl server go to Xwindow my client PING say 192.168.0.1 network unreachable.

pls... pls.. pls.... helppp me cause my internet realy fast if my server is DAMNsmallInux.....!!!!!!!!!!

###DSLinux is Best Server###

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.