Click to See Complete Forum and Search --> : about eth0 ip changing every boot time
yhotg
10-02-2003, 11:59 AM
how can i do to change the ip of eth0 once and for all? now i am doing the "ifconfig eth ....." but every time i re start the computer the ip return to something else.
i tried to change it in the mandrake control center. but didn't work.
i have mandrake 9.1, standalone. with pptp for adsl.
Icarus
10-02-2003, 12:07 PM
It's called DHCP (Dynamic Host Configuration Protocol)
The server you connect to assigns an IP for you and most IPs like to keep changing the IP for you, security through obscurity you know...if they can't find you they can't hack you ;)
Usually this can not be controled unless you ask your ISP for a static IP. They might say ok, but charge you extra.
yhotg
10-02-2003, 12:45 PM
no, u don't understand. I don't have a network. i have one computer - standalone -.
the eth0 ip is something of my computer. the isp don't use DHCP and i have an static ip. the problem is that when booting linux change the ip adress of my eth0 to other adress. and every time i want to connect to internet i need to do ifconfig eth0 etc etc.
in a terminal as su-
What are the contents of your /etc/sysconfig/network-scripts/ifcfg-eth0 file? That's where your IP settings for eth0 should be stored.
Also- does the IP address always change back to the same address, or do you get random addresses when you reboot?
mdwatts
10-02-2003, 04:20 PM
From my /etc/sysconfig/network/ifcfg-eth0
BOOTPROTO='static'
BROADCAST='192.168.1.255'
IPADDR='192.168.1.4'
NETMASK='255.255.255.0'
NETWORK='192.168.1.0'
REMOTE_IPADDR=''
STARTMODE='onboot'
UNIQUE='ZcKW.SYXZLk83VE3'
WIRELESS='no'
Change BOOTPROTO to 'static', add the necessary ip addresses and disable the dhcp client service from starting.
Originally posted by mdwatts
From my /etc/sysconfig/network/ifcfg-eth0 In Mandrake it will be /etc/sysconfig/network-scripts/ifcfg-eth0.
:)
mdwatts
10-02-2003, 05:48 PM
Originally posted by DMR
In Mandrake it will be /etc/sysconfig/network-scripts/ifcfg-eth0.
:)
Who in their right mind would be using Mandrake anyways? :eek:
:D
Originally posted by mdwatts
Who in their right mind would be using Mandrake anyways? :eek:
:D
Oh, I don't know- maybe people who want to learn its particular quirks before (*ahem*) trying to answer Mandrake-related questions in this forum...
:eek:
(Sorry Mike, I think my need for another TroutSlap is showing; the one Steve gave me on Tuesday must be losing it's effect)
ricstr
10-02-2003, 07:15 PM
With my cable modem the computer connects to it via DHCP on the internal side and then the cable modem on the external side connects to the cable company with another IP. Your ADSL modem may work similar.
Icarus
10-02-2003, 08:05 PM
Originally posted by DMR
(Sorry Mike, I think my need for another TroutSlap is showing; the one Steve gave me on Tuesday must be losing it's effect) Alright...here you are again! :D
http://www.stevewolfonline.com/Downloads/DMR/Visuals/fishwhack.gif
Originally posted by ricstr
With my cable modem the computer connects to it via DHCP on the internal side and then the cable modem on the external side connects to the cable company with another IP. Your ADSL modem may work similar. Being a DSL connection, it probably uses PPPoE instead of DHCP (most DSL providers do). While similar in functionality to DHCP, it is a different protocol, but that could be the core of the problem.
Originally posted by mahdi
Alright...here you are again! :D
http://www.stevewolfonline.com/Downloads/DMR/Visuals/fishwhack.gif Damn you, Steve- that is my trout; you're slaping me with a fish from my own FTP site!! Barstard- between you and Mike I'm starting to smell fishy all over....
:eek: :eek:
Icarus
10-02-2003, 09:32 PM
Originally posted by DMR
Damn you, Steve- that is my trout; you're slaping me with a fish from my own FTP site!! Barstard- between you and Mike I'm starting to smell fishy all over....
:eek: :eek: :D
When did you stop smelling fishy? ;)
Yup, I'm raiding your fish shack and slaping you with your own Trout :D
yhotg
10-03-2003, 08:24 AM
lets see......
i was getting ansious about doing something with the eth0 ip changing, so i did something that -now- i know wasn't good idea.
i used linuxconfig. :(
i changed the ip adress in ip and network settings (something like that , don't remember now exactly the name of the window. And i am in my xp-side of the computer.... )
so i put in local ip the ip that i wanted to stay static and the netmask. ----> then i needed to fill the domain that untill this morning was blank , so i wrote 'localhost' and happy with myself hit ok and do the changes.
after that, when i tried to connect to internet i got an error message.
"warn[open_inetsock:pptp_callmgr.c:310]:connect: Connection refused
fatal[callmgr_main:pptp_callmgr.c:133]: Could not open control connection to ("here was the ip of my gateway")
fatal[open_callmgr:pptp.c:283]: Call manager exited with error 256"
begining to desperate i tried to change all back, but i found that it was not possible, i couldn't leave the domain name blank.
after that i found that something with the name of "shorewall" was blocking my attemps to connect to internet. (by the way i use pptp )
when i stopped the shorewall the computer connected to something, but i don't know to what. not to internet. mozilla couldn't connect to anything.
i did 'ifconfig -a' and the result of the eth0, ppp0, and loop was (i think) right. (the netmask of loop and eth0 is the same, is that ok?)
after that i did 'netstat -r -n and again all looks right.
then i did 'host cnn.com' in the terminal. the message was (something like) : fail in the loop and after looking for other server couldn't found.
(sorry there, i didn't copy that message, if it is important i'll go and copy it)
after that i looked at the logs and copy the netconf log:
### misc: Wed Sep 24 09:23:37 2003 Miscellaneous task Checking kernel configuration
### misc: Wed Sep 24 11:10:44 2003 Miscellaneous task Checking kernel configuration
### misc: Wed Sep 24 14:04:56 2003 Miscellaneous task Checking kernel configuration
### misc: Fri Sep 26 13:06:16 2003 Miscellaneous task Checking kernel configuration
### misc: Mon Sep 29 23:06:42 2003 Miscellaneous task Checking kernel configuration
### misc: Wed Oct 1 21:24:42 2003 Miscellaneous task Checking kernel configuration
### misc: Fri Oct 3 10:12:02 2003 Miscellaneous task Checking kernel configuration
### misc: Fri Oct 3 10:10:21 2003 Miscellaneous task
Archiving /etc/sysconfig/network-scripts/ifcfg-eth0, version Home-Office
Archiving /etc/hosts-stationid, version Office
Archiving /etc/hosts-client, version Office
Archiving /etc/sysconfig/network, version Office
Archiving /etc/modules.conf, version Home-Office
Archiving /etc/hosts-stationid, version Office
Archiving /etc/hosts-client, version Office
Archiving /etc/networks, version Home-Office
netconf --update: Fri Oct 3 10:14:33 2003
Activating changes
Checking base configuration
Checking kernel's modules
Mounting local volumes
Checking files permissions
Changing owner of file /dev/printers/0 to root.lp
Changing permissions of file /etc/linuxconf from 40775 to 40755
Changing permissions of file /usr/sbin/pppd from 105755 to 104755
Executing some Sysv init scripts ? Missing configuration file /etc/sysconfig/apmd for service apmd
Executing: /etc/rc5.d/S26apmd stop > Shutting down APM daemon: [ OK ] ? Service saslauthd is not running
Executing: /etc/rc5.d/S40saslauthd start > saslauthd already running * return 1 ? Configuration file /etc/sysconfig/network have changed for service xinetd
Executing: /etc/rc5.d/S56xinetd restart > Stopping xinetd: [ OK ] > Starting xinetd: [ OK ] ? Missing configuration file /etc/devsfsd.config for service devfsd
Executing: /etc/rc5.d/S99devfsd stop > [ OK ]Stopping devfsd daemon: [ OK ] Checking kernel configuration
### misc: Fri Oct 3 11:01:51 2003 Miscellaneous task
### misc: Fri Oct 3 11:04:08 2003 Miscellaneous task Checking kernel configuration
### misc: Fri Oct 3 11:12:21 2003 Miscellaneous task
Archiving /etc/sysconfig/network-scripts/ifcfg-eth0, version Home-Office
Archiving /etc/hosts-stationid, version Office
Archiving /etc/hosts-client, version Office
Archiving /etc/sysconfig/network, version Office
Archiving /etc/modules.conf, version Home-Office
Archiving /etc/hosts-stationid, version Office
Archiving /etc/hosts-client, version Office
Archiving /etc/networks, version Home-Office
netconf --update: Fri Oct 3 11:12:30 2003
Activating changes
Checking base configuration
Checking kernel's modules
Mounting local volumes
Checking files permissions
Changing owner of file /dev/printers/0 to root.lp
Executing some Sysv init scripts
? Missing configuration file /etc/sysconfig/apmd for service apmd
Executing: /etc/rc5.d/S26apmd stop > Shutting down APM daemon: [ OK ] ? Service saslauthd is not running
Executing: /etc/rc5.d/S40saslauthd start > saslauthd already running * return 1 ? Configuration file /etc/sysconfig/network have changed for service xinetd
Executing: /etc/rc5.d/S56xinetd restart > Stopping xinetd: [ OK ] > Starting xinetd: [ OK ] ? Missing configuration file /etc/devsfsd.config for service devfsd
Executing: /etc/rc5.d/S99devfsd stop > [ OK ]Stopping devfsd daemon: [ OK ] Checking kernel configuration
### misc: Fri Oct 3 11:15:27 2003 Miscellaneous task Checking kernel configuration
### misc: Fri Oct 3 11:23:36 2003 Miscellaneous task
Archiving /etc/sysconfig/network-scripts/ifcfg-eth0, version Home-Office
Archiving /etc/hosts-stationid, version Office
Archiving /etc/hosts-client, version Office
Archiving /etc/sysconfig/network, version Office
Archiving /etc/modules.conf, version Home-Office
Archiving /etc/hosts-stationid, version Office
Archiving /etc/hosts-client, version Office
Archiving /etc/networks, version Home-Office
### misc: Fri Oct 3 11:25:24 2003 Miscellaneous task Checking kernel configuration
any idea?
ty
Originally posted by mahdi
Yup, I'm raiding your fish shack and slaping you with your own Trout :D Oh well, at least you aren't slapping me with someone else's trout like my ex-girlfriend did....
:eek:
:mad:
Originally posted by yhotg
then i needed to fill the domain that untill this morning was blank , so i wrote 'localhost'Depending on your setup, the domain entry might need to be the domain name of your ISP.
Originally posted by yhotg
after that i found that something with the name of "shorewall" was blocking my attemps to connect to internet. Right- shorewall is a firewall program. It's function is to block/filter network connections for security reasons. If you're directly connected to your DSL modem you should learn how to configure Shorewall to allow your connection but block incoming connections.
Originally posted by yhotg
i did 'ifconfig -a' and the result of the eth0, ppp0, and loop was (i think) right. (the netmask of loop and eth0 is the same, is that ok?)Yes, you should have lo, eth0, and ppp0. lo's netmask is 255.0.0.0, eth0's netmask could be the same; if your ISP told you to use that netmask, then that's what you should use.
Originally posted by yhotg
then i did 'host cnn.com' in the terminal. the message was (something like) : fail in the loop and after looking for other server couldn't found.
(sorry there, i didn't copy that message, if it is important i'll go and copy it)Yes, posting the exact message might help.
I can't really offer any more suggestions, since I don't use DSL.
yhotg
10-03-2003, 07:12 PM
so...,
u said i need to learn shorewall. good. i was looking for that, (the problem is that i the more i look and read to learn linux and manual or man pages or how-to's for every little part of linux the less i understand. Is there in linux something easy to do?) Remember. i am not stupid, i am an alien end user. and i don't have a natural fascination for learning computers.
i only want it for working and playing a little. or a lot.
about the correct error message , yeah i'll copy it later and post it.
but what about the log i posted? isn't there anything that helps?
well...., to read and try to understan more linux literature.
maybe if somebody could write that manuals with a little of dramatic structure or something remotely understable. like : "there were 3 piggys, and they lived in 3 houses. The first one had a house with the name hda builded by microsoft. and then came the bad bad penguin and ......"
Originally posted by yhotg
so...,
u said i need to learn shorewall. good. The only reason I say that is because you appear to be directly connected to your DSL modem. This can be dangerous, because your machine will be visible and available to people on the 'Net who could attack or break into your system. Without using a hardware firewall (such as a broadband gateway router) or a software firewall such a shorewall, you greatly increase the risk of getting "hacked".
Originally posted by yhotg
Remember. i am not stupid, i am an alien end user. and i don't have a natural fascination for learning computers. Understandable, and unfortunately I don't have a good solution for you. Because Linux comes with so many applications, users can get overwhelmed when they start discovering all of them. Windows users get sheltered from this for a couple of reasons:
a) Windows doesn't come with anywhere near the amount of "goodies" that a Linux installation does. Win users won't have to learn much, because they aren't given that much to learn.
b) Because of setup "Wizards" and the general "point and clickness" of Windows, users can be lulled into the (very false) sense that everything just automatically gets set up for them in the best possible way. They never have to wonder what, for example, a firewall is, because they probably won't ever run across any mention of such a beast. This also means that their machines are big, fat targets for hackers, because by default Windows will, without asking, enable a lot of insecure (and probably unnecessary) services. Since Windows does a lot of this without user intervention, Joe Average User will have no idea what's really going on behind the scene.
Anyway, enough of that debate...
Originally posted by yhotg
what about the log i posted? isn't there anything that helps?It's difficult for me to tell. For one thing, I'm away from my Linux boxes for a couple of days, so I don't have all of my resources available to me right now.
The apmd, devfsd, and saslauthd errors don't look good. The apmd and devfsd error are most likely not part of the problem (apmd is a power-management component; devfsd is a component of the devfs filesystem), but saslauthd is a network authorization component, so that might be a clue. Unfortunately I'm not enough of a "guru" to say for sure. I did see a message on a Mandrake mailing list regarding recent changes to the workings of sasl, so the saslauthd error might relate to known bug in your version of Mandrake.
Originally posted by yhotg
maybe if somebody could write that manuals with a little of dramatic structure or something remotely understable. like : "there were 3 piggys, and they lived in 3 houses. The first one had a house with the name hda builded by microsoft. and then came the bad bad penguin and ......" lol. Absolutely; if I ever learn enough about this operating system to do so, I'll write those manuals myself!
:D