LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ip from dhcp changed after new install (https://www.linuxquestions.org/questions/linux-networking-3/ip-from-dhcp-changed-after-new-install-338700/)

mht 06-30-2005 07:59 AM

ip from dhcp changed after new install
 
hello, i'm a linux newbie.
my pc is part of an network wich gives ip's throu a dhcp. some days ago a had to reinstall suse81. and to my own surprise, the dhcp gave a new ip. the problem: many users in the network ran services over ip (e.g. ftp://xxx.xxx.xxx.xxx or samba //xxx.xxx.xxx.xxx/pub). now i have to tell them all the new ip???
my net-adapter does not changed, so why i have a new ip?
is there a way to access services over a name? do i have to run a dns server for this purpose? but a dns is already running in the network.
please help. thanks!
mht

Half_Elf 06-30-2005 10:59 AM

the D in DHCP mean "DYNAMIC".
If you expected your ip to be static, you shouldn't have used DHCP at first. DHCP _try_ to keep the same ip, your client will request the same one from the server and the server will _try_ to give the same one if possible. But there is no warranty. Another client probably got your ip while you were reinstalling or your DHCP lease (the _time_ your ip is reserved for you) probably prevented your computer to get a new one.

In any case, if you want a static ip, use a static configuration ( mean, set it manually in your network card configuration), but you will probably need to talk with your network administrator yo make sure the DHCP will not give this ip to someone else then (what would result in a conflict on the network). You could also ask the admin to set some old BOOTP protocol options in the DHCP server so that the server will send ips according to MAC addresses (MAC address is an hardware address burned into your network card, it shouldn't never change). This is the only way to get "static" address from DHCP.

Or you could also run a DynDNS so your computer will get a hostname that will update when your ip will change?

mht 06-30-2005 11:26 AM

dhcp
 
hello,
and thanks for reply.
i know that dhcp is dynamic, but for over a year it was static. i thought the MAC adresses are the reason for a (static) ip from the dhcp. so when i change network adapter i get a new ip. but hardware is still the same.
to speak with the network admin: forget it, no chance.
i thought there is a way to give the pc a hostname, so you can use
//hostname/pub instead of //x.x.x.x/pub or ftp://hostname instead of ftp://x.x.x.x
i realy dont like to give a dyndns-adress.
how do i manage to give a hostname that is known everywere in the network segment, WITHOUT having dyndns?
i have to have an adress that is there for the rest of time.
thanks
mht

Half_Elf 06-30-2005 11:59 AM

hmmm the only way is to run your own DNS, and once again you will need to talk to the admin (unless all your client want to use your DNS instead of the network one?).
However, if your clients are windoze... you could run Samba ( and NMBD daemon ) to set yourself a name, as windoze box try to resolve Netbios name (samba name if you prefer) for every service when they can't find the hostname on DNS. This is some kind of silly behavior, but you could use (read : exploit) it for good purpose :)

mht 07-02-2005 08:37 PM

samba and dyndns
 
now i just use samba and dyndns for ftp. i thought dyndns would not work because i'm behind a proxy. but works fine.
thanks for help.

charon79m 07-03-2005 07:38 AM

Name Resolution without DNS
 
Another solution would be for the others to toss an entry in their hosts file (Windows = C:\windows\system32\drivers\etc\hosts) (linux = /etc/hosts).

That way, if your address changes you can just give them the new address and they can update the hosts file.

MrKnisely

mht 07-06-2005 07:55 PM

host flie
 
hi,
good idea. but: every user in the network have to do this. but a lot of DAU's (german for 'most stupid user') around. they can klick a link, but not edit a textfile.
for the user it should only be one adress for all things: http, ftp, samba, whatever....
mht

charon79m 07-07-2005 07:02 AM

You could create a batch file/shell script to take care of it for them.

MrKnisely


All times are GMT -5. The time now is 02:31 PM.