Network cheat sheet

From Wikitech
Jump to: navigation, search

Foundry

Unlike juniper all operational (like show) commands work in configuration mode.

Foundries don't take ssh keys and need passwords. boo!

show interfaces brief - shows interfaces with status, speed, and description (port-name)
Port  Link    L2 State  Dupl Speed Trunk Tag Priori MAC            Name           
1/1   Up      Forward   Full 1G    None  No  level0 0012.f2c5.5600 db63           
1/2   Up      Forward   Full 1G    None  No  level0 0012.f2c5.5600 db64   

| include - grep

sh mac-address - shows mac addresses
sh mac-address ethernet x/x - shows mac for interface x/x

conf t - configuration mode
SSH@csw1-sdtpa(config)#

show run - shows configuration

int ether 12/1 - go into configuration for that interface

port-name - assigns description
disable - turns port off
enable - turns port on
exit - moves you up a level

after configuration - ALWAYS type "write mem" 
must do write mem OUT of config mode
write mem - saves to hard drive the config, incase the box reboots

in conf mode - 
Foundries configure immediately - when you've typed the command, it's live!
vlan 2 - moves into vlan 2's configuration mode
unt eth X/X - puts X/X into that vlan as untagged
no unt eth X/x - takes X/X out of vlan
 

if you get the error "error - port ethe 1/25 do not belong to default vlan" that means the port is in another vlan and must be removed first

Juniper

Junipers take ssh keys. huzzah!

Juniper has operational mode and configuration mode.

operational mode - 
{master:8}       
lcarr@asw-a-eqiad> 
configuration mode - 
{master:8}[edit]
lcarr@asw-a-eqiad# 

Operational commands

show ethernet-switching table  - shows mac addresses
show ethernet-switching table interface - shows mac addresses for that interface
show ethernet-switching table vlan  - shows mac addresses for vlan
show interfaces descriptions - 
Interface       Admin Link Description
ge-1/0/0        up    up   ms1001

show interfaces terse - shows interfaces with ip's in a very short format

show interface ge-1/0/0 (extensive)- shows interfaces in more detail

monitor interface xe-1/1/0 - shows interface in a real-time updating mode (errors, bits, etc)

show log messages | last 20 - shows log with info

Config commands

Junipers configure after you confirm - you can configure and then double check

  • configure - puts you in config mode
  • exit - takes you up one level (or out of) config mode
  • top - takes you to the top level of config mode
  • show - shows you configuration below that level