LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-22-2005, 08:09 AM   #1
ivanatora
Member
 
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Rep: Reputation: 32
Can DHCP do that?


Just came up in my mind. Can DHCP assign an IP address and network configurations to given host (well, it can ) and then change these things to another?
The idea is as follows: gateway A, several hosts connected to it (one of them should be B). When B boots he gets an IP from a private network (192.168.0.X for example) and no access out of the gateway. When a client from B log on into a web page that is hosted on A, the DHCP changes B's IP to a public one and sends him another network configuration (for the gateway, new IP, new subnet mask, etc).
The idea is, can DHCP change network configuration to a host, when already send them while booting? Well... its 'dinamycal' in the name, so I guess it can be done in some way
 
Old 04-22-2005, 09:31 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
A dhcp server will only respond to a dhcp request made by a client so you would also have to get the client to ask for another IP address.

If you are looking for a way to authenticate clients then getting your webpage to add an iptables rule would be a lot simpler.
 
Old 04-23-2005, 12:41 PM   #3
ivanatora
Member
 
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Original Poster
Rep: Reputation: 32
I thought about that, but also thought about changing the IP
Thanks for the info. Is there any other method to change an IP of a host other than DHCP?
 
Old 04-23-2005, 01:56 PM   #4
winsnomore
Member
 
Registered: May 2004
Location: USA
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
Posts: 315

Rep: Reputation: 31
you can bring down the interface and then restart the networking with a new address. so you could write a little application that waits on socket and after getting a message kicks of a script that does the stoping and starting.
this whole things sounds rather bizzare, but it can be done.
When you find that you are trying to do something for which no simpler solution exists, you should rethink what you are trying to do, most situations are handled by the protocols and the packages. Generally speaking changing machine name/addresses dynamically is not a good idea.
 
Old 04-24-2005, 03:40 AM   #5
ivanatora
Member
 
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Original Poster
Rep: Reputation: 32
Thanks, I'll think about that
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP problems - multiple DHCP servers sat86 Linux - Networking 4 10-02-2005 05:43 AM
ADSL DHCP A-OK, but Mandrake 10.1 to be DHCP for other subnet is a problem turnbui Linux - Networking 2 08-20-2005 09:34 AM
dhcp client not getting IP from dhcp server jkmartha Linux - Networking 2 06-17-2005 08:12 AM
why DHCP client not sending own host name in DHCP request packet? sonika_singhi Linux - Networking 7 05-28-2005 05:18 AM
XP Pro Build 2600/sp1 v.1105 DHCP Client to Redhat 8.0 DHCP Server - Problems atomant Linux - Networking 5 06-28-2003 11:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration