Tuesday 21 March 2017

Juniper Troubleshooting Commands

TROUBLESHOOTING

set cli timestamp (logs timestamp on cli for all commands you run. Very useful)
show system uptime
show chassis hardware
show chassis fpc detail
show chassis environment
show chassis alarms
show configuration | display detail
show configuration | display inheritance (displays inherited config from a group)
show system statistics (displays tcp, udp, icmp, arp, ...packet statistics)
show system commit (displays last 50 commits)
show system rollback compare <commit #> <commit #> (displays the differences between two commits)

USER MANAGEMENT

show system users (displays logged in users)
request system logout user (terminates a user's session)
request message all message "<message>" (send message to all logged in users)

FIREWALL

show security flow session (displays active sessions for given source, destination parameters)
show security match-policies (displays which policy would match for given source, destination parameters)
show configuration groups junos-defaults (displays pre-defined Junos Applications)

NAT

show security nat source [summary|rule|pool] (displays source nat rules and details)
show security nat static rule (displays static nat rules and details)
show security nat destination [summary|rule|pool] (displays destination nat rules and details)

FIBRE OPTICS

show interfaces diagnostics optics <interface name> (displays sfp module rx/tx power values)

SWITCHING AND ARP

show ethernet-switching table (displays mac address table)
clear ethernet-switching table <mac-address>
show arp [no-resolve] (displays ip to mac table)
clear arp [interface|hostname]

ROUTING

show route table <routing-table-name>
show route terse
show route forwarding-table

OSPF

show ospf neighbor [extensive]
show ospf overview
show ospf interface
show ospf database detail
show ospf route [abr|asbr|extern]
clear ospf neighbor <neighbor ip>

BGP

show bgp summary
show bgp neighbor <neighbor ip>
show route advertising protocol bgp (displays the advertised routes via bgp)
show route receiving protocol bgp (displays the received routes via bgp)
clear bgp neighbor <neighbor ip> [soft|soft-inbound]

DHCP RELAY

show dhcp relay statistics
show dhcp relay binding
clear dhcp relay binding

IPv6

show ipv6 router-advertisement (displays the ipv6 enabled interfaces with ra statistics)
show ipv6 neighbors (displays ipv6 address to mac address table)

CPU & MEMORY

show chassis routing-engine
request chassis routing-engine master switch (to switchover routing engine mastership)
show system processes extensive (displays cpu and memory usage of software processes)
restart <process-name> (restarts a specific software process)
show route summary (displays max limits and the numbers of active routes per routing table)
show system virtual-memory (displays detailed memory usage)
show task memory detail (displays detailed memory usage)

VIRTUAL CHASSIS

show virtual-chassis status (displays virtual chassis members status)
show virtual-chassis vc-port (displays virtual chassis ports details)
request virtual-chassis vc-port [set|delete] (to set or delete virtual chassis ports)

TRACEOPTIONS CONFIG (creates process specific debug output)

traceoptions file <filename>
traceoptions file size <file size>
traceoptions file files <# of files>
traceoptions flag <events to be monitored>

TECHNICAL SUPPORT REQUIRED DATA

request support information | save /var/tmp/<filename>.txt
file archive compress source /var/tmp/<filename>.txt destination /var/tmp/<filename>.txt.tgz
show system core-dumps

Friday 24 February 2017

Juniper EX4300 40G QSFP+ Ports Configuration (Non VC-Ports)

The 40G ports on EX4300 Switches are configured as VC-PORTs by default. First remove VC-PORT configurations.

> request virtual-chassis vc-port delete pic-slot 1 port 0
> request virtual-chassis vc-port delete pic-slot 1 port 1
> request virtual-chassis vc-port delete pic-slot 1 port 2
> request virtual-chassis vc-port delete pic-slot 1 port 3

Then you need to configure no-auto-negotiation for the ports to become active.

# set interfaces et-0/1/0 ether-options no-auto-negotiation
# set interfaces et-0/1/1 ether-options no-auto-negotiation
# set interfaces et-0/1/2 ether-options no-auto-negotiation
# set interfaces et-0/1/3 ether-options no-auto-negotiation

Monday 6 February 2017

Junos Copy Files From TFTP Server To Switch/Router

Login with "root" account

> file copy ftp://(TFTP IP Address or Hostname)/ex4300/jinstall-ex-4300-14.1X53-D40.8-domestic-signed.tgz /var/tmp/jinstall-ex-4300-14.1X53-D40.8-domestic-signed.tgz


Tuesday 15 November 2016

Aruba Wireless Controller User Debug by MAC Address

controller (config) # logging level debugging user-debug <mac-address>

controller # show log user-debug all

Friday 11 November 2016

Junos Restoring a Saved Backup Configuration

Once the saved configuration file is copied to the router, you load and commit the file:

Start the CLI configuration mode.

user@routername> configure
Entering configuration mode
 
[edit]
user@host#

Load the file into the current configuration. You should override the existing file.

user@host# load override /var/tmp/filename
load complete

Commit the file.

user@host# commit
commit complete

Thursday 10 November 2016

DHCPv6 and Router Advertisements in Junos

Even if you intend to use DHCPv6 instead of SLAAC in your environment, you still need RA messages to function on the local LAN.  The RAs provide the default gateway information to an end node and, with the M-bit, inform the nodes that the LAN uses stateful DHCPv6

The RA contains several flags that are set that the nodes watch for and use.
  • A-bit – Autonomous Address Autoconfiguration Flag tells the node it should perform stateless address assignment (SLAAC RFC 4862)
  • L-bit – On-Link Flag tells the node that the prefix listed in the RA is the local IPv6 address
  • M-bit – Managed Address Config Flag tells the host if it should use stateful DHCPv6 (RFC 3315) to acquire its address and other DHCPv6 options
  • O-bit – Other Config Flag tells the host that there is other information the router can provide (such as DNS information defined in Stateless DHCPv6 (RFC 3736))



Junos RA config that is required for the DHCPv6 enabled infrastructure

set protocols router-advertisement interface <interface name> managed-configuration
set protocols router-advertisement interface <interface name> prefix <IPv6 Prefix> no-autonomous
set protocols router-advertisement interface <interface name> prefix <IPv6 Prefix> on-link

If the "on-link" option is not set for a prefix. Any host on that network sends all packets destined for the hosts on the same network to its default gateway. DHCPv6 does not send the prefix information to the client. When "on-link" is set the router informs the clients with the directly connected prefixes.

Juniper Troubleshooting Commands

TROUBLESHOOTING set cli timestamp (logs timestamp on cli for all commands you run. Very useful) show system uptime show chass...