Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
git-virl-hs-fulda
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Rieger
git-virl-hs-fulda
Commits
0ce8c55d
Commit
0ce8c55d
authored
9 years ago
by
Sebastian Rieger
Browse files
Options
Downloads
Patches
Plain Diff
added default route to servers
parent
19954abe
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
GIT-VIRL-HS-Fulda/Experiments/smb.virl
+112
-110
112 additions, 110 deletions
GIT-VIRL-HS-Fulda/Experiments/smb.virl
with
112 additions
and
110 deletions
GIT-VIRL-HS-Fulda/Experiments/smb.virl
+
112
−
110
View file @
0ce8c55d
...
@@ -527,122 +527,124 @@ end
...
@@ -527,122 +527,124 @@ end
</node>
</node>
<node
name=
"server-1"
type=
"SIMPLE"
subtype=
"server"
location=
"251,336"
>
<node
name=
"server-1"
type=
"SIMPLE"
subtype=
"server"
location=
"251,336"
>
<extensions>
<extensions>
<entry
key=
"config"
type=
"String"
>
#cloud-config
<entry
key=
"config"
type=
"String"
>
#cloud-config

bootcmd:
bootcmd:

- ln -s -t /etc/rc.d /etc/rc.local
- ln -s -t /etc/rc.d /etc/rc.local

hostname: server-1
hostname: server-1

manage_etc_hosts: true
manage_etc_hosts: true

runcmd:
runcmd:

- start ttyS0
- start ttyS0

- systemctl start getty@ttyS0.service
- systemctl start getty@ttyS0.service

- systemctl start rc-local
- systemctl start rc-local

- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config

- echo "UseDNS no"
>>
/etc/ssh/sshd_config
- echo "UseDNS no"
>>
/etc/ssh/sshd_config

- service ssh restart
- service ssh restart

- service sshd restart
- service sshd restart

users:
users:

- default
- default

- gecos: User configured by VIRL Configuration Engine 0.18.9
- gecos: User configured by VIRL Configuration Engine 0.18.9

lock-passwd: false
lock-passwd: false

name: cisco
name: cisco

plain-text-passwd: cisco
plain-text-passwd: cisco

shell: /bin/bash
shell: /bin/bash

ssh-authorized-keys:
ssh-authorized-keys:

- VIRL-USER-SSH-PUBLIC-KEY
- VIRL-USER-SSH-PUBLIC-KEY

sudo: ALL=(ALL) ALL
sudo: ALL=(ALL) ALL

write_files:
write_files:

- path: /etc/init/ttyS0.conf
- path: /etc/init/ttyS0.conf

owner: root:root
owner: root:root

content: |
content: |

# ttyS0 - getty
# ttyS0 - getty

# This service maintains a getty on ttyS0 from the point the system is
# This service maintains a getty on ttyS0 from the point the system is

# started until it is shut down again.
# started until it is shut down again.

start on stopped rc or RUNLEVEL=[12345]
start on stopped rc or RUNLEVEL=[12345]

stop on runlevel [!12345]
stop on runlevel [!12345]

respawn
respawn

exec /sbin/getty -L 115200 ttyS0 vt102
exec /sbin/getty -L 115200 ttyS0 vt102

permissions: '0644'
permissions: '0644'

- path: /etc/systemd/system/dhclient@.service
- path: /etc/systemd/system/dhclient@.service

content: |
content: |

[Unit]
[Unit]

Description=Run dhclient on %i interface
Description=Run dhclient on %i interface

After=network.target
After=network.target

[Service]
[Service]

Type=oneshot
Type=oneshot

ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease

RemainAfterExit=yes
RemainAfterExit=yes

owner: root:root
owner: root:root

permissions: '0644'
permissions: '0644'

- path: /etc/rc.local
- path: /etc/rc.local

owner: root:root
owner: root:root

permissions: '0755'
permissions: '0755'

content: |-
content: |-

#!/bin/sh -e
#!/bin/sh -e

ifconfig eth1 up 10.0.0.2 netmask 255.255.0.0
ifconfig eth1 up 10.0.0.2 netmask 255.255.0.0

route add -host 192.168.0.1 gw 10.0.0.1 dev eth1
route add -host 192.168.0.1 gw 10.0.0.1 dev eth1

route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1
route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1

exit 0
route add default gw 10.0.0.1

exit 0

</entry>
</entry>
</extensions>
</extensions>
<interface
id=
"0"
name=
"eth1"
ipv4=
"10.0.0.2"
netPrefixLenV4=
"16"
/>
<interface
id=
"0"
name=
"eth1"
ipv4=
"10.0.0.2"
netPrefixLenV4=
"16"
/>
</node>
</node>
<node
name=
"server-2"
type=
"SIMPLE"
subtype=
"server"
location=
"517,336"
>
<node
name=
"server-2"
type=
"SIMPLE"
subtype=
"server"
location=
"517,336"
>
<extensions>
<extensions>
<entry
key=
"config"
type=
"String"
>
#cloud-config
<entry
key=
"config"
type=
"String"
>
#cloud-config

bootcmd:
bootcmd:

- ln -s -t /etc/rc.d /etc/rc.local
- ln -s -t /etc/rc.d /etc/rc.local

hostname: server-2
hostname: server-2

manage_etc_hosts: true
manage_etc_hosts: true

runcmd:
runcmd:

- start ttyS0
- start ttyS0

- systemctl start getty@ttyS0.service
- systemctl start getty@ttyS0.service

- systemctl start rc-local
- systemctl start rc-local

- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config
- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config

- echo "UseDNS no"
>>
/etc/ssh/sshd_config
- echo "UseDNS no"
>>
/etc/ssh/sshd_config

- service ssh restart
- service ssh restart

- service sshd restart
- service sshd restart

users:
users:

- default
- default

- gecos: User configured by VIRL Configuration Engine 0.18.9
- gecos: User configured by VIRL Configuration Engine 0.18.9

lock-passwd: false
lock-passwd: false

name: cisco
name: cisco

plain-text-passwd: cisco
plain-text-passwd: cisco

shell: /bin/bash
shell: /bin/bash

ssh-authorized-keys:
ssh-authorized-keys:

- VIRL-USER-SSH-PUBLIC-KEY
- VIRL-USER-SSH-PUBLIC-KEY

sudo: ALL=(ALL) ALL
sudo: ALL=(ALL) ALL

write_files:
write_files:

- path: /etc/init/ttyS0.conf
- path: /etc/init/ttyS0.conf

owner: root:root
owner: root:root

content: |
content: |

# ttyS0 - getty
# ttyS0 - getty

# This service maintains a getty on ttyS0 from the point the system is
# This service maintains a getty on ttyS0 from the point the system is

# started until it is shut down again.
# started until it is shut down again.

start on stopped rc or RUNLEVEL=[12345]
start on stopped rc or RUNLEVEL=[12345]

stop on runlevel [!12345]
stop on runlevel [!12345]

respawn
respawn

exec /sbin/getty -L 115200 ttyS0 vt102
exec /sbin/getty -L 115200 ttyS0 vt102

permissions: '0644'
permissions: '0644'

- path: /etc/systemd/system/dhclient@.service
- path: /etc/systemd/system/dhclient@.service

content: |
content: |

[Unit]
[Unit]

Description=Run dhclient on %i interface
Description=Run dhclient on %i interface

After=network.target
After=network.target

[Service]
[Service]

Type=oneshot
Type=oneshot

ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease

RemainAfterExit=yes
RemainAfterExit=yes

owner: root:root
owner: root:root

permissions: '0644'
permissions: '0644'

- path: /etc/rc.local
- path: /etc/rc.local

owner: root:root
owner: root:root

permissions: '0755'
permissions: '0755'

content: |-
content: |-

#!/bin/sh -e
#!/bin/sh -e

ifconfig eth1 up 10.0.0.3 netmask 255.255.0.0
ifconfig eth1 up 10.0.0.3 netmask 255.255.0.0

route add -host 192.168.0.1 gw 10.0.0.1 dev eth1
route add -host 192.168.0.1 gw 10.0.0.1 dev eth1

route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1
route add -net 10.0.0.0/16 gw 10.0.0.1 dev eth1

exit 0
route add default gw 10.0.0.1

exit 0

</entry>
</entry>
</extensions>
</extensions>
<interface
id=
"0"
name=
"eth1"
ipv4=
"10.0.0.3"
netPrefixLenV4=
"16"
/>
<interface
id=
"0"
name=
"eth1"
ipv4=
"10.0.0.3"
netPrefixLenV4=
"16"
/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment