Juniper Challenge 11

 

Objectives:

 

The Juniper device is built on a Free BSD infrastructure, thus the folders are similar to a UNIX file infrastructure. JUNOS saves a copy of the configuration within the /config folder every time there is a commit. An example is:

 

fred@fred> file list /config

 

/config:

.snap/

juniper.conf.1.gz

juniper.conf.2.gz

juniper.conf.3.gz

juniper.conf.gz

usage.db

 

where the current configuration is saved in the ZIP form within juniper.config.gz. The most recent version is juniper.config.1gz, as can be seen from:

 

fred@testing> file list /config detail

 

/config:

total 28

drwxrwxr-x  2 root  wheel        512 Mar 2   2008 .snap/

-rw-r-----  1 root  wheel        579 Aug 3  21:38 juniper.conf.1.gz

-rw-r-----  1 root  wheel        581 Jul 29 13:33 juniper.conf.2.gz

-rw-r-----  1 root  wheel        582 Jul 29 13:32 juniper.conf.3.gz

-rw-r-----  1 root  wheel        585 Aug 3  21:54 juniper.conf.gz

--w----r--  1 root  wheel          0 Mar 2   2008 usage.db

 

Up to 50 versions of the configuration can be stored. The remaining files (from juniper.config.4 onwards) are held in the /var/db/config folder:

 

fred@testing> file list /var/db/config detail

 

/var/db/config:

total 84

-rw-r-----  1 root  wheel        439 Jul 28 08:43 juniper.conf.10.gz

-rw-r-----  1 root  wheel        440 Jul 27 16:07 juniper.conf.11.gz

-rw-r-----  1 root  wheel        434 Jul 26 23:53 juniper.conf.12.gz

-rw-r-----  1 root  wheel        447 Jul 26 22:48 juniper.conf.13.gz

-rw-r-----  1 root  wheel        371 Jul 26 22:22 juniper.conf.14.gz

-rw-r-----  1 root  wheel        349 Jul 26 21:04 juniper.conf.15.gz

-rw-r-----  1 root  wheel        297 Jul 26 20:54 juniper.conf.16.gz

-rw-r-----  1 root  wheel        274 Jul 26 01:56 juniper.conf.17.gz

-rw-r-----  1 root  wheel        259 Jul 26 01:43 juniper.conf.18.gz

-rw-r-----  1 root  wheel        259 Jul 26 01:30 juniper.conf.19.gz

-rw-r-----  1 root  wheel        187 Jun 22  2009 juniper.conf.20.gz

-rw-r-----  1 root  wheel        151 Mar 6   2008 juniper.conf.21.gz

-rw-r-----  1 root  wheel        581 Aug 3  21:54 juniper.conf.4.gz

-rw-r-----  1 root  wheel        546 Aug 3  21:38 juniper.conf.5.gz

-rw-r-----  1 root  wheel        546 Jul 29 13:33 juniper.conf.6.gz

-rw-r-----  1 root  wheel        494 Jul 29 13:32 juniper.conf.7.gz

-rw-r-----  1 root  wheel        448 Jul 29 13:31 juniper.conf.8.gz

-rw-r-----  1 root  wheel        434 Jul 28 09:05 juniper.conf.9.gz

-rw-r-----  1 root  wheel        275 Mar 2   2008 juniper.conf.pre-install

 

Some details of key folders are at: [Link]

 

Overview:

 

root@% cli

root@> file list /bin

root@> file list /dev

root@> file list /config

root@> file list /var/db/config

root@> file list /config details

root@> file list /var/db/config details

root@> file list /etc

root@> file list /etc

root@> file list /

root@> file list .

 

An example is:

 

root@% cli

root@> file list /bin

/bin:

[@   -+ /packages/mnt/jbase/bin/test

cat@ -+ /packages/mnt/jbase/bin/cat

chflags@ -+ /packages/mnt/jbase/bin/chflags

chmod@ -+ /packages/mnt/jbase/bin/chmod

cp@  -+ /packages/mnt/jbase/bin/cp

csh@ -+ /packages/mnt/jbase/bin/csh

date@ -+ /packages/mnt/jbase/bin/date

dd@  -+ /packages/mnt/jbase/bin/dd

df@  -+ /packages/mnt/jbase/bin/df

echo@ -+ /packages/mnt/jbase/bin/echo

ed@  -+ /packages/mnt/jbase/bin/ed

expr@ -+ /packages/mnt/jbase/bin/expr

hostname@ -+ /packages/mnt/jbase/bin/hostname

kill@ -+ /packages/mnt/jbase/bin/kill

ln@  -+ /packages/mnt/jbase/bin/ln

ls@  -+ /packages/mnt/jbase/bin/ls

mkdir@ -+ /packages/mnt/jbase/bin/mkdir

mv@  -+ /packages/mnt/jbase/bin/mv

pax@ -+ /packages/mnt/jbase/bin/pax

ps@  -+ /packages/mnt/jbase/bin/ps

pwd@ -+ /packages/mnt/jbase/bin/pwd

rcp@ -+ /packages/mnt/jbase/bin/rcp

red@ -+ /packages/mnt/jbase/bin/ed

rm@  -+ /packages/mnt/jbase/bin/rm

rmdir@ -+ /packages/mnt/jbase/bin/rmdir

sh@  -+ /packages/mnt/jbase/bin/sh

sleep@ -+ /packages/mnt/jbase/bin/sleep

stty@ -+ /packages/mnt/jbase/bin/stty

sync@ -+ /packages/mnt/jbase/bin/sync

tcsh@ -+ /packages/mnt/jbase/bin/csh

test@ -+ /packages/mnt/jbase/bin/test

root@> file list /dev

fred@fred> file list /dev

 

/dev:

ad0

ad0s1

ad0s1a

ad0s1b

ad0s1c

ad0s1e

ad0s1f

ata

bios

bpsm0

console*

consolectl

ctty

cuad0

cuad0.init

cuad0.lock

cuad2

cuad2.init

cuad2.lock

devctl

devstat

em0

em1

fd /

fd0

fido

fileassoc

geom.ctl

io

klog

kmem

log@ -+ /var/run/log

md0

md1

md2

md3

md4

md5

md6

md7

mdctl

mem

nfs4

nfslock

null

pci

psm0

ptyp0

random

stderr@ -+ fd/2

stdin@ -+ fd/0

stdout@ -+ fd/1

sysmouse

ttyd0

ttyd0.init

ttyd0.lock

ttyd2

ttyd2.init

ttyd2.lock

ttyp0*

ttyv0

ttyv1

ttyv2

ttyv3

ttyv4

ttyv5

ttyv6

ttyv7

ttyv8

ttyv9

ttyva

ttyvb

ttyvc

ttyvd

ttyve

ttyvf

uflash

urandom@ -+ random

usb

usb0

veriexec

xpt0

zero

root@> file list /config

/config:

.snap/

juniper.conf.1.gz

juniper.conf.2.gz

juniper.conf.3.gz

juniper.conf.gz

usage.db

 

root@> file list /etc

/etc:

amd.map

auth.conf

banner.wiz@ -+ /packages/mnt/jkernel/etc/banner.wiz

certs@ -+ /packages/mnt/jbase/etc/certs

config/

crontab

csh.cshrc

csh.login

csh.logout

db /

dcd.miniconffiles.conf@ -+ /packages/mnt/jkernel/etc/dcd.miniconffiles.conf

defaults/

devfs

disktab@ -+ /packages/mnt/jbase/etc/disktab

dumpd@ -+ /packages/mnt/jkernel/etc/dumpd

exports.1@ -+ /packages/mnt/jkernel/etc/exports.1

fbtab@ -+ /packages/mnt/jbase/etc/fbtab

fstab

ftpusers

gettytab

group@ -+ /var/etc/group

group.sys

host.conf

hosts@ -+ /var/etc/hosts

hosts.equiv

hosts.junos@ -+ /packages/mnt/jbase/etc/hosts.junos

hosts6.junos@ -+ /packages/mnt/jbase/etc/hosts6.junos

indb/

inetd.conf@ -+ /var/etc/inetd.conf

inetd.conf.sys@ -+ /packages/mnt/jbase/etc/inetd.conf.sys

init.conf@ -+ /packages/mnt/jkernel/etc/init.conf

localtime@ -+ /var/etc/localtime

login.access

login.conf@ -+ /var/etc/login.conf

login.conf.sys

master.passwd@ -+ /var/etc/master.passwd

master.passwd.sys

modems

motd

motd.sys

mtree/

netconfig@ -+ /packages/mnt/jbase/etc/netconfig

netstart*

networks

newsyslog.conf@ -+ /var/etc/newsyslog.conf

newsyslog.conf.sys

pam.conf@ -+ /var/etc/pam.conf

pam.conf.sys

passwd

profile

protocols@ -+ /packages/mnt/jkernel/etc/protocols

pwd.db

rc@  -+ /packages/mnt/jbase/etc/rc

rc.conf

rc.d/

rc.i386@ -+ /packages/mnt/jbase/etc/rc.i386

rc.local

rc.network@ -+ /packages/mnt/jkernel/etc/rc.network

rc.pdb@ -+ /packages/mnt/jkernel/etc/rc.pdb

rc.sdb@ -+ /packages/mnt/jkernel/etc/rc.sdb

rc.serial

rc.subr@ -+ /packages/mnt/jbase/etc/rc.subr

rc.ui@ -+ /packages/mnt/jkernel/etc/rc.ui

rc.veriexec@ -+ /packages/mnt/jbase/etc/rc.veriexec

rc.verify@ -+ /packages/mnt/jbase/etc/rc.verify

remote

resolv.conf@ -+ /var/etc/resolv.conf

rpc

security

services

shells

skeykeys@ -+ /var/etc/skeykeys

spwd.db

ssh/

sshd_conf.dtcp@ -+ /packages/mnt/jroute/etc/sshd_conf.dtcp

sshd_netconf@ -+ /packages/mnt/jroute/etc/sshd_netconf

syslog.conf@ -+ /var/etc/syslog.conf

termcap@ -+ /packages/mnt/jbase/usr/share/misc/termcap

termcap.small

tnetd.conf@ -+ /packages/mnt/jkernel/etc/tnetd.conf

tnp.hosts@ -+ /packages/mnt/jkernel/etc/tnp.hosts

ttys

ttys.sys@ -+ /packages/mnt/jbase/etc/ttys.sys

usbd.conf@ -+ /packages/mnt/jbase/etc/usbd.conf

root@> file list /

/:

.snap/

COPYRIGHT

altconfig/

altroot/

bin/

boot/

config/

data/

dev/

etc/

kernel@ -+ /packages/jkernel

mfs/

mnt/

modules/

opt/

packages/

proc/

root/

sbin/

staging@ -+ /var/tmp

tmp/

usr/

var/

var2/

 

root@> file list .

 

/var/home/fred/:

.ssh/

 

fred@testing> file li /var/db/config

 

/var/db/config:

juniper.conf.10.gz

juniper.conf.11.gz

juniper.conf.12.gz

juniper.conf.13.gz

juniper.conf.14.gz

juniper.conf.15.gz

juniper.conf.16.gz

juniper.conf.17.gz

juniper.conf.18.gz

juniper.conf.19.gz

juniper.conf.20.gz

juniper.conf.21.gz

juniper.conf.4.gz

juniper.conf.5.gz

juniper.conf.6.gz

juniper.conf.7.gz

juniper.conf.8.gz

juniper.conf.9.gz

juniper.conf.pre-install

 

fred@testing> file li /var/db/config de

 

/var/db/config:

total 84

-rw-r-----  1 root  wheel        439 Jul 28 08:43 juniper.conf.10.gz

-rw-r-----  1 root  wheel        440 Jul 27 16:07 juniper.conf.11.gz

-rw-r-----  1 root  wheel        434 Jul 26 23:53 juniper.conf.12.gz

-rw-r-----  1 root  wheel        447 Jul 26 22:48 juniper.conf.13.gz

-rw-r-----  1 root  wheel        371 Jul 26 22:22 juniper.conf.14.gz

-rw-r-----  1 root  wheel        349 Jul 26 21:04 juniper.conf.15.gz

-rw-r-----  1 root  wheel        297 Jul 26 20:54 juniper.conf.16.gz

-rw-r-----  1 root  wheel        274 Jul 26 01:56 juniper.conf.17.gz

-rw-r-----  1 root  wheel        259 Jul 26 01:43 juniper.conf.18.gz

-rw-r-----  1 root  wheel        259 Jul 26 01:30 juniper.conf.19.gz

-rw-r-----  1 root  wheel        187 Jun 22  2009 juniper.conf.20.gz

-rw-r-----  1 root  wheel        151 Mar 6   2008 juniper.conf.21.gz

-rw-r-----  1 root  wheel        581 Aug 3  21:54 juniper.conf.4.gz

-rw-r-----  1 root  wheel        546 Aug 3  21:38 juniper.conf.5.gz

-rw-r-----  1 root  wheel        546 Jul 29 13:33 juniper.conf.6.gz

-rw-r-----  1 root  wheel        494 Jul 29 13:32 juniper.conf.7.gz

-rw-r-----  1 root  wheel        448 Jul 29 13:31 juniper.conf.8.gz

-rw-r-----  1 root  wheel        434 Jul 28 09:05 juniper.conf.9.gz

-rw-r-----  1 root  wheel        275 Mar 2   2008 juniper.conf.pre-install