From: "Daniel da Veiga" <danieldaveiga@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Printer Sharing with Samba
Date: Thu, 9 Mar 2006 15:42:30 -0300 [thread overview]
Message-ID: <342e1090603091042k5cf01221pbed42c99f68a627a@mail.gmail.com> (raw)
In-Reply-To: <200603091205.53033.kkerwin@insightbb.com>
Someone with more network knowledge will probably correct any bullshit
I'll type from now on... :)
On 3/9/06, Kris Kerwin <kkerwin@insightbb.com> 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 <kkerwin@insightbb.com> 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
next prev parent reply other threads:[~2006-03-09 18:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 2:28 [gentoo-user] Printer Sharing with Samba Kris Kerwin
2006-03-09 2:43 ` Daniel da Veiga
2006-03-09 18:05 ` Kris Kerwin
2006-03-09 18:24 ` John Jolet
2006-03-09 18:42 ` Daniel da Veiga [this message]
2006-03-09 3:06 ` Boyd Stephen Smith Jr.
2006-03-09 17:56 ` Eric Bliss
2006-03-09 18:07 ` Kris Kerwin
2006-03-10 1:26 ` Boyd Stephen Smith Jr.
2006-03-09 18:35 ` Michael Crute
2006-03-09 19:18 ` Daniel da Veiga
2006-03-09 19:33 ` Michael Crute
2006-03-10 4:53 ` [SOLVED] " Kris Kerwin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=342e1090603091042k5cf01221pbed42c99f68a627a@mail.gmail.com \
--to=danieldaveiga@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox