Benutzer-Werkzeuge

Webseiten-Werkzeuge


juniper

Juniper ist ein Anbieter und Hersteller von Netzwerkhardware wie Switches und Router aber auch Software wie z.B JunOS welches native auf Linux bzw FreeBSD läuft (je nach Version). Somit ist Zugriff auf alle Funktionalitäten des Hostsystems gegeben.

Juniper hat ein commit-rollback system.

Aufgaben können via REST Api oder nconf automatisiert werden.

CCNA == JNCIA

Slogan: „In Juniper ist alles ein Sub-Interface“

Im Gegensatz zu Cisco, wo alle Interfaces von Haus aus bereitstehen muss man auf Juniper alle Interfaces erst anlegen.

Subnet-Masks werden nicht genutzt - nur CIDR

Ein Chassis ist ein (Cisco) Stack - ein eigenes FPC oder auch Line Card.

Konfigurationshierarchie

  • system
    • login
      • user
  • interfaces
    • ge-0/0/0
    • irb
      • unit 10
  • routing-options
  • protocols
  • firewall
user@JunOS-Router1> configure

[edit]
user@JunOS-Router1# edit system

[edit system]
user@JunOS-Router1# edit login

[edit system login]
user@JunOS-Router1# show
user manuel {
    uid 2002;
    class super-user;
    authentication {
        encrypted-pasword "ds789a5fd6s8a5f7d8sa5f65ds7f85ds6a85fa85f675f78a";
    }
}
user jango {
    uid 2003;
    class super-user;
    authentication {
        encrypted-pasword "789s6fd786s7f68ds786f7ds86f7d8s6f7d8s58df6sf6ds74";
    }
}
[edit system login]
user@JunOS-Router1# up // go 1 step up in hierarchy

[edit system]
user@JunOS-Router1# top // top to get on top of the hierarchy

[edit]
user@JunOS-Router1# set system host-name Router2

[edit]
user@JunOS-Router1# delete system login user jango

[edit]
user@JunOS-Router1# commit // save changes to disk


//
set interfaces et-4/0/0 promiscuous-mode
delete interfaces et-4/0/0 promiscuous-mode

Konfigurationsdateien

Diese Cisco Config

hostname Router1
clock timezone set CET +2
!
interface ge0/0
  switchport access vlan 99
!
ip route 0.0.0.0 0.0.0.0 10.0.0.1

würde auf Juniper so aussehen

system {
    host-name Router1;
    time-zone Austria/Vienna;
}
interfaces {
    ge-0/0/0 {
        unit 0 {
            family ethernet-switching {
                vlan members [ 99 ];
            }
        }
    }
}
routing-options {
    static {
        route 0.0.0.0/0 next-hop 10.0.0.1;
    }
}

Command line interface

//Pipes
| no-more // zeigt alles auf einmal
| find
| resolve // löst IPs auf

// konfigurationsmodus
configure

// run operational command in configuration mode (wie do auf cisco)
run <command>

// go to host OS
start shell
...
// back to JunOS
exit

help apropos <command>

set interfaces ge-0/0/0.0 family inet address 10.0.0.1/32 [primary|preferred]

rename interfaces ge0/0/0.0 to unit 1 // rename unit (subinterface)

set interfaces ge-0/0/0.0 disable // disable interface (cisco: shutdown)

delete interfaces ge-0/0/0.0 disable // enable it (cisco: no shutdown)

show interfaces ge-0/0/0 [extensive]

deactivate interfaces ge-0/0/0 // config bleibt aber wird ignoriert!!


set system host-name R2

Alle EMACS Shortcuts werden unterstützt.

Interfaces

  • IFD = Physical device
  • IFL = Logical device
  • IFF = Address family
  • IFA = Address entry
  • ge = Gigabit Ethernet
  • xe = 10G Ethernet
  • et/xle/fte = 40G Ethernet
  • et = 100G Ethernet
  • ae = Aggregated Ethernet
  • vlan/irb = Logical interface

Wenn ein Port ein SFP Modul nutzt kommt es auf den Speed an wie das Interface benannt wird. Ist es ein 1G SFP dann heisst es ge0/0/0 ist es ein 10G SFP heisst das Interface xe0/0/0 (Trifft nicht auf alle Versionen zu).

Interface Konfiguration ist ebenfalls eine Hierarchie

  • interface (when physical, physical parameters like duplex, speed, mtu, description)
    • unit (most config goes here, a logical interface or like a sub-interface, eg VLAN)
      • family (type of addressing, ipv4, ipv6 or ethernet)
        • settings
{master:0}
admin@Home-SW> configure

{master:0}[edit]
admin@Home-SW# set interfaces ge-0/0/1 unit 0 family inet address 10.0.1.1/24 [primary|preferred]
// or this 
admin@Home-SW# set interfaces ge-0/0/1.0 family inet address 10.0.1.1/24

{master:0}[edit]
admin@Home-SW# set interfaces ge-0/0/1 unit 0 description "My description"

{master:0}[edit]
admin@Home-SW# rename interfaces ge-0/0/1.0 to unit 1
Auf Cisco gibt es IP Adressen und secondary IP Adressen. Auf Juniper definiert man die primary oder preferred IP, alle anderen sind automatisch secondary.

Primary geht ins remote-net, preferred ins local-net.

Wenn primary/preferred nicht gesetzt wird, wird die niedrigste IP am Interface ausgewählt.

Out of Band

Managment Interfaces auf Routern und Switches heissen unterschiedlich.

  • fxp0 = Physical managment Interface on a router
  • em0 = Internal ports on a router
  • me0 = Physical managment interface on a switch
  • vme0 = Virtual managment for a switch virtual chassis (a switch stack)

Special interfaces

Auch permanent interfaces genannt.

  • pimd/pime = Special interfaces for multicast traffic
  • dsc = Discard interface (to silently drop packets)
  • ipip/gre = Used to create tunnel interfaces
  • and others..

VLANS

  • access – Lassen Sie die Schnittstelle im Zugriffsmodus arbeiten. In diesem Modus kann sich die Schnittstelle nur in einem einzigen VLAN befinden. Zugangsschnittstellen verbinden sich typischerweise mit Netzwerkgeräten wie PCs, Druckern, IP-Telefonen und IP-Kameras.
  • Tagged-Access – Lassen Sie die Schnittstelle im Tagged-Access-Modus arbeiten. In diesem Modus kann sich die Schnittstelle in mehreren VLANs befinden. Gekennzeichnete Zugangsschnittstellen stellen normalerweise eine Verbindung zu Netzwerkgeräten wie PCs, Druckern, IP-Telefonen und IP-Kameras her.
  • trunk – Betreiben Sie die Schnittstelle im Trunk-Modus. In diesem Modus kann sich die Schnittstelle in mehreren VLANs befinden und den Datenverkehr zwischen verschiedenen VLANs multiplexen. Trunk-Schnittstellen sind normalerweise mit anderen Switches und Routern im LAN verbunden.

Siehe JunOS Port mode

Todo.. https://youtu.be/Q5365028XbA?t=530

Basic Settings

JunOS> configure
root# set system host-name MX
root# set system root-authentication plain-text-password
root# commit
root# request system power-off at now
root# show chassis fpc

Interfaces

JunOS> show interfaces
JunOS> configure
[edit]
root# show interfaces terse
# unit ist wie ein Subinterface
root# set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.1/24
root# set interfaces ge-0/0/0 unit 1 family inet address 10.0.1.1/24
# oder
root# set interfaces ge-0/0/0.1 family inet address 10.0.1.1/24
root# set interfaces ge-0/0/0 unit 0 description "My Interface description"
root# delete interfaces ge-0/0/0

Routing

JunOS> configure
[edit]
root# set routing-options static route 0.0.0.0/0 next-hop 100.0.0.1
root# show route
root# show routing-options
juniper.txt · Zuletzt geändert: 2023/10/31 05:36 (Externe Bearbeitung)