*BSD News Article 53382


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!news.mathworks.com!newsfeed.internetmci.com!howland.reston.ans.net!blackbush.xlink.net!noris.net!pizza.franken.de!chico.franken.de!faui0n.informatik.uni-erlangen.de!uni-erlangen.de!news.tu-chemnitz.de!irz401!theatre.pandora.sax.de!mw
From: mw@theatre.pandora.sax.de (Martin Welk)
Subject: Re: local tcp/ip btween 2 machines and 2 O/S ?
Organization: Private Site, Member of Individual Network e. V.
Message-ID: <DGw4Ey.Ipo@theatre.pandora.sax.de>
References: <46dkfe$rs9@dns.enter.net>
Date: Mon, 23 Oct 1995 07:20:58 GMT
Lines: 217

In article <46dkfe$rs9@dns.enter.net>, Daniel Hauer <dh@enter.net> wrote:

>  I have recently got freebsd 2.1.0 (one of the snaps) running, nice,
>what I would like to know is this, the freebsd machine and the machine
>upstairs (running win 95 tcp/ip) are naturally ethernetted togetther
>as I dual boot the free bsd machine occasionally for network dos work.
>MY Question is How could I set free bsd up to accept tcp/ip
>requests from the remote machine? how do I set it up so I can telnet
>in from upstairs on the other machine ? I know how to set-up the stack
>for the dos box, but how do I do it on the unix box?

The easiest way is to set up the network environment during the
install procedure. When you're using any network media to install
(vi NFS or ftp) you're asked about IP number, default gateway,
netmask and so on. This becomes the default.

For giving you exact information on how to set up your local area
network, we would need more information - do you have a registered
class C network, do you plan to split your class C network to
sub networks? I'm assuming you have your own little LAN and no
registered network and no sub networks - this is the easiest way :-)

On a running system, have a look at the following files:

=======> /etc/hosts

# $Id: hosts,v 1.2 1993/11/11 22:32:36 wollman Exp $
#
# Host Database
# This file should contain the addresses and aliases
# for local hosts that share this file.
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/host.conf for the resolution order.
#
#
127.0.0.1		localhost localhost.my.domain
#
# Imaginary network.
#0.2		myname.my.domain myname
#0.3		myfriend.my.domain myfriend
#
# NB: 0 is not a valid network number.  PLEASE PLEASE PLEASE do not try
# to invent your own network numbers but instead get one from your
# network provider (if any) or from the Internet Registry (ftp to
# rs.internic.net, directory `/templates').
#

You need to assign some IP numbers to your hosts.
Unless you have a registered class C network (the first three bytes,
for example 193.28.3 or 193.175.26), you should use some of those
numbers reserved for usage in LANs, that means, not on the world-
wide Internet. I'm sorry that I can't look up which numbers this
are now, but feel free to use any number you like, as long as you
don't try to use them dialing to your IP provider :-)

For example, add those entries:

1.0.0.1		freebsd
1.0.0.2		windoze

(I call the machines freebsd and windoze - you may give 'em any
name you like, of course. But those names make it easier.)

I know that we wouldn't even need a change of /etc/hosts but
I find using hostnames rather than IP numbers more comfortable.

=======> /etc/sysconfig

######################### Start Of Netconfig Section #######################

# Set to the name of your host - this is pretty important!
hostname=freebsd

# Set to the NIS domainname of your host, or NO if none
defaultdomainname=NO

#
# Some broken implementations can't handle the RFC 1323 and RFC 1644
# TCP options.  If TCP connections randomly hang, try disabling this,
# and bug the vendor of the losing equipment.
#
tcp_extensions=YES

#
# Set to the list of network devices on this host.  You must have an
# ifconfig_${network_interface} line for each interface listed here.
# for example:
#
#	network_interfaces="ed0 sl0 lo0"
#	ifconfig_ed0="inet 10.0.0.1 netmask 0xffffff00"
#	ifconfig_sl0="inet 10.0.1.0 netmask 0xffffff00"
#
network_interfaces="lo0 ed0"
ifconfig_lo0="inet localhost"
ifconfig_ed0="inet freebsd netmask 255.255.255.0"

