LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   What is "carrier" from the ifconfig output? (https://www.linuxquestions.org/questions/linux-networking-3/what-is-carrier-from-the-ifconfig-output-57333/)

brian_p_sully 04-29-2003 02:46 PM

What is "carrier" from the ifconfig output?
 
I am having numerous networking problems with one my systems. I ran a netstat -i and got:

Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 01136723183 0 0 01195137148 0 0 0 BMRU
lo 16436 081148549 0 0 081148549 0 0 0 LRU

So no errors and I think all is well. When I run ifconfig though I got:

eth0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
inet addr:XX.XX.XX.XX Bcast:XX.XX.XX.XX Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1136725015 errors:0 dropped:0 overruns:0 frame:0
TX packets:1195140164 errors:0 dropped:0 overruns:0 carrier:1110109378
collisions:0 txqueuelen:100
RX bytes:3328720157 (3174.5 Mb) TX bytes:1835116748 (1750.1 Mb)
Interrupt:5 Memory:f7fe0000-f8000000

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:81148937 errors:0 dropped:0 overruns:0 frame:0
TX packets:81148937 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2272855379 (2167.5 Mb) TX bytes:2272855379 (2167.5 Mb)


And I see this huge number for carrier. I run it every few seconds and I see this number increasing fairly steadily. I tried looking everywhere but I can't find a description of what "carrier" means in this context? Can anyone point me to a reference better than the man page? I am running Red Hat 7.3 on Compaq Server.

vladkrack 05-02-2003 01:32 PM

The carrier is a wave that is used for modulation of signal. The modulated signal consists pure sine wave "carrier" signal which is modified to convey information. Modulation is the conversion of a digital signal represented by binary binary into an analog signal something like a sine wave. A pure carrier sine wave, unchanging in frequency and voltage, provides no flow of information at all. There are 3 basic types of modulation: frequency, amplitude, and phase.

Maybe you can find more information about how to fix your problem in:
http://tldp.org/HOWTO/Ethernet-HOWTO.html#toc1

Hope that helps ...

brian_p_sully 05-02-2003 01:40 PM

So the carrier is what allows the NICs to communicate. What does the number mean though? Is a big number good? a small number good? Does "carrier" number from ifconfig really mean carrier errors?

vladkrack 05-02-2003 01:47 PM

The number means that you are having errors with it, a small number is better in this case.

skrall 02-20-2008 11:32 AM

ifconfig errors
 
This is an old question but seems to be recurring.

TX errors = CRC, checksum mismatch
Frame = Packet fails to end on a 32bit/4 byte boundary
Not sure if this includes small packets ( <64bytes )
or large packets.
Collisions = This interface is running half duplex.
It is detecting TX and RX packets at the same time.
This is bad in a HDuplex environment (Hubs)
Switched environments operate full duplex.
Collision detection is disabled in FD mode.
A mismatch in duplex is very bad for throughput.
(Switch = FD but Host = HD)
The HDuplex device will terminate transmission if collisions
are detected.
Some devices used to report late collisions which were very
bad in hub environments.
Carrier = Loss of link pulse. Sometimes recreated by removing and
installing the Ethernet cable.
If this counter is high, the link is flapping. (up/down)
Either this Ethernet chip is having issues or the device at the
other end of the cable is having issues
Overruns = The NIC has a Buffer of X bytes and this filled and was
exceeded before the buffer could be emptied.
The Excess is the overrun.

These days, Full Duplex switch links are the norm. Only TX and RX packets should be incrementing. Carrier is typically a low number less than 10. This will be higher on linux boxes that go an entire year between reboots. The important thing to look at is the rate at which the errors are incrementing.

rg.viza 02-20-2008 11:51 AM

Quote:

Originally Posted by skrall (Post 3063888)
This is an old question but seems to be recurring.

TX errors = CRC, checksum mismatch
Frame = Packet fails to end on a 32bit/4 byte boundary
Not sure if this includes small packets ( <64bytes )
or large packets.
Collisions = This interface is running half duplex.
It is detecting TX and RX packets at the same time.
This is bad in a HDuplex environment (Hubs)
Switched environments operate full duplex.
Collision detection is disabled in FD mode.
A mismatch in duplex is very bad for throughput.
(Switch = FD but Host = HD)
The HDuplex device will terminate transmission if collisions
are detected.
Some devices used to report late collisions which were very
bad in hub environments.
Carrier = Loss of link pulse. Sometimes recreated by removing and
installing the Ethernet cable.
If this counter is high, the link is flapping. (up/down)
Either this Ethernet chip is having issues or the device at the
other end of the cable is having issues
Overruns = The NIC has a Buffer of X bytes and this filled and was
exceeded before the buffer could be emptied.
The Excess is the overrun.

These days, Full Duplex switch links are the norm. Only TX and RX packets should be incrementing. Carrier is typically a low number less than 10. This will be higher on linux boxes that go an entire year between reboots. The important thing to look at is the rate at which the errors are incrementing.

other tips:

autonegotiation doesn't always work. Intel nic in a cisco environment is one example where it can be unreliable. If you are having duplex mismatches (indicated by frame alignment errors and or collisions and dropped packets), hard-set the duplex and speed settings at NIC and port on switch. The method for your card is in google. For the switch if it's managed it's in there... A healthy connection should show 0 errors.

MTU - if the mtu on the card is larger than the smallest mtu in your network path, packet fragmentation occurs. this also slows things down. I find an mtu of 1500 a lot on OS's I install, but my dsl's is 1492. Not a good thing.

-Viz

hahacc 04-17-2012 10:14 PM

here's something you may be interested in re how to set NIC parameters:
#disable pause autonegotiate
/sbin/ethtool -A eth0 autoneg off
/sbin/ethtool -s eth0 autoneg off
#change tx ring buffer
/sbin/ethtool -G eth0 tx 4096 #maybe too large(consider 512). To increase interrupt rate, ethtool -C eth0 rx-usecs 10<10000 interrupts per second>
#change rx ring buffer
/sbin/ethtool -G eth0 rx 128
#disable wake on line
/sbin/ethtool -s eth0 wol d
#turn off offload
/sbin/ethtool -K eth0 tx off rx off sg off tso off gso off gro off
#enable TX pause
/sbin/ethtool -A eth0 tx on
#disable ASPM
/sbin/setpci -s 02:00.0 CAP_EXP+10.b=40
/sbin/setpci -s 00:19.0 CAP_EXP+10.b=40

For more info, you can check here Resolved Intel e1000e driver bug on 82574L Ethernet controller causing network blipping


All times are GMT -5. The time now is 09:30 PM.