Which Ethernet?
Markus Schönhaber
ubuntu-users at schoenhaber.de
Wed Aug 8 12:45:44 UTC 2007
das দাশ wrote:
> I have two ethernet cards, named eth0 and eth2 by the OS. And, one of
> them connects with the dsl modem through pppoe. 'pppoeconf' detected it,
> and connected it to Internet with ppp0. But, I cannot get which ethernet
> card (0 or 2) is connected with the modem? Is there any way to know it?
>
> This is the result of 'ifconfig -a':
> <<<
> dd at mahammad:~$ ifconfig -a
> eth0 Link encap:Ethernet HWaddr 00:A1:B0:09:0C:8F
> inet addr:192.168.0.1 Bcast:192.168.1.255 Mask:255.255.255.0
Since this setting looks pretty useless to me, I'd put my bet on eth0 as
the interface connected to the dsl modem.
To verify this, take a look at /etc/network/interfaces. Search for a
line similar to
iface dsl-provider inet ppp
The "dsl-provider" above refers to a file in /etc/ppp/peers (in this
case /etc/ppp/peers/dsl-provider) where the configuration options for
pppd are stored. This file, in turn, should contain (propably near the
end) an option which tells pppd the ethernet interface to use. For me
that looks like
plugin rp-pppoe.so eth1
Which means, on my machine the dsl modem is connected to eth1.
Browsing through /etc/ppp/peers/<whatever> might even not be necessary
since pppoeconf may have added something like
# added by pppoeconf
auto eth1
hinting to eth1 as connection to the dsl modem.
Moreover you could use pppoe-discovery to find the interface.
Or you could search for pppd in /var/log/messages. When pppd establishes
a connection it will log something like
Aug 5 19:46:52 localhost pppd[3296]: Connect: ppp0 <--> eth1
also telling you the interface in use.
Regards
mks
More information about the ubuntu-users
mailing list