Networking
26 November 2004

Summary

Gigabit connection should be in place, with cat 5e cables, but it's not been fully tested. Gubbio still has the old 100MB/s card.

Configuration files

  • /etc/network/interfaces
  • ifrename uses /etc/iftab to assign persistent names to network interfaces; see iftab(5).
    eth0 mac 00:0d:60:75:c8:87
    eth1 mac 00:0c:f1:41:27:da

>Debian packages and other software

  • ifupdown?
  • dhcp?
  • ntop (caused some problems -- uninstalled?)
  • iproute (this may be what ruined dhcp -- uninstalled?)
  • gip (IP calculator -- looks great)
  • See your LAN
    • etherape -- graphic display of network
    • lanmap -- a bit like etherape, shows network talk
      • sudo lanmap -vvv -i eth0 -T png -o /tmp
      • feh /tmp/lanmap.png
    • LiSA -- the LAN browser in KDE
    • pads -- passive asset detection
  • netcat -- TCP/IP swiss army knife
  • nmap, nmapfs, knmap -- port sniffer
  • See the Internet
    • mtr -- similar to xtraceroute
    • xt -- xtracetroute
    • traceroute
    • pchar (measures bandwidth between hops -- see example below)
  • wakeonlan (Debian package)
  • ns820-diag for diagnosing a built-in NatSemi NIC (in package nic-tools)
  • ethstat eth0
  • netload eth1
  • vnstat
  • nagios2 -- a host/service/network monitoring and management system

Commands

  • just start networking
  • just stop networking
  • route del -net 128.97.223.0 netmask 255.255.255.0 dev eth0
  • route del default gw 192.168.1.1
  • route add -net 128.97.223.0 netmask 255.255.255.0 dev eth0
  • route add default gw 192.168.1.100
  • ifconfig eth0 128.97.223.157 netmask 255.255.255.0 up
  • ifconfig eth0 dynamic (this is accepted but I don't know what it does)
  • ifdown eth0
  • ifconfig -s eth0 down
  • netstat -nr  (see route)
  • netstat -a --inet
  • route -n

Guides

To Do

  • Connect the Macs to Cyberspace and test the connections
  • Look into DV from Firewire over IP
  • CONFIG_NET_IPIP:

    Tunneling means encapsulating data of one protocol type within another protocol and sending it over a channel that understands the encapsulating protocol. This particular tunneling driver implements encapsulation of IP within IP, which sounds kind of pointless, but can be useful if you want to make your (or some other) machine appear on a different network than it physically is, or to use mobile-IP facilities (allowing laptops to seamlessly move between networks without changing their IP addresses; check out ).

  • Linux IP Masquerade HOWTO
  • Setting up IP Aliasing on A Linux Machine Mini- HOWTO

Commands

  • Monitoring the network with ntop
    • ntop -u root
      • ntop -u ntop (you may have some permission problems to sort out)
    • http://gubbio:3000/ (nice display of connection information)
  • gip 255.255.240.0 (IP address calculations)
  • netcat
    • host1# nc -l -p 2000 > foo.bz2
    • host2# nc host1 2000 < foo.bz2
Applications


Host-to-host options

Installation and monitoring history

Update 19 December 2003

Speed tests, ping -s 2024 -c 10 (average)
To
From ->
sigillo bighoss cybers spello gubbio blue
sigillo 0.0
1.3
0.7 0.7 0.9

bighoss 1.1 0.3
1.1 1.1 1.3
cybers 0.7 1.3 0.0 0.2
0.4
spello 0.7 1.3 0.2
0.0 0.4

gubbio 0.9 1.5
0.4
0.4
0.0
blue 1.1 1.6 1.1 1.1 1.3

Total
4.4
7.3
3.5
3.5 4.3

  1. I can't ssh to blue
  2. bighoss consistently gets a 6-10ms slowdown every 5 or so pings, so the figures given are minimum rather than average -- real averages are double the given figures
  3. cyberspace and spello ping each other at 0.2 and better -- that's the gigabit!
  4. gubbio and sigillo ping faster to cybers and spello than to each other -- so half-way gigabit makes a difference!
  5. Next time use 8000 packets for a better effect -- a simple ping shows 0.0 between the gigabit NICs.
Conclusion: the linux machines appear to provide a more consistent network flow, and the gigabit machines connect more rapidly to all other machines.

Update 18 December 2003

I just got the 3Com Gigabit NICs and installed one on Spello, alongside the existing Intel Ethernet Pro 100.

I first thought they use the acenic driver (cf. old home page), and I compiled Spello's 2.4.21-ac2; however, the module wouldn't insert. I then realized the driver is strictly speaking for the 3Com 3C985 chip, while my box says 3C2000T, which just might be another chip. The box also says there's a Linux driver. Amazingly, the CD contains a Linux driver! Now that's a first. So it turns out that the3C2000 indeed does have a different driver, and it's supplied as 3c2000.o for the 2.4 kernel.

The driver had to be compiled, and a simple "make" worked. Note that I did this on spello; trying to compile on sigillo failed --unsurprisingly; it's running 2.6 and gcc 3.2. The module 3c2000.o installed cleanly with a simple "insmod 3c2000.o". Wow. For more information, issue "modinfo 3c2000.o" -- turns out it's GPL'd. So this is pretty impressive: Linux is mentioned on the box, the driver is on the CD, it's GPL'd, and it compiles and installes perfectly. Also note that it's called the "SysKonnect SK-NET Gigabit Ethernet SK-98xx driver" -- likely the card is a version of the SysKonnect Gigabit Ethernet Adapters with open source drivers -- looks like a SuSE-sponsored project. These drivers are also in the kernel; see /usr/src/linux/Documentation/networking/sk98lin.txt. However, the 2.4.21 help file doesn't yet say that this driver works for the 3Com card, which it obviously does. The module is normally called sk98lin.o. For details on this NIC and its driver, see also the readme file in /vc/software/tarballs/3c2000. So that's a little less impressive -- the documentation might as well have mentioned that the driver is the SysKonnect driver in the kernel.

The skgepnmi.c file on the CD is version 1.102 of the driver, from exactly a year ago (2002/12/16). Others are from February 2003. The driver was packaged on 21 May 2003. I don't see a build number.

The skgepnmi.c file in the 2.4.21-ac2 kernel is the same file. The build number is 6.02 from 2002-12-19. The files are a bit older than those on the CD, but the files don't look modified for the 3c2000 driver. 3Com claims a copyright, which may be a GPL violation.

On the SysKonnect website, the most recent driver is 6.19, a kernel patch for 2.4.22, so I could do that -- see readme.

I looked at VLAN (Virtual LAN), which could be useful for the KFA (probably unnecessary).

BTW the module was built on /vc, which is a cyberspace drive. When I inserted this module, this means I inserted a module that's located on one machine into the kernel of another. I wonder if I can just move the module into /lib/modules -- I'll try that.

So this all worked. I modified /etc/modutils/ethernet as follows:

alias   ethernet-0      eepro100
alias   ethernet-1      3c2000
alias   ethernet-2      eth1394

and ran "update-modules" and "depmod-a". I then added these lines to /etc/modules:
ethernet-0
ethernet-1
ethernet-2

Finally, I modified /etc/network/interfaces to use eth1 instead of eth0.

On rebooting I got this:

3C2000: 3Com Gigabit NIC Driver Version A11
Copyright (C) 2003 3Com Corporation.
Copyright (C) 2003 Marvell.
eth1: 3Com Gigabit NIC (3C2000)
      PrefPort:A  RlmtMode:Check Link State
eth1: network connection up using port A
    speed:           100
    autonegotiation: yes
    duplex mode:     full
    flowctrl:        symmetric
    scatter-gather:  enabled
So everything is looking good -- the card is working, though it's currently set to 100Mb/s. Now that I know it's working, I can install one on cyberspace too and use the same driver. In this case, I didn't feel I needed to keep the Intel Ethernet Pro 100. So I made the same changes and got everything working. Once I connected the working 3Com NICs to the gigabit switch, I got "speed: 1000". The actual speed for copying between spello and cybers once the new NICs were in pace was just barely above what I get with the 100mb/s -- I may need to tweak.

Note that available eth devices will be sequentially numbered, so you can't decide that the ether1394, say, should be eth2. If there's only one NIC card, ether1394 will become eth1. Consequently I modified /etc/modutils/ethernet:

alias   ethernet-0      3c2000
alias   ethernet-1      eth1394

I'm still not using eth1394, but one day I'll try it.

Update 25 June 2003

I issued a "just install iproute" to check out Linux advanced networking tools; see HowTo.

root@sigillo:~# ip link list
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:9f:15:0f:59 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 100
    link/ether 00:d0:59:44:5a:ed brd ff:ff:ff:ff:ff:ff

See instructions at http://lartc.org/howto/lartc.iproute2.explore.html.

root@sigillo:~# ip address show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:c0:9f:15:0f:59 brd ff:ff:ff:ff:ff:ff
    inet 128.97.184.97/24 brd 128.97.184.255 scope global eth0
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 100
    link/ether 00:d0:59:44:5a:ed brd ff:ff:ff:ff:ff:ff

This may be the package that made DHCP stop working -- not sure about it.

UCLA Network characteristics

In early May, I chatted with G.J., who told me Hershey (but not Kinsey) is hooked up to the campus gigabit network. He said a gigabit connection requires a dedicated GHz CPU and is most suited to dual CPU motherboards. It's possible that the copper wire currently going to our rooms is capable of supporting gigabit traffic -- or something approaching it -- but the simple solution would be to give us a 100 megabit/second (mbs) connection, if we didn't already have it. I did some transfer tests and found that indeed we only had 10mps. On 14 May, Carlos mounted a new switch for our three rooms -- 1214, 1220, and 1223 -- in Hershey 3300, apparently the switching room. The switch appears to be 3Com's SuperStack II Switch 3000, see review. I tested the new connection and found that it was good enough for streaming uncompressed digital video (DV format); the image and sound came through without a hiccup.

System names

Naming ideas:

Towns in Umbria Towns in Tuscany
spello arezzo
gubbio certaldo
sigillo chianti
trevi cortona
bevagna greve
montefalco lucca
bibbiena siena
todi volterra
orvieto
spoleto
citerna
pratomagno


The NAPA machines should just have numbers: napa1, napa2 will do fine. Here's a great tourism idea -- rafting and caving on Monte Cucco!

Review of SuperStack II Switch 3000 (1996)

We were impressed with the scaleability of the SuperStack II Switch 3000. The product supports up to 4,000 MAC addresses. Furthermore, its shared-bus design wasn't a constraint. Out of curiosity, we reran the backup test with heavy traffic on all eight ports. The result: the superstack completed the 90MB backup in an average of 13 minutes and 40 seconds. It also has an integrated flow-control algorithm that exerts back pressure on transmitting devices when a port's buffer becomes full. In fact, the Switch 3000 turned in the most impressive overall scaleability score.

There's more to love with the SuperStack II Switch 3000, namely its management. Besides having embedded RMON (remote monitoring) support and integrated support for the 802.1p specification--which allows access arbitration and prioritizing of 802.3 packets--the SuperStack II Switch 3000 is fully manageable using 3Com's Transcend management software. The product also has virtual LAN (vLAN) capabilities, as well as the security of five levels of password protection, if you choose to configure them. In short, the SuperStack II Switch 3000 has the best management capabilities of any switch in the comparison. Source.

Bandwidth measurements on 1 January 2005

root@clitunno:~# pchar www.uio.no
pchar to www.uio.no (129.240.4.44) using UDP/IPv4
Using raw socket input
Packet size increments from 32 to 1500 by 32
46 test(s) per repetition
32 repetition(s) per hop
 0: 128.97.221.35 (clit)
    Partial loss:      0 / 1472 (0%)
    Partial char:      rtt = 0.201161 ms, (b = 0.000146 ms/B), r2 = 0.997504
                       stddev rtt = 0.000892, stddev b = 0.000001
    Partial queueing:  avg = 0.000023 ms (156 bytes)
    Hop char:          rtt = 0.201161 ms, bw = 54642.673793 Kbps
    Hop queueing:      avg = 0.000023 ms (156 bytes)
 1: 128.97.221.1 (eff015-221.sscnet.ucla.edu)
    Partial loss:      0 / 1472 (0%)
    Partial char:      rtt = 0.550535 ms, (b = 0.000309 ms/B), r2 = 0.999040
                       stddev rtt = 0.001168, stddev b = 0.000001
    Partial queueing:  avg = 0.000212 ms (1317 bytes)
    Hop char:          rtt = 0.349375 ms, bw = 49117.177239 Kbps
    Hop queueing:      avg = 0.000189 ms (1161 bytes)
 2: 128.97.235.1 (128.97.235.1)
    Partial loss:      0 / 1472 (0%)
    Partial char:      rtt = 0.681140 ms, (b = 0.000335 ms/B), r2 = 0.998392
                       stddev rtt = 0.001639, stddev b = 0.000002
    Partial queueing:  avg = 0.001801 ms (62199 bytes)
    Hop char:          rtt = 0.130605 ms, bw = 306485.528647 Kbps
    Hop queueing:      avg = 0.001589 ms (60882 bytes)
 3: 169.232.49.105 (sscnet--pubpol.bacbone.ucla.net)
    Partial loss:      0 / 1472 (0%)
    Partial char:      rtt = 0.663900 ms, (b = 0.000349 ms/B), r2 = 0.998417
                       stddev rtt = 0.001692, stddev b = 0.000002
    Partial queueing:  avg = 0.006258 ms (392103 bytes)
    Hop char:          rtt = --.--- ms, bw = 592244.257383 Kbps
    Hop queueing:      avg = 0.004456 ms (329904 bytes)
 4: 169.232.6.69 (pubpol--core.backbone.ucla.net)
    Partial loss:      0 / 1472 (0%)
    Partial char:      rtt = 0.711527 ms, (b = 0.000350 ms/B), r2 = 0.993850
                       stddev rtt = 0.003357, stddev b = 0.000004
    Partial queueing:  avg = 0.001430 ms (392103 bytes)
    Hop char:          rtt = 0.047627 ms, bw = 5594393.531002 Kbps
    Hop queueing:      avg = -0.004828 ms (0 bytes)
 5: 169.232.6.94 (core--border.backbone.ucla.net)
    Partial loss:      0 / 1472 (0%)
    Partial char:      rtt = 4.452108 ms, (b = 0.000388 ms/B), r2 = 0.947093
                       stddev rtt = 0.011171, stddev b = 0.000014
    Partial queueing:  avg = 0.000817 ms (392103 bytes)
    Hop char:          rtt = 3.740582 ms, bw = 212199.161640 Kbps
    Hop queueing:      avg = -0.000613 ms (0 bytes)
 6: 137.164.27.13 (sdsc-hpr1--ucla-egm.cenic.net)
    Partial loss:      1 / 1472 (0%)
    Partial char:      rtt = 7.993203 ms, (b = 0.000406 ms/B), r2 = 0.951326
                       stddev rtt = 0.011177, stddev b = 0.000014
    Partial queueing:  avg = 0.000322 ms (392103 bytes)
    Hop char:          rtt = 3.541095 ms, bw = 454211.620527 Kbps
    Hop queueing:      avg = -0.000495 ms (0 bytes)
 7: 137.164.25.4 (lax-hpr1--sdg-hpr1-10ge-l3.cenic.net)
    Partial loss:      0 / 1472 (0%)
    Partial char:      rtt = 8.167392 ms, (b = 0.000356 ms/B), r2 = 0.998899
                       stddev rtt = 0.001440, stddev b = 0.000002
    Partial queueing:  avg = 0.001022 ms (392103 bytes)
    Hop char:          rtt = 0.174189 ms, bw = --.--- Kbps
    Hop queueing:      avg = 0.000700 ms (0 bytes)
 8: 137.164.25.3 (abilene-LA--hpr-lax-gsr1-10ge.cenic.net)
    Partial loss:      4 / 1472 (0%)
    Partial char:      rtt = 15.640470 ms, (b = 0.000364 ms/B), r2 = 0.999403
                       stddev rtt = 0.001082, stddev b = 0.000001
    Partial queueing:  avg = 0.001131 ms (406588 bytes)
    Hop char:          rtt = 7.473078 ms, bw = 1064096.385545 Kbps
    Hop queueing:      avg = 0.000109 ms (14485 bytes)
 9: 198.32.8.95 (snvang-losang.abilene.ucaid.edu)
    Partial loss:      2 / 1472 (0%)
    Partial char:      rtt = 40.413500 ms, (b = 0.000361 ms/B), r2 = 0.996568
                       stddev rtt = 0.002584, stddev b = 0.000003
    Partial queueing:  avg = 0.002025 ms (406588 bytes)
    Hop char:          rtt = 24.773030 ms, bw = --.--- Kbps
    Hop queueing:      avg = 0.000893 ms (0 bytes)
10: 198.32.8.2 (dnvrng-snvang.abilene.ucaid.edu)
    Partial loss:      1 / 1472 (0%)
    Partial char:      rtt = 51.029446 ms, (b = 0.000355 ms/B), r2 = 0.989223
                       stddev rtt = 0.004508, stddev b = 0.000006
    Partial queueing:  avg = 0.001893 ms (406588 bytes)
    Hop char:          rtt = 10.615946 ms, bw = --.--- Kbps
    Hop queueing:      avg = -0.000131 ms (0 bytes)
11: 198.32.8.14 (kscyng-dnvrng.abilene.ucaid.edu)
    Partial loss:      4 / 1472 (0%)
    Partial char:      rtt = 60.206649 ms, (b = 0.000363 ms/B), r2 = 0.995269
                       stddev rtt = 0.003051, stddev b = 0.000004
    Partial queueing:  avg = 0.002992 ms (532387 bytes)
    Hop char:          rtt = 9.177204 ms, bw = 915939.982368 Kbps
    Hop queueing:      avg = 0.001099 ms (125799 bytes)
12: 198.32.8.80 (iplsng-kscyng.abilene.ucaid.edu)
    Partial loss:      3 / 1472 (0%)
    Partial char:      rtt = 64.023743 ms, (b = 0.000370 ms/B), r2 = 0.998403
                       stddev rtt = 0.001802, stddev b = 0.000002
    Partial queueing:  avg = 0.001548 ms (532387 bytes)
    Hop char:          rtt = 3.817093 ms, bw = 1200416.425691 Kbps
    Hop queueing:      avg = -0.001444 ms (0 bytes)
13: 198.32.8.76 (chinng-iplsng.abilene.ucaid.edu)
    Partial loss:      0 / 1472 (0%)
    Partial char:      rtt = 165.545422 ms, (b = 0.000411 ms/B), r2 = 0.997773
                       stddev rtt = 0.002366, stddev b = 0.000003
    Partial queueing:  avg = 0.003510 ms (579957 bytes)
    Hop char:          rtt = 101.521679 ms, bw = 193991.961865 Kbps
    Hop queueing:      avg = 0.001962 ms (47570 bytes)
14: 62.40.103.165 (abilene.nl1.nl.geant.net)
    Partial loss:      2 / 1472 (0%)
    Partial char:      rtt = 162.881729 ms, (b = 0.000415 ms/B), r2 = 0.997886
                       stddev rtt = 0.002329, stddev b = 0.000003
    Partial queueing:  avg = 0.003887 ms (669954 bytes)
    Hop char:          rtt = --.--- ms, bw = 1907647.058856 Kbps
    Hop queueing:      avg = 0.000377 ms (89997 bytes)
15: 62.40.96.182 (nl.uk1.uk.geant.net)
    Partial loss:      1 / 1472 (0%)
    Partial char:      rtt = 205.553777 ms, (b = -0.019210 ms/B), r2 = 0.022017
                       stddev rtt = 15.595192, stddev b = 0.019301
    Partial queueing:  avg = 0.011696 ms (669954 bytes)
    Hop char:          rtt = 0.000000 ms, bw = 0.000000 Kbps
    Hop queueing:      avg = 0.007809 ms (0 bytes)
16: 62.40.96.125 (uk.se1.se.geant.net)
    Partial loss:      3 / 1472 (0%)
    Partial char:      rtt = 197.937343 ms, (b = 0.000392 ms/B), r2 = 0.997353
                       stddev rtt = 0.002461, stddev b = 0.000003
    Partial queueing:  avg = 0.001792 ms (669954 bytes)
    Hop char:          rtt = --.--- ms, bw = 408.126747 Kbps
    Hop queueing:      avg = -0.009904 ms (0 bytes)
17: 62.40.103.118 (sw-gw.nordu.net)
    Partial loss:      3 / 1472 (0%)
    Partial char:      rtt = 205.352818 ms, (b = 0.000400 ms/B), r2 = 0.998976
                       stddev rtt = 0.001560, stddev b = 0.000002
    Partial queueing:  avg = 0.000459 ms (669954 bytes)
    Hop char:          rtt = 7.415476 ms, bw = 1004121.915898 Kbps
    Hop queueing:      avg = -0.001333 ms (0 bytes)
18: 193.10.68.30 (no-gw.nordu.net)
    Partial loss:      7 / 1472 (0%)
    Partial char:      rtt = 205.316603 ms, (b = 0.000339 ms/B), r2 = 0.867032
                       stddev rtt = 0.016150, stddev b = 0.000020
    Partial queueing:  avg = 0.000284 ms (669954 bytes)
    Hop char:          rtt = --.--- ms, bw = --.--- Kbps
    Hop queueing:      avg = -0.000175 ms (0 bytes)
19: 193.10.68.102 (oslo-gw1.uninett.no)
    Partial loss:      1 / 1472 (0%)
    Partial char:      rtt = 205.412676 ms, (b = 0.000449 ms/B), r2 = 0.995478
                       stddev rtt = 0.003685, stddev b = 0.000005
    Partial queueing:  avg = 0.000577 ms (672607 bytes)
    Hop char:          rtt = 0.096072 ms, bw = 72528.785840 Kbps
    Hop queueing:      avg = 0.000293 ms (2653 bytes)
20: 128.39.3.94 (uio-gw7.uio.no)
    Partial loss:      7 / 1472 (0%)
    Partial char:      rtt = 212.657654 ms, (b = -0.017414 ms/B), r2 = 0.018378
                       stddev rtt = 16.547269, stddev b = 0.019187
    Partial queueing:  avg = 0.008068 ms (672607 bytes)
    Hop char:          rtt = 0.000000 ms, bw = 0.000000 Kbps
    Hop queueing:      avg = 0.007491 ms (0 bytes)
21: 129.240.4.44 (www.uio.no)
    Path length:       21 hops
    Path char:         rtt = 212.657654 ms r2 = 0.018378
    Path bottleneck:   408.126747 Kbps
    Path pipe:         10848 bytes
    Path queueing:     average = 0.008068 ms (672607 bytes)
    Start time:        Sat Jan  1 00:59:55 2005
    End time:          Sat Jan  1 03:55:46 2005



 

top