File: create_dummy

package info (click to toggle)
pyroute2 0.8.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,704 kB
  • sloc: python: 50,245; makefile: 280; javascript: 183; ansic: 81; sh: 44; awk: 17
file content (31 lines) | stat: -rw-r--r-- 723 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/env pyroute2-cli
#
#
interfaces
    # create a dummy interface
    #
    # there the very minimal spec consists of ifname,
    # other properties may be set later
    #
    create {ifname test01}
        #
        # set properties
        kind dummy
        address 00:11:22:33:44:55
        commit
        #
        # create addresses ...
        ipaddr
            create {address 192.168.15.67, prefixlen 24}
                commit
            create {address 192.168.15.68, prefixlen 24}
                commit
            #
            # and remove one of them
            192.168.15.68/24
                remove
                commit
        #
        # remove the interface
        remove
        commit