Ethernet worked with Ubuntu

Hi there!

Today I switched from Ubuntu to OpenSuse. But I can’t setup my Ethernet connection.

I have 2 PCs connected with a crossover cable, one with Ubuntu, the other with OpenSuse 11.3. Lights are on in both NICs.

I wrote:

ifconfig eth0 192.168.0.2  (My local NIC address, OpenSuse)
route add default gw 192.168.0.1 (My gateway NIC address, Ubuntu)

I can ping myself (192.168.0.2) but not the gateway (192.168.0.1); I get a “Destination Host Unreachable” error.
Both ifconfig -a and route -n seem to return a correct setup

Does anybody know what may be going on here?

On Sun, 25 Jul 2010 05:36:01 +0000, Kun2 wrote:

> Hi there!
>
> Today I switched from Ubuntu to OpenSuse. But I can’t setup my Ethernet
> connection.
>
> I have 2 PCs connected with a crossover cable, one with Ubuntu, the
> other with OpenSuse 11.3. Lights are on in both NICs.
>
> I wrote:
>
> Code:
> --------------------
> ifconfig eth0 192.168.0.2 (My local NIC address, OpenSuse)
> route add default gw 192.168.0.1 (My gateway NIC address, Ubuntu)
> --------------------
>
>
> I can ping myself (192.168.0.2) but not the gateway (192.168.0.1); I get
> a “Destination Host Unreachable” error. Both ifconfig -a and route -n
> seem to return a correct setup
>
> Does anybody know what may be going on here?

What kind of network card, and what’s the output from dmesg (that relates
to the nic setup)?

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On Sun July 25 2010 12:51 am, Jim Henderson wrote:

> On Sun, 25 Jul 2010 05:36:01 +0000, Kun2 wrote:
>
>> Hi there!
>>
>> Today I switched from Ubuntu to OpenSuse. But I can’t setup my Ethernet
>> connection.
>>
>> I have 2 PCs connected with a crossover cable, one with Ubuntu, the
>> other with OpenSuse 11.3. Lights are on in both NICs.
>>
>> I wrote:
>>
>> Code:
>> --------------------
>> ifconfig eth0 192.168.0.2 (My local NIC address, OpenSuse)
>> route add default gw 192.168.0.1 (My gateway NIC address, Ubuntu)
>> --------------------
>>
>>
>> I can ping myself (192.168.0.2) but not the gateway (192.168.0.1); I get
>> a “Destination Host Unreachable” error. Both ifconfig -a and route -n
>> seem to return a correct setup
>>
>> Does anybody know what may be going on here?
>
> What kind of network card, and what’s the output from dmesg (that relates
> to the nic setup)?
>
> Jim
>
Kun2;

In addition to the information requested by Jim, can you also post the results
from Opensuse of:


/sbin/ifconfig -a
/sbin/route -n

And from Ubuntu the results of


ifconfig -a

The fact that you can ping your own IP is not really much of a test since it
just loops back. Are you certain that your cable is good and is actually a
crossover cable? Cables can fail out of the box, so you might want to test
the cable.


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

Ok guys, here’s the info:

dmesg | grep eth

    6.193560] r8169 0000:02:00.0: eth0: RTL8102e at 0xffffc900050de000, 00:23:54:e1:94:a2, XID 04a00000 IRQ 27
    6.279454] 8139too 0000:04:00.0: eth1: RealTek RTL8139 at 0xffffc900057fec00, 00:08:54:a5:e0:0e, IRQ 20
   18.264299] r8169 0000:02:00.0: eth0: link down
   18.264586] ADDRCONF(NETDEV_UP): eth0: link is not ready

ifconfig -a (OpenSuse)

eth0      Link encap:Ethernet  HWaddr 00:23:54:E1:94:A2
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:27 Base address:0xe000

eth1      Link encap:Ethernet  HWaddr 00:08:54:A5:E0:0E
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:20 Base address:0xec00

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:158 errors:0 dropped:0 overruns:0 frame:0
          TX packets:158 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:11284 (11.0 Kb)  TX bytes:11284 (11.0 Kb)

route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

ifconfig -a (Ubuntu)

eth1      Link encap:Ethernet  HWaddr 00:08:54:a5:e0:13
          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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:18 Base address:0xd800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:42 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2484 (2.4 KB)  TX bytes:2484 (2.4 KB)

nas0      Link encap:Ethernet  HWaddr 00:13:49:03:fa:55
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8685 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7536 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8480688 (8.0 MB)  TX bytes:1449191 (1.3 MB)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:XXXXXXXX  P-t-P:XXXXXXXX  Mask:XXXXXXXX
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:8633 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7481 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:8409604 (8.0 MB)  TX bytes:1207530 (1.1 MB)

vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

The cable is Ok: my other Ubuntu kernel works ok with the LAN.

On Sun, 25 Jul 2010 15:36:02 +0000, Kun2 wrote:

> 18.264299] r8169 0000:02:00.0: eth0: link down
> 18.264586] ADDRCONF(NETDEV_UP): eth0: link is not ready

Was the cable plugged in when you booted the system up?

These two messages seem to indicate that the connection wasn’t plugged in
when the system was booted.

I note the output from ifconfig shows the connection is up.

Can you ping the openSUSE box from the Ubuntu box? (I expect not, but
it’s good to verify).

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

It was connected, and the lights on both NICs were turned on.

No, I can’t ping OpenSuse from Ubuntu. I get the same “Destination Host Unreachable” error.

I note the output from ifconfig shows the connection is up.

I don’t know how this got setup. I didn’t add the ifconfig nor the route lines to my bash profile. Maybe some tool has configured everything automatically?

On Sun July 25 2010 02:36 pm, Kun2 wrote:

