Juniper Challenge 3

 

Objectives:

 

This challenge adds additional services for the Juniper device, such as defining the loopback (lo0) address, defining an Ethernet IP address for the Ethernet interfaces, and adding a new user.

 

Overview:

 

root@> configure

[edit]

root@# set system host-name fred

root@# set domain-name fred.com

root@# set backup-router 1.2.3.4

root@# set system login user fred class superuser

root@# set system login user fred authentication plain-text-password

New Password:

root@# set interface lo0 unit 0 family inet address 1.2.3.4/24

root@# set interface em0 unit 0 family inet address 1.2.3.5/24

root@# set interface em1 unit 0 family inet address 2.3.4.6/24

root@# commit

[edit]

root@# show

root@fred# exit

Exiting configuration mode

root@fred>

 

Configuration:

 

In the simulator there are two main physical interfaces (em0 and em1), and a loopback interface (lo0). To view the setup of the interfaces, the following command is used (where em0 has the IP address of 192.168.0.150 and em1 has the IP address of 192.168.1.150):

 

fred@fred> show interfaces terse

Interface               Admin Link Proto    Local                 Remote

dsc                     up    up

em0                     up    up

em0.0                   up    up   inet     192.168.0.150/24

em1                     up    up

em1.0                   up    up   inet     192.168.1.150/24

gre                     up    up

ipip                    up    up

lo0                     up    up

lo0.16384               up    up   inet     127.0.0.1           --> 0/0

lo0.16385               up    up   inet

lsi                     up    up

mtun                    up    up

pimd                    up    up

pime                    up    up

tap                     up    up

 

fred@fred> show interfaces brief

Physical interface: dsc, Enabled, Physical link is Up

  Type: Software-Pseudo, Link-level type: Unspecified, MTU: Unlimited,

  Clocking: Unspecified, Speed: Unspecified

  Device flags   : Present Running

  Interface flags: Point-To-Point SNMP-Traps

 

Physical interface: em0, Enabled, Physical link is Up

  Type: Ethernet, Link-level type: Ethernet, MTU: 1514, Clocking: Unspecified,

  Speed: 1000mbps

  Device flags   : Present Running

  Interface flags: SNMP-Traps

 

  Logical interface em0.0

    Flags: SNMP-Traps Encapsulation: ENET2

    inet  192.168.0.150/24

 

Physical interface: em1, Enabled, Physical link is Up

  Type: Ethernet, Link-level type: Ethernet, MTU: 1514, Clocking: Unspecified,

  Speed: 1000mbps

  Device flags   : Present Running

  Interface flags: SNMP-Traps

 

  Logical interface em1.0

    Flags: SNMP-Traps Encapsulation: ENET2

    inet  192.168.1.150/24

 

Physical interface: gre, Enabled, Physical link is Up

  Type: GRE, Link-level type: GRE, MTU: Unlimited, Speed: Unlimited

  Device flags   : Present Running

  Interface flags: Point-To-Point SNMP-Traps

 

Physical interface: ipip, Enabled, Physical link is Up

  Type: IPIP, Link-level type: IP-over-IP, MTU: Unlimited, Speed: Unlimited

  Device flags   : Present Running

  Interface flags: SNMP-Traps

 

Physical interface: lo0, Enabled, Physical link is Up

  Type: Loopback, Link-level type: Unspecified, MTU: Unlimited,

  Clocking: Unspecified, Speed: Unspecified

  Device flags   : Present Running Loopback

  Interface flags: SNMP-Traps

 

  Logical interface lo0.16384

    Flags: SNMP-Traps Encapsulation: Unspecified

    inet  127.0.0.1        --> 0/0

 

  Logical interface lo0.16385

    Flags: SNMP-Traps Encapsulation: Unspecified

    inet

 

Physical interface: lsi, Enabled, Physical link is Up

  Type: Software-Pseudo, Link-level type: LSI, MTU: 1496, Clocking: Unspecified,

  Speed: Unlimited

  Device flags   : Present Running

  Interface flags: SNMP-Traps

 

Physical interface: mtun, Enabled, Physical link is Up

  Type: Multicast-GRE, Link-level type: GRE, MTU: Unlimited, Speed: Unlimited

  Device flags   : Present Running

  Interface flags: SNMP-Traps

 

Physical interface: pimd, Enabled, Physical link is Up

  Type: PIMD, Link-level type: PIM-Decapsulator, MTU: Unlimited,

  Speed: Unlimited

  Device flags   : Present Running

  Interface flags: SNMP-Traps

 

Physical interface: pime, Enabled, Physical link is Up

  Type: PIME, Link-level type: PIM-Encapsulator, MTU: Unlimited,

  Speed: Unlimited

  Device flags   : Present Running

  Interface flags: SNMP-Traps

 

Physical interface: tap, Enabled, Physical link is Up

  Type: Software-Pseudo, Link-level type: Interface-Specific, MTU: Unlimited,

  Clocking: Unspecified, Speed: Unlimited

  Device flags   : Present Running

  Interface flags: SNMP-Traps

 

 

Commands:

 

root@% cli

root@> configure

[edit]

root@# set system host-name fred

root@# set domain-name fred.com

root@# set backup-router 1.2.3.4

user@# set interface ?

Possible completions:

  <interface-name>     Interface name

+ apply-groups         Groups from which to inherit

+ apply-groups-except  Don't interhit configuration

> interface-set        Logical interface set configuration

> traceoptions         Interface trace options

 

user@host# set interface lo0 ?

Possible completions:

  accounting-profile   Accounting profile name

+ apply-groups         Groups from which to inherit

+ apply-groups-except  Don't inherit configuration

  description          Text description of interface

  disable              Disable this interface

> hold-time            Hold time for link up and link down

  no-traps             Don't enable SNMP notifications for state changes

> traceoptions         Interface trace options

  traps                Enable SNMP notifications on state changes

> unit                 Logical interface

 

user@# set interface lo0 unit ?

Possible completions:

  <interface_unit_number>  Logical unit number (0..16385)

 

user@# set interface lo0 unit 0 ?

Possible completions:

  <[Enter]>            Execute this command

 accounting-profile    Accounting profile name

+ apply-groups         Groups from which to inherit

+ apply-groups-except  Don't interhit configuration

  bandwidth            Logical unit bandwidth

  description          Text description of interface

  disable              Disable this logical interface

> family               Protocol family

  no-traps             Don't enable SNMP notifications

  traps                Enable SNMP notifications

  |                    Pipe through a command

 

user@# set interface lo0 unit 0 family ?

Possible completions:

> any                  Parameters for 'any' family

> ccc                  Circuit cross-connect parameters

> inet                 IPv4 parameters

> inet6                IPv6 parameters

> iso                  OSI ISO protocol parameters

> tcc                  Translation cross-connect parameters

 

user@# set interface lo0 unit ANY fam inet ?

Possible completions:

  <[Enter]>            Execute this command

> address              Interface address/destination prefix

+ apply-groups         Groups from which to inherit

+ apply-groups-except  Don't interhit configuration

> filter               Packet filtering

  no-redirects         Do not redirect traffic

> policer              Interface policing

  primary              Candidate for primary interface in system

> service              Service operations

> simple-filter        Filter for doing multifield class

> unnumbered-address   Unnumbered interface

 

user@# set int lo0 unit 0 fam inet address ?

Possible completions:

 <source>              Interface address/destination prefix

 

user@host# set interface lo0 un 0 fam inet address 1.2.3.4/24

 

root# set sys log ?

Possible completions:

  announcements        System announcement message

+ apply-groups         Groups from which to inherit configuration data

+ apply-groups-except  Don't inherit configuration data from these groups

> class                Login class

  message              System login message

> password             Password configuration

> retry-options        Configure password retry options

> user                 Username

 

root# set sys log us ?

Possible completions:

  <user-name>          User name (login)

 

root# set sys log us fred ?

Possible completions:

+ apply-groups         Groups from which to inherit configuration data

+ apply-groups-except  Don't inherit configuration data from these groups

  authentication       Authentication method

  class                Login class

  full-name            Full name

  uid                  User identifier (uid) (100..64000)

 

 

root# set system login user fred class ?

Possible completions:

  <class>              Login class

  operator             permissions [ clear network reset trace view ]

  read-only            permissions [ view ]

  super-user           permissions [ all ]

  unauthorized         permissions [ none ]

 

root@# set system login user fred class superuser

root@# set system login user fred authentication plain-text-password

New Password: test

 

root@# commit

[edit]

root@# show

system {

    host-name fred;

    domain-name fred.com;

    backup-router 1.2.3.4;

    time-zone Europe/london;

 

    root-authentication {

        authentication-method (password | public-key);

    }

    services {

      ssh;

    }
    ntp {

      Server 1.2.3.4;

    }

 

    name-server {

        address;

    }

}

interfaces {

    fxp0 {

        unit 0 {

            family inet {

                1.2.3.4/24;

            }

        }

    }

}

root@fred# exit

Exiting configuration mode

root@fred>