summaryrefslogtreecommitdiffstats
path: root/samples/openconfig-interfaces/set-ip.xml
blob: 80b368c70043dd8139cf07d507fa0a52746759f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!-- XML for edit-config RPC to set an IP using openconfig-interfaces -->
<interfaces xmlns="http://openconfig.net/yang/interfaces">
    <interface>
        <name>tap0</name>
        <config>
            <name>tap0</name>
            <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
            <mtu>1501</mtu>
            <loopback-mode>true</loopback-mode>
            <description>openconfig</description>
            <enabled>true</enabled>
        </config>
        <subinterfaces>
            <subinterface>
                <index>0</index>
                <ipv4 xmlns="http://openconfig.net/yang/interfaces/ip">
                    <addresses>
                        <address>
                            <ip>192.168.0.2</ip>
                            <config>
                                <ip>192.168.0.2</ip>
                                <prefix-length>24</prefix-length>
                            </config>
                        </address>
                    </addresses>
                </ipv4>
                <config>
                    <index>0</index>
                    <description>openconfig</description>
                    <enabled>true</enabled>
                </config>
            </subinterface>
        </subinterfaces>
    </interface>
</interfaces>