Re: How to get my 2 ethernet cards to work

From: VD (st946tbf_at_drexel.edu)
Date: 05/04/04


Date: 4 May 2004 09:30:04 -0700

Thank you for helping me out. Let me try to explain abit better this
time:

ptb@oboe.it.uc3m.es (P.T. Breuer) wrote in message news:<c3o77c.jc8.ln@news.it.uc3m.es>...
> VD <st946tbf@drexel.edu> wrote:
> > I have two network/ethernet cards. One is for my home network with
> > static ip (eth0), another is to the DHCP cable modem (eth1). The
>
> This is not clear. A cable modem is not exactly the same thing as an
> ethernet card. If you have a cable modem that connects to an ethernet
> card on your computer, then I understand that, but the connection is
> the wrong way round - usually eth0 will be to the internet, and eth1 to
> the intranet. Swap your cables.

I have 2 computers. One is the main machine, has 2 nics. One nic
connects to a cable modem, which connects to the internet. This one
use DHCP. The nic is a built-in intel chipset with the motherboard.

The 2nd nic connects to a crossover cable to my 2nd computer. After
this works, I intent to make my main computer share the internet to my
2nd computer.

With regard to the eth0, eth1, I have thought of that, but questioning
that with the almighty Linux, known to be a network OS, how could it
restrict so strictly on which one goes to the private network, and
which goes to the public network.

To make sure, the eth0 binds to the static ip address, connects to the
crossover cable to my 2nd computer. eth1 connects to the cable modem.
 Individually, I was able to surf the internet with eth1, and ping the
eth0 using my 2nd computer.

>
> > I also get "failed" when start up the computer on both of my network
>
> Then you had better fix that! Without drivers they are not going to
> work.
>
> > cards, but I can get into the internet normally. Strange!
>
> Don't be silly. Do you also say "strange" when you walk into your hose
> and find that the dining room suite has gone? I would say "something is
> deeply wrong here and I need to fix it before taking a single step
> further".
>

You're right. I spends hours to fix this first, but don't know where
to start. I installed linux on 3 machines before with network cards.
They all said failed when the system starts up, but works in a sense
that I could get to the internet and everything. This does not
justify anything, just let you know that I tried to work on it too.

>
> > I cannot ping my home ip which is: 192.168.10.1 from a same machine
> > (it waits forever).
>
> It's supposed to wait forever. What makes you think that is your IP?
> SHow the output of
>
> /sbin/ifconfig
>

I am sorry, the 192.168.10.1 is the static IP I configured for eth0.
/sbin/ifconfig was shown in the bottom of the previous post.

> and then we can judge.
>
> > I can get to the internet (eth1). However, with command: "service
>
> What do you mean?

I can browser the web, email, and whatnot, and you see alot of data
below because I was searching for a solution to my problem here.

>
> > network restart"
> > Output: failed on the eth1 and success on the eth0. I cannot get into
>
> I don't understand what you mean. Please be precise: command line and
> error message, test and observation. Nothing else.
>

