summaryrefslogtreecommitdiffstats
path: root/doc/Building_FRR_on_OmniOS.md
blob: f158c80a7544ed30eaff1f8a203d76d1fa592c31 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Building FRR on OmniOS (OpenSolaris) from Git Source
====================================================

OmniOS restrictions:
--------------------

- MPLS is not supported on `OmniOS` or `Solaris`. MPLS requires a Linux 
  Kernel (4.5 or higher). LDP can be built, but may have limited use 
  without MPLS

### Enable IP & IPv6 forwarding

    routeadm -e ipv4-forwarding
    routeadm -e ipv6-forwarding 

Install required packages
-------------------------

Add packages:

    pkg install \
      developer/build/autoconf \
      developer/build/automake \
      developer/lexer/flex \
      developer/parser/bison \
      developer/object-file \
      developer/linker \
      developer/library/lint \
      developer/build/gnu-make \
      developer/gcc51 \
      library/idnkit \
      library/idnkit/header-idnkit \
      system/header \
      system/library/math/header-math \
      git libtool gawk pkg-config   

Add additional Solaris packages:

    pkgadd -d http://get.opencsw.org/now
    /opt/csw/bin/pkgutil -U
    /opt/csw/bin/pkgutil -y -i texinfo
    /opt/csw/bin/pkgutil -y -i perl
    /opt/csw/bin/pkgutil -y -i libjson_c_dev
    /opt/csw/bin/pkgutil -y -i python27 py_pip

Add libjson to Solaris equivalent of ld.so.conf

    crle -l /opt/csw/lib -u

Add Perl packages:

    cpan
    cpan[1]> install XML::LibXML
    cpan[2]> exit

Add pytest:

    pip install pytest

Select Python 2.7 as default (required for pytest)

    rm -f /usr/bin/python
    ln -s /opt/csw/bin/python2.7 /usr/bin/python
        
Fix PATH for all users and non-interactive sessions. Edit `/etc/default/login`
and add the following default PATH:

    PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin

Edit `~/.profile` and add the following default PATH:

    PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/opt/csw/bin

Get FRR, compile it and install it (from Git)
---------------------------------------------

**This assumes you want to build and install FRR from source and not using
any packages**

### Add frr group and user

    sudo groupadd -g 93 frr
    sudo groupadd -g 94 frrvty
    sudo useradd -g 93 -u 93 -G frrvty -c "FRR suite" \
        -d /nonexistent -s /bin/false frr

(You may prefer different options on configure statement. These are just
an example)

    git clone https://github.com/freerangerouting/frr.git frr
    cd frr
    git checkout stable/2.0
    ./bootstrap.sh
    export MAKE=gmake
    export LDFLAGS="-L/opt/csw/lib"
    export CPPFLAGS="-I/opt/csw/include"
    ./configure \
        --sysconfdir=/etc/frr \
        --enable-exampledir=/usr/share/doc/frr/examples/ \
        --localstatedir=/var/run/frr \
        --sbindir=/usr/lib/frr \
        --enable-vtysh \
        --enable-watchfrr \
        --enable-ospfclient=yes \
        --enable-ospfapi=yes \
        --enable-multipath=64 \
        --enable-user=frr \
        --enable-group=frr \
        --enable-vty-group=frrvty \
        --enable-configfile-mask=0640 \
        --enable-logfile-mask=0640 \
        --enable-rtadv \
        --enable-tcp-zebra \
        --enable-fpm \
        --with-pkg-git-version \
        --with-pkg-extra-version=-MyOwnFRRVersion   
    gmake
    gmake check
    sudo gmake install

### Enable IP & IPv6 forwarding

    routeadm -e ipv4-forwarding
    routeadm -e ipv6-forwarding