LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   1NIC->ok, no config needed; 2NICs->no connection al all (??) (https://www.linuxquestions.org/questions/linux-networking-3/1nic-ok-no-config-needed%3B-2nics-no-connection-al-all-416230/)

minike 02-16-2006 05:07 PM

1NIC->ok, no config needed; 2NICs->no connection al all (??)
 
hi... gonna try to keep it short and clear:
I've got 2 boxes, trying to make this scheme works:

<www><c.modem><--><Nic1:linux+winXP:nic2><--><nic3:linux>

both boxes runnin' slack10.2
both nics on box1: 3com
nic3 on box2: realtek
boxes linked thru twisted cable.

when I put nic2 in box1, under windows nic2 is auto-configured and the internet connection is ok, but under linux such connection get lost, dmesg don't say absolutely nothing related eth*; ifconfig only shows local; nic1_led=bright,nic2_led=dark. :scratch: -if I take off nic2, internet is back.

question 1: what should I do to get internet connection on box1 under linux? (plz. be generous with examples..I've got not a clue about net configs)

question 2: how to configure both boxes to connect each other this way: linux<->linux and windows<->linux ?
(with a telnet/ssh connection is enough by now)

waitin' 4 any help,
thanks in advance

Brian1 02-16-2006 05:32 PM

What IP are you assigning to the second nic? A non routable one like 192.68.***.***.

If so have you defined a gateway on the 2nd nic. If so do not. What you need on the second nic is an IP and subnet defined. No gateway. Then on the second computer you use the IP of the second nic for the gateway on it.

Example
computer 1
nic 1 IP ***.***.***.***
nic 2 IP 192.168.1.1, subnet 255.255.255.0
computer 2
nic 3 IP 192.168.1.2, subnet 255.255.255.0, gateway 192.168.1.1

To have the 2nd computer to see the other you need to add masquerade command on the 1st computer. Can be a complex thing to setup without more details.

What you are after is a simple firewall with masquerading. Check out this site and there are many tutorials and scripts there. http://www.linuxguruz.com/iptables/ . Also down near the bottom is one called easy firewall generator. It ask questions about your network and creates a iptables script that you can use.

Hope this helps.
Brian1

minike 02-16-2006 05:53 PM

thanks 4 answer Brian,
I'm not assigning any ip adress to no nic: I don't know howto.
which command handle such task? --I remember you that acording to my dmesg, my box doesn't "see" any nic (no single mention of any eth device)
is that normal?
how should I reffer to the nics if my box don't see it?
selecting the dinamic-config (dhcp or something like that) is the only way I know to "configure" the cards. -in fact, all of the job is made by such dinamic configuration-I really do nothing.
do I need the ip address my isp is assigning to me?
I guess this 2 steps are needed:
1) assign to nic1 my ip,
2) change the nic2 ip..
(plz.correct me if I'm wrong)
..but with which command should I do that?

regards


All times are GMT -5. The time now is 12:50 PM.