Someone with more network knowledge will probably correct any bullshit
I'll type from now on... :)

On 3/9/06, Kris Kerwin <[EMAIL PROTECTED]> wrote:
> Daniel,
>
> Thanks for your quick reply.
>
> > I couldn't think of a more "complex" solution right now, but
> > couldn't you simply make your IP static? I've done it at work
> > because our DNS was failing, simply copied the network
> > configurations gained with DHCP and made it permanent...
>
> Question: how does one *make* a static IP? I thought that IP was
> assigned by DHCP? Isn't that the way that DHCP works? It leases an IP

Well, this is more of a server solution than a workstation one, you'll
probably turn your computer off once in a while. DHCP wil not give
anyone an IP that is already in use (its against TCP/IP rules), so, if
you have your machine running with an IP, DHCP will not lease it (at
least I think so because my machine never conflited).

> to a specific computer, which then gives up that lease when it's done
> using it. At that point, DHCP is free to re-lease that same IP to
> whomever else requests it, correct? If that's the case, what would

Yes, if your DHCP sends a DHCP_RELEASE command to the server, it will
"give up" that IP and it will be available for another computer.

> prevent another computer from accidentally obtaining that same IP?

You just never RELEASE the IP, and when it expires you LEASE it again,
and DHCP cache will always try to get the last IP, of course, I've
done it in a server running all the time, first I tried RELEASING and
automatic LEASING it again in TIMEOUT seconds (where timeout is the
LEASE time minus a few seconds, it alll depends on how big is your
server's lease time), I've created a script to do that, but deleted it
long ago. Then I decided to simply configure /etc/resolv.conf,
/etc/conf.d/net and /etc/hosts so I would have an static IP, and let
TCP/IP do the rest (not allow the DHCP server to LEASE that IP to
someone else). I couldn't find anywhere in the web if that SHOULD
work, it just does, for me.

>
> Otherwise, if this is a viable solution, how do I make it work? I'm
> comfortable editing config files, but I just don't know where to go
> to do it.
>

You ifconfig to get the IP your're using right now and the Netmask
used in your network environment. Then you edit the /etc/conf.d/net
file to configure your ethernet interface to have a static IP, using
the one you're already using from DHCP and set the netmask you got
from ifconfig, and let be your /etc/resolv.conf and /etc/hosts that
were written by the DHCP client.

> Thanks again, all, for your help.
>
> Kris
>
> On Wednesday 08 March 2006 20:43, Daniel da Veiga wrote:
> > On 3/8/06, Kris Kerwin <[EMAIL PROTECTED]> wrote:
> > > Hi folks!
> > >
> > > I have a quick question.
> > >
> > > I'm a college student. I share my printer with my roommate. We
> > > have separate computers; he uses Windows XP, and I Gentoo.
> > > Together, we're behind our school's router which dynamically
> > > assigns us both IP's.
> > >
> > > Currently, in order to share our printer, we simply unplug it
> > > from one another's computers. However, we would like to be able
> > > to share it over the network instead to make life easier for the
> > > both of us. However, there are a few problems that I'm
> > > foreseeing.
> > >
> > > First off, I have a laptop with only one ethernet port, so
> > > setting up an ad hoc network between us is out of the question.
> > > Also, my school has a "one port - one computer" rule that
> > > prohibits routers.
> > >
> > > Second, since we're both behind a DHCPd server, we both have
> > > dynamic IPs. There's no easy way to point his computer to the
> > > right server if it has a dynamic IP.
> > >
> > > Third, since we're both behind a router, using something like
> > > DynDNS to provide a static contact despite the dynamic IP won't
> > > work either.
> > >
> > > So, I guess what I'm wondering is if there's any way to make this
> > > work, or if I'm SOL?
> > >
> > > Thank you much for your help.
> > >
> > > Kris Kerwin
> > > --
> > > gentoo-user@gentoo.org mailing list
> >
> > I couldn't think of a more "complex" solution right now, but
> > couldn't you simply make your IP static? I've done it at work
> > because our DNS was failing, simply copied the network
> > configurations gained with DHCP and made it permanent...
> >
> > --
> > Daniel da Veiga
> > Computer Operator - RS - Brazil
> > -----BEGIN GEEK CODE BLOCK-----
> > Version: 3.1
> > GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M-
> > V- PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
> > ------END GEEK CODE BLOCK------
>


--
Daniel da Veiga
Computer Operator - RS - Brazil
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
------END GEEK CODE BLOCK------

-- 
gentoo-user@gentoo.org mailing list

Reply via email to