\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Bell.Labs (Steve Fowlkes)} \pdfinfo{ /Title (the-webgw.pdf) /Creator (Cheatography) /Author (Bell.Labs (Steve Fowlkes)) /Subject (The WebGW Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{E30505} \definecolor{LightBackground}{HTML}{FDEFEF} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{The WebGW Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Bell.Labs (Steve Fowlkes)} via \textcolor{DarkBackground}{\uline{cheatography.com/20709/cs/3772/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Bell.Labs (Steve Fowlkes) \\ \uline{cheatography.com/steve-fowlkes} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 27th March, 2015.\\ Updated 4th October, 2016.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{4} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{The Maintenance Host (host01)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Host01 is the Maintenance Host. It is host to things like the MI and CNFG. Commands for Health and Status of the other blades are run from here. These are all very passive and "safe" commands to run without disrupting or changing any configuration. \newline % Row Count 5 (+ 5) {\bf{cm\_adm -a flavor\_summary}} Shows what 'flavor' is running on the cards. Flavor is what the VM is doing. Ex: vPIM or vSCM \newline % Row Count 8 (+ 3) {\bf{cm\_adm -a tenant\_summary}} Displays all of the configured tenants on the system, their 'type", what VLAN's they belong to, and what io type is configured. \newline % Row Count 12 (+ 4) {\bf{cm\_adm -a vm\_status -{}-target all}} Great command that shows, tenant by tenant, the name, state and flavor of the VM. In general the state here must be active. \newline % Row Count 16 (+ 4) {\bf{ cm\_adm -a health }} A command that preforms a health diagnostic of the entire system. If it passes you'll get a "Health Check Passed" message. This is an all inclusive test. Hosts, VM's and the files needed to checked.Things to look out for here are SSH, and IPM. (IP Manager) these must be in a pass state. \newline % Row Count 23 (+ 7) {\bf{ cm\_adm -a vm\_host\_summary -t host\#}} replace the \# with which host you are inquiring about. This gives you a modest amount of info for the host's vm's. \newline % Row Count 27 (+ 4) {\bf{cm\_adm -a vm\_power\_off -v 0\textless{}VM NAME\textgreater{}}} Used to shutdown a VM. \newline % Row Count 29 (+ 2) {\bf{cm\_adm -a vm\_restore -v \textless{}VM NAME\textgreater{}}} Used to start a VM that was previously created and then stopped by the vm\_shutdown action, or vm\_power\_off command.% Row Count 33 (+ 4) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Backing Out of a Layer}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Starting from ssh and going all the way down to the rconsole levels is a tricky business to pull back out of. If you don't exit the layers properly, you can level a session open, in which it will hang if you try to re-enter that same layer. \newline % Row Count 5 (+ 5) Here's a general methodology: \newline % Row Count 6 (+ 1) How you get in: {\bf{ssh}} \newline % Row Count 7 (+ 1) How you get out: {\bf{exit}} \newline % Row Count 8 (+ 1) How you get in: {\bf{virsh console}} \newline % Row Count 9 (+ 1) How you get out: {\bf{ctrl + {]}}} \newline % Row Count 10 (+ 1) How you get in: {\bf{node-console -s}} \newline % Row Count 11 (+ 1) How you get out: {\bf{logout}} then... {\bf{ctrl + c}} \newline % Row Count 12 (+ 1) How you get in: {\bf{rconsole}} \newline % Row Count 13 (+ 1) How you get out: {\bf{exit}} \newline % Row Count 14 (+ 1) In effect you would be climbing back up the chain of layers to where you started.% Row Count 16 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{TroubleShooting}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{`cm\_adm -a generate` - creates a set of ssh keys to interact with the iLO} \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{TroubleShooting}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{`cm\_adm -a generate` - creates a set of ssh keys to interact with the iLO} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{`cm\_adm -a install` - applies the generated ssh keys to the hosts.} \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{TroubleShooting}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{`cm\_adm -a generate` - creates a set of ssh keys to interact with the iLO \newline % Row Count 2 (+ 2) `cm\_adm -a install` - applies the generated ssh keys to the hosts.% Row Count 4 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{The Hosts}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{These commands can be run from any host on the system. Remember there is one host per blade. Each host runs multiple VM's.Normally you ssh to the host you want, or ssh from host01 to whatever host you wish. \newline % Row Count 5 (+ 5) {\bf{Not all of these commands are 'passive', so use caution!}} \newline % Row Count 7 (+ 2) {\bf{virsh list}} Let's you see all of the VM's running on the particular host that you are on. For example, Host01, has 4 different vm's. Also shows the state it is in. Should be 'running'. \newline % Row Count 11 (+ 4) {\bf{virsh console \textless{}VM NAME\textgreater{}}} This is the virsh command you'll be using the most. Let's you connect into the VM that you have on that particular host. Ex: \newline % Row Count 15 (+ 4) {\bf{virsh console 01-s00c01h0}} \newline % Row Count 16 (+ 1) You can't virsh into a VM that is not located on the host. \newline % Row Count 18 (+ 2) {\bf{virsh console \textless{}VM NAME\textgreater{} -{}-force}} This can be an extremely helpful command to help force out an existing or hung session (If someone logs out of virsh incorrectly! \newline % Row Count 22 (+ 4) {\bf{virsh reboot \textless{}VM NAME\textgreater{}}} Reboots the VM specified. \newline % Row Count 24 (+ 2) {\bf{virsh shutdown \textless{}VM NAME\textgreater{}}} Shutsdown the VM specified. \newline % Row Count 26 (+ 2) {\bf{virsh start \textless{}VM NAME\textgreater{}}} Starts the VM specified \newline % Row Count 27 (+ 1) {\bf{virsh dumpxml \textless{}VM NAME\textgreater{}}} This prints out the XML configuration about the VM that was written at it's creation. Generally you won't need to change any of this... \newline % Row Count 31 (+ 4) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{The Hosts (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{virsh destroy \textless{}VM NAME\textgreater{}}} Destroys the instance of the VM you specify \newline % Row Count 2 (+ 2) {\bf{virsh undefine \textless{}VM NAME\textgreater{}}} Undefines the name, and provisioning of the domain of the VM you specify. To completely remove a VM you need to run both commands, destroy and undefine.% Row Count 6 (+ 4) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{In Virsh, all VM's are created by configuring XML files, which are read into virsh.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{VM States}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{When you are in the MI host (00-s00c01h0) run the command "cm\_adm -a vm\_status -{}-target all" you will see a read out of the state of all the VM's provisioned. The states of the VM's on the cards are as follows:% Row Count 5 (+ 5) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Guest or "Tenant" Commands}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{RCC- Reliable Cluster Computing}} This cluster is a process on a host that \newline % Row Count 2 (+ 2) monitors and controls the status of all the VMs on that host. RCC maintains high availability and acts upon errors. \newline % Row Count 5 (+ 3) {\bf{REM - REdundancy Manager}} The REM combines the actions of the SM running on the configuration server and LM tasks running on the cards \newline % Row Count 8 (+ 3) (Local Manager and System Manager). \newline % Row Count 9 (+ 1) These commands can be run from the MI. They manage the VM's throughout the different blades. These must be run as user lss. \newline % Row Count 12 (+ 3) {\bf{rcc\_srv\_state -{}-action display -{}-set ALL}} Report all RCC and VM states \newline % Row Count 14 (+ 2) {\bf{rem\_srv\_state -{}-action display -{}-set all}} Report all REM status% Row Count 16 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{The VM's On Each Host}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Each Host blade will be running VM's that are running the services we need. (IMS, PIM, SCM, OA etc...) Once on the VM, you can connect to each of the services running. \newline % Row Count 4 (+ 4) {\bf{node-console -s \textless{}card \#\textgreater{}}} This allows you to connect to the specific SCM card. Replace card \# with the actual number. The card number must be on the Host to connect to it. \newline % Row Count 8 (+ 4) {\bf{node-console -p \textless{}card \#\textgreater{}}} This allows you to connect to the specific PIM card. Replace card \# with the actual number. The card number must be on the Host to connect to it. \newline % Row Count 12 (+ 4) {\bf{view node}} This lets you get a low level look at what the application on the VM are doing. Most importantly it shows the VM's UP/DOWN status, and the application's UP/DOWN status. It also shows each application (PIM, or SCM), it's state, and it's function (Active/Standby). Very useful command. \newline % Row Count 18 (+ 6) {\bf{view ip statistics current}} This seems to give you a good measurement of how to gauge rather the applications you set up are actually talking and receiving traffic. \newline % Row Count 22 (+ 4) {\bf{view ip if}} This command shows the basics of what most ifconfig commands show. It gives you a list of interfaces that are created for the application, as well as the state (up/down) the prefix or subnet cidr, the interfaces name (en.scm1, or en.pim2 etc..), and the vlan it's attached to \newline % Row Count 28 (+ 6) ( mgc, oam, voice, etc..) \newline % Row Count 29 (+ 1) {\bf{view route table}} Shows the routing table would should have atleast 1 static and one local route. The static route may or may not be the default gateway.% Row Count 33 (+ 4) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{It is at this deep, 'Application Layer' that we must configure the IP's, networks, and subnets.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{The GUI's}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{Remember what GUI is on what machine. \newline % Row Count 1 (+ 1) {\bf{FS-GUI}} \newline % Row Count 2 (+ 1) The CNFG VM hosts the web server that lets us get to the FS-GUI. This is the application where we set the parameters for the ISC portion, including realms, filters, SIP applications, firewalls, Diameter profiles, charging collection data, PCSCF tables etc.. The FS-GUI application needs to be downloaded from the CNFG server via ftp. Use filezilla. It is located in /opt/lss/lmt/provgui \newline % Row Count 10 (+ 8) {\bf{MI-GUI}} \newline % Row Count 11 (+ 1) {\bf{8950 ID Management GUI}}% Row Count 12 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Quick Definitions and Things to Remember}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{IP Realms:}} Realms allow you to group addresses and subnets that are known to a border gateway. It then lets the gateway know which realm it requires an address from. (untrusted or trusted in our case) \newline % Row Count 5 (+ 5) {\bf{VMM}} Virtual Machine Manager, basically the hypervisor that supports us using all of the VM's and their sub-applications. \newline % Row Count 8 (+ 3) {\bf{iLO}} iLO is the embedded server software on the chassis itself, and on each bay, that allows for remote connectivity. All iLO addresses are apart of the OAM vlan. \newline % Row Count 12 (+ 4) Naming of VM's: \textless{}Tenant Number\textgreater{} - \textless{}shelf number\textgreater{} \textless{}card number\textgreater{} \textless{}Host number\textgreater{} \newline % Row Count 14 (+ 2) All VM's, Hosts, and nodes in a particular subnet, and VLAN will use the same default gateway. \newline % Row Count 16 (+ 2) Remember to put ipv6 addresses in {[} {]} 's when used with a port number. \newline % Row Count 18 (+ 2) If you are on a PC or behind a router that only supports IPv4, and the MI-GUI is provisioned IPv6, you won't be able to access it. \newline % Row Count 21 (+ 3) You must download the provisioning gui software from the CNFG server. Check the CPC for this address, and ftp the software from that address. \newline % Row Count 24 (+ 3) It's location: \seqsplit{/opt/LSS/LMT/ProvGui/Softswitch} \newline % Row Count 25 (+ 1) Files Needed: \newline % Row Count 26 (+ 1) {\bf{.olv.zip}} is for the chassis provisioning. Created from the original Guest Field Worksheet. \newline % Row Count 28 (+ 2) {\bf{.xls Guest Worksheet}} is for the system and VM provisioning. \newline % Row Count 30 (+ 2) } \tn \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Quick Definitions and Things to Remember (cont)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{{\bf{"7510 script"}} 7510 IP Provisioning \newline % Row Count 1 (+ 1) {\bf{CPC/NDP:}} Core files that are used to create and populate the above files. \newline % Row Count 3 (+ 2) {\bf{.xlsprov}} This file is needed to prevent manually inputting the hundreds of parameters into the FS-GUI/COM% Row Count 6 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Keep Your Bearings}} \tn \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{To keep track of where you are in the system, you can reference this to see what the prompts correspond to. The prompts below are examples, the numbers will be different, but learn to recognize the general syntax. \newline % Row Count 5 (+ 5) When you are on the Host Level: \newline % Row Count 6 (+ 1) {\bf{{[}root@wgw03-host01 \textasciitilde{}{]}\#}} \newline % Row Count 7 (+ 1) When you are on the VM Level: \newline % Row Count 8 (+ 1) {\bf{{[}root@vmm05-10 \textasciitilde{}{]}\#}} \newline % Row Count 9 (+ 1) When you are on the 'Sub-Service' Level: \newline % Row Count 10 (+ 1) {\bf{My-Chassis:ACT-SCM:1.10(r0)\textgreater{}=2:diag:main:vMGx\#}} \newline % Row Count 12 (+ 2) When are you in any of these levels, make sure you exit the level properly, or the 'session' will still be open, and cause you problems when you try to return!% Row Count 16 (+ 4) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}