Networking Forums

Networking Forums > Computer Networking > Linux Networking > Problems with broadcast? with two ethernet adaptors up

Reply
Thread Tools Display Modes

Problems with broadcast? with two ethernet adaptors up

 
 
Andrew P. Billyard
Guest
Posts: n/a

 
      01-16-2004, 09:35 AM
Hi ALL,

This is different than my last post so please read on...

In my box I have two ethernet adaptors: an SMC EZNET-PCI (as eth0) and a
3COM 905TX (as eth1 to be used as a connection for my laptop). The
following problem occurs whether I have my firewall (iptables) running or
not. When the eth1 card is brought up (via "ifup eth1") I can
*only* access the outside world (via eth0) if I use IP numbers:

ping 130.15.26.30
ssh 130.15.26.30

But if I try it with ip names, the system just sits there with no output
whatsoever (not even error messages or "can't resolve host" type messages)

ping astro.queensu.ca
ssh astro.queensu.ca

(there isn't even any activity light with my DSL box).

So I started to fiddle with the script ifup, inserting "exit;" commands
throughout to find out where this problem arises and it's with the command:

ip addr add ${IPADDR}/${PREFIX} \
brd ${BROADCAST:-+} dev ${REALDEVICE} ${SCOPE} label ${DEVICE};

(executed in an if...then statement), where
${IPADDR}=192.168.1.25
${PREFIX}=24
${BROADCAST}=192.168.1.255
${REALDEVICE}=eth1
${SCOPE}=
${DEVICE}=eth1

I know that this is the offending command since I inserted an exit;
statement in ifup before this statement, ran "ifup eth1", ran "ping
astro.queensu.ca" (which worked), ran "ip addr add 192.168...." and then
ran "ping astroq.queensu.ca" again and it failed.

The output to "ip addr list", before and after the offending statement is
executed is:

BEFORE:
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
4: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:e0:29:8d:f0:84 brd ff:ff:ff:ff:ff:ff
inet 10.40.188.180/28 brd 10.40.188.191 scope global eth0
6: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:04:16:6f:5e brd ff:ff:ff:ff:ff:ff


AFTER:
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
4: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:e0:29:8d:f0:84 brd ff:ff:ff:ff:ff:ff
inet 10.40.188.180/28 brd 10.40.188.191 scope global eth0
6: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:04:16:6f:5e brd ff:ff:ff:ff:ff:ff
inet 192.168.1.25/24 brd 192.168.1.255 scope global eth1

Now, if I execute the following

ip addr flush dev eth1
ip addr add 192.168.1.25 brd 192.168.1.255 dev eth1 label eth1

(i.e., I specify ${IPADDR} rather than ${IPADDR}/${PREFIX}) everything
works!

Can anyone see the problem here? This networking is really new to me so
I'm not even sure what I should be looking for. So,

What is the significance of the "/24" in the IP address?
Where can I turn it off?
Should I turn it off?
Should it be a specific number?

For completeness, I've included some of my machine's
configures and (hopefully) key files below.

Cheers,
Andrew

================================================== ====
uname -a:
------------------------------------------------------
Linux billyard 2.4.22-1.2135.nptl #1 Mon Dec 15 15:46:09 EST 2003 i586 i586 i386 GNU/Linux

================================================== ====
Distribution: Fedora Core 1


================================================== ====
/etc/sysconfig/network:
------------------------------------------------------
NETWORKING=yes
HOSTNAME=billyard
GATEWAYDEV="eth0"
FORWARD_IPV4=yes

================================================== ====
/etc/sysconfig/network-scripts/ifcfg-eth0:
------------------------------------------------------
# Realtek|RTL-8029(AS)
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
HWADDR=00:E0:29:8D:F0:84


================================================== ===
/etc/sysconfig/network-scripts/ifcfg-eth1:
------------------------------------------------------
# 3Com Corporation|3c905B 100BaseTX [Cyclone]
DEVICE=eth1
ONBOOT=no
BOOTPROTO=none
IPADDR=192.168.1.25
NETMASK=255.255.255.0
HWADDR=00:50:04:16:6F:5E
 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      01-16-2004, 12:50 PM
Andrew P. Billyard <(E-Mail Removed) > wrote:

> AFTER:
> 6: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
> link/ether 00:50:04:16:6f:5e brd ff:ff:ff:ff:ff:ff
> inet 192.168.1.25/24 brd 192.168.1.255 scope global eth1


That bit looks all right to my eyes.

> Now, if I execute the following
>
> ip addr flush dev eth1
> ip addr add 192.168.1.25 brd 192.168.1.255 dev eth1 label eth1
>
> (i.e., I specify ${IPADDR} rather than ${IPADDR}/${PREFIX}) everything
> works!
>
> Can anyone see the problem here? This networking is really new to me so
> I'm not even sure what I should be looking for. So,


I'm a newbie to the new iproute2 stuff (actually, less than a newbie).
What is the output of "ip addr list" after you have added the fixed
ip addr add ... command?

What do the routing tables say before and after? I imagine that would be
"ip route list"

> What is the significance of the "/24" in the IP address?


It's the network mask, actually, it's the number of 1's in the network
mask starting from the left, so it would be

255.255.255.0

Recall that each octet can be from 0 to 255, which is 8 bits. 24 is 3*8,
so therefore there are three whole octets with (binary) ones in them.

> Where can I turn it off?


Ideally, you shouldn't. File a bug report. Or just work around it until
its properly fixed.

> Should I turn it off?


Most software should be smart enough to recognise an address such as
192.168.x.x as a /24 network (Used to be called a C class network, and
could be told by the starting three or so bits.)

> Should it be a specific number?


Certainly, you can't expect to just make up numbers willy-nilly. 24 is
correct for you.

PS. Where does it go if you try using traceroute instead of ping?

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
Clifford Kite
Guest
Posts: n/a

 
      01-16-2004, 05:44 PM
Andrew P. Billyard <(E-Mail Removed) > wrote:

> In my box I have two ethernet adaptors: an SMC EZNET-PCI (as eth0) and a
> 3COM 905TX (as eth1 to be used as a connection for my laptop). The
> following problem occurs whether I have my firewall (iptables) running or
> not. When the eth1 card is brought up (via "ifup eth1") I can
> *only* access the outside world (via eth0) if I use IP numbers:


> ping 130.15.26.30
> ssh 130.15.26.30


> But if I try it with ip names, the system just sits there with no output
> whatsoever (not even error messages or "can't resolve host" type messages)


> ping astro.queensu.ca
> ssh astro.queensu.ca


> (there isn't even any activity light with my DSL box).


> So I started to fiddle with the script ifup, inserting "exit;" commands
> throughout to find out where this problem arises and it's with the command:


> ip addr add ${IPADDR}/${PREFIX} \
> brd ${BROADCAST:-+} dev ${REALDEVICE} ${SCOPE} label ${DEVICE};


> (executed in an if...then statement), where
> ${IPADDR}=192.168.1.25
> ${PREFIX}=24
> ${BROADCAST}=192.168.1.255
> ${REALDEVICE}=eth1
> ${SCOPE}=
> ${DEVICE}=eth1


> I know that this is the offending command since I inserted an exit;
> statement in ifup before this statement, ran "ifup eth1", ran "ping
> astro.queensu.ca" (which worked), ran "ip addr add 192.168...." and then
> ran "ping astroq.queensu.ca" again and it failed.


> The output to "ip addr list", before and after the offending statement is
> executed is:


> BEFORE:
> 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
> 4: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
> link/ether 00:e0:29:8d:f0:84 brd ff:ff:ff:ff:ff:ff
> inet 10.40.188.180/28 brd 10.40.188.191 scope global eth0
> 6: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000
> link/ether 00:50:04:16:6f:5e brd ff:ff:ff:ff:ff:ff



> AFTER:
> 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
> 4: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
> link/ether 00:e0:29:8d:f0:84 brd ff:ff:ff:ff:ff:ff
> inet 10.40.188.180/28 brd 10.40.188.191 scope global eth0
> 6: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
> link/ether 00:50:04:16:6f:5e brd ff:ff:ff:ff:ff:ff
> inet 192.168.1.25/24 brd 192.168.1.255 scope global eth1


> Now, if I execute the following


> ip addr flush dev eth1
> ip addr add 192.168.1.25 brd 192.168.1.255 dev eth1 label eth1


> (i.e., I specify ${IPADDR} rather than ${IPADDR}/${PREFIX}) everything
> works!


> Can anyone see the problem here? This networking is really new to me so
> I'm not even sure what I should be looking for. So,


Sounds very much like the DNS requests are being forwarded through eth1
for some reason. First I'd take a look at /etc/resolv.conf, and then I'd
try running tcpdump on eth1 to see what's going on there. Then I'd do
"ip addr flush dev eth1" and run tcpdump on eth0. (And ping the FQDN
of a host on the Internet in both instances.)

Great description of what you've already done to find the problem!
It seemed to me that where DNS requests go is the only thing left
to check.

> What is the significance of the "/24" in the IP address?


It means that anything sent to a host on the old classful "C" network
192.168.1.0 will go to the LAN to which eth1 is attached (IP addresses
192.168.1.[1-254]).

> Where can I turn it off?


Remove /${PREFIX}.

> Should I turn it off?


No, do that and very likely you won't be able to communicate with other
hosts on your LAN.

> Should it be a specific number?


It defines the LAN hosts' IP address range and hence a LAN network route.
The /24 is for an old classful "C" network and is apropos here.

> For completeness, I've included some of my machine's
> configures and (hopefully) key files below.


They looked okay to me.

--
Clifford Kite Email: "echo xvgr_yvahk-(E-Mail Removed)|rot13"
PPP-Q&A links, downloads: http://ckite.no-ip.net/
/* Emacs vs vi:
Sort of like a Swiss Army knife versus a rapier. */
 
Reply With Quote
 
Andrew P. Billyard
Guest
Posts: n/a

 
      01-19-2004, 08:28 AM
On Fri, 16 Jan 2004 10:35:51 +0000, Andrew P. Billyard wrote:

> Hi ALL,
>
> This is different than my last post so please read on...
>
> ... [etc]


Many thanks to those who responded. I found the error of my ways and feel
like a complete prat for not seeing it. I simply added to
/etc/sysconfig/network-scripts/ifcfg-eth1 the two lines:

NETWORK=192.168.0.0
BROADCAST=192.168.0.255

Although I think it was the absence of the first one which was messing me
up! Such a simple thing, but by the time I wrote the last posting I had
burried myself so deep in the scripting that I couldn't see the forest for
the woods. Perhaps I shouldn't be working on this stuff at 5 am before my
first cup of coffee.

Cheers,
Andrew
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Direct connection via multiple Ethernet adaptors Robert Sneddon Home Networking 6 12-22-2008 03:30 AM
Broadcast/Connect problems sk Linux Networking 0 05-23-2006 05:26 AM
problems with tg3 ethernet driver yoginho Linux Networking 2 04-04-2006 02:09 PM
Problems with VT6102 (Rhine-II) adaptors Vrai Stacey Linux Networking 0 04-25-2005 02:36 PM
Ethernet Adaptors not installing. John Broadband Hardware 1 06-25-2004 07:17 PM



1 2 3 4 5 6 7 8 9 10 11