the command I used: service network restart<enter>
The output: the first couple lines are [ok] (sorry, I don't have the
machine with me here, I'll update that if you need). But the last 2
lines, about eth0 and eth1, it says: [ok] and [failed] respectively.

> > the internet anymore, but then I can ping 192.168.10.1. Somehow my
>
> Meaningless - why should we be interested in this number? You present
> no evidence to suggest we should. It could be anything.
>
> > two cards are in conflict with each other. Next, I remove the eth1,
>
> That's fine. Keep things like that.
>
> > then add it back again (using the graphical interface). Next, I log
>
> No, do not use a "graphical interface". Remove means "take out using
> screwdriver".
>

Using single card, I can get to the internet, or the local network
(along with the "FAILED" when computer start up), but what I want is
to use 2 cards as described in the beginning of this post.

> > out and in. Now, I can ping both IP addresses of the machine from the
> > same machine, but cannot ping to the public internet, or get onto the
>
> That's all fine. But stop making us guess. Just show the output from
> /sbin/ifconfig and /sbin/route. There is no need to make so much fuss!
>
>
> > internet. However, loggin in, running any GUI apps would take
>
> Well that's because you have messed up your networking. Your host name
> does not resolve.
>
> > forever. Restart the machine, and I loose this current settings, and
>
> Good.
>
> > it goes back to the begining (cannot ping the home-networking/static
>
> Good.
>
> > ip), and the internet works. Also, there are many errors showing up
> > during the restart of the machine.
>
> Good.
>
> Show us some data.
>
> > I add a route to my iptable:
>
> Eh?
>
> > route add -host 192.168.10.1 dev eth0
>
> FIne - but this merely shows you that eth0 is not up. No driver. Why
> are you doing all this blind?
>
> > Output: "SIOCADDRT: No such device" error
> >
> > If I do: route add -host 192.168.10.1 netmask 255.255.255.0 eth0
> > Output: "route: netmask 000000ff doesn't make sense with host route"
>
> Indeed it doesn't. Stop using "-host".
>
> > If I do: route add -net 192.168.10.1 netmask 255.255.255.0 eth0
> > Output: "route: netmask doesn't match route address"
>
> Indeed it doesn't. Stop using "-net".
>

> > Here is the settings under: /etc/sysconfig/network-scripts
> > For the eth0 device:
>
> Show us the output from
>
> /sbin/ifconfig
> /sbin/route -n
>
> and there's an end to it!
>
>
> > eth1: no IPv6 routers present
> > eth0: no IPv6 routers present
>
> Yay!!!!!!!!! What NIC? What driver?
>
>
> >
> > Here is the ifconfig command outputs (with some data back out):
> >
> > eth0 Link encap:Ethernet HWaddr 00:0x:xx:xx:xx:xx
> > inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0
> > inet6 addr: xxxx::xxx:xxx:xxxx:xxxx/64 Scope:Link
> > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> > RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>
> OK - well this has been configured correctly, but it is not connected
> to a line on which any packets have been seen. I would open the netmask
> to /16 instead of /24, since I find it unlikely that 192.168.10. is
> really a network of yours or your providers. Anyway, there should be
> some broadcast packets going by! A session with tcpdump -i eth0
> would show you.
>

I did not ping or do anyting from my 2nd computer, so there should not
be any data here (at this time). I did ping before (on other machine
restart), but the ping failed.

> I might suspect the IP addresses are on the wrong cards.
>
>
> > TX packets:18 errors:36 dropped:0 overruns:0 carrier:72
> > collisions:0 txqueuelen:1000
> > RX bytes:0 (0.0 b) TX bytes:848 (848.0 b)
> > Interrupt:21 Base address:0xd400
> >
> > eth1 Link encap:Ethernet HWaddr 00:0x:xx:xx:xx:xx
> > inet addr:xx.xxx.xxx.xxx Bcast:255.255.255.255 Mask:255.255.252.0
> > inet6 addr: xxxx::xxx:xxxx:xxxx:xxxx/64 Scope:Link
> > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> > RX packets:660276 errors:0 dropped:0 overruns:0 frame:0
> > TX packets:314 errors:0 dropped:0 overruns:0 carrier:0
>
>
> This one is fine, and is both transmitting and receiving like crazy.
> Oh - but its broadcast address is crazy. Fix! Is this the internet
> side?
>

Yes, eth1 is the internet side. I hide the address because I am
newbie in this area, and I don't know if any misconfiguration would
let me machine opened for attach. Please forgive me on this.

> If so, it's fine. If it's your intranet side, I don't see why you
> bothered to hide the addresses. Are you sure this is the internet side?

Yes, I am sure. I check this more than 10 times.

> With that much activity, it looks a lot more like there are many other
> computers on that lan, which sounds more like your home lan than the
> router.
>
>
> > collisions:0 txqueuelen:1000
> > RX bytes:47864860 (45.6 Mb) TX bytes:20410 (19.9 Kb)
> > Interrupt:22 Memory:feaf8000-0
>
> See? 45MB have gone by your eyes on that lan! Looks like the intranet
> side to me! But how did you get them seen?
> Oh well.
>

the 45MB is the amount of search that I tried to find a solution to
this. As I have said, the internet side work except the "FAILED"
status when the computer start up on the (from all those scrolling
lines). If I issues "service network restart", then it stops working,
then I have to remove and add a new connection for this again (set it
up again).

> > Issue command: /sbin/route -n
> >
> > 192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
> > xxx.xxx.xxx.0 0.0.0.0 255.255.252.0 U 0 0 0 eth1
> > 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
> > 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 eth0
>
> yes, well your default route is on the wrong interface, if eth1 is the
> internet side! That's silly. Fix.

Could you please tell me which flag defines the "default" route? How
do I fix this?

>
>
> > /etc/hosts file:
> > 127.0.0.1 localhost
> > No Ip comp1.mynet.com comp1
>
> Eh? Fix. That'll wreck the file. You want the internet IP binding
> there.
>

The No Ip lines was added by the Mandrake's GUI tools. I am not sure
how to fix this. Do I just delete the line? Note that this is DHCP,
which means I don't have a fixed IP address to put here.

> > 192.168.10.1 comp1.mynet.com comp1
>
> No no. It's good that you have an entry for your intranet NIC, but it's
> not necessary since you have a fixed internet connection to which you
> can bind the hostname. Leave this out unless you are planning on having
> this as the permament binding (fine by me!).
>
> > Please give me some helps. Reading the How-Tos, and other tutorial,
> > but I just cannot get it to work.
>
> Well, stop messing up.
>
> > I also remove all the configurations many times, and then add them
> > again (using Mandrake graphical tools and manually).
>
> Well, don't! Don't use such things.
>
> Peter



Relevant Pages

  • Re: How to get my 2 ethernet cards to work
    ... the wrong way round - usually eth0 will be to the internet, ... Then you had better fix that! ... really a network of yours or your providers. ... I might suspect the IP addresses are on the wrong cards. ...
    (comp.os.linux.networking)
  • Re: SuSE home network
    ... > 2000) connected to a cable modem. ... > up to four internet connections via dhcp. ... >From your ISP's network or from your own internal network? ...
    (alt.os.linux.suse)
  • Re: problem with home network
    ... The XP machine has access to internet through a cable modem, ... >> while the Win98SE machine has internet access through the XP machine. ... >> network and can transfer files to each other. ...
    (microsoft.public.windowsxp.general)
  • Re: getting broadband working on my new AMD64 box....
    ... The internet connection works fine on it. ... I also looked in the network configuration box in the network admin icon. ... the cable modem. ...
    (Debian-User)
  • Re: Limit Network Card to Internal Only
    ... Networking, Internet, Routing, VPN Troubleshooting on ... The iTV Server to which the cabel modem is attached specificly looks ... The same server has a standard network card which which it uses to access ... and want the cable modem to access the internet so that when we go to ...
    (microsoft.public.windows.server.networking)