[svlug] ethernet questions

Seth David Schoen schoen at uclink4.berkeley.edu
Thu Aug 6 15:39:50 PDT 1998


Chris Mason writes:

> I'd like to get two computers to talk to each other in my new
> studio apartment.  I would like one to have linux and the other
> to have a pane 98 on it.  If I use addresses IP such as
> 10.1.1.1 for the linux computer and 10.1.1.2 for the wintel box,
> would this possibly work?

Yes.

You might want to use 192.168.n.0, where n is a randomly-chosen byte, instead.
(This looks like a class C address, with netmask 255.255.255.0, to software
that is hard-coded to obtain its netmask from the IP address rather than
external interface configuration information; 10.1.1.0 looks like part of the
class A network 10.0.0.0 with netmask 255.0.0.0 to such software, even if you
personally have decided to use it as a private class C network.)
 
> I'm confused about my ip number regarding ppp versus ethernet.
> I have a certain ip number statically from best.com 204. something...
> And I wonder if I "need" or "should" use it in /etc/hosts.
> it seems to help during ppp if I have a line
> hcmason.vip.best.com 204.4.2.222 hcmason, but this probably screws
> up my ethernet connection, right?

No, there's no reason that it would hurt your Ethernet connection.

> Should I only have 204.4.2.222 (not my real best ip, just an example)
> in the pppd command in the chat script, and have 10.1.1.1 in
> the /et/hosts for hcmason?  Or should my machine have two ip
> identities whilst connected to the internet via ppp and 
> connected to another machine?

The idea that a computer has only one IP address is a low expectation due
to working with single-user Windows or Macintosh systems.  It has been
traditional for years for a Unix system to have many IP addresses.

Each IP address is associated with a particular network interface, and each
interface can, if you want, have a separate DNS name.

For example, I've often seen the form

hcmason.vip.best.com for the outside (upstream)
hcmason-inside for the inside (private LAN)

Then you can always access your Linux box from your Windows box, whether
or not the Linux box is connected to the Internet.  When your Linux box is
connected to the Internet, if you use masquerading, your Windows box will
also have limited Internet access, if it designates the Linux box as its
default gateway.

I use, e.g.

169.229.76.69	requiem.reshall.berkeley.edu requiem.geecs.org requiem
192.168.39.1	requiem-inside.geecs.org requiem-inside
192.168.39.2	kyrie.geecs.org kyrie
192.168.39.3	palm3.geecs.org palm3
192.168.39.4	eleison.geecs.org eleison

The use of the domain (.geecs.org) is entirely optional; since I control a
DNS server for geecs.org, and contemplate making VPNs with other people, I
find it useful, but it would work fine if the names were unqualified.

Note that the first address above is globally visible, while the others are
private, at present.

> Is there a howto on how to do this, i.e. have a machine connected
> to the internet via ppp and connected to another machine
> via ethernet?

You could try the Net-3-HOWTO and the IP-Masquerade HOWTO.

If you learn to use "ifconfig", "route", and "ipfwadm", you will be able to
do any number of tricks which will blow non-Linux users away.  RedHat also
has some configuration files in /etc/sysconfig/network-scripts which make
setting up a machine as a router very easy.

-- 
   Seth David Schoen L&S '01 (undeclared) / schoen at uclink4.berkeley.edu
Magna dis immortalibus habenda est atque huic ipsi Iovi Statori, antiquissimo
custodi huius urbis, gratia, quod hanc tam taetram, tam horribilem tamque
infestam rei publicae pestem totiens iam effugimus.  -- Cicero, in Catilinam I

--
echo "unsubscribe svlug" | mail majordomo at svlug.org
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ to unsubscribe



More information about the svlug mailing list