LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 09-04-2003, 09:32 AM   #1
Marcelo Oliveir
LQ Newbie
 
Registered: Sep 2003
Location: Brazil
Distribution: Kurumin (Based on Knoppix and Debian)
Posts: 4

Rep: Reputation: 0
Box Linux with 3 NICs


I have 3 NICs on my box Linux (router)

eth0 onboard - Conected to Cable-Modem (Configured)
eth1 Realtek - Conected to hub (Configured)
eth2 Realtek - Conected directly to other box. (That's the problem)

When Win XP is active(dual boot), a bridge is created between eth1 and eth2 automatically and boxes pinging one with another one, but not on Linux.

How Can I do that on Linux ?

I use a brazilian distribution named 'Kurumin' based on Knoppix and Debian distributions.

Thanks for advanced...

Last edited by Marcelo Oliveir; 09-04-2003 at 10:07 AM.
 
Old 09-04-2003, 09:49 AM   #2
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,369

Rep: Reputation: 46
ok, you need to make it into a router, do this:
recompile kernel with module support for the ipfilters and full nat + all its requirements, or to be safe everything in ipfilters

download iptables from www.iptables.org
then this tutorial
http://www.tldp.org/HOWTO/IP-Masquer...WTO/index.html

I didn't read the whole thing, but read the basics, the kernel stuff, then also use the config examples it gives you.
 
Old 09-04-2003, 10:33 AM   #3
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
Read "Rusty's Unreliable Guides". He wrote the program.

I am unfamiliar with your Distro, so bear with me.

You did use a crossover cable to connect the two boxes didn't you?

If you don't explicitly define IP addresses in your subnet, you also have to set up a dhcp server in your router. (XP does that automagically.)

It will be easier to write the rule chains and other functions involving networking if you set up explicit IP addresses for everything. I haven't set up a router in linux for a couple of years. Things may be different now, but when I did it, setting up dynamic addressing for all of the users and computers was a bear. Then again, I am notorious for skimming documentation and trying to "wing it", instead of planning everything on paper and really researching everything. (I have come up 'new and improved" ways for thrashing anything I get my pudgy little fingers on. Many of my Linux Administration books are in "like new" condition. Don't be like me.)

Before you recompile everything, make sure it isn't already there. Red Hat uses an initrd and loads all that as modules after pivot_root. The services are already there, they just have to be added to the run-level and configured. (Or in my case, edited out of the run-level as I connect through a router--I have cable and don't leave the outside world connected when I'm not using it.)
 
Old 09-04-2003, 10:59 AM   #4
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
The program is "Netfilter"; IPtables is a portion of that program.

My cable modem is connected to a router which has a built in print server and automatic fail-over to modem for my home network. It has built-in NAT, programmable ports and services, explicit permissions by MAC/IP address, a DHCP server, and a DMZ. Spiffy. (I don't know if the new SMC products do all that anymore.)

Remember, you can make it as complicated as you want with linux. You can go off half-cocked like me and make it far more complicated than you need, or you can plan out exactly what you need on paper, implement it, then go on to make it a work of art.

The "work of art" part of it is where the twisted sense of "linux fun" comes from.
 
Old 09-06-2003, 08:32 AM   #5
Marcelo Oliveir
LQ Newbie
 
Registered: Sep 2003
Location: Brazil
Distribution: Kurumin (Based on Knoppix and Debian)
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Eqwatz
You did use a crossover cable to connect the two boxes didn't you?
Yes, I do.
Quote:
Originally posted by Eqwatz
It will be easier to write the rule chains and other functions involving networking if you set up explicit IP addresses for everything.
Yes, I set up explicit IP Adresses.
Quote:
Originally posted by Eqwatz
Before you recompile everything, make sure it isn't already there
I guess my distro is already that.
Quote:
Originally posted by Eqwatz
They just have to be added to the run-level and configured.
How can i do that ? I'm a newbie.

Thanks for advanced...

Last edited by Marcelo Oliveir; 09-06-2003 at 10:10 AM.
 
Old 09-09-2003, 07:34 AM   #6
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
Ok, did you assign an IP address for the eth2?

You may have to install samba to have it work. I had to install samba to enable file sharing and general communications to the windows boxes on my subnet. The "Windows" box expects to get specific queries to auto-magically make itself part of a network.

I found an online book from O'Reilly:
http://www.oreilly.com/catalog/samba...ook/index.html

help desk on XP:
http://www.helpdesk.umd.edu/topics/c...nce/windows_xp

Google.com/linux the topics:
linux networking;
connect windows to Linux;
XP to Linux connection;
build linux router;
XP to Unix network;
crossover cable connect XP;
Xover ethernet Linux XP;
crossover XP Linux.
Then read a lot.
 
Old 09-09-2003, 07:51 AM   #7
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
Maybe someone else can give you nice simple point-and-click and fill in the blank instructions????!!!!!
 
Old 09-10-2003, 01:18 PM   #8
Marcelo Oliveir
LQ Newbie
 
Registered: Sep 2003
Location: Brazil
Distribution: Kurumin (Based on Knoppix and Debian)
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Eqwatz
Ok, did you assign an IP address for the eth2?
Looking in google i found tips for network talking about machines connected by a crossover cable.

One of these tips indicate that way:

Server:
eth0 - connected to cable-mode - Ok.
eth1 - connected to hub - Ok.
eth2 - connected to other machine with crossover cable - IP=192.168.1.1

Client:
eth0 - IP=192.168.1.2

Now, the Client can 'see' the Server and the Other machines of the net, but get access only to the server. Ping don't response too.

What I need to configure that client to access other machines in the net ?

Last edited by Marcelo Oliveir; 09-10-2003 at 04:34 PM.
 
Old 09-11-2003, 01:01 PM   #9
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
Hosts file on all of the machines must match. There must be an entry for each machine name and IP Address.

Do that then ping. Your private network (for ease of set-up)

eth0 This is the NIC connected to the cable modem and receives the IP Address for the cable network, the assigned IP Address for your subnet host, and the DNS server addresses.

192.168.123.1 is your router/network host/Default_Gateway to your first subnet--> connected to your HUB(I am assuming it is an ethernet SWITCH)

192.168.123.2-253 are your clients

192.168.12X.254 would be your print server (Pick a subnet either 3 or 4.)

192.168.124.1 is your router/network host/Default_Gateway to your second subnet--> connected to your machine via crossover cable.

192.168.124.2-253 are your clients. (You have one. Pick a number.)

192.168.12X.254 would be your print server (Pick a subnet either 3 or 4.)
 
Old 09-11-2003, 01:12 PM   #10
Eqwatz
Member
 
Registered: May 2003
Distribution: Slack Puppy Debian DSL--at the moment.
Posts: 341

Rep: Reputation: 30
Frankly, if your HUB is a ether-switch instead of a router, you really didn't need the third NIC. As illustrated by the info above.

A switch merely connects the cables together and one port is connected to the host for the network.

It really helps me when I post if I am well rested and can think.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3 nics set up firewall box props666999 Slackware 2 09-11-2005 01:05 PM
Linux Box w/ 2 NICs and passive firewall? rruss Linux - Networking 1 04-14-2005 08:15 AM
Two tulip NICs in one box for ADSL ? Caysho Linux - Hardware 2 10-24-2004 08:55 AM
Linux Box with 3 NICs for Internet sharing digihall7 Linux - Networking 3 04-30-2004 03:30 AM
I need some help with 2 nics in 1 box ForumKid Linux - Networking 6 01-21-2002 01:56 PM


All times are GMT -5. The time now is 02:52 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration