Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vyos router not working #173

Open
Narratot opened this issue Feb 14, 2024 · 7 comments
Open

vyos router not working #173

Narratot opened this issue Feb 14, 2024 · 7 comments

Comments

@Narratot
Copy link

I an using the provided packer config for generating the vyos image. During the startup process of the vyos guest I get the information that the startup of the phenix processes failed. Furthermore it is currently not loading the router configuration.

@activeshadow
Copy link
Collaborator

activeshadow commented Feb 26, 2024

@Narratot can you provide us with the specific information you're getting about the phenix processes failing? Or at least some details on how we can try to reproduce what you're seeing?

I will admit I have not used or tested the vyos capabilities in phēnix in quite a while so I'm not surprised there's some issues arising. I just need more detail on what they are or how you're generating them so I can reproduce and come up with a fix.

@Narratot
Copy link
Author

Narratot commented Feb 29, 2024

I can build the vyos image successfully. During vyos startup I get the following error.
Screenshot from 2024-02-29 09-33-19

The Error is logged with the following information:

Screenshot from 2024-02-29 11-29-25
Screenshot from 2024-02-29 11-29-35

This also leads to the planned configuration in the vrouter app not getting loaded by the router.

apiVersion: phenix.sandia.gov/v2
kind: Scenario
metadata:
  name: helloworld-router
  created: '2024-02-14T10:26:19+01:00'
  updated: '2024-02-29T10:57:18+01:00'
  annotations:
    topology: helloworld-router
spec:
  apps:
    - assetDir: /phenix/topologies/example-topo/assets
      hosts:
        - hostname: router
          metadata:
            dhcp:
              - defaultRoute: 192.168.1.254
                dnsServers:
                  - 192.168.1.254
                listenAddress: 192.168.1.254
                ranges:
                  - highAddress: 192.168.1.20
                    lowAddress: 192.168.1.10
      name: vrouter

Which can also be seen within the minimega view, as there are no IPs assigned to the VMs. This changes when I manually configure the vyos router.

@activeshadow
Copy link
Collaborator

Hi @Narratot can you also post your topology file please?

@Narratot
Copy link
Author

Narratot commented Mar 1, 2024

@activeshadow sure.

apiVersion: phenix.sandia.gov/v1
kind: Topology
metadata:
  name: helloworld-router
  created: '2024-02-14T10:25:11+01:00'
  updated: '2024-03-01T09:34:34+01:00'
spec:
  nodes:
    - general:
        description: Test-Win
        hostname: Test
      hardware:
        drives:
          - image: Windows-10.qc2
            inject_partition: 2
        memory: 16000
        os_type: windows
        vcpus: 8
      network:
        interfaces:
          - address: 192.168.1.11
            gateway: 192.168.1.254
            mask: 24
            name: if0
            proto: ospf
            type: ethernet
            vlan: SW1
      type: VirtualMachine
    - general:
        hostname: test2
      hardware:
        drives:
          - image: kali.qc2
        os_type: linux
      network:
        interfaces:
          - address: 192.168.1.12
            gateway: 192.168.1.254
            mask: 24
            name: if0
            proto: ospf
            type: ethernet
            vlan: SW1
      type: VirtualMachine
    - general:
        hostname: router
      hardware:
        drives:
          - image: vyos.qc2
        os_type: vyos
      network:
        interfaces:
          - address: 192.168.1.1
            mask: 30
            name: SW1
            proto: ospf
            type: ethernet
            vlan: SW1
        ospf:
          areas:
            - area_id: 0
              area_networks:
                - network: 192.168.1.1/24
          dead_interval: 60
          hello_interval: 10
          retrans_interval: 5
          router_id: 192.168.1.1
      type: Router

@Narratot
Copy link
Author

Narratot commented Mar 21, 2024

Update: in src/go/app/vrouter.go specifies

		if isVyos {
			vyattaConfig = "/boot/vyos/rw/config/config.boot"
		}

But from my understanding the config can be found in /config/config.boot. Furthermore the configuration is passed to the vyos router as a chain of cli commands.

I propose to use the cloudconfig implemented to vyos for the router configuration instead of passing the configuration through an individual set of CLI commands.

@activeshadow
Copy link
Collaborator

activeshadow commented Mar 21, 2024

The config is injected into vyatta or vyos instances in the pre-start stage with the destination file location being different based on vyatta or vyos.

A chain of CLI commands are sent to minirouter instances and then committed to be applied in the post-start stage.

I'm open to the use of cloudconfig capabilities in vyos if you want to provide a working PR we can review and test.

@Narratot
Copy link
Author

@activeshadow Thx for the explanation, i try to have a look at it. Could you reproduce the issue of the failed phenix startup services?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants