Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

Getting the most from ifconfig

Sandra Henry-Stocker | April 19, 2016
The ifconfig command can tell you a lot about your Unix server’s connection to your network and the role it’s playing in both generating and receiving network traffic.

You may encounter bonded interfaces --- an arrangement that allows a system to increase network throughput by using more than one physical interface to send traffic. In the example below, notice how the same hardware address appears to be used for three separate interfaces. The bonded interface is called bond0. That kind of gives it away. It's not a separate physical interface, but a bonding of the eth0 and eth1 interfaces.

# ifconfig -a
bond0     Link encap:Ethernet  HWaddr 78:2B:CB:4E:B2:44
          inet addr:10.1.2.3  Bcast:10.1.255.255  Mask:255.255.0.0
          inet6 addr: fe80::b2a7:bcee:fe5f:a949/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:552315 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1811373 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:50142555 (47.8 MiB)  TX bytes:2726862940 (2.5 GiB)

eth0      Link encap:Ethernet  HWaddr 78:2B:CB:4E:B2:44
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:375620 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1811373 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:32261660 (30.7 MiB)  TX bytes:2726862940 (2.5 GiB)
          Interrupt:106 Memory:d2000000-d2012100

eth1      Link encap:Ethernet  HWaddr 78:2B:CB:4E:B2:44
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:176695 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:17880895 (17.0 MiB)  TX bytes:0 (0.0 b)
          Interrupt:114 Memory:d4000000-d4012100

inet & inet6 – the IPv4 and IPv6 addresses. Yes, those IPv6 addresses are still somewhat intimidating for those of us who have spent the bulk of our careers with IPv4, but you’re likely to see more and more of them.

The status indicators – UP, BROADCAST, RUNNING, MULTICAST, MTU – tell you a range of things. Note that UP and RUNNING are not the same thing.

  • UP shows that the kernel modules needed for the interface have been loaded.
  • RUNNING tells you that the interface is ready to accept data.
  • BROADCAST tells you that the interface supports broadcasting. Note that this is necessary if a system is going to obtain its address using DHCP as it has to broadcast its request for an IP address.
  • MULTICAST tells you that the interface supports multicasting – sending packets to a select group of systems.
  • MTU (maximum transmission unit) sets the packet size, generally 1500. Notice how the packet size for the loopback interface is so much larger. These packets, of course, don’t actually have to go over the network.

 

Previous Page  1  2  3  4  Next Page 

Sign up for CIO Asia eNewsletters.