Re: [Simh] Ubuntu 17.10 and TAP device for SIMH

2017-12-10 Thread Jordi Guillaumes Pons


> On 9 Dec 2017, at 21:44, Tim Stark  wrote:
> 
> Folks,
>  
> Since I upgraded to Ubuntu 17.10 (now GNOME shell), I had some problems with 
> networking setup. 
>  
> I finally resolved a problem with TAP device because ifconfig display format 
> changed.  I updated my shell script to create TAP0 device for SIMH use.
>  
> With /etc/network/interfaces, I still have some problems with auto br0 or 
> tap0 setup.   Does anyone have good TAP0 setup for that interfaces?
>  
> I successfully installed SIMH 4.0 beta and noticed that new VDE facility 
> (virtual distributed ethernet). That is very new to me.
>  
> Does anyone have any experience with VDE?  VDE vs TAP?
>  
> For 4K monitor users, login with Xorg and use ‘xrandr –output DP-1 –scale 
> 0.5x0.5’.

Hello Tim,

All my simulated VAXen and PDP11s use VDE since it was available. I’m also 
using VDE for KLH10 (the “current” source tree also supports it).

Theoretically, VDE puts more load onto the host OS and the network throughput 
is somehow lower, but in my opinion the flexibility it provides offsets those 
inconvenients. For instance, I can “plug in” the VDE virtual switch from my 
laptop using vde_cryptcab, so I can have “mobile DECNET” :)

As an example, this is the /etc/network/interfaces of one of my machines (a 
Cubietruck ARM SoC running ARMbian, a Debian derivative):

auto lo eth0
iface lo inet loopback
#iface eth0 inet dhcp

auto tap0
 iface tap0 inet manual
 vde2-switch -t tap0 -n 16 -s /tmp/vde.ctl -M /tmp/vde.mgmt -m 666 
--mgmtmode 666
   
auto br0
iface br0 inet static
address 192.168.0.12
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.128
dns-nameservers 192.168.0.128 192.168.0.12
bridge-ports eth0 tap0
upsysctl net.ipv4.conf.br0.proxy_arp=1
upip link set dev $IFACE promisc on
down  ip link set dev $IFACE promisc off

This setup makes an ethernet bridge with static IP address, plugs in the real 
ethernet interface and a tap one, and creates a vde virtual switch plugs to 
tap0, so to the bridge. Then I simply attach the SIMH simulated NICs to 
/tmp/vde.ctl and have all of them visible in my network (no routing setup 
needed in the hosts).







___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

[Simh] Ubuntu 17.10 and TAP device for SIMH

2017-12-09 Thread Tim Stark
Folks,

 

Since I upgraded to Ubuntu 17.10 (now GNOME shell), I had some problems with
networking setup. 

 

I finally resolved a problem with TAP device because ifconfig display format
changed.  I updated my shell script to create TAP0 device for SIMH use.

 

With /etc/network/interfaces, I still have some problems with auto br0 or
tap0 setup.   Does anyone have good TAP0 setup for that interfaces?

 

I successfully installed SIMH 4.0 beta and noticed that new VDE facility
(virtual distributed ethernet). That is very new to me.

 

Does anyone have any experience with VDE?  VDE vs TAP?

 

For 4K monitor users, login with Xorg and use 'xrandr -output DP-1 -scale
0.5x0.5'.

 

Thanks,

Tim

 

Here is my new shell script for SIMH's TAP device. 

 

#!/bin/sh

HOSTIP=`/sbin/ifconfig eno1 | grep "inet " | gawk -- '{ print $2 }'`

HOSTNM=`/sbin/ifconfig eno1 | grep "netmask" | gawk -- '{ print $4 }'`

HOSTBR=`/sbin/ifconfig eno1 | grep "broadcast" | gawk -- '{ print $6 }'`

HOSTGW=`/sbin/route -n | grep ^0.0.0.0 | gawk -- '{ print $2 }' | head -n 1`

#

#echo "Host Addr  ${HOSTIP}"

#echo "Netmask${HOSTNM}"

#echo "Broadcast  ${HOSTBR}"

#echo "Default GW ${HOSTGW}"

#

/usr/bin/tunctl -t tap0 -u sword7

/sbin/ifconfig tap0 up

#

# Now convert eth0 to a bridge and bridge it with the TAP interface

/sbin/brctl addbr br0

/sbin/brctl addif br0 eno1

/sbin/brctl setfd br0 0

/sbin/ifconfig eno1 0.0.0.0

/sbin/ifconfig br0 $HOSTIP netmask $HOSTNM broadcast $HOSTBR up

# set the default route to the br0 interface

/sbin/route add -net 0.0.0.0/0 gw $HOSTGW

# bridge in the tap device

/sbin/brctl addif br0 tap0

/sbin/ifconfig tap0 0.0.0.0

___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh