Skip to content

Commit 5153273

Browse files
committed
Add loopback interface
Signed-off-by: Gris Ge <fge@redhat.com>
1 parent 5e32705 commit 5153273

File tree

1 file changed

+106
-73
lines changed

1 file changed

+106
-73
lines changed

devel/yaml_api.md

Lines changed: 106 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,80 @@
11
<!-- vim-markdown-toc GFM -->
22

33
* [Introduction](#introduction)
4-
* [Interfaces](#interfaces)
5-
* [Base Interface](#base-interface)
6-
* [Name](#name)
7-
* [Type](#type)
8-
* [State](#state)
9-
* [Description](#description)
10-
* [Profile Name](#profile-name)
11-
* [Interface Identifier](#interface-identifier)
12-
* [MAC Address](#mac-address)
13-
* [Permanent MAC Address](#permanent-mac-address)
14-
* [MTU](#mtu)
15-
* [Minimum MTU](#minimum-mtu)
16-
* [Maximum MTU](#maximum-mtu)
17-
* [Wait IP](#wait-ip)
18-
* [Interface Controller](#interface-controller)
19-
* [Accept All MAC addresses](#accept-all-mac-addresses)
20-
* [Copy MAC From](#copy-mac-from)
21-
* [Dispatch script](#dispatch-script)
22-
* [IP](#ip)
23-
* [IP Enable](#ip-enable)
24-
* [DHCP](#dhcp)
25-
* [IPv6 Autoconf](#ipv6-autoconf)
26-
* [IP Address](#ip-address)
27-
* [Auto DNS](#auto-dns)
28-
* [Auto Routes](#auto-routes)
29-
* [Auto Gateway](#auto-gateway)
30-
* [Auto Route Table ID](#auto-route-table-id)
31-
* [Auto Route Metric](#auto-route-metric)
32-
* [Multipath TCP](#multipath-tcp)
33-
* [Ethtool](#ethtool)
34-
* [Ethtool feature](#ethtool-feature)
35-
* [Ethtool coalesce](#ethtool-coalesce)
36-
* [Ethtool ring](#ethtool-ring)
37-
* [LLDP](#lldp)
38-
* [LLDP Enabled](#lldp-enabled)
39-
* [Neighbors](#neighbors)
40-
* [TLV Type](#tlv-type)
41-
* [TLV Subtype](#tlv-subtype)
42-
* [Organization code](#organization-code)
43-
* [Ethernet Interface](#ethernet-interface)
44-
* [Ethernet speed](#ethernet-speed)
45-
* [Ethernet duplex](#ethernet-duplex)
46-
* [Ethernet Auto Negotiation](#ethernet-auto-negotiation)
47-
* [SR-IOV](#sr-iov)
48-
* [SR-IOV Total VFS Count](#sr-iov-total-vfs-count)
49-
* [SR-IOV VF Specific Settings](#sr-iov-vf-specific-settings)
50-
* [Bond Interface](#bond-interface)
51-
* [Bond Mode](#bond-mode)
52-
* [Bond Options](#bond-options)
53-
* [Bond Ports](#bond-ports)
54-
* [VLAN Interface](#vlan-interface)
55-
* [VxLAN Interface](#vxlan-interface)
56-
* [Linux Bridge Interface](#linux-bridge-interface)
57-
* [Linux Bridge Options](#linux-bridge-options)
58-
* [Linux Bridge Ports](#linux-bridge-ports)
59-
* [Linux Bridge Port VLAN](#linux-bridge-port-vlan)
60-
* [OpenvSwitch Bridge Interface](#openvswitch-bridge-interface)
61-
* [OpenvSwitch Bridge Options](#openvswitch-bridge-options)
62-
* [OpenvSwitch Bridge Ports](#openvswitch-bridge-ports)
63-
* [OpenvSwitch DPDK](#openvswitch-dpdk)
64-
* [OpenvSwitch Internal Interface](#openvswitch-internal-interface)
65-
* [OpenvSwitch Bridge Patch Interface](#openvswitch-bridge-patch-interface)
66-
* [Mac VTAP Interface](#mac-vtap-interface)
67-
* [Mac VLAN Interface](#mac-vlan-interface)
68-
* [IP over InfiniBand Interface](#ip-over-infiniband-interface)
69-
* [Virtual Routing and Forwarding (VRF) Interface](#virtual-routing-and-forwarding-vrf-interface)
70-
* [Linux Virtual Ethernet(veth) Interface](#linux-virtual-ethernetveth-interface)
71-
* [IPsec Encryption](#ipsec-encryption)
72-
* [Routes](#routes)
73-
* [Route Rules](#route-rules)
74-
* [DNS Resolver](#dns-resolver)
75-
* [Hostname](#hostname)
76-
* [OpenvSwitch Database](#openvswitch-database)
4+
* [Interfaces](#interfaces)
5+
* [Base Interface](#base-interface)
6+
* [Name](#name)
7+
* [Type](#type)
8+
* [State](#state)
9+
* [Description](#description)
10+
* [Profile Name](#profile-name)
11+
* [Interface Identifier](#interface-identifier)
12+
* [MAC Address](#mac-address)
13+
* [Permanent MAC Address](#permanent-mac-address)
14+
* [MTU](#mtu)
15+
* [Minimum MTU](#minimum-mtu)
16+
* [Maximum MTU](#maximum-mtu)
17+
* [Wait IP](#wait-ip)
18+
* [Interface Controller](#interface-controller)
19+
* [Accept All MAC addresses](#accept-all-mac-addresses)
20+
* [Copy MAC From](#copy-mac-from)
21+
* [Dispatch script](#dispatch-script)
22+
* [IP](#ip)
23+
* [IP Enable](#ip-enable)
24+
* [DHCP](#dhcp)
25+
* [IPv6 Autoconf](#ipv6-autoconf)
26+
* [IP Address](#ip-address)
27+
* [Auto DNS](#auto-dns)
28+
* [Auto Routes](#auto-routes)
29+
* [Auto Gateway](#auto-gateway)
30+
* [Auto Route Table ID](#auto-route-table-id)
31+
* [Auto Route Metric](#auto-route-metric)
32+
* [Multipath TCP](#multipath-tcp)
33+
* [Ethtool](#ethtool)
34+
* [Ethtool feature](#ethtool-feature)
35+
* [Ethtool coalesce](#ethtool-coalesce)
36+
* [Ethtool ring](#ethtool-ring)
37+
* [LLDP](#lldp)
38+
* [LLDP Enabled](#lldp-enabled)
39+
* [Neighbors](#neighbors)
40+
* [TLV Type](#tlv-type)
41+
* [TLV Subtype](#tlv-subtype)
42+
* [Organization code](#organization-code)
43+
* [Ethernet Interface](#ethernet-interface)
44+
* [Ethernet speed](#ethernet-speed)
45+
* [Ethernet duplex](#ethernet-duplex)
46+
* [Ethernet Auto Negotiation](#ethernet-auto-negotiation)
47+
* [SR-IOV](#sr-iov)
48+
* [SR-IOV Total VFS Count](#sr-iov-total-vfs-count)
49+
* [SR-IOV VF Specific Settings](#sr-iov-vf-specific-settings)
50+
* [Bond Interface](#bond-interface)
51+
* [Bond Mode](#bond-mode)
52+
* [Bond Options](#bond-options)
53+
* [Bond Ports](#bond-ports)
54+
* [VLAN Interface](#vlan-interface)
55+
* [VxLAN Interface](#vxlan-interface)
56+
* [Linux Bridge Interface](#linux-bridge-interface)
57+
* [Linux Bridge Options](#linux-bridge-options)
58+
* [Linux Bridge Ports](#linux-bridge-ports)
59+
* [Linux Bridge Port VLAN](#linux-bridge-port-vlan)
60+
* [OpenvSwitch Bridge Interface](#openvswitch-bridge-interface)
61+
* [OpenvSwitch Bridge Options](#openvswitch-bridge-options)
62+
* [OpenvSwitch Bridge Ports](#openvswitch-bridge-ports)
63+
* [OpenvSwitch DPDK](#openvswitch-dpdk)
64+
* [OpenvSwitch Internal Interface](#openvswitch-internal-interface)
65+
* [OpenvSwitch Bridge Patch Interface](#openvswitch-bridge-patch-interface)
66+
* [Mac VTAP Interface](#mac-vtap-interface)
67+
* [Mac VLAN Interface](#mac-vlan-interface)
68+
* [IP over InfiniBand Interface](#ip-over-infiniband-interface)
69+
* [Virtual Routing and Forwarding (VRF) Interface](#virtual-routing-and-forwarding-vrf-interface)
70+
* [Linux Virtual Ethernet(veth) Interface](#linux-virtual-ethernetveth-interface)
71+
* [IPsec Encryption](#ipsec-encryption)
72+
* [Loopback Interface](#loopback-interface)
73+
* [Routes](#routes)
74+
* [Route Rules](#route-rules)
75+
* [DNS Resolver](#dns-resolver)
76+
* [Hostname](#hostname)
77+
* [OpenvSwitch Database](#openvswitch-database)
7778

7879
<!-- vim-markdown-toc -->
7980

@@ -1534,6 +1535,38 @@ IPsec remote.
15341535

15351536
You may also check [IPsec example page](../features/ipsec.md) for use cases.
15361537

1538+
### Loopback Interface
1539+
1540+
New feature in 2.2.2
1541+
1542+
Example loopback interface YAML:
1543+
1544+
```yml
1545+
interfaces:
1546+
- name: lo
1547+
type: loopback
1548+
state: up
1549+
mac-address: 00:00:00:00:00:00
1550+
mtu: 65536
1551+
ipv4:
1552+
enabled: true
1553+
dhcp: false
1554+
address:
1555+
- ip: 127.0.0.1
1556+
prefix-length: 8
1557+
ipv6:
1558+
enabled: true
1559+
dhcp: false
1560+
address:
1561+
- ip: ::1
1562+
prefix-length: 128
1563+
```
1564+
1565+
Use `state: absent` will revert loopback interface back to kernel defaults.
1566+
1567+
Even desired state does not have `127.0.0.1/8` or `::1/128`, nmstate will
1568+
still include those two IPs to loopback interface.
1569+
15371570
## Routes
15381571

15391572
The `routes` top section of network state contains two type routes:

0 commit comments

Comments
 (0)