[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.
What was your gateway for the route command? Or were you setting a route to B?
in that etap route not need at all, i think, because in "internal network" is no further going \ routes.
gateway is need only if it must be routing via networks \ going to internet from machine B...
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?
First, to thank you for your nice posts. Secondly, it seems to me the modem is really a modem-router because I am having internet through the switch! However, B machine gave errors when booting. I got
Quote:
Object "192.168.0.2" is unknown, try ip help
Maybe it is 192.168.1.2?
EDIT: on the other hand I have no gw on either 12.0 or 14.0.
First, to thank you for your nice posts. Secondly, it seems to me the modem is really a modem-router because I am having internet through the switch! However, B machine gave errors when booting. I got
Maybe it is 192.168.1.2?
maybe. it do not remember your adressing, first three digit groups must be the same on both machines, if your netmask is 255.255.255.0 i e on both machines you must be 192.168.0.x or or 192.168.1.x, not mixed.
about internet via switch - as i tell you agree, switch is transparent network device. no matter, your modem is connected to your ethernet port on computer, or via switch - it is be same thing, as so, there is no "modem router".
modem can be router if you can distribute internet from it to all your local computerts at the same time, on whole internal network. but as i understand, your router cannot be configured to have "lowered" address like 192.168.x.x and distribute internet access from that whole network...
gw on this stage not necessary, except that one, who goes from dhcp for machine connected to modem, and need in that case, for internet on it is working.
# ifconf eth0 192.168.1.1 netmask 255.255.255.0
# route add default gw 192.168.1.1
Then in etc/rc.d/rc.local, I added line
/sbin/ifconfig eth0:0 192.168.0.1 netmask 255.255.255.0
Here A takes either 192.168.0.1 or 192.168.1.1 without complaining.
In B:
# ifconf eth0 192.168.1.2 netmask 255.255.255.0
Then in /etc/rc.d/rc.inet1.conf, I added line
ip 192.168.0.2
Here 'ip 192.168.0.2' and 'ip 192.168.1.2' both give errors.
Booted both A and B and I had internet in A. It's a pity such a good track I had at last found is really a dead end, though not your fault, of course. Anyway, to have understood that the switch is really transparent, in the same way as a splitter, is a very good thing. Of course, I can't now ping.
Yes, internet working in A. Now, what is the syntax for 'route' in /etc/rc.d/rc.inet1.conf? I am at one inch of success.
in /etc/rc.d/rc.inet1.conf conf on machine B write address, who you given in aliase ( eth0:0) for machine A. but link between A and B works also without that.
# ifconf eth0 192.168.1.1 netmask 255.255.255.0
# route add default gw 192.168.1.1
Then in etc/rc.d/rc.local, I added line
/sbin/ifconfig eth0:0 192.168.0.1 netmask 255.255.255.0
Here A takes either 192.168.0.1 or 192.168.1.1 without complaining.
In B:
# ifconf eth0 192.168.1.2 netmask 255.255.255.0
Then in /etc/rc.d/rc.inet1.conf, I added line
ip 192.168.0.2
Here 'ip 192.168.0.2' and 'ip 192.168.1.2' both give errors.
Booted both A and B and I had internet in A. It's a pity such a good track I had at last found is really a dead end, though not your fault, of course. Anyway, to have understood that the switch is really transparent, in the same way as a splitter, is a very good thing. Of course, I can't now ping.
oh, mai god!
machine A is with internet. do it in A:
in etc/rc.d/rc.local, I added line
/sbin/ifconfig eth0:0 192.168.0.1 netmask 255.255.255.0
in machine B do:
in /etc/rc.d/rc.inet1.conf
# Config information for eth0:
IPADDR[0]="192.168.0.2"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
# Default gateway IP address:
GATEWAY="192.168.0.1"
then, restart both. after restart all must be worked.
do not think so. it may help in any different cases, but in this is all are very,very basic and simple.
there is not need to cross fingers to get work that things, imho
in /etc/rc.d/rc.inet1.conf conf on machine B write address, who you given in aliase ( eth0:0) for machine A. but link between A and B works also without that.
Will machine B also have internet through the alias?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.