Re: very simple lan question
A long time ago, in a galaxy far, far way, someone said...
> Hi, I have two boxes (one woody, one potato) with ethernet cards,
> connected by a RJ45 cable. I'd like to be able to ssh/sftp betwixt them.
>
> [I admit I don't grok networking much yet (that's partly why I'm doing
> this, to learn). I've mainly been reading the Net-HOWTO and the man pages
> for ifconfig, if(up|down), route, and references therein; let me know if
> there's another FM I should RT.]
find one that has basic ip number information first - you need to know
that before you get to assigning ip numbers to hosts
a cisco ccna book has the information you seek - you might be able to
borrow one from someone.
you can also find such books at a border's bookstore - i know i can in
the town where i live.
> I've given the two boxes, 'leper-messiah' [1] and 'yomama', which I've
> given addresses 192.168.0.0 and 192.168.0.1 resp; and I've edited
> /etc/hosts on each box appropriately. The file
> 'leper-messiah:/etc/network/interfaces' contains the stanza
> iface eth0 inet static
> address 192.168.0.0
> netmask 255.255.255.0
change the ip number to 192.168.0.2 - 192.168.0.0 has a special meaning
and probably shouldn't be assigned to a host.
> The file 'yomama:/etc/network/interfaces' contains this stanza
> iface eth0 inet static
> address 192.168.0.1
> netmask 255.255.255.0
> I've gotten the eth0 interface working fine (I think) on both. For
> example, on yomama, 'ifconfig eth0' yields
> yomama:~# ifconfig eth0
> eth0 Link encap:Ethernet HWaddr 00:C0:F0:47:A9:A1
> inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:100
> Interrupt:11 Base address:0xdc00
> I've enabled the appropriate services in /etc/services on both machines,
> I'm pretty certain, so I don't believe that's the problem.
sshd runs as a stand-alone daemon
/etc/services doesn't specify the services your computer is going to run
btw - basically it's just there to associate a certain service (ftp, ssh,
www, etc) with the appropriate tcp/udp port number.
> I tried various manipulations of the routing table, but they didn't seem
> to help. I'm not sure what other info is useful, so please ask.
when you assign the ip number the kernel takes care of adding a route to
the local network for you.
--
----------------------------------------------------------------------
Phil Brutsche pbrutsch@tux.creighton.edu
"There are two things that are infinite; Human stupidity and the
universe. And I'm not sure about the universe." - Albert Einstien
Reply to: