LinuxQuestions.org
Help answer threads with 0 replies.
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
  Search this Thread
Old 04-02-2005, 11:41 AM   #1
mailavj
LQ Newbie
 
Registered: Apr 2005
Location: India
Posts: 24

Rep: Reputation: 15
Unhappy Problem when configuring 2 NICs for internal LAN and cable internet


Please help me..
i'm using fedora core 3
i hve 2 NICs
i'm not a linux expert
one for my internal LAN and one for my cable internet connection
when i activate the home lan card.. internet connection doesnt work..
that is my browser cant point to websites..
when i de-activate home lan NIC.. the internet connection works again.. please help me.. how to solve this..
 
Old 04-02-2005, 11:58 AM   #2
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
How do you have your network configured? It should look something like this...
Cable modem (192.168.1.1) --- (192.168.1.2) Linux machine (192.168.0.1) --- Hub/Switch --- (192.168.0.x) Internal LAN
** Notice the change in subnet.

I imagine that your linux machine has both cards on the same subnet and that the routing is confused.

If you are not sure how to check your IP addresses, /sbin/ifconfig .

J.
 
Old 04-02-2005, 12:05 PM   #3
mailavj
LQ Newbie
 
Registered: Apr 2005
Location: India
Posts: 24

Original Poster
Rep: Reputation: 15
reply

i have only 2 Boxes in my home
so i dont use a hub ..
i use a crossover connection
can u please help me how to change the subnet mask of each card..
my both cards are from same manufacturer and hve same hardware specs
 
Old 04-02-2005, 12:19 PM   #4
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
Sure. Lets start with a few questions...
Q1. Do you have DHCP enabled on your Linux router?
Q2. What are your current IP addresses of the NICS? (use /sbin/ifconfig to see)
Q3. What are the NIC settings on your internal machine? (In Windows, you can see using ipconfig )
Q4. Do you have a firewall configured properly to allow ip forwarding?
 
Old 04-02-2005, 12:27 PM   #5
mailavj
LQ Newbie
 
Registered: Apr 2005
Location: India
Posts: 24

Original Poster
Rep: Reputation: 15
DHCP is disabled
current IP of external NIC ( connected to internet is) 202.88.241.83
and that of home LAN NIC is 192.168.0.1
on my second machine.. that is a windoze machine is configured to hve an IP of 192.168.0.2
its set to be in a windows workgroup named GAYATHRI
my problem is not concerend with second machine..
i want to browse internet on linux box at the same time i want to access files on windows machine
but when eth0 (internal) is activated my browser losts its connection to Internet (through eth1 )
 
Old 04-02-2005, 12:33 PM   #6
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
Quick note. Mask your external ip address... do not post the exact address on a public site.

Can you post the results of /sbin/ifconfig for a) when you can browse the net and b) after you activate the second NIC.

Other information that can be handy is output from your routing table and your iptables config.
 
Old 04-02-2005, 12:49 PM   #7
mailavj
LQ Newbie
 
Registered: Apr 2005
Location: India
Posts: 24

Original Poster
Rep: Reputation: 15
reply

here is /sbin/ifconig output when eth1 (internal LAN nic ) is disabled
and browsin is possible through eth0

eth0 Link encap:Ethernet HWaddr 00:80:48:34:2F:E4
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:90 (90.0 b)
Interrupt:5 Base address:0xb800

eth1 Link encap:Ethernet HWaddr 00:80:48:2C:5F:4E
inet addr:200.80.243.73 Bcast:255.255.255.255 Mask:255.255.254.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:52126 errors:0 dropped:0 overruns:0 frame:0
TX packets:3334 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5438665 (5.1 MiB) TX bytes:527315 (514.9 KiB)
Interrupt:3 Base address:0xb400

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5052 errors:0 dropped:0 overruns:0 frame:0
TX packets:5052 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2382456 (2.2 MiB) TX bytes:2382456 (2.2 MiB)

following is the /sbin/ifconfig output when both NICs are enabled... but browsing is not possible

eth0 Link encap:Ethernet HWaddr 00:80:48:34:2F:E4
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:60 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8233 (8.0 KiB) TX bytes:390 (390.0 b)
Interrupt:5 Base address:0xb800

eth1 Link encap:Ethernet HWaddr 00:80:48:2C:5F:4E
inet addr:200.80.243.73 Bcast:255.255.255.255 Mask:255.255.254.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:54143 errors:0 dropped:0 overruns:0 frame:0
TX packets:3349 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5580639 (5.3 MiB) TX bytes:528541 (516.1 KiB)
Interrupt:3 Base address:0xb400

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5052 errors:0 dropped:0 overruns:0 frame:0
TX packets:5052 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2382456 (2.2 MiB) TX bytes:2382456 (2.2 MiB)
 
Old 04-02-2005, 12:53 PM   #8
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
I think there may be some confusion here...
eth0 is your internal NIC
eth1 is your external NIC

Is your firewall configured in reverse? What is the output of /sbin/iptables ?
 
Old 04-02-2005, 12:57 PM   #9
mailavj
LQ Newbie
 
Registered: Apr 2005
Location: India
Posts: 24

Original Poster
Rep: Reputation: 15
reply

eth0 is my internal card
eth1 is my external card

i havent configured IPTABLES
i don wanna do masqueradin now
i just wanna both NICs enabled and able to browse on my linux box
i don wanna browse on windows box now
i wanna access files from windows box
 
Old 04-02-2005, 01:08 PM   #10
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
I understand what you want to do. I must start at the basics to eliminate any problems that may be occurring...

So... we've established that your NIC cards appear to be configured with a proper ip addresses.
The next step is to see if anything may be blocking communication. This is where iptables comes in. Even if you think you didn't configure it, it may have some default rules that will block your connections. If your iptables are, in fact empty, we will check your routing to make sure that everything is ok. If your routing is ok, we'll check to see if you have problems with nslookups because that might appear that your internet connection is unavailable... trouble-shooting is a multistep process so please work with me.

What is the output of /sbin/iptables? (Before and after?)
What is the output of /sbin/route? (Before and after?)
What is the output of nslookup bob.com? (Before and after?)

Don't worry my friend, we will have the problem resolved shortly.
 
Old 04-02-2005, 01:30 PM   #11
mailavj
LQ Newbie
 
Registered: Apr 2005
Location: India
Posts: 24

Original Poster
Rep: Reputation: 15
reply

output of the commands when etho (internal) is inactive and eth1(external) is active .. browsin is possible

/sbin/iptables

iptables v1.2.11: no command specified
Try `iptables -h' or 'iptables --help' for more information.

/sbin/route

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
200.70.242.0 * 255.255.254.0 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default 202.88.240.1 0.0.0.0 UG 0 0 0 eth1


nslookup bob.com

Server: 200.86.240.4
Address: 200.86.240.4#53

Non-authoritative answer:
Name: bob.com
Address: 66.151.148.168

output ot the commands when both eth0 and eth1 are active that is browsing is not possible



/sbin/iptables

iptables v1.2.11: no command specified
Try `iptables -h' or 'iptables --help' for more information.


/sbin/route

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
202.88.240.0 * 255.255.254.0 U 0 0 0 eth1


nslookup bob.com

;; connection timed out; no servers could be reached
 
Old 04-02-2005, 01:59 PM   #12
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
Ok... that's interesting.

For iptables you must run it as root and I forgot to mention -LL (oops)
(as root) /sbin/iptables -L

Your routing table doesn't look right. In the second case, you are missing your routes to 192.168.0.x network and your default...

How are you restarting your network? Using the GUI?
Try making your changes and then going to a command prompt (as root) and use this command
service network restart
 
Old 04-02-2005, 02:22 PM   #13
mailavj
LQ Newbie
 
Registered: Apr 2005
Location: India
Posts: 24

Original Poster
Rep: Reputation: 15
reply

this is the output of /sbin/iptables -L

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destinatio


now theres a surprise
before running the command
services network restart
eth0 was disabled.. after running that command on root prompt.. both eth0 and eth1 are active and now i can browse
but i cant access my samba share on windows machine
 
Old 04-02-2005, 02:36 PM   #14
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
Re: reply

Quote:
Originally posted by mailavj
this is the output of /sbin/iptables -L
<snip>
now theres a surprise
before running the command
services network restart
eth0 was disabled.. after running that command on root prompt.. both eth0 and eth1 are active and now i can browse
but i cant access my samba share on windows machine
Well... that's good and bad. I'm glad the routing problem was resolved by a simple restart.

The bad part is trouble-shooting samba connections is difficult.
Now that both NICs are up and running, can you post the output from /sbin/route ?
Are you able to ping your windows machine?
Can your window's machine ping your Linux machine?
 
Old 04-02-2005, 03:58 PM   #15
mailavj
LQ Newbie
 
Registered: Apr 2005
Location: India
Posts: 24

Original Poster
Rep: Reputation: 15
reply

this is the output when both eth0 and eth1 are active
/sbin/route

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
202.88.240.0 * 255.255.254.0 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default 202.88.240.1 0.0.0.0 UG 0 0 0 eth1

any hope on SAMBA
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while configuring Internal Modem thru INTERNET-DRUID mlalkm Linux - Networking 0 08-22-2005 01:37 AM
How to connect to internet using the internal 802.11b/g wireless LAN in laptop bin75 Linux - Wireless Networking 1 04-21-2005 10:48 AM
Cable Modem - Problems configuring to connect to internet gevers1 Linux - Networking 13 01-17-2004 01:44 PM
Cable Internet through LAN enigma Z Linux - Networking 10 09-25-2003 10:32 AM
LAN internal mailserver no internet access guanyu Linux - Networking 8 11-15-2002 12:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:35 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration