[Simh] Networking Tricks...

Gregg Levine gregg.drwho8 at gmail.com
Mon Oct 4 18:23:45 EDT 2010


On Mon, Oct 4, 2010 at 6:11 PM, David Holland <david.w.holland at gmail.com> wrote:
> I stumbled across a vaguely useful trick to do my SIMH network, that,
> doesn't involve a 2nd physical network interface, nor does it involve
> a 2nd level user-land process. (aka: taptap)
>
> # ip link add name veth0 type veth peer name veth1
> # ifconfig veth0 up
> # ifconfig veth1 up
>
> And the following in VAX.INI
>
> ; Attach Ethernet to a network interface
> set xq mac=08-00-2B-AA-BB-CC
> attach xq veth1
>
> Packets written to veth1, show up on veth0, and vice versa. (aka:
> taptap, except kernel level, and accordingly no user/kernel context
> switches.)
>
> Apparently its a device type, called VETH, added in newer kernels.
> http://lwn.net/Articles/232688/
> I found them on my Fedora 13 and Ubuntu 9.10 images, but the devices
> don't exist in my Centos 5.5 image.
>
> You can then do the "usual" bridging tricks to attach veth0 to the
> local LAN, with a single interface.
>
> # brctl show br0
> bridge name     bridge id               STP enabled     interfaces
> br0             8000.00044b155730       no              eth0
>                                                        veth0
>
> # ifconfig br0
> br0       Link encap:Ethernet  HWaddr 00:04:4b:15:57:30
>          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
>          inet6 addr: fe80::204:4bff:fe15:5730/64 Scope:Link
>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>          RX packets:1123428 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:678405 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:0
>          RX bytes:1201987824 (1.2 GB)  TX bytes:3680295206 (3.6 GB)
>
> # ifconfig eth0
> eth0      Link encap:Ethernet  HWaddr 00:04:4b:15:57:30
>          inet6 addr: fe80::204:4bff:fe15:5730/64 Scope:Link
>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>          RX packets:3444300 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:1995726 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:1000
>          RX bytes:4148911351 (4.1 GB)  TX bytes:2278845621 (2.2 GB)
>          Interrupt:26 Base address:0x6000
>
> # ifconfig veth0
> veth0     Link encap:Ethernet  HWaddr ca:5d:97:4d:c2:f6
>          inet6 addr: fe80::c85d:97ff:fe4d:c2f6/64 Scope:Link
>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>          RX packets:536 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:524 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:1000
>          RX bytes:285375 (285.3 KB)  TX bytes:45167 (45.1 KB)
>
> # ifconfig veth1
> veth1     Link encap:Ethernet  HWaddr 2a:e0:6c:f4:47:af
>          inet6 addr: fe80::28e0:6cff:fef4:47af/64 Scope:Link
>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>          RX packets:527 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:548 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:1000
>          RX bytes:45305 (45.3 KB)  TX bytes:293468 (293.4 KB)
>
> [uholld1 at quest ~]$ ping defeat
> PING defeat.localdomain.home (192.168.0.201) 56(84) bytes of data.
> 64 bytes from defeat.localdomain.home (192.168.0.201): icmp_seq=0
> ttl=64 time=10.5 ms
>
> (You'll have to trust me that 'quest' is a completely separate
> (virtual) Linux image, and 'defeat' is the name of the VAX)
>
> One other bit of trivia is custom interface names:
>
> # ip link add name VAXeth0 type veth peer name VAXeth1
>
> Works as well.
>
> Hopefully someone will find this of vague use......
>
> David
> _______________________________________________
> Simh mailing list
> Simh at trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh
>

Hello!
How new? I mean, David, what kernel version are we talking about here?
For example, my (new to here) P4 based system, running Slackware-13.1
reports this from uname-a, "root at tomswift3:/# uname -a
Linux tomswift3 2.6.33.4-smp #2 SMP Wed May 12 22:47:36 CDT 2010 i686
Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux"

Ideally this is almost useful to me. I had hoped to have online a
simulated VAX running, VMS, by now, talking to an activity that we've
got running via elsewhere, but that also presupposes that I can find
my copy of VMS......

The other problem is sorting out how big a disk image would be created
by SIMH/VAX for VMS.....
-----
Gregg C Levine gregg.drwho8 at gmail.com
"This signature fought the Time Wars, time and again."



More information about the Simh mailing list