[Linux-Anyway] Re: eth1

  • From: Meph Istopheles <meph@xxxxxxxxxxx>
  • To: Linux-Anyway@xxxxxxxxxxxxx
  • Date: Thu, 6 Mar 2003 12:16:04 -0800 (PST)

  Horror,

> >   Hey,

> >   Poking in the dark here.  Each appears to be OK, but eth1 
> > isn't accessable from 10.0.0.3, the W2k box.  Anyone know what 
> > I've done wrong?
> > # /sbin/ifconfig eth1
> > eth1      Link encap:Ethernet  HWaddr 00:60:08:A0:92:22  
> >           inet addr:10.0.0.2  Bcast:10.255.255.255  
> > Mask:255.0.0.0
> >           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
> >           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> >           TX packets:5 errors:0 dropped:0 overruns:0 carrier:3
> >           collisions:0 txqueuelen:100 
> >           RX bytes:0 (0.0 b)  TX bytes:300 (300.0 b)
> >           Interrupt:10 Base address:0xecc0
> > 
> >   Meph

> The reason is that you don't have eth1. You have only one NIC
> in there, right?

  Uh, no.  There are two phisical nics.  They appear to be using 
the same irq, but different addresses.

  It may be that the second nic isn't actually recognised by the 
system, &, to get two addresses, the system uses different base 
addresses for the same nic?

  In any case, I thought I may be using the wrong broadcast 
addressing & switched (based on some ipmasq howto) to a 192.x 
addressing & used the broadcast addressing specified in the 
howto.  Still, no go -- with either nic.

> Then eth1 is what you could call "virtual interface", hehe. The
> one that's physically connected with your winbox is eth0

  Huh?  There is an eth0 on each box.  Win eth0 is set to 
192.168.0.3 (or was 10.0.0.3) & eth0 on the Linux box is 
63.249.19.72, while the Linux box eth1 is 192.168.0.2 (was 
10.0.0.2) (note: the dsl router is set to 10.0.0.1).

  So, here you ~really~ confuse me.

> and you need to configure two addresses for it. Now, I've known
> for a long time that linux can have more IP's on the same NIC,
> but I never needed it, didn't know how it's done, and found out
> that this isn't documented either. ifconfig manpage didn't
> help, google did. What you need is: ifconfig eth0:1 10.0.0.2 up

  OK.  Did that.  No change.

> The description I found said: ifconfig IF:N <ip-address>
> up/down, where IF is clearly the interface name, and N a number
> between 1 and 255, meaning that you can switch 256 IP's on one
> interface on and off as you please, yipee. Don't know why, but
> this newly discovered fact gives me a strange pleasure.

  Interesting.  I wonder though, after running it on eth0 
without error, I still get:

eth0      Link encap:Ethernet  HWaddr 00:C0:4F:60:E4:5F  
          inet addr:63.249.19.72  Bcast:63.255.255.255  
Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1621713 errors:0 dropped:0 overruns:0 
frame:0
          TX packets:1732265 errors:0 dropped:0 overruns:0 
carrier:2305
          collisions:43089 txqueuelen:100 
          RX bytes:1026006417 (978.4 Mb)  TX bytes:1120018609 
(1068.1 Mb)
          Interrupt:10 Base address:0xdc00

> Hope this helps

  Well, I s'pose it would -- if I got the subnet working:-(.

  Meph

-- 
  There are people so addicted to exaggeration that they can't 
  tell the truth without lying.
  -Josh Billings
To unsubcribe send e-mail with the word unsubscribe in the body to:   
Linux-Anyway-Request@xxxxxxxxxxxxx?body=unsubscribe

Other related posts: