Skip to contentSkip to conversation

two eth devices ...

DISCUSSION [email protected] 3 participants 4 messages Jan 26, 2004 – Jan 27, 2004 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi, I've been assigned a PC with two eth devices, What utility can I give them? or is better if i unplug one, my network is configured to assign an IP address via dhcp.

As you can see I'm a Linux newbie in network thems... TKS

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw
Quoted 6 lines · At 12:29 PM 1/26/2004 -0600, [email protected] wrote:

Hi, I've been assigned a PC with two eth devices, What utility can I give them? or is better if i unplug one, my network is configured to assign an IP address via dhcp.

As you can see I'm a Linux newbie in network thems... TKS

I cannot know for certain what is installed on your system. The usual command for checking eth* interfaces (not "devices") is

ifconfig -a

Some newer, or stripped down, Linux systems may lack this command. In that case, see if you have the command "ip" on your system. If you do, the command

ip link show

should give you information about the interfaces.

I am assunming here that your Linux kernel has in it, or loads modules that provide, support for the actual NICs in your system. If not, you don't have the eth* interfaces, and you'll need to do something to create them. I cannot say what without knowing a few more things, namely ...

what sorts of NICs they are (you may have to open the case to find
out, or the command "lspci" may tell you)
what Linux distrubution and version you are using
what Linux kernel ("uname -a") you are running, and whether it is
a stock or a custom-compiled kernel.

You should be logged on as root to execute any of the commands I listed above.

As to whether you should "unplug" one ... it depends on unreported details of your setup. Again, approaches vary a lot from one Linux distro to another, but newer versions are tending to use /etc/network/interfaces as the config file for the eth* (and some other) network interfaces. You might see if you have such a file and, if you do, what it says about setup of eth0 and eth1. Which of them (or are both) is set up here to get an IP address via DHCP?

And am I correct in inferring that both eth* interfaces are connected to the *same* network (the same LAN, probably)?If they are, you probably want to ask the sysadmin if the network is setup to allow the interfaces to be bridged, so they can work together to double your connection speed. If they are not, advising you as to what you should do depends enough on what they are connected to that no advice can make sense without your providing more information.

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 1 line · At 06:46 PM 1/26/2004 -0600, [email protected] wrote:

I have 2 interfaces, but i don't know what to do with

First, let's keep this discussion on the list, not private. So I've added the list back in with this reply.

Second, as I look at the interface data, the packet counts make it clear that both are being used ... about equally for incoming traffic, but heavily favoring eth0 for outgoing packets. A look at your routing table ("netstat -nr" is one way to view it) will probably explain the TX imbalance.

Without knowing more about your setup ... for example, why the two interfaces are on different Ip networks (do they connect to the same or to different physical networks?), what services the host is running, what mix of LAN and Internet services the host accesses and how (what the routing table looks like is most of the "how" part) ... it is hard to recommend anything.

Really, from the standpoint of Linux, the system seems to be working. If you want to disable an interface temporarily, you *probably* want to use the command

ifdown eth0
or
ifdown eth1

But the question of *whether* you should be running one or two interfaces really is better posed to the sysadmin at your site ... it is not particularly a Linux question. If his or her answer poses any issues that seem specific to Linux, then that would be a good time to come back here.

For example, I think I saw another message from you, earlier today, asking about controlling how the host accesses squid. It was too vague for me to reply to, but now that I see you have interfaces on different networks, the system's routing table should control which interface handles squid traffic (assuming the squid server is local, on one or the other network).

Quoted 49 lines
# if config -a
eth0      Link encap:Ethernet  HWaddr 00:C0:4F:97:2D:8D
          inet addr:150.100.106.24  Bcast:150.100.106.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:301002 errors:3 dropped:0 overruns:0 frame:3
          TX packets:13656 errors:0 dropped:0 overruns:0 carrier:14
          collisions:791 txqueuelen:100
          RX bytes:97659433 (93.1 Mb)  TX bytes:1976281 (1.8 Mb)
          Interrupt:11 Base address:0xec80

eth1 Link encap:Ethernet HWaddr 00:A0:24:0B:56:3C
inet
addr:150.100.107.199 Bcast:150.100.107.255 Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:290096 errors:3 dropped:0 overruns:0 frame:3
          TX packets:1163 errors:0 dropped:0 overruns:0 carrier:0
          collisions:62 txqueuelen:100
          RX bytes:94395209 (90.0 Mb)  TX bytes:112613 (109.9 Kb)
          Interrupt:10 Base address:0x230

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:297 errors:0 dropped:0 overruns:0 frame:0 TX packets:297 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0
RX bytes:32918 (32.1 Kb) TX bytes:32918 (32.1 Kb)

# ip link show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:c0:4f:97:2d:8d brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:a0:24:0b:56:3c brd ff:ff:ff:ff:ff:ff
# uname -a
Linux naboo 2.4.20-8 #1 Thu Mar 13 16:42:56 EST 2003 i586 i586 i386 GNU/Linux

::::::::::::::
/etc/sysconfig/networking/profiles/default/ifcfg-eth0 ::::::::::::::
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
TYPE=Ethernet
USERCTL=no
PEERDNS=no
::::::::::::::

Quoted 8 lines

/etc/sysconfig/networking/profiles/default/ifcfg-eth1 ::::::::::::::
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=dhcp
TYPE=Ethernet
USERCTL=no
PEERDNS=no

[old stuff deleted]

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#4 lore raw
In reply to [email protected]
Quoted 3 lines · On Monday 26 January 2004 19:29, [email protected] wrote:

Hi, I've been assigned a PC with two eth devices, What utility can I give them? or is better if i unplug one, my network is configured to assign an IP address via dhcp.

If you dont need eth1 then dont use it, simply down it via ifconfig, i cant say much more as you failed to say what distro you use, most possably answer would be.
edit /etc/rc.d/rc.local and place the following;

/sbin/ifconfig eth1 down
rmmod <module>

See you did not even say what sort of card it is so module is unknown to me.!!

Next time be more informative, or better, be imaganative yourself.

Quoted 3 lines

As you can see I'm a Linux newbie in network thems... TKS

Signature · 15 lines
If the Linux community is a bunch of theives because they
try to imitate windows programs, then the Windows community
is built on organized crime.

Regards Richard
[email protected]
http://people.zeelandnet.nl/pa3gcu/



-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs