[NTLUG:Discuss] which one is eth0, and which one is eth1?
Mark Bickel
eusmb at exu.ericsson.se
Thu Jul 13 15:43:44 CDT 2000
> From: "m m" <llliiilll at hotmail.com>
> To: discuss at ntlug.org
> Subject: Re: [NTLUG:Discuss] which one is eth0, and which one is eth1?
> >From: Mark Bickel <eusmb at exu.ericsson.se>
> >To: discuss at ntlug.org
> >Subject: Re: [NTLUG:Discuss] which one is eth0, and which one is eth1?
> >jc wrote:
> >
> > > From: "m m" <llliiilll at hotmail.com>
> > > Subject: [NTLUG:Discuss] which one is eth0, and which one is eth1?
> >
> > > 1. How do I know which card is eth0 and the other is eth1 physically? I
> > > guess that it is based on the motherboard's slot order? right?
> >
> >Nope. The network devices are not "physical" devices - they are not
> >represented
> >under /dev/. Rather, they are "logical" device names known to the kernel,
> >and
> >they are logically assigned as they are recognized by the kernel. In most
> >modern
> ....
>
> Does it mean that I can plug internal network cable and Internet cable into
> them regardless which card to hook up which cable?
No! It means just what I said. Network device names are assigned based on the
order in which the modules for each NIC are loaded to the kernel. Now first off
you need to be clear which physical NIC is represented by which logical device
name. That means you should know (at least) the base I/O address of each NIC.
ifconfig will show you what the physical I/O address and IRQ of each netdev is.
Secondly, you need to how and what the IP address, netmask, and route will be
assigned to each NIC. If one NIC is going to be connected to the internet it must
either be configured (by you) with a static IP which you have rented from your ISP,
OR it must get its IP address, netmask and gateway from your cable/DSL modem/router
via the DHCP protocol, which means that netdev must be a DHCP client and the client
daemon dhcpcd must be configured (by you) to run on that interface.
Now, if you want to configure a second NIC, I will assume you want to use it to
connect to other hosts on your own private network, and even perhaps share
that (public) internet connection with these other hosts. This means setting up
IP masquerading/forwarding between the two networks, AND YOU BETTER HAVE FIREWALL
and other security policies in place! The NIC on the private net should have a
non-routable IP address like 192.168.2.1 and will be the default gateway address
for the other hosts on your private net that will access the internet through it.
If none of this makes any sense, you probably should not try this at home, or at
least don't store any data you care about keeping safe and private on the box!
Mark.Bickel at ericsson.com
More information about the Discuss
mailing list