Networking Forums

Networking Forums > Computer Networking > Linux Networking > DHCP and Static IP

Reply
Thread Tools Display Modes

DHCP and Static IP

 
 
Johan
Guest
Posts: n/a

 
      10-25-2003, 08:45 PM
Hi all.

I'm setting up a spare computer to serve files and songs at the GF's
appartment. Installing RH 9.0 as we speak. I chose to use DHCP but am
regretting it now. Read on for why.

Anyways:

the girls have a linksys box, giving their respective laptops dhcp and
thereby the nameservers of their DSL provider. However, being a cheap-ass
piece of kit, it doesn't do any sort of DNS locally, so the computers
can't easily speak to each other. Normally not a problem, but a hassle in
this case: they need to access the linux box in order to use it as a music
server. I need to somehow figure out the IP address of the server so that
the various clients (the girls' computers) can talk to it. Two options

1) use dyn-dns to register its dhcp granted address. Easy, but requires
the dsl modem to be connected in order for clients to access the
mp3s.

2) assign it a static IP. Also easy, but I don't know which nameservers to
assign to it. As it stands, the linux box probably DOESN'T need and
DNS (perhaps for ssh?), but I thought I would do it right.

So: how can I set up RH 9.0 so that it gets a static IP, yet speaks DHCP
to the linksys to get the nameserves? I'd like to modify the redhat
networking scripts as little as possible.

Thanks

Johan
 
Reply With Quote
 
 
 
 
Neil Horman
Guest
Posts: n/a

 
      10-29-2003, 02:15 PM
Johan wrote:
> Hi all.
>
> I'm setting up a spare computer to serve files and songs at the GF's
> appartment. Installing RH 9.0 as we speak. I chose to use DHCP but am
> regretting it now. Read on for why.
>
> Anyways:
>
> the girls have a linksys box, giving their respective laptops dhcp and
> thereby the nameservers of their DSL provider. However, being a cheap-ass
> piece of kit, it doesn't do any sort of DNS locally, so the computers
> can't easily speak to each other. Normally not a problem, but a hassle in
> this case: they need to access the linux box in order to use it as a music
> server. I need to somehow figure out the IP address of the server so that
> the various clients (the girls' computers) can talk to it. Two options
>
> 1) use dyn-dns to register its dhcp granted address. Easy, but requires
> the dsl modem to be connected in order for clients to access the
> mp3s.
>
> 2) assign it a static IP. Also easy, but I don't know which nameservers to
> assign to it. As it stands, the linux box probably DOESN'T need and
> DNS (perhaps for ssh?), but I thought I would do it right.
>
> So: how can I set up RH 9.0 so that it gets a static IP, yet speaks DHCP
> to the linksys to get the nameserves? I'd like to modify the redhat
> networking scripts as little as possible.
>
> Thanks
>
> Johan


Make the linux box its own caching DNS server (the configs are available
as rpms I think). Then configure the DHCP server to provide its own ip
address as the primary DNS when the laptops request IP addresses. Add a
zone to the DNS config to allow dyn-dns from the laptops. That way
the two laptops can refer to each other by name all the time, and the
linux box will pass DNS requests up the internet DNS heirarcy when the
router is up.

HTH
Neil


--
/************************************************** *
*Neil Horman
*Software Engineer
*Red Hat, Inc., www.redhat.com
*gpg keyid: 1024D / 0x92A74FA1
*http://www.keyserver.net
************************************************** */

 
Reply With Quote
 
Rich Grise
Guest
Posts: n/a

 
      02-13-2004, 04:47 AM
Has anybody got a quick link to a small glossary or something that could
teach me to understand what Neil Horman is saying? Or maybe I have questions
like, OK, how do I do that?

"Make the linux box its own caching DNS server," I can figure out. Maybe
trying to find out how exactly to make the box a caching DNS server is
a little advanced at this stage for me - I'm currently trying to read
enough to be able to make an informed decision as to where to go from
here. I have an embarrassment of riches here:
http://home.earthlink.net/~entheos_e...ntheos_LAN.gif
Installing and studying Linux empowered me to be a W2K guru - of course,
having the router card helps - in W2K, everything just shows up. And you
have to download an update every few days to devirus it. So, I'm putting
Slackware 9.1 on Thunderbird and Vehicle - have it all installed that is,
and sitting here with two virgin systems to configure any way I want to. ;-)
I'm not a stranger to linux - last millennium, I downloaded and installed
Slackware 2 or 3.something, and actually had virtual hosts at 127.0.0.2,
127.0.0.3, and so on, with web sites. But I'm brand new to networking.
I understand most of the basic concepts, and I'm at a point where I need
to learn to decide what to do next. I suppose I could just jump in, but
with the wealth of resources out there, and knowing how much stuff needs
to be exactly right, I really don't know what to do first. Well,
maybe I have done what needs to be done first: I've done enough to
rc.netdevices and rc.inet1.conf that dhcpcd gets 4.10.128.236 and
/sbin/ifconfig eth1 192.168.0.1 broadcast 192.168.0.255 netmask
255.255.255.0.
I guess I should go straight to dhcp server, but someone in
alt.os.linux.slackware suggested I read man route. Again, I understand
the concept of what a router does; making the computer act like one
is the part I don't have yet. :-)

Or maybe I should be looking at, "How do I make _this_ computer act like
a router?"

I find the examples in man route terribly confusing, like there's so much
stuff I'm
supposed to already know.
--------------------
route add -net 127.0.0.0
adds the normal loopback entry, using netmask
255.0.0.0 (class A net, determined from the desti-
nation address) and associated with the "lo" device
(assuming this device was prviously set up cor-
rectly with ifconfig(8)).
---------------------- [and yes, he's misspelled "previously."]

Wouldn't the normal loopback entry kinda be there by default?
And how would DNS and/or DHCP fit into this?

Maybe I'm stuck at, "What goes in /etc/hosts when eth0 has a dynamic IP?"
(eth1
is 192.168.0.1).
And that sort of thing.

Thanks for any suggestions; in the interim I'll be reading. :-)

Thanks,
Rich


"Neil Horman" <(E-Mail Removed)> wrote in message
news:bnomjf$bo1$(E-Mail Removed)...

> Make the linux box its own caching DNS server (the configs are available
> as rpms I think). Then configure the DHCP server to provide its own ip
> address as the primary DNS when the laptops request IP addresses. Add a
> zone to the DNS config to allow dyn-dns from the laptops. That way
> the two laptops can refer to each other by name all the time, and the
> linux box will pass DNS requests up the internet DNS heirarcy when the
> router is up.
>
> HTH
> Neil



 
Reply With Quote
 
Dan
Guest
Posts: n/a

 
      02-14-2004, 02:44 AM
On Fri, 13 Feb 2004 05:47:48 GMT, "Rich Grise" <(E-Mail Removed)>
wrote:

>I guess I should go straight to dhcp server, but someone in
>alt.os.linux.slackware suggested I read man route. Again, I understand
>the concept of what a router does; making the computer act like one
>is the part I don't have yet. :-)



I found the following link to be helpful.

http://projectfiles.com/firewall/


You run the script and it does all the hard work for you. The distro
you use probably does something similar.

Dan

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Static AND dhcp on same NIC? Jonathan Linux Networking 7 06-13-2008 05:32 PM
static ip/dhcp on mn-700 computanerd@gmail.com Broadband Hardware 9 10-19-2007 07:36 AM
DHCP and Static IPs? HotRdd Network Routers 5 06-14-2007 11:20 PM
DHCP Error 64 - No static IP bound to this DHCP Server DHCP Firewall Windows Networking 0 02-02-2006 04:04 PM
DHCP to static IP - is this OK? Bob O'Connor Linux Networking 3 07-05-2003 08:17 PM



1 2 3 4 5 6 7 8 9 10 11