\documentclass[12pt,a4paper]{article}
\usepackage[a4paper,scale=0.9]{geometry}
\usepackage{graphics,acro,ifthen,pstricks,pst-node,pst-tree,pst-eps}
\newpsobject{showgrid}{psgrid}{subgriddiv=1,griddots=10,gridlabels=6pt}

% Copyright (c) 2003 by Nick Urbanik <nicku(at)nicku.org>.
% This material may be distributed only subject to the terms and
% conditions set forth in the Open Publication License, v1.0 or later
% (the latest version is presently available at
% http://www.opencontent.org/openpub/).

% I should probably have used the psmatrix environment instead of
% using pstree, since this is really a graph rather than a tree.
% Anyway, it's okay, except that the positioning will break if
% things are resized individually.

% See page 49 of Graphics Companion
% #1, #2 x and y coordinates of reference point of brace in pt
% #3 rotation angle for large right brace in degrees: 90 faces down
%                              -90 faces up, 180 faces to the right
% #4 total height of brace in pt
\newcommand{\Bpara}[4]{%
  \begin{picture}(0,0)%
    \setlength{\unitlength}{1pt}%
    \put(#1,#2){\rotatebox{#3}{\raisebox{0mm}[0mm][0mm]{%
          \makebox[0mm]{$\left.\rule{0mm}{#4pt}\right\}$}}}}%
  \end{picture}%
}

\newlength{\NW}
\newlength{\mylevelsep}
\newlength{\mytextlen}
\setlength{\mylevelsep}{5cm}
\setlength{\NW}{0.6\mylevelsep}

%% \newcommand{\Node}[1]{%
%%   \settowidth{\mytextlen}{#1}
%%   \Tr[ref=r]{%
%%     \psframebox[linestyle=none]{%
%%       \ifthenelse{\lengthtest{\mytextlen > \NW}}%
%%       {
%%         \begin{minipage}[c]{\NW}
%%           \raggedleft%
%%           #1%
%%         \end{minipage}%
%%       }%
%%       %else
%%       {%
%%         #1%
%%       }%
%%     }%
%%   }%
%% }

\newcommand{\Node}[1]%
{%
  \TR%
  {%
        \large\texttt{\textbf{#1}}%
  }%
}

\newcommand*{\interfaces}{\Node{1} \Node{2} \Node{3} \Node{4} \Node{5}}

%\renewcommand{\psedge}{\ncangle}
\begin{document}
\begin{TeXtoEPS}%
 %\begin{pspicture}(0,0)(18,4)%\showgrid
  \begin{pspicture}(0,0)%\showgrid
    \psset{treefit=tight,levelsep=0.4\mylevelsep}
%%     \psset{arrows=<-,xbbd=1.5cm,treemode=L,
%%     %\psset{arrows=<-,xbbd=0cm,treemode=L,
%%       angleA=-180,angleB=0,levelsep=\mylevelsep}
    %\pstree[treemode=R]{\Node{who}}{}{}
    \pstree[nodesep=3pt]{\Node{\textnormal{(root node)}}}%
    {%
      \Node{ccit(0)}
      \pstree{\Node{iso(1)}}
      {%
        \Tp \Tp \Tp
        \pstree{\Node{org(3)}}%
        {
          \pstree{\Node{dod(6)}}%
          {%
            \pstree[thislevelsep=2\mylevelsep]{\Node{internet(1)}}%
            {
              \Node{directory(1)}
              \pstree{\Node{mgmnt(2)}}%
              {
                \pstree[thislevelsep=2\mylevelsep]{\Node{mib-2(1)}}%
                {
                  \pstree{\Node{system(1)}}%
                  {
                    \Node{sysDescr(1)}
                    \Node{sysObjectID(2)}
                    \Node{sysContact(4)}
                    \Node{sysName(5)}
                    \Node{sysLocation(6)}
                    \Node{sysServices(7)}
                    \Node{sysORLastChange(8)}
                    \Node{sysORTable(9)}
                  }% end system
                  \pstree{\Node{interfaces(2)}}%
                  {
                    \pstree{\Node{ifTable(2)}}%
                    {
                      \pstree[nodesep=3pt,thislevelsep=\mylevelsep]%
                      {\Node{ifEntry(1)}}
                      {%
                        \pstree{\Node{ifIndex(1)}}{\interfaces}
                        \pstree{\Node{ifDescr(2)}}{\interfaces}
                        \pstree{\Node{ifType(3)}}{\interfaces}
                        \pstree{\Node{ifMtu(4)}}{\interfaces}
                        \pstree{\Node{ifSpeed(5)}}{\interfaces}
                        \pstree{\Node{ifPhysAddress(6)}}{\interfaces}
                        \pstree{\Node{ifAdminStatus(7)}}{\interfaces}
                        \pstree{\Node{ifOperStatus(8)}}{\interfaces}
                        \pstree{\Node{ifLastChange(9)}}{\interfaces}
                        \pstree{\Node{ifInOctets(10)}}{\interfaces}
                        \pstree{\Node{ifInUcastPkts(11)}}{\interfaces}
                        \pstree{\Node{ifInNUcastPkts(12)}}{\interfaces}
                        \pstree{\Node{ifInDiscards(13)}}{\interfaces}
                        \pstree{\Node{ifInErrors(14)}}{\interfaces}
                        \pstree{\Node{ifInUnknownProtos(15)}}{\interfaces}
                        \pstree{\Node{ifOutOctets(16)}}{\interfaces}
                        \pstree{\Node{ifOutUcastPkts(17)}}{\interfaces}
                        \pstree{\Node{ifOutNUcastPkts(18)}}{\interfaces}
                        \pstree{\Node{ifOutDiscards(19)}}{\interfaces}
                        \pstree{\Node{ifOutErrors(20)}}{\interfaces}
                        \pstree{\Node{ifOutQLen(21)}}{\interfaces}
                        \pstree{\Node{ifSpecific(22)}}{\interfaces}
                      }% end ifEntry
                    }% end ifTable
                  }% end interfaces
                  %\pstree{\Node{at(3)}}{\pstree{\Tp}{\pstree{\Tp}{\Tp \Tp
                  %      \Tp}}}
                  \Node{at(3)}
                  \pstree{\Node{ip(4)}}
                  {
                    \Tp \Tp \Tp
                  }% end ip
                  \pstree{\Node{icmp(5)}}
                  {
                    \Tp \Tp \Tp
                  }% end icmp
                  \pstree{\Node{tcp(6)}}
                  {
                    \Tp \Tp \Tp
                  }% end tcp
                  \pstree{\Node{udp(7)}}
                  {
                    \Tp \Tp \Tp
                  }% end udp
                  \pstree{\Node{egp(8)}}
                  {
                    \Tp \Tp \Tp
                  }% end egp
                  \pstree{\Node{transmission(10)}}
                  {
                    \Tp \Tp \Tp
                  }% end transmission
                  \pstree{\Node{snmp(11)}}
                  {
                    \Tp \Tp \Tp
                  }% end snmp
                }% end mib-2
              }% end mgmnt
              \Node{experimental(3)}
              \pstree{\Node{private(4)}}
              {
                \pstree[thislevelsep=2\mylevelsep]{\Node{enterprises(1)}}
                {
                  \pstree{\Node{ibm(2)}}
                  {
                    \Tp \Tp \Tp
                  }% end ibm
                  \pstree{\Node{cisco(9)}}
                  {
                    \Tp \Tp \Tp
                  }% end cisco
                  \pstree{\Node{hp()}}
                  {
                    \Tp \Tp \Tp
                  }% end hp
                  \pstree{\Node{ict(11400)}}
                  {
                    \Tp \Tp \Tp
                  }% end ict
                }% end enterprises
              }% end of private
              \Node{security(5)}
              \pstree{\Node{snmpV2(6)}}
              {
                \Tp \Tp \Tp \Tp \Tp \Tp \Tp
              }% end security
            }% end internet
          }% end dod
        }% end org
      }% end iso
      \Node{joint(2)}
    }% end root node
  \end{pspicture}
\end{TeXtoEPS}
\end{document}
ifIndex (1)
ifDescr (2)
ifType (3)
ifMtu (4)
ifSpeed (5)
ifPhysAddress (6)
ifAdminStatus (7)
ifOperStatus (8)
ifLastChange (9)
ifInOctets (10)
ifInUcastPkts (11)
ifInNUcastPkts (12)
ifInDiscards (13)
ifInErrors (14)
ifInUnknownProtos (15)
ifOutOctets (16)
ifOutUcastPkts (17)
ifOutNUcastPkts (18)
ifOutDiscards (19)
ifOutErrors (20)
ifOutQLen (21)
ifSpecific (22)