#
# Set to the list of route add lines for this host.  You must have a
# route_${static_routes} line for each static route listed here.
#
static_routes="loopback multicast"
route_multicast="224.0.0.0 -netmask 0xf0000000 -interface ${hostname}"
route_loopback="${hostname} localhost"

# Set to the host you'd like set as your default router, or NO for none.
defaultrouter=NO

# These are the flags you'd like to start the routing daemon with
routedflags=NO
#-q

# timed flags, or NO if you don't want to start the time daemon
timedflags=NO

# xntpd flags, or NO if you don't want to start the xntpd daemon
xntpdflags="NO"

# this is inoperative unless xntpd is enabled; NO to disable
tickadjflags="-Aq"

# Set to the site you'd like to syncronize your clock from (gatekeeper.dec.com,
# for example) or NO for no such site.
ntpdate="NO"

# Set to YES if you want to run rwhod
rwhod=NO

# Default sendmail flags.  -bd is pretty mandatory, -q<n>m sets the queue scan
# time in minutes.  If set to NO, don't start sendmail at all.
sendmail_flags="-bd -q30m"

# Set to appropriate flags if you want to use AMD
amdflags="NO"

# Set to YES if this machine will be an NFS client
nfs_client=YES

# Set to YES if this machine will be an NFS server
nfs_server=YES

# Set to appropriate flags if you want to start NIS for a client
nis_clientflags="NO"

# Set to appropriate flags if you want to start NIS for a server
nis_serverflags="NO"

# Set to appropriate flags for yppasswdd, if you wish to run it.
# Typical flags might be "-m /var/yp/master.passwd -s -f"
yppasswddflags="NO"

# Set to appropriate flags for named, if you have a full-time
# connection to the Internet.
# For most hosts, flags should be "-b /etc/namedb/named.boot"
namedflags="NO"

# Set to YES if you want to run the X-10 power controller daemon
xtend=NO

# Set to YES if you want kernel crashdumps to be saved for debugging
savecore=NO

# Set to YES if you want to run Kerberos authentication
kerberos_server=NO

# Set to YES if you want to run gated
gated=NO

# Set to YES if you wish to check quotas.  NOTE:  For now this probably
# doesn't work and should be left disabled.
check_quotas=NO

# Set to YES to turn on accounting.  NOTE: For now this probably
# doesn't work and should be left disabled.
accounting=NO


# This stuff needed for proper daemons tuning, comsat f.e.
# See profile and csh.login also.
# Uncomment next line if you want to setup your 8-bit locale at program
# startup automatically
# ENABLE_STARTUP_LOCALE=; export ENABLE_STARTUP_LOCALE
# Uncomment next line to activate russian locale
# LANG=ru_SU.KOI8-R; export LANG
# Uncomment next line to activate italian locale
# LANG=it_IT.ISO8859-1; export LANG
# For full list of locales, check /usr/share/locale/*

######################### End Of Netconfig Section #######################

That should be all if you have done a standard installation, that
means, the distribution defaults are set (geee, that's what makes
me like FreeBSD, using Linux I would have to ask ``what distribution
is it you're using, what version, what side of the CD did you use
when installing'' - please don't take me to serious!)

Try something like a telnet or ftp to your FreeBSD box and it
should work. Try a ``ping windoze'' on your FreeBSD machine (assuming
that you properly configured the other host) and it should already
answer.

Ah, of course, after making the changes to /etc/hosts and
/etc/sysconfig, don't forget to reboot your machine so that the
settings become used. Of course you could change your configuration
without rebooting, but this makes it easier for you (I don't want
to bore you with ifconfig commands and so on, although it isn't
really much more difficult than entering reboot :-) )

I hope, this was what you wanted.

Bye,
    Martin
-- 
 /| /|        | /| /       \      ,,You know, there's a lot of opportunities,
/ |/ | artin  |/ |/ elk     \                 if you're knowing to take them,
                             \      you know, there's a lot of opportunities,
mw@pandora.sax.de             \            if there aren't you can make them,
Meissen, Germany, Europe       \         make or break them!'' (Tennant/Lowe)