[SOLVED] Two machines LAN configuration in Slackware plus internet.
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Two machines LAN configuration in Slackware plus internet.
Hi:
The problem: A modem-router, a switch and two computers. The switch is connected to the modem-router and the two computers, and I want the computers to communicate between them and one of them, say computer A, to have access to internet (the modem-router is fed by the ISP). Let the other be computer B.
I've been reading The Linux Network Administrator's Guide, 2nd edition and /usr/doc/Linux-HOWTO/Linux+IPv6-HOWTO, but still can't figure out how to solve this problem.
As I see it, its a case of assigning one IP to A and another to B. This would do for address resolution. And could be done with ifconfig, though I do not know how (yes, I studies the man page).
What I did was to just forget about the modem-router (Motorola Surfboard SB5101i) and join the computers by means of the switch. I did 'ifconfig eth0 xxx.xxx.1.1' and 'ifconfig eth0 xxx.xxx.1.2' on B, where I chose xxx.xxx arbitrarily. Then, I verified with ping. This I did trying to simplify the problem, only to test. However, I was not able to login into the other machine. As you can see, my knowledge on LAN is insufficient, so I would not be entitled to ask for help here. If you think otherwise, please let me know.
net-tools 1.60
ifconfig 1.42 (2001-04-13)
Linux 3.2.29
Slackware 14.0
What I did was to just forget about the modem-router (Motorola Surfboard SB5101i) and join the computers by means of the switch. I did 'ifconfig eth0 xxx.xxx.1.1' and 'ifconfig eth0 xxx.xxx.1.2' on B, where I chose xxx.xxx arbitrarily. Then, I verified with ping. This I did trying to simplify the problem, only to test. However, I was not able to login into the other machine. As you can see, my knowledge on LAN is insufficient, so I would not be entitled to ask for help here. If you think otherwise, please let me know.
net-tools 1.60
ifconfig 1.42 (2001-04-13)
Linux 3.2.29
Slackware 14.0
it's more easy to designate address via /etc/rc/d/rc.inet1.conf
it contains some like:
# Config information for eth0:
IPADDR[0]="192.168.3.55"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""
# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""
# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""
# Default gateway IP address:
GATEWAY="192.168.3.254"
edit it with your own settings, save, and restart computer ( or do command: /etc/rc.d/rc.inet1 restart ). if you do not want setting done via manual, as i remeber commands is like ifconfig eth0 192.168.1.2 mask 255.255.255.0
then do add gateway: route add default gw 192.168.1.1
then it be must works. both computer must be in one subnet ( if netmask is 255.255.255.0 ( "c" class netmask, or /24), then ip adress range for both is like a 192.168.1.x, where x= 1 to 254 ) in example, give A computer 192.168.1.1, and B one - 192.168.1.2. netmask on both is 255.255.255.0 after you do that, you must can ping each other from both machines, if it be connected physically with ethernet cable ( crossed, or patch cables connected to ethernet switch).
also you do not want to hide your addresses, if it from 192.168.x.x range - it is "grey" address range for small private networks - it not routed to internet and not showing in global internet. when you connecting to inet, you must have a "real address", some like, for example, 60.50.104.45...
PS. why IPv6? do your cable provider use IPv6 ? :-O
PS. why IPv6? do your cable provider use IPv6 ? :-O
Hello stf92,
Wise Draco asks why you are reading a How-To about Linux+IPv6?
If you see in Chapter 2 (2.1) it explains how
IPv6 differs from IPv4.
The addresses you have set for your two
computers are 32-bit IPv4.
Wise Draco asks why you are reading a How-To about Linux+IPv6?
If you see in Chapter 2 (2.1) it explains how
IPv6 differs from IPv4.
The addresses you have set for your two
computers are 32-bit IPv4.
Oh yes. Four 8-bit numbers, that is, binary bbbbbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb or up to 255.255.255.255. You are right. And the computer when booting has trouble with 'IPv6 RAS'. So that was the trouble! But then it takes another course of action and seems to resolve. Otherwise I would not be speaking with you now. Thanks.
EDIT: by the way, when I had just bought the switch, I connected it to the modem and to this computer while the computer was running. And it, the computer, went on running as if nothing had happened. Perfect, said I, this works! Of course the other computer was not connected yet to the switch. However, I could NEVER again repeat these conditions! I wonder how I did it.
But this fact, that I continued having internet, does not say the modem is really a modem-router?
switch is hardware mm...hard to say in english - but switch is like a electric spreader, splitter - it looks up transparent for network. router \ firewall is a bit different things -it in you must configure it, and it works with packet filtration, addr4ess translation and another complex things. do you done configure ip address on both machines, as i describe? after that, it pings each other?
ifconf eth0 xxxxxxx.1 mask 255.255.255.0 gave 'mask: Host name lookup failure'. I have the same hostnames on both machines.
sorry, there have been "netmask" - i configured it many time ago. correct syntax is
ifconfig eth0 xxx.xxx.xxx.xxx netmask 255.255.255.0
on one machine in xxx.xxx.xxx.xxx do a 192.168.0.1, on another - 192.168.0.2
then make sure both of it is be connected to switch, and switch is turn on, and then make a ping 192.168.0.2 from first machine.
It is complicated. There might be some way for you to use the modem
and switch as was discussed yesterday, but it would better IMHO
to follow the recommendation here.
OK. Both ifconfig done in each machine plus route command on A. After that, I pinged from each machine with no problem. What next?
what you want next? i think, it is goal, who you want - network connection between these two machines.
if you need also internet on one of your machines in the same time ( says, on machine A), then
go on /etc/rc.d/rc.local on that machine and write in rc.local new string with /sbin/ifconfig eth0:0 192.168.0.1 netmask 255.255.255.0
in machine B on /etc/rc.d/rc.inet1.conf writes ip 192.168.0.2 and gw 192.168.0.1
in that example means, a internet ( with modem and so) is always connect to machine A.
after reboot both machines you must going to internet from machine A, and ping from A to B, ant vice versa...
it is any another things, who you want?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.