Skip to content

Commit d20855d

Browse files
committed
Include document for referring port/parent via MAC or PCI
Signed-off-by: Gris Ge <fge@redhat.com>
1 parent 71ca73b commit d20855d

File tree

2 files changed

+136
-0
lines changed

2 files changed

+136
-0
lines changed

features/mac_identifier.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,71 @@ interfaces:
3434
3535
Above profile could be delete by `state:absent` using `name: wan0` or its real
3636
interface name.
37+
38+
You can also refer port by profile name in OVS bridge, linux bridge, VRF and
39+
bond.
40+
41+
Example YAML for referring bond port by MAC address:
42+
43+
```yml
44+
---
45+
interfaces:
46+
- name: port1
47+
type: ethernet
48+
mac-address: 00:23:45:67:89:1a
49+
identifier: mac-address
50+
- name: port2
51+
type: ethernet
52+
mac-address: 00:23:45:67:89:1b
53+
identifier: mac-address
54+
- name: bond0
55+
type: bond
56+
state: up
57+
link-aggregation:
58+
mode: balance-rr
59+
ports:
60+
- port1
61+
- port2
62+
```
63+
64+
65+
You can also refer to base-interface by profile name in VLAN, VxLAN, MacSec,
66+
MacVtap, MacVlan. Example on using MAC address to identify VLAN base interface:
67+
68+
```yml
69+
---
70+
interfaces:
71+
- name: port1
72+
type: ethernet
73+
identifier: mac-address
74+
mac-address: 00:23:45:67:89:1a
75+
- name: vlan101
76+
type: vlan
77+
state: up
78+
vlan:
79+
base-iface: port1
80+
id: 101
81+
```
82+
83+
You can also refer to route next-hop-interface by profile name. For example:
84+
85+
```yml
86+
---
87+
interfaces:
88+
- name: port1
89+
type: ethernet
90+
state: up
91+
mac-address: 00:23:45:67:89:1a
92+
identifier: mac-address
93+
ipv4:
94+
enabled: true
95+
address:
96+
- ip: 192.0.2.251
97+
prefix-length: 24
98+
dhcp: false
99+
routes:
100+
config:
101+
- destination: 0.0.0.0/0
102+
next-hop-address: 192.0.2.1
103+
next-hop-interface: port1
104+
```

features/pci_identifier.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,71 @@ interfaces:
3030
3131
Above profile could be delete by `state:absent` using `name: wan0` or its real
3232
interface name.
33+
34+
You can also refer port by profile name in OVS bridge, linux bridge, VRF and
35+
bond.
36+
37+
Example YAML for referring bond port by PCI address:
38+
39+
```yml
40+
---
41+
interfaces:
42+
- name: port1
43+
type: ethernet
44+
pci-address: 0000:07:00.0
45+
identifier: pci-address
46+
- name: port2
47+
type: ethernet
48+
pci-address: 0000:07:00.1
49+
identifier: pci-address
50+
- name: bond0
51+
type: bond
52+
state: up
53+
link-aggregation:
54+
mode: balance-rr
55+
ports:
56+
- port1
57+
- port2
58+
```
59+
60+
61+
You can also refer to base-interface by profile name in VLAN, VxLAN, MacSec,
62+
MacVtap, MacVlan. Example on using PCI address to identify VLAN base interface:
63+
64+
```yml
65+
---
66+
interfaces:
67+
- name: port1
68+
type: ethernet
69+
identifier: pci-address
70+
pci-address: 0000:07:00.0
71+
- name: vlan101
72+
type: vlan
73+
state: up
74+
vlan:
75+
base-iface: port1
76+
id: 101
77+
```
78+
79+
You can also refer to route next-hop-interface by profile name. For example:
80+
81+
```yml
82+
---
83+
interfaces:
84+
- name: port1
85+
type: ethernet
86+
state: up
87+
pci-address: 0000:07:00.0
88+
identifier: pci-address
89+
ipv4:
90+
enabled: true
91+
address:
92+
- ip: 192.0.2.251
93+
prefix-length: 24
94+
dhcp: false
95+
routes:
96+
config:
97+
- destination: 0.0.0.0/0
98+
next-hop-address: 192.0.2.1
99+
next-hop-interface: port1
100+
```

0 commit comments

Comments
 (0)