[Linux-Anyway] Re: Hmm -- more on eth0:1

  • From: horrorvacui@xxxxxxx
  • To: Linux-Anyway@xxxxxxxxxxxxx
  • Date: Sun, 16 Mar 2003 19:59:06 +0100

On Sun, 16 Mar 2003 10:17:24 -0800 (PST)
Meph Istopheles <Meph@xxxxxxxxxxxxxxxxxxx> wrote:

> 
>   Looking at various things & find that 
> /etc/sysconfig/network-scripts/ifcfg-eth0:1 is not only 
> different, being a virtual device, but ~very~ different from 
> /etc/sysconfig/network-scripts/ifcfg-eth0.
> 
>   Will anyone with more than one network via a single nic 
> (Horror) post their ifcfg-eth0:1 for comparison reasons.

No, he will not :) I have just bog-standard one network per NIC, ergo eth0
and eth1. Of course, it wouldn't be a problem to quickly configure one NIC
with two IP addresses and I would/will gladly do it if you need it.
Only, I have SuSE 7.1, and there's no such thing as ifcfg-ethX, there
isn't even an /etc/sysconfig - all the crap RH & Co. keep in
/etc/sysconfig is crammed in one single, heeuuuge /etc/rc.config file over
here, but still not huge enough to carry as much information as I can see
in your ifcfg-eth's.

I'd say I can see a couple of funnies here:

> ifcfg-eth0:1:
> IPADDR="10.0.0.0-24"          <-- This should be 10.0.0.1 (or whatever)
> NETMASK="255.255.255.0"
> GATEWAY=63.249.19.1
> TYPE=Ethernet
> ONBOOT=yes
> BOOTPROTO=none
> DEVICE=eth0:0                 <-- Don't know what this is used for, but I 
> think it
> should be the same as the file it's in: eth0:1 USERCTL=no
> PEERDNS=no

Well, in case it's any help here's what:
19:42:30 root@www:~  # ifconfig eth0:1 10.0.0.7 netmask 255.255.255.0 up
gives me concerning eth0 and eth0:1


eth0      Link encap:Ethernet  HWaddr 00:00:CB:60:44:D2  
          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:100 
          Interrupt:10 Base address:0x6000 

eth0:1    Link encap:Ethernet  HWaddr 00:00:CB:60:44:D2  
          inet addr:10.0.0.7  Bcast:10.255.255.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:10 Base address:0x6000

I'm surprised to see that ifconfig obviously got the broadcast of eth0:1
wrong, as this should be 10.0.0.255. I think.
I checked the routing tables while I was at it, and it does its job:

Destination   Gateway        Genmask         Flags Metric Ref Use Iface
172.19.89.138 0.0.0.0       255.255.255.255 UH    0      0     0 ppp0
192.168.0.1   0.0.0.0       255.255.255.255 UH    1      0     0 dummy0
10.0.0.0      0.0.0.0       255.255.255.0   U     0      0     0 eth1
10.0.0.0      0.0.0.0       255.255.255.0   U     0      0     0 eth0
192.168.0.0   0.0.0.0       255.255.255.0   U     0      0     0 eth0
0.0.0.0       172.19.89.138 0.0.0.0         UG    0      0     0 ppp0

 - it has added a route for 10.0.0/24 via eth0, which is nice.

Hope this helps...

Cheers 

-- 
Horror Vacui

Registered Linux user #257714

Go get yourself... counted: http://counter.li.org/
- and keep following the GNU.
To unsubcribe send e-mail with the word unsubscribe in the body to:   
Linux-Anyway-Request@xxxxxxxxxxxxx?body=unsubscribe

Other related posts: