Skip to content

Commit

Permalink
Merge pull request #250 from srl-wim/sros-improvements
Browse files Browse the repository at this point in the history
Sros improvements
  • Loading branch information
hellt authored Jan 28, 2021
2 parents 67f0b0f + 80e283c commit 427c286
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions clab/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,14 +540,13 @@ func (c *CLab) NewNode(nodeName string, nodeCfg NodeConfig, idx int) error {

// env vars are used to set launch.py arguments in vrnetlab container
defEnv := map[string]string{
"NUM_NICS": "5",
"CONNECTION_MODE": "bridge"}
node.Env = mergeStringMaps(defEnv, envs)

// mount tftpboot dir
node.Binds = append(node.Binds, fmt.Sprint(path.Join(node.LabDir, "tftpboot"), ":/tftpboot"))

node.Cmd = fmt.Sprintf("--trace --num-nics %s --connection-mode %s --hostname %s --variant %s", node.Env["NUM_NICS"], node.Env["CONNECTION_MODE"], node.ShortName, node.NodeType)
node.Cmd = fmt.Sprintf("--trace --connection-mode %s --hostname %s --variant %s", node.Env["CONNECTION_MODE"], node.ShortName, node.NodeType)

case "vr-vmx":
node.Image = c.imageInitialization(&nodeCfg, node.Kind)
Expand Down
10 changes: 10 additions & 0 deletions docs/manual/kinds/vr-sros.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ vr-sros container uses the following mapping for its interfaces:
* `eth1` - first data interface, mapped to first data port of SR OS line card
* `eth2+` - second and subsequent data interface

???warning "data interfaces need to be defined consequently"
Note, that data interfaces need to be defined in the topology file in a consequent fashion. Meaning that no gaps are allowed between the interfaces definition:
```yaml
links:
- endpoints: ["srl:e1-1", "sros:eth1"]
# this is not allowed by vr-sros kind.
# if eth5 is needed, define eth2-4 as well
- endpoints: ["srl:e1-5", "sros:eth5"]
```

When containerlab launches vr-sros node, it will assign IPv4/6 address to the `eth0` interface. These addresses can be used to reach management plane of the router.

Data interfaces `eth1+` needs to be configured with IP addressing manually using CLI/management protocols.
Expand Down

0 comments on commit 427c286

Please sign in to comment.