Kitz Forum

Computers & Hardware => Networking => Topic started by: tickmike on December 06, 2014, 11:05:28 PM

Title: ifconfig
Post by: tickmike on December 06, 2014, 11:05:28 PM
Eric uses 'ifconfig' for Linux DSLstats  If I remember windows uses 'ipconfig'

This is from my connection (with my ip's taken out !).
Any idea what they are, what are they all for ?,  I did look at the 'Man'page but not much wiser   :blush:  .
------------------------------------------------------------------------------
ifconfig
atm1      Link encap:Ethernet  HWaddr 84:A8:E4:03:0E:56 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:120220 errors:1 dropped:0 overruns:0 frame:0
          TX packets:109612 errors:78 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:101187551 (96.4 MiB)  TX bytes:4520526 (4.3 MiB)

br0       Link encap:Ethernet  HWaddr 84:A8:E4:03:0E:55 
          inet addr:x.y.z.110 <modem LAN address
 Bcast:x.y.z.111  <broadcast
Mask:255.255.255.248
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:56134 errors:0 dropped:0 overruns:0 frame:0
          TX packets:73756 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5883734 (5.6 MiB)  TX bytes:83473892 (79.6 MiB)

eth0      Link encap:Ethernet  HWaddr 84:A8:E4:03:0E:55 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:56211 errors:0 dropped:0 overruns:0 frame:0
          TX packets:73753 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6900684 (6.5 MiB)  TX bytes:83774641 (79.8 MiB)
          Interrupt:40 Base address:0x6a00

eth0.5    Link encap:Ethernet  HWaddr 84:A8:E4:03:0E:55 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:56211 errors:0 dropped:0 overruns:0 frame:0
          TX packets:73753 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6900684 (6.5 MiB)  TX bytes:83774641 (79.8 MiB)
         

imq0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          UP RUNNING NOARP  MTU:16000  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:11000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

imq1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          UP RUNNING NOARP  MTU:16000  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:11000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

imq2      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
          UP RUNNING NOARP  MTU:16000  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:11000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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:196 errors:0 dropped:0 overruns:0 frame:0
          TX packets:196 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:16327 (15.9 KiB)  TX bytes:16327 (15.9 KiB)

pktcmf_sa Link encap:UNSPEC  HWaddr FE-FF-FF-FF-FF-FF-FF-FF-00-00-00-00-00-00-00-00 
          UP NOTRAILERS RUNNING NOARP  MTU:0  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:50 Base address:0x5220

pktcmf_sw Link encap:UNSPEC  HWaddr FE-FF-FF-FF-FF-FF-FF-FF-00-00-00-00-00-00-00-00 
          UP NOTRAILERS RUNNING NOARP  MTU:0  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:42 Base address:0x6a40

ppp256    Link encap:Point-to-Point Protocol 
          inet addr:x.y.z.105 <my WAN address
P-t-P:x.w.1.69  <My WAN gateway address
Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:120105 errors:0 dropped:0 overruns:0 frame:0
          TX packets:109574 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:101269633 (96.5 MiB)  TX bytes:23820461 (22.7 MiB)

ptm1      Link encap:Ethernet  HWaddr 84:A8:E4:03:0E:57 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:0 (0.0 B)  TX bytes:0 (0.0 B)

#
Title: Re: ifconfig
Post by: kitz on December 07, 2014, 01:36:30 AM
Quote
Any idea what they are, what are they all for ?,  I did look at the 'Man'page but not much wiser

Highly likely they are used for the traffic monitoring page, because thats the information that will be needed to count traffic flowing through the modem.   
 
I dont use it now because my present ISP monitors my bandwidth which I can easily view in their portal - but I did use it at one time with my previous ISP as it can be quite useful for those on ISPs that dont let you know how much bandwidth you are using each month.  It can even be set to give an alarm if you are approaching a bandwidth cap limit 

As you can see its looking for the no of packets transferred in each of the modems interfaces.  (rx & tx packets and rx & tx bytes) From these figures it attempts to calculate your bandwidth over say one month.

- see screen shot below.   

---
ETA
Erics page has some more info on the configuration
http://www.s446074245.websitehome.co.uk/trafficconfig.html
and theres also a screenshot here of what it looks like when monitoring bandwidth
http://www.s446074245.websitehome.co.uk/features.html#traffic
(https://forum.kitz.co.uk/proxy.php?request=http%3A%2F%2Fwww.s446074245.websitehome.co.uk%2Fimages%2Ftraffic.png&hash=30ab8a42b9adc9fbbf02af49c24cea3e05847e72)
Title: Re: ifconfig
Post by: roseway on December 07, 2014, 07:19:56 AM
Yes, that's correct - the ifconfig data is used for traffic monitoring purposes in DSLstats. I think that what's being requested here is more information about what the individual sections represent, and I have to admit that apart from guessing the obvious ones such as eth0, I'm fairly clueless.
Title: Re: ifconfig
Post by: burakkucat on December 07, 2014, 03:25:13 PM
Until such time as a wizard with knowledge of embedded systems comments, I'll provide my very limited understanding.

We must remember that the device in question is an embedded system using a Linux kernel. Therefore the OS itself has its own interfaces . . .

Taking the list of interfaces, above and reducing it to the bare minimum gives --

atm     
br       
eth
imq
lo       
pktcmf_sa
pktcmf_sw
ppp
ptm


My limited interpretation is --

atm -- an interface used when the device is configured for asynchronous transfer mode.
br -- a bridge interface.
eth -- a standard Ethernet interface.
imq -- ??
lo -- the local loopback interface.
pktcmf_sa -- ??
pktcmf_sw -- ??
ppp -- a interface used by the point to point protocol.
ptm -- an interface used when the device is configured for packet transfer mode.
Title: Re: ifconfig
Post by: roseway on December 07, 2014, 04:09:29 PM
imq appears to be intermediate queueing device

http://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.imq.html

pktcmf relates to the DSL driver (various references)
Title: Re: ifconfig
Post by: tickmike on December 07, 2014, 09:08:54 PM
Thanks all, that's interesting.
When they are put in there basic form then it comes clear what they are for.
Title: Re: ifconfig
Post by: Chrysalis on December 11, 2014, 11:53:15 AM
Usually is the following on a typical linux embedded router.

Lan interface
Wan interface
PPP tunnel
Bridge interface
Localhost interface

But its not just that.

e.g. my asus creates a vlan on top of the wan interface, it also has seperate ipv6 interfaces.