Re: [Simh] running on Debian

2016-03-04 Thread Peter Svensson
Hi, 

I am a networking guy and the Linux way seems more natural to me.  First there 
is a bridge. That bridge bridges some interfaces, one of which may be the local 
os. 

Nowadays it is all VMs anyway,  and all interfaces are bridges to connect 
/disconnect the VMs on the fly. Same as simh.

I have mostly used the RH and derivatives and never found the bridges a problem 
with the standard tools. 

Anyway,  use whatever is easy for you among gets the job done.  

Peter

On March 4, 2016 7:41:19 PM GMT+01:00, Rhialto  wrote:
>On Fri 04 Mar 2016 at 18:10:18 +0100, Peter Svensson wrote:
>> Bridged virtual interfaces is what you use for other virtual
>machines,
>> why not simh?
>
>Linux has the EXTREME annoyance that once you connect an interface to a
>bridge, it stops being usable as an "internet endpoint". In other
>words,
>your internet connection is suddenly broken. That means that to fix it,
>you have to transfer all your settings to the bridge. That is IPv4
>address, IPv6 address, firewall rules that may apply, the lot.
>
>That in turn makes bridges completely unsuitable for casual use. If you
>want to use them, better set up your system permanently with a bridge,
>so at least the casually attaching a simulator to it is doable.
>(And doing that confuses NetworkManager...)
>
>See
>http://www.microhowto.info/troubleshooting/troubleshooting_ethernet_bridging_on_linux.html#idp87072
>
>Whoever thought this idiotic setup made sense, I don't know. I do know
>that the BSDs work much more sensibly.
>
>-Olaf.
>-- 
>___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
>\X/ rhialto/at/xs4all.nl-- 'this bath is too hot.'
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] running on Debian

2016-03-04 Thread Paul Koning

> On Mar 4, 2016, at 1:41 PM, Rhialto  wrote:
> 
> On Fri 04 Mar 2016 at 18:10:18 +0100, Peter Svensson wrote:
>> Bridged virtual interfaces is what you use for other virtual machines,
>> why not simh?
> 
> Linux has the EXTREME annoyance that once you connect an interface to a
> bridge, it stops being usable as an "internet endpoint". In other words,
> your internet connection is suddenly broken. That means that to fix it,
> you have to transfer all your settings to the bridge. That is IPv4
> address, IPv6 address, firewall rules that may apply, the lot.
> 
> That in turn makes bridges completely unsuitable for casual use. If you
> want to use them, better set up your system permanently with a bridge,
> so at least the casually attaching a simulator to it is doable.
> (And doing that confuses NetworkManager...)

Yes, that's quite an amazing design error that cost me the better part of a day 
to figure out.  And as a result, I do just as you say -- keep the bridge as a 
permanent part of the config.

paul

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

Re: [Simh] running on Debian

2016-03-04 Thread Rhialto
On Fri 04 Mar 2016 at 18:10:18 +0100, Peter Svensson wrote:
> Bridged virtual interfaces is what you use for other virtual machines,
> why not simh?

Linux has the EXTREME annoyance that once you connect an interface to a
bridge, it stops being usable as an "internet endpoint". In other words,
your internet connection is suddenly broken. That means that to fix it,
you have to transfer all your settings to the bridge. That is IPv4
address, IPv6 address, firewall rules that may apply, the lot.

That in turn makes bridges completely unsuitable for casual use. If you
want to use them, better set up your system permanently with a bridge,
so at least the casually attaching a simulator to it is doable.
(And doing that confuses NetworkManager...)

See
http://www.microhowto.info/troubleshooting/troubleshooting_ethernet_bridging_on_linux.html#idp87072

Whoever thought this idiotic setup made sense, I don't know. I do know
that the BSDs work much more sensibly.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl-- 'this bath is too hot.'


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

Re: [Simh] running on Debian

2016-03-04 Thread Johnny Billquist
Wait, so you think it's easier to have to setup the bridge, and all 
associated activities to that, and then setup the interface in simh, 
compared to just setup the interface in simh?


How do you figure that?

Johnny

On 2016-03-04 18:10, Peter Svensson wrote:

I have always found the tap+bridge style easier than pcap. It works just
as you would expect a separate computer to work. With pcap I was never
sure what happened when talking to the local computer.

Bridged virtual interfaces is what you use for other virtual machines,
why not simh?

Peter

On March 4, 2016 4:46:50 PM GMT+01:00, Mark Pizzolato
 wrote:

Joshua,

PLEASE consider Scott's configuration as advanced configuration details
that you may want to deploy when you are polishing up what you're putting
together.  DO NOT start with this stuff.  Start with basic pcap networking
and migrate your existing system environment to a simh instance and
get that completely working before considering this stuff.  In other words,
learn to walk before you try running!

- Mark

On Friday, March 4, 2016 at 7:15 AM, Scott Bailey wrote:

Sigh. No matter how many times I re-read before sending, it
doesn't matter.
Let me expand on this:

1. in /etc/rc.local, I have this snippet to make sure the
network tap
device I need is ready to go:

if ! ip link show tap0 ; then
tunctl -t tap0
ifconfig tap0 up
brctl addif br0 tap0
fi

Here, tap0 is the device I am setting up for my virtual VAX
and br0 is
my physical interface. (As a reminder, going through this
rather than
putting simh directly on the physical interface is what
enables your
virtual VAX and your Debian host to talk to each other.)


Actually, of course, br0 is a bridge device that lets me connect
tap0 to my
physical interface. I have this in /etc/network/interfaces:

# The bridge interface

auto br0
iface br0 inet static
bridge_ports eth1
address X.Y.Z.3
broadcast X.Y.Z.255
netmask 255.255.255.0 
gateway X.Y.Z.1

That is, if you current specify a device (like eth1) directly,
transfer its settings to
br0 and attach the original NIC as a bridge port. [Or change
instances of "eth1"
to "br0", then add the "bridge_ports eth1" line.] Then continue
as I originally
described...

Cheers,
Scott



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



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



--
Johnny Billquist  || "I'm on a bus
  ||  on a psychedelic trip
email: b...@softjar.se ||  Reading murder books
pdp is alive! ||  tryin' to stay hip" - B. Idol
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] running on Debian

2016-03-04 Thread Mark Pizzolato
> I have always found the tap+bridge style easier than pcap. It works just
> as you would expect a separate computer to work.

Once you’ve got the network structure setup the simh commands are certainly 
simple and it works (at least for Wired Ethernet).

> With pcap I was never sure what happened when talking to the local computer.

Joshua is just getting started with simh AND the goals he’s described don’t 
actually include communicating between the host system and other systems on the 
LAN.

> Bridged virtual interfaces is what you use for other virtual machines,
> why not simh?

The hard part, is changing the network configuration of the host computer.  
This is a set of activities which are certainly NOT where someone new to this 
process should start until they’ve already go a working simulator system.

Other virtual machine environments have network components which are 
‘installed’ when the virtual machine application is installed and this 
installation process handles the messy part of changing the network setup.


-  Mark



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

Re: [Simh] running on Debian

2016-03-04 Thread Peter Svensson
I have always found the tap+bridge style easier than pcap. It works just as you 
would expect a separate computer to work.  With pcap I was never sure what 
happened when talking to the local computer.

Bridged virtual interfaces is what you use for other virtual machines,  why not 
simh?

Peter 

On March 4, 2016 4:46:50 PM GMT+01:00, Mark Pizzolato  wrote:
>Joshua,
>
>PLEASE consider Scott's configuration as advanced configuration details
>
>that you may want to deploy when you are polishing up what you're
>putting 
>together.  DO NOT start with this stuff.  Start with basic pcap
>networking
>and migrate your existing system environment to a simh instance and
>get that completely working before considering this stuff.  In other
>words, 
>learn to walk before you try running!
>
>- Mark
>
>On Friday, March 4, 2016 at 7:15 AM, Scott Bailey wrote:
>> Sigh. No matter how many times I re-read before sending, it doesn't
>matter.
>> Let me expand on this:
>> 
>> >1. in /etc/rc.local, I have this snippet to make sure the network
>tap
>> >device I need is ready to go:
>> >
>> >if ! ip link show tap0 ; then
>> >  tunctl -t tap0
>> >  ifconfig tap0 up
>> >  brctl addif br0 tap0
>> >fi
>> >
>> >Here, tap0 is the device I am setting up for my virtual VAX and br0
>is
>> >my physical interface. (As a reminder, going through this rather
>than
>> >putting simh directly on the physical interface is what enables your
>> >virtual VAX and your Debian host to talk to each other.)
>> 
>> Actually, of course, br0 is a bridge device that lets me connect tap0
>to my
>> physical interface. I have this in /etc/network/interfaces:
>> 
>> # The bridge interface
>> 
>> auto br0
>> iface br0 inet static
>> bridge_ports eth1
>> address X.Y.Z.3
>> broadcast X.Y.Z.255
>> netmask 255.255.255.0
>> gateway X.Y.Z.1
>> 
>> That is, if you current specify a device (like eth1) directly,
>transfer its settings to
>> br0 and attach the original NIC as a bridge port. [Or change
>instances of "eth1"
>> to "br0", then add the "bridge_ports eth1" line.] Then continue as I
>originally
>> described...
>> 
>> Cheers,
>> Scott
>___
>Simh mailing list
>Simh@trailing-edge.com
>http://mailman.trailing-edge.com/mailman/listinfo/simh
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] running on Debian

2016-03-04 Thread Mark Pizzolato
Joshua,

PLEASE consider Scott's configuration as advanced configuration details 
that you may want to deploy when you are polishing up what you're putting 
together.  DO NOT start with this stuff.  Start with basic pcap networking
and migrate your existing system environment to a simh instance and
get that completely working before considering this stuff.  In other words, 
learn to walk before you try running!

- Mark

On Friday, March 4, 2016 at 7:15 AM, Scott Bailey wrote:
> Sigh. No matter how many times I re-read before sending, it doesn't matter.
> Let me expand on this:
> 
> >1. in /etc/rc.local, I have this snippet to make sure the network tap
> >device I need is ready to go:
> >
> >if ! ip link show tap0 ; then
> >  tunctl -t tap0
> >  ifconfig tap0 up
> >  brctl addif br0 tap0
> >fi
> >
> >Here, tap0 is the device I am setting up for my virtual VAX and br0 is
> >my physical interface. (As a reminder, going through this rather than
> >putting simh directly on the physical interface is what enables your
> >virtual VAX and your Debian host to talk to each other.)
> 
> Actually, of course, br0 is a bridge device that lets me connect tap0 to my
> physical interface. I have this in /etc/network/interfaces:
> 
> # The bridge interface
> 
> auto br0
> iface br0 inet static
> bridge_ports eth1
> address X.Y.Z.3
> broadcast X.Y.Z.255
> netmask 255.255.255.0
> gateway X.Y.Z.1
> 
> That is, if you current specify a device (like eth1) directly, transfer its 
> settings to
> br0 and attach the original NIC as a bridge port. [Or change instances of 
> "eth1"
> to "br0", then add the "bridge_ports eth1" line.] Then continue as I 
> originally
> described...
> 
> Cheers,
> Scott
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] running on Debian

2016-03-04 Thread Bailey, Scott
Sigh. No matter how many times I re-read before sending, it doesn't matter. 
Let me expand on this:

>1. in /etc/rc.local, I have this snippet to make sure the network tap device 
>I
>need is ready to go:
>
>if ! ip link show tap0 ; then
>  tunctl -t tap0
>  ifconfig tap0 up
>  brctl addif br0 tap0
>fi
>
>Here, tap0 is the device I am setting up for my virtual VAX and br0 is my
>physical interface. (As a reminder, going through this rather than putting
>simh directly on the physical interface is what enables your virtual VAX and
>your Debian host to talk to each other.)

Actually, of course, br0 is a bridge device that lets me connect tap0 to my 
physical interface. I have this in /etc/network/interfaces:

# The bridge interface

auto br0
iface br0 inet static
bridge_ports eth1
address X.Y.Z.3
broadcast X.Y.Z.255
netmask 255.255.255.0
gateway X.Y.Z.1

That is, if you current specify a device (like eth1) directly, transfer its 
settings to br0 and attach the original NIC as a bridge port. [Or change 
instances of "eth1" to "br0", then add the "bridge_ports eth1" line.] Then 
continue as I originally described...

Cheers,
Scott


smime.p7s
Description: S/MIME cryptographic signature
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Re: [Simh] running on Debian

2016-03-04 Thread Bailey, Scott
I agree with everything Mark said. (Particularly installing libpcap-dev...)

I'm running a simh VAX 8650 on Debian stretch (although nothing has changed 
appreciably of late except maybe systemd); here are some additional 
operational notes that you might or might not find useful -- these are about 
using the executable once you've built it successfully.

1. in /etc/rc.local, I have this snippet to make sure the network tap device I 
need is ready to go:

if ! ip link show tap0 ; then
  tunctl -t tap0
  ifconfig tap0 up
  brctl addif br0 tap0
fi

Here, tap0 is the device I am setting up for my virtual VAX and br0 is my 
physical interface. (As a reminder, going through this rather than putting 
simh directly on the physical interface is what enables your virtual VAX and 
your Debian host to talk to each other.) Run this manually the first time 
(since of course it wasn't there when your system last booted, lol).

2. In my vax8600.ini file, I attach the network device like so:

set xu enable
set xu type=delua
attach xu tap:tap0

Obviously (?) if you're using an emulated Q-bus system, you'd use xq instead 
of xu (and I believe the set xu type can just be deleted).

3. I do this to my simh vax8600 executable (each time I build a new one) so 
that I can run it as a non-root user and still bind to the network device:

sudo /sbin/setcap cap_net_raw,cap_net_admin=eip /vax/vax8600

4. I use a script called "screen-vax" to start the VAX with the console 
attached to a screen session, so I generally can ignore it but have the option 
of attaching (via "screen -dr") when I actually want to do something on the 
console -- like enter a new VMS license PAK. ;-)

#!/bin/sh
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
cd /vax

# Start the simulator...

if [ "$1" = service ] ; then
  # "detach" process but do not fork (so systemd can track it)
  FLAG="-D"
else
  # detach and fork so we can go on about our business
  FLAG="-d"
fi

screen $FLAG -mh 500 /vax/vax8600

echo "Simulator terminated."
exit 0

5. If you want systemd to start your VAX automatically when your host boots, 
you can use something like this, which sits in 
/etc/systemd/system/oasis.service: (OASIS:: is the emulated VAX 8650)

[Unit]
Description=Emulated VAX OASIS::
After=network.target auditd.service
Requires=network.target
RequiresMountsFor=/vax

[Service]
Type=simple
User=sbailey
ExecStart=/vax/screen-vax service
#ExecStop=
KillMode=process

[Install]
WantedBy=multi-user.target
Alias=simh.service

A few notes about this:

- I can't remember why I put auditd.service into the "After=" directive;
- Don't forget to do "systemctl daemon-reload" after creating or editing this 
file;
- This does *NOT* do a clean shutdown of the system; luckily VMS is very 
forgiving... ;-)

Happy computing,
Scott


smime.p7s
Description: S/MIME cryptographic signature
___
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh