Help
O JunOS tem integrado um livraria que permite por exemplo ver qual o significado do output de uma mensagem de syslog.
junos@R1# help ?
Possible completions:
<[Enter]> Execute this command
apropos Find help information about a topic
reference Reference material
syslog System log error messages
tip Tip for the day
topic Help for high level topics
| Pipe through a command
Separation of configuration edit and activation
validation checks
version control
automated rollback
candidate configuration ->commit->validated configuration->active configuration
configure private – permite que todos os users alterem em simultâneo a active config
configure exclusive – proíbe outros efetuarem alterações enquanto estiver conectado ao device
show command – mostra a config candidate relativamente a hierarquia onde se está inserido no momento
Set/Edit Command
From Top
junos@R1#set sytem services finger
junos@R1#set sytem services ftp
junos@R1#set sytem services ssh
From Sublevel
junos@R1#edit system services
[edit system services]
junos@R1#set finger
junos@R1#ser ftp
junos@R1#set ssh
Rollback
Apenas modifica a candidate config (não esquecer do commit)
rollback 0 – reset a candidate para a config atualmente ativa+
rollback n – n representa o numero da config ativa
rollback rescue – load o rescue file previamente criado
Fazer commit num determinado período
junos@R1#commit at 02:00:00
run command – permite executar comandos em config mode como se estivesse no Operational mode
Junos Sytem Health
Real-time Performance Monitoring (RPM)
Flow accounting – cflowd
Health monitor
RMON
Junos Sytem Health Diagnostic
System logging
hardware and operating events
Trace logging
protocol operations
snmp
Routing tables
Predefined Routing tables
inet.0 ipv4 unicast
inet.1 multicast forwarding cache
inet.2 usado para MBGP para permitir reverse path forwarding (RPF) checks
inet.3 usado para MPLS path information
inet.4 usado para MSDP routes
inet6.0 Usado para IPv6 unicast
mpls.0 usado para MPLS next hops
Route preference = Administrative Distance (Cisco World)
DIRECT 0
LOCAL 0
STATIC 5
OSPF internal 10
RIP 100
OSPF AS external 150
BGP (both EBGP and IBGP) 170
show route forwarding-table – existe uma entrada default para quando o prefix não existe, notificando a source device com ICMP unreachable
Default Routing Instance
A tabela default unicast de nome master e inclui a inet.0, e poderá tb incluir a inet6.0
show route instance
User-Defined instances
edit routing-instances new-instance instance-type instance-type
Existem diversos tipos de instances:
forwarding – Forwarding instance
l2vpn – Layer 2 VPN routing instance
layer2-control -Layer 2 control protocols
no-forwarding -Nonforwarding instance
virtual-router -Virtual routing instance
virtual-switch -Virtual switch routing instance
vpls -VPLS routing instance
vrf -Virtual routing forwarding instance
show route table new-instace.inet.0
Rotas estáticas
O next-hop pode ser a opção de bit bucket, as opções de discard/reject permite descartar o tráfego.
discard – faz drop silenciosamente (não envia ICMP)
reject – envia ICMP unreachable
set routing-options
static{
route 0.0.0.0/0 next-hop 172.30.25.1;
route 172.28.102.0/24 {
next-hop 10.210.11.190;
no-readdvertise;
resolve;
}
}
O nex-hop deve ser directamente ligado, porque by default o JunOS não faz lookups recursivos. Para permitir é necessário usar o comando resolve
Qualified Next hops
Permite indicar a preferência de uma rota (floating route)
qualified-next-hop x.x.x.x {
preference 7;
}
Config OSPF
Apartir da versão 8.x o Loop0/router-id é advertido automaticamente
set protocols ospf
set area 0 interface ge-0/0/1.{0} Se a unit não for referenciada, o JunOS considera como 0
set area 0 interface ge-0/0/3.0 passive
O JunOS converte a area 0 para decimal 0.0.0.0
show
area 0.0.0.0 {
interface ge-0/0/1.0;
interface ge-0/0/2.0;
interface ge-0/0/3.0 {
passive;
}
show ospf neighbor {detail,extensive}
show route protocol ospf
NETCONF XML Interface
set system load patch terminal
NTP
Para o sistema sincronizar quando faz booting é necessário configurar:
set system ntp boot-server 1.1.1.1
set system time-zone Europe/Lisbon
request system configuration rescue {save | delete} – efetua uma cópia da actual config como rescue config
rollback rescue – este comando apenas altera a candidate config
Operational Mode
show system command arguments:
alarms: Displays current system alarms
boot-messages: Displays the messages seen during the last system boot
connections: Displays the status of local TCP and UDP connections
processes: Displays the system’s process table
statistics : Provides options for viewing various protocol statistics
storage: Displays the status of the file system storage space.
show version detail (inclui as versões das pacotes instalados)
Junos Naming Convention
Package-release-edition
jroute-10.1R1.8-domestic-signed.tgz
release:
• Describes the Junos version
• Includes major and minor release numbers, release type (Release,Beta or Internal), build number and spin number
edition:
• Versions are either domestic-supporting strong encryption, or export-not supporting encryption
• Federal Information Processing Standards (or FIPS) editions provide advanced network security
the letter is an R to
indicate that this is released software. If you are involved in testing prereleased software,
this letter might be a B (for beta-level software) or I (for internal, test, or experimental
versions of software). The release also includes a build and spin number for the Junos
version.
Here, the release is 9.5R1.8, which is version 9.5, which has been released, build 1,
spin 8.-signed.tgz – Junos software is digitally signed and compressed using Secure Hash Algorithm (SHA-1) and
Message Digest 5 (MD5) checksums.
A package is installed only if the checksum within it matches the hash recorded in its corresponding file. The actual checksum used depends on the software version.
Package :
jinstall usado nas M/Mx/T Series
jinstall-ex usado nos EX Series,
junos-jsr usado J Series
junos-srx usado nos SRX Series
Upgrading JunOS
>reques system software add /var/tmp/jbundle-10.1R1.8-domestic.tgz reboot
Commands Useful in Upgrading Software:
• request system software add /var/tmp/<image-name> upgrades software
• request system storage cleanup deletes images
• show system storagedisplays compact-flash device storage details
• request system software add /var/tmp/<image-name> reboot upgrades the software
Permite verificar quais os ficheiros a serem eliminados
root@R1> request system storage ?
Possible completions:
cleanup Clean up temporary files and rotate logs
root@R1> request system storage cleanup ?
Possible completions:
<[Enter]> Execute this command
dry-run Only list the cleanup candidates, do not remove them
root@R1> request system storage cleanup dry-run
Referências:
4 thoughts on “Notas estudo JNCIA-Junos parte 2”