>
> It was connected, and the lights on both NICs were turned on.
>
> No, I can’t ping OpenSuse from Ubuntu. I get the same “Destination Host
> Unreachable” error.
>
>> I note the output from ifconfig shows the connection is up.
> I don’t know how this got setup. I didn’t add the ifconfig nor the
> route lines to my bash profile. Maybe some tool has configured
> everything automatically?
>
>
Kun2;

Is it possible that you have the cable connected to the wrong interface? Is
it possible that it is not fully seated? Have you tried another cable or
hub/switch?

Since you have come to Opensuse from Ubuntu it might help if you looked at
this HowTo on configuring your network cards, perhaps you have missed
something.
http://opensuse.swerdna.org/susenic.html
Since this appears to be a desktop, I would suggest you configure the cards to
use the ifup method rather than network manager.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

On Sun, 25 Jul 2010 19:36:02 +0000, Kun2 wrote:

> It was connected, and the lights on both NICs were turned on.

That indicates a physical connection but nothing more for many NICs.

> No, I can’t ping OpenSuse from Ubuntu. I get the same “Destination Host
> Unreachable” error.
>
>> I note the output from ifconfig shows the connection is up.
> I don’t know how this got setup. I didn’t add the ifconfig nor the route
> lines to my bash profile. Maybe some tool has configured everything
> automatically?

That’s set up by Networkmanager by default.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

The easiest way to set it up in openSUSE is to go to yast2>network devices>network settings.
Click the ‘global’ tab and set the network to use ifup.
Exit by clicking OK and then go back to the network settings.
Now click edit and set up the card with the desired static address info (ipaddress, subnet, gateway, dns.)
Probably:
192.168.0.2; 255.255.255.0 and 192.168.0.1 as the gateway.

Network managers are great if you have wireless, but otherwise use ifup to control the network if you have a wired system.

Is it possible that you have the cable connected to the wrong interface? Is
it possible that it is not fully seated? Have you tried another cable or
hub/switch?

Thanks for the link. The cable is Ok. I have Windows and Ubuntu on the same OpenSuse PC. They do connect to my Ubuntu gateway box nicely, using that very same cable, upon reboot.

The problem must be elsewhere. Perhaps the firewall (iptables?) is rejecting the ping? Could network manager be conflicting in any way?

On Sun, 25 Jul 2010 23:36:03 +0000, Kun2 wrote:

>> Is it possible that you have the cable connected to the wrong
>> interface? Is
>> it possible that it is not fully seated? Have you tried another cable
>> or
>> hub/switch?
> Thanks for the link. The cable is Ok. I have Windows and Ubuntu on the
> same OpenSuse PC. They do connect to my Ubuntu gateway box nicely, using
> that very same cable, upon reboot.
>
> The problem must be elsewhere. Perhaps the firewall (iptables?) is
> rejecting the ping?

Doubt it, since the firewall would also reject traffic from the other
platforms, too.

> Could network manager be conflicting in any way?

Possibly. Maybe go into the network config and try setting it up again,
perhaps after deleting the existing config.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Doubt it, since the firewall would also reject traffic from the other
platforms, too.

I meant iptables running on the OpenSuse box (with the default out-of-the-box setup). I deactivated it with iptables --flush but the problem is still there.

However I found that OpenSuse somehow switched my interfaces eth0 to eth1 and vice versa: I rebooted OpenSuse, write ifconfig eth1 192.168.0.2 && ifconfig eth1 up and now I can ping OpenSuse from Ubuntu.

But not in the opposite direction (and I get no error message from ping. Just silence)

On Mon, 26 Jul 2010 00:36:02 +0000, Kun2 wrote:

>> Doubt it, since the firewall would also reject traffic from the other
>> platforms, too.
> I meant iptables running on the OpenSuse box (with the default
> out-of-the-box setup). I deactivated it with iptables --flush but the
> problem is still there.

Default firewall configuraiton is to block inbound traffic - not outbound
(I don’t know if it can even block outbound, come to think of it).

> However I found that OpenSuse somehow switched my interfaces eth0 to
> eth1 and vice versa: I rebooted OpenSuse, write ifconfig eth1
> 192.168.0.2 && ifconfig eth1 up and now I can ping OpenSuse from
> Ubuntu.

Sounds like that is the issue. :slight_smile:

> But not in the opposite direction (and I get no error message from ping.
> Just silence)

Make sure you’ve got your default route (and your local route) configured
to use eth1 rather than eth0.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Yes iptables can. It wouldn’t be much of a netfilter if it couldn’t do that. If you mean whether SuSEfirewall2 can be easily set up to block outbound, that I never tried.

On Mon, 26 Jul 2010 02:06:01 +0000, ken yap wrote:

> hendersj;2196154 Wrote:
>> (I don’t know if it can even block outbound, come to think of it).
>
> Yes iptables can. It wouldn’t be much of a netfilter if it couldn’t do
> that. If you mean whether SuSEfirewall2 can be easily set up to block
> outbound, that I never tried.

Yeah, that’s what I meant - thanks for the clarification. :slight_smile:

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Still no luck here.
Just noticed something:

ifconfig eth0 down

should disable eth0, right?
Because it still shows up in ifconfig -a but not in ifconfig -v

On Thu, 29 Jul 2010 00:36:02 +0000, Kun2 wrote:

> Still no luck here.
> Just noticed something:
>
> ifconfig eth0 down
>
> should disable eth0, right?
> Because it still shows up in ifconfig -a but not in ifconfig -v

ifconfig -a shows all interfaces, up or down. “-a” = “all”. :slight_smile:

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Sorry for the long away time

Thanks Jim, it makes sense now (I though it showed all the up ifaces)