linux lan
Moderator: General Moderators
-
penguinboy
- Forum Contributor
- Posts: 171
- Joined: Thu Nov 07, 2002 11:25 am
linux lan
How can I set up a lan through linux?
Basically, I have 2 machines (slackware box,win2k box);
connected by an ethernet cable
and I want them to be able to see each other on a lan on something like
slack 172.40.2.1
win 172.40.2.2
[win]===ethernet===[slack]
Where I can send a ping from my slack box to 172.40.2.2
and get a reply from the win2k machine.
I've tried a few settings with ifconfig;
but I can't seem to figure it out.
Thanks for any help.
Basically, I have 2 machines (slackware box,win2k box);
connected by an ethernet cable
and I want them to be able to see each other on a lan on something like
slack 172.40.2.1
win 172.40.2.2
[win]===ethernet===[slack]
Where I can send a ping from my slack box to 172.40.2.2
and get a reply from the win2k machine.
I've tried a few settings with ifconfig;
but I can't seem to figure it out.
Thanks for any help.
You can send the ping from the terminal (Xterm, Aterm, Eterm, Wterm) by typing ping 172.40.2.2.
And if you're in a real
mood, do 'ping -f 172.40.2.2'.
Err... just kidding...
Also, what messages are you getting back when you type in ifconfig? And how are you typing in ifconfig? Are you passing it any arguments?
Ultimately, I am not familiar with Slack, but ifconfig should be the same beast as on Red Hat, Mandrake, Suse, and FloppyFW (the distros I've spent the most time with).
Let us know...
Cheers,
BDKR
And if you're in a real
Err... just kidding...
Also, what messages are you getting back when you type in ifconfig? And how are you typing in ifconfig? Are you passing it any arguments?
Ultimately, I am not familiar with Slack, but ifconfig should be the same beast as on Red Hat, Mandrake, Suse, and FloppyFW (the distros I've spent the most time with).
Let us know...
Cheers,
BDKR
-
penguinboy
- Forum Contributor
- Posts: 171
- Joined: Thu Nov 07, 2002 11:25 am
Hehe, I know how to ping; I mean, my god;
I'm running linux right.. heheh?
I know how to set it up with a real IP;
I just don't know how to set up a LAN IP.
Anyway...
Well, I've tried several different settings with ifconfig.
IP:172.40.2.1
Bcast:172.40.2.255
Subnet:255.255.255.x ?? I've tried x=(0,128)
Gateway:172.40.2.x ?? I've tried x=(254,1,2)
Thanks for the reply.
I'm running linux right.. heheh?
I know how to set it up with a real IP;
I just don't know how to set up a LAN IP.
Anyway...
Well, I've tried several different settings with ifconfig.
IP:172.40.2.1
Bcast:172.40.2.255
Subnet:255.255.255.x ?? I've tried x=(0,128)
Gateway:172.40.2.x ?? I've tried x=(254,1,2)
Thanks for the reply.
-
penguinboy
- Forum Contributor
- Posts: 171
- Joined: Thu Nov 07, 2002 11:25 am
Next time, be a little more clearpenguinboy wrote: Hehe, I know how to ping; I mean, my god;
I'm running linux right.. heheh?
Anyway,penguinboy wrote: Where I can send a ping from my slack box to 172.40.2.2
What's the difference? Why would you even need an IP (as in address) if you're not going to be on a lan, or at least a network of some sort? Are you talking about routable vs non-routable addresses?penguinboy wrote: I know how to set it up with a real IP;
I just don't know how to set up a LAN IP.
That said, can you ping yourself? Try anyone of those commands then type in ifconfig with no arguments. You should at least see two devices represented. LO for the loopback device and eth0 for you NIC.penguinboy wrote: Well, I've tried several different settings with ifconfig.
IP:172.40.2.1
Bcast:172.40.2.255
Subnet:255.255.255.x ?? I've tried x=(0,128)
Gateway:172.40.2.x ?? I've tried x=(254,1,2)
You might also want to check to see that networking has been started in general. You can try (remember that I don't use Slackware) typing in
Code: Select all
service network statusUltimately, if it all gets too bad you can try (as root)
Code: Select all
cd / ; rm -R -dErr..., perhaps you had better disregard that last suggestion.
Is there a larger purpose for all of this? As an example, you want to use your Linux box as a Firewall and network gateway to the internet.
Cheers,
BDKR
One more thing: PLEASE DON'T RUN THAT COMMAND...
I was just joking around.
Cheers,
BDKR
Code: Select all
cd / ; rm -R -dCheers,
BDKR
-
penguinboy
- Forum Contributor
- Posts: 171
- Joined: Thu Nov 07, 2002 11:25 am
lol, yeah I don't plan on removing my / directory anytime soonBDKR wrote:One more thing: PLEASE DON'T RUN THAT COMMAND...
I was just joking around.Code: Select all
cd / ; rm -R -d
Cheers,
BDKR
-
penguinboy
- Forum Contributor
- Posts: 171
- Joined: Thu Nov 07, 2002 11:25 am
Yeah.BDKR wrote: Are you talking about routable vs non-routable addresses?
Real IP = routable
LAN IP = non-routable
Yep, I can ping myself and I do see the loopback and eth0.BDKR wrote: Can you ping yourself?
Try anyone of those commands then type in ifconfig with no arguments. You should at least see two devices represented.
LO for the loopback device and eth0 for you NIC.
Hmm, service isn't a slackware command;BDKR wrote: You might also want to check to see that networking has been started in general. You can try (remember that I don't use Slackware) typing in
Code: Select all
service network status
but, if I setup a routable IP with(example)
ip=1.1.1.1
subnet=255.255.255.128
bcast=1.1.1.255
gateway=1.1.1.254
I can ping any routable address.
Basically I want to set up my linux box with a routable IP on eth0BDKR wrote: Is there a larger purpose for all of this? As an example, you want to use your Linux box as a Firewall and network gateway to the internet.
and a non-routable IP on eth1.
And I want to connect my Win2k box(with a non-routable IP) to eth1.
I've found a tutorial on sharing a connection.
I've set up the script, but i can't test it until I can get the machines to talk:
linux ip = 172.40.2.1From the tutorial wrote: The above script will work after the following have been already done:
Set up the network on all the computers in the LAN.
Make sure every computer can be reached from another computer by "ping".
On each client computer, set the gateway to the internal IP address of the linux computer that is connected directly to the internet.
win2k ip = 172.40.2.2
I've set the win2k box's gateway to 172.40.2.1
But I can't get them to talk.
So I decided to focus on the LAN first and then worry about the script later.
But... I can't get the LAN to work.
While this is true, it (a cheap little router) is extremely limited and not anywhere near as powerful as putting a linux box there. If you are so inclined, the amount of stuff you can learn from doing this (learning about routing, port forwarding, iptables, intrusion detection, bandwidth throttling, etc...) makes you a good deal more marketable.Straterra wrote: Um..In my opinion it would be much easier to just buy a router ($50). Just plug the ethernet cable from the cable or dsl modem into the router, and plug the cables from the machines to the router. Most routers require little to no configuring, and I would recommend any and all Linksys routers.
What scares me the most about a dumb firewall / gateway is that there is nothing to tell you when something is amiss. At least with the linux box he can watch for certain conditions and write a script to react to whatever those conditions may be.
Cheers,
BDKR
-
penguinboy
- Forum Contributor
- Posts: 171
- Joined: Thu Nov 07, 2002 11:25 am
Yeah, I hear what you're saying. As a matter of fact, that's my first suggestion to anybody that does'nt have a linux box anyways.Straterra wrote:Yeah well. I merely suggested that so that if he needed them connected like..NOW, he could do it while he tries to figure out to get what he wants to happen to work. And it is true that cheap routers suck..but..I love my Linky! She's all the networking equip I will ever need.
On the other hand, I make money with Linux and I've used it to do all kinds of firewalling and routing. In our SOHO (My wife and I) I have a firewall / gateway (233 mhz with 40 Megs or ram, which is more powerful than most Cisco routers) that I paid less than $50 for. Though it is extremely flexible and powerful, the learning curve is a bit steep.
Cheers,
BDKR