Skip to content

Instantly share code, notes, and snippets.

@jzlka
Last active March 28, 2018 06:38
Show Gist options
  • Save jzlka/206b3a87e2e012fbb990d88cf3f1d6cb to your computer and use it in GitHub Desktop.
Save jzlka/206b3a87e2e012fbb990d88cf3f1d6cb to your computer and use it in GitHub Desktop.
\begin{center}
\begin{tcolorbox}[text width=1cm,halign=center]
\section*{CCNA1}
\end{tcolorbox}
\end{center}
\subsection*{Basics}
\#hostname <name> \\
\#banner motd d <text\ldots> d \\
(config)\#no ip domain-lookup\\
(config-if)\#descr <text\ldots>\\
(config)\#default <interface>\\
\#sh int status err-disabled\\
\#copy running-config startup-config\\
\#erase startup-config\\
\#reload
\subsection*{Settings}
\subsubsection*{Logs}
(config)\#line console 0\\
(config-line)\#logg synch
\subsubsection*{Password -privileged exec}
(config)\#enable pass cisco\\
(config)\#enable secret cisco
\subsubsection*{Password -console}
(config)\#line cons 0\\
(config-line)\#passw cisco\\
(config-line)\#login\\
(config)\#service password-encryption
\subsubsection*{Password -telnet}
(config)\#line vty 0 15\\
(config-line)\#passw cisco\\
(config-line)\#login
\subsubsection*{Misc}
\#auto secure\\
\#undebug all\\
\#sh ... | section\\
\#sh ... | begin\\
\#sh ... | include\\
\#sh ... | exclude\\
\#more ..\\
\#ip mtu <num>\\
\#ip host <TEXT> <ip>
\subsubsection*{Debug}
\#show running-config
\subsection*{IP}
\subsubsection*{Router}
R(config)\#int <interface>\\
R(config-if)\#ip addr <ip> <mask>\\
R(config-if)\#no shut
\subsubsection*{Switch}
S(config)\#int vlan 1\\
S(config-if)\#ip addr <ip> <mask>\\
S(config-if)\#no shut
S(config)\#ip default-gateway <ip>\\
\subsubsection*{Loopback}
S(config)\#int lo 1\\
S(config-if)\#ip addr <ip> <mask>
\subsubsection*{Dhcp}
S(config-if)\#ip addr dhcp
\subsubsection*{Debug}
\#sh ip int br\\
\#sh ip arp\\
\#sh mac address-table\\
\#sh cdp neigh\\
\#sh ipv6 neigh
\subsection*{Serial ports}
(config)\#int Serialx/y/z\\
(config-if)\#ip addr <ip> <mask>\\
(config-if)\#clock rate 128000\\
(config-if)\#no shut
\subsubsection*{Debug}
\#show controllers [interface]
\subsection*{DHCP}
R(config)\#ip dhcp excluded-addr <first> [<last>]\\
R(config)\#ip dhcp pool <name>\\
R(dhcp-config)\#network <ip> <mask>\\
R(dhcp-config)\#default-router <ip>\\
R(dhcp-config)\#dns-server <ip>\\
R(config-if)\#ip helper-addr <ip>
\subsubsection*{Debug}
\#show ip dhcp binding\\
\#show ip dhcp server stat\\
\#show ip dhcp <pool>\\
\#debug ip dhcp server packet
\subsection*{Routing}
\subsubsection*{NAT}
R(config)\#access-li <num> perm <netw> <mask>\\
R(config)\#int serial x/y/z\\
R(config-if)\#ip nat inside\\
R(config)\#int ge0/0\\
R(config-if)\#ip nat outside\\
R(config)\#ip nat in sourc lis <num> int ge0/0 overl
\subsubsection*{Static routing}
R(config)\#ip route 0.0.0.0 0.0.0.0 <int>
\subsubsection*{Debug}
\#sh ip nat translations\\
\#sh ip nat statistics\\
\#clear ip nat translation *\\
\#show ip route [static]
\begin{center}
\begin{tcolorbox}[text width=1cm,halign=center]
\section*{CCNA2}
\end{tcolorbox}
\end{center}
\subsection*{SSH}
(config)\#username <name> secret <pass>\\
(config)\#ip domain-name <name>\\
(config)\#crypto key generate rsa\\
(config)\#ip ssh ver 2\\
(config)\#line vty 0 15\\
(config-line)\#exec-timeout 10\\
(config-line)\#login local\\
(config-line)\#transport input ssh
\subsubsection*{Debug}
\#sh ip ssh\\
\#sh ssh
\subsection*{Switch Port Security}
(config)\#int range fa0/1-24\\
(config-range-if)\#switchport mode access\\
(config-range-if)\#switchp port-sec max <num>\\
(config-range-if)\#switchp port-sec mac-addr sticky\\
(config-range-if)\#switchp port-sec viol \{restr, shut\}\\
(config-range-if)\#swithcp port-security
\subsubsection*{Debug}
\#sh port-security\\
\#sh port-security addr\\
\#sh port-security int <int>\\
\subsection*{VLAN}
(config)\#vlan <num>\\
(config-vlan)\#name <name>\\
(config-if)\#swithcp mode access\\
(config-if)\#switchp access vlan <id>\\
(config-if)\#switchp host
\subsubsection*{Trunk}
(config-if)\#switchp trunk encap dot1q\\
(config-if)\#switchp trunk allowed vlan <id\_list>\\
(config-if)\#switchp mode trunk\\
(config-if)\#switchp trunk native vlan <id>
\subsubsection*{DTP advertising}
(config-if)\#switchp nonegotiate
\subsubsection*{Debug}
\#sh vlan [br]\\
\#sh vlan id <id>\\
\#sh vlan name <name>\\
\#sh int <int> switchport\\
\#sh int trunk
\subsection*{Inter-vlan routing}
\subsubsection*{Router-On-A-Stick}
R(config)\#int fa0/0.<vlanId>\\
R(config-subif)\#encap dot1q <vlanId>\\
R(config-subif)\#ip addr <addr> <mask>\\
R(config-subif)\#no shut
\subsubsection*{Switch-based}
S(config)\#sdm prefer lanbase-routing\\
S\#reload\\
S(config)\#ip routing
\subsubsection*{Debug}
\#sh ip int br\\
\#sh ip route\\
\#sh sdm prefer |section spanning-tree portfast
\subsection*{ACL}
\subsubsection*{Standard named}
(config)\#ip access-list standard <name>\\
(config-std-nacl)\#\{deny|permit\} <ip> <wildcard>\\
(config-if)\#ip access-group <name> \{in|out\}\\
(config)\#line vty 0 15\\
(config-line)\#access-class <acl> in
\subsubsection*{Extended numbered}
(config)\#access-l <num> \{perm|deny\} <proto> <fromip> <wildc> <to> <wildc> <operator> [port]
\subsubsection*{Extended named}
(config)\#ip access-l exte <name> \{perm|deny\} <prot> <from> <wildc> <to> <wildc> <operator> [port]
\subsubsection*{Nat/Pat with extended acl}
(config)\#ip nat in sour list <name> int <int> overload
\subsubsection*{Debug}
\#sh access-lists\\
\#sh ip access-lists\\
\#debug ip packet <num>
\subsection*{RIP}
\subsubsection*{RIPv2}
R(config)\#router rip\\
R(config-router)\#ver 2\\
R(config-router)\#no auto-summary\\
R(config-router)\#network <netw>\\
R(config-router)\#passive-int \{default,<int>\}\\
R(config-router)\#default-info originate
\subsubsection*{Debug}
\#sh ip proto\\
\#sh ip route\\
\#undebug all\\
\#debug ip rip\\
\#clear ip route *
\subsubsection*{RIPng}
R(config)\#ipv6 unicast-routing\\
R(config)\#ipv6 router rip <name>\\
R(config-if)\#ipv6 rip <name> enable
\subsubsection*{Debug}
\#sh ipv6 int br\\
\#sh ipv6 proto\\
\#sh ipv6 rip [<name>]\\
\#sh ipv6 route
\subsection*{OSPFv2}
R(config)\#router ospf 1\\
R(config-if)\#ip ospf cost <num>\\
R(config-router)\#network <addr> <wildcard> area 0\\
R(config-router)\#passive-int \{<int>|default\}\\
R(config-router)\#default-inf originate
\subsubsection*{Change ID}
R(config)\#int lo 0\\
R(config-lo)\#ip addr <addr> <mask>\\
--OR\\
R(config-router)\#router-id 200.200.200.200\\
R\#clear ip ospf process
\subsubsection*{Debug}
\#sh ip ospf [neigh]\\
\#sh ip ospf int [br]\\
\#sh ip route ospf\\
\#auto-cost reference-bandwidth 10000
\subsection*{IPv6}
R(conf)\#int gi0/0\\
R(conf-if)\#ipv6 addr <addr>/<prefix>
\subsubsection*{Debug}
\#sh ipv6 proto\\
\#sh ipv6 route\\
\#sh ipv6 int [br]\\
\#sh ipv6 neigh
\begin{center}
\begin{tcolorbox}[text width=1cm,halign=center]
\section*{CCNA3}
\end{tcolorbox}
\end{center}
\subsection*{EtherChannel}
\subsubsection*{PAgP}
S(config-if)\#channel-gr <num> mode \{desirable|auto\}\\
s(config)\#int port-channel <num>
\subsubsection*{LACP}
S(config-if)\#channel-gr <num> mode \{active|passive\}
\subsubsection*{Debug}
\#sh etherchannel \{summ|detail|proto|port-ch\}\\
\#sh int trunk\\
\#sh int fa0/1 etherchannel
\subsection*{HSRP}
R(config-if)\#standby <num> ip <addr>\\
R(config-if)\#standby <num> priority <num>\\
R(config-if)\#standby <num> preempt\\
R(config-if)\#standby <num> track f0/0 30
\subsubsection*{Debug}
\#sh standby [br]
\subsection*{PVST+,RPVST+}
\subsubsection*{PVST+}
S(config-if)\#spanning-tree port type edge\\
S(config)\#spanning-tree vlan <id> priority <num>\\
S(config)\#spanning-tree vlan <id> root primary
\subsubsection*{Cost}
S(config-if)\#spanning-tree cost <cost>\\
S(config-if)\#spanning-tree vlan <id> cost <cost>
\subsubsection*{Port priority}
S(config-if)\#spanning-tree port-priority <num>\\
S(config-if)\#spanning-tree vlan <id> port-prio <num>
\subsubsection*{Portfast}
S(config)\#spanning-tree portfast default\\
S(config-if)\#spanning-tree portfast
\subsubsection*{PVRST+}
S(config)\#spanning-tree mode rapid\_pvst\\
S(config)\#spanning-tree mode pvst\\
S(config)\#spanning-tree link-type <type>\\
S(config)\#spanning-tree vlan20
\subsubsection*{BPDU guard}
S(config-if)\#spanning-tree bpduguard
\subsubsection*{Debug}
\#sh spanning-tree \{vlan <id>|int <int>\}\\
\#sh spanning-tree \{detail|vlan <id> root|events\}\\
\#debug spanning-tree events
\begin{enumerate}
\item Lowest Root ID
\item Lowest Root Path Cost
\item Lowest Sender Bridge ID
\item Lowest Sender Port ID
\item Lowest Receiver Port ID
\end{enumerate}
\subsection*{OSPF Multiarea}
R(config-if)\#ip ospf prior <num>
\subsubsection*{md5}
R(config-if)\#ip ospf message-d <key\_id> md5 <key>\\
R(config-if)\#ip ospf auth message-digitest\\
R(config-router)\#area <id> authent message-digitest
\subsubsection*{Loopbacks}
R(config-if)\#ip ospf network point-to-point
\subsubsection*{OSPF Point-To-Multipoint}
R(config-if)\#ip ospf network point-to-multipoint
\subsubsection*{Network}
R(config-router)\#network <ip> <wldcrd> area <id>
\subsubsection*{Summary routes (LSA 4)}
R(config-router)\#area <id> range <addr> <mask>
\subsubsection*{External networks (LSA 5)}
R(config-router)\#summary-addr <network> <mask>
\subsubsection*{Debug}
\#clear ip ospf process\\
\#sh ip proto\\
\#sh ip route [ospf]\\
\#sh ip ospf [\{neigh|int [br]|database|border-router\}]
\subsection*{EIGRP}
R(config)\#router eigrp <AS-num>\\
R(config-router)\#no auto-summary\\
R(config-router)\#network <net\_addr> <wildc>
\subsubsection*{Passive interface}
R(config-router)\#passive-int <int>
\subsubsection*{Default route}
R(config-router)\#redistribute static
\subsubsection*{Summarization}
R(config-if)\#ip summary\_a eigrp <AS> <net> <wild>
\subsubsection*{Authentication}
R(config)\#key chain EIGRP\_KEYS\\
R(config-keychain)\#key 1\\
R(config-keychain-key)\#key-string CiscoLab\\
R(config-if)\#ip auth key-ch eigrp 65100 EIGRP\_KEYS\\
R(config-if)\#ip auth mode eigrp 65100 md5
\subsubsection*{Debug}
\#sh key chain\\
\#sh ip proto\\
\#sh ip route [eigrp]\\
\#sh ip ospf [\{neigh|int [detail]|topology\}]
\begin{center}
\begin{tcolorbox}[text width=1cm,halign=center]
\section*{CCNA4}
\end{tcolorbox}
\end{center}
\subsection*{PPP}
R(config-if)\#encap ppp (hdlc by default)
\subsubsection*{PAP}
R(config)\#username <local\_usr> passw <local\_pass>\\
R(config-if)\#ppp authentication pap\\
R(config-if)\#ppp pap sent-u <rmt\_usr> pass <pass>
\subsubsection*{CHAP}
R(config)\#username <remote\_host> passw <passwd>\\
R(config-if)\#ppp authentication chap
\subsubsection*{PPP Multilink}
R(config-if)\#encap ppp\\
R(config-if)\#ppp multilink\\
R(config-if)\#ppp multilink group 1\\
R(config-if)\#clock rate <rate> (\#for DCE)\\
R(config-if)\#int multilink 1\\
R(config-if)\#ip addr <addr> <mask>\\
R(config-if)\#ppp multilink\\
R(config-if)\#ppp multilink group 1
\subsubsection*{PPP IP from Range}
R(config-if)\#encap ppp\\
R(config-if)\#ppp chap hostname <name>\\
R(config-if)\#ppp chap passw <pwd>\\
R(config-if)\#ip addr nonegotiated\\
R1(config)\#ip local pool <name> <first/8> <last>\\
R1(config)\#username <name> passw <pwd>\\
R1(config-if)\#ip addr ip> <mask>\\
R1(config-if)\#encap ppp\\
R1(config-if)\#peer default ip addr pool <name>\\
R1(config-if)\#ppp auth chap callin
\subsubsection*{Debug}
\#debug ppp {packet|negotiation|authentication}\\
\#sh ppp multilink\\
\#sh int multilink 1\\
\#sh ip cdp neigh
\subsection*{Frame-Relay}
R(config)\#frame-relay switching\\
R(config-if)\#encap frame-r [ietf]\\
R(config-if)\#frame-rel intf-type dce\\
R(config-if)\#frame-rel route 112 int s0/0/0 121
\subsubsection*{FR Router}
R(config-if)\#enncap frame-rel\\
R(config-if)\#clock rate <rate> (\#if DCE)\\
R(config-if)\#no keepalive (\#if we don't have FR SW)
\subsubsection*{Statuc FR mapping (no inverse arp)}
R(config-if)\#shut\\
R(config-if)\#frame-r map ip<nxtHpIp><DLIC>[brdcst]\\
R(config-if)\#no shut
\subsubsection*{FR subinterface}
FRSW(config-if)\#frame-r rout 114 int s0/0/1 141\\
R(config-if)\#encap frame-relay\\
R(config-if)\#int s0/0/1.114 point-to-point\\
R(config-subif)\#ip addr <ip> <mask>\\
R(config-subif)\#frame-rel interface-dlci 114
\subsubsection*{LMI types}
R(config-if)\#frame-rel lmi-type ansi\\
R(config-if)\#bandwidth <num>\\
\#wait 60 sec
\subsubsection*{OSPF}
R(config-if)\#ip ospf net point-to-point
\subsubsection*{Debug}
\#sh frame-rel pvc [summary]\\
\#sh frame-rel [route|map|lmi]\\
\#sh int <int>\\
\#debug frame-rel
\subsection*{TFTP}
\#copy running tftp
\subsection*{NAT(ACL) Pool}
\subsubsection*{static}
R(config)\#ip nat inside source static tcp <localIp> <localPort> <globalIp> <globalPort>
\subsubsection*{dynamic}
R(config)\#ip nat pool <pool> <firstIp> <lastIp> netmask <mask>\\
R(config)\#access-list <num> permit <srcIp> <wildc>\\
R(config)\#ip nat inside sourc list <num> pool <pool>
\subsection*{GRE Tunnel}
R(config)\#int tunnel 0\\
R(config-if)\#ip addr <addr>/<prefix>\\
R(config-if)\#tunnel source <int>\\
R(config-if)\#tunnel dest <remoteIp>
\subsubsection*{Debug}
\#sh ip int br\\
\#sh int tunnel 0
\subsection*{IPv6 Tunnel}
R(config)\#int tunnel 0\\
R(config-if)\#ipv6 addr <addr>/<prefix>\\
R(config-if)\#tunnel mode ipv6ip\\
R(config-if)\#tunnel source <serial\_int>\\
R(config-if)\#tunnel dest <remote\_ipv4>
\subsection*{IPv6 over IPv4 Tunnel}
R(config)\#int t1\\
R(config-if)\#ipv6 addr <addr>/<prefix>\\
R(config-if)\#tunnel source <int>\\
R(config-if)\#tunnel dest <remote\_ipv4>\\
R(config-if)\#tunnel mode ipv6ip
\subsubsection*{Debug}
\#sh ipv6 int br
\subsection*{DHCPv6}
\#sdm prefer ???-ipv4-and-ipv6 default\\
R(config)\#ipv6 unicast-routing\\
R(config-if)\#ipv6 en\\
R(config-if)\#ipv6 addr autoconfig
\subsubsection*{Pool}
R(config)\#ipv6 dhcp pool IPV6-POOL\\
R(config-dhcpv6)\#domain-name domain.com
\subsubsection*{Static IP}
R(config-if)\#ipv6 addr <ipv6>/<prefix>\\
R(config-if)\#ipv6 addr fe80::1 link-local\\
R(config-if)\#ipv6 nd other-config-flags\\
R(config-if)\#ipv6 dhcp server IPV6\_stateless\\
R(config-if)\#ipv6 nd managed-config-flags
\subsubsection*{Debug}
\#sh ipv6 dhcp bindings\\
\#sh ip cache flow
\subsection*{EIGRPv6}
R(config)\#ipv6 router eigrp <AS-num>\\
R(config-rtr)\#eigrp router-id <ipv4addr>\\
R(config-rtr)\#passive-ont <int>
\subsubsection*{Enable on interfaces}
R(config-if)\#ipv6 eigrp <AS-num>
\subsection*{OSPFv3}
R(config)\#ipv6 router ospf 10\\
R(config-rtr)\#router-id 2.2.2.2\\
R(config-rtr)\#auto-cost reference 10.0\\
R(config-rtr)\#int Gi0/0\\
R(config-if)\#bandwidth 100000\\
R(config-if)\#ipv6 ospf 10 area 0
\subsubsection*{Debug}
\#sh ipv6 proto\\
\#sh ipv6 ospf neigh\\
\#sh ipv6 route ospf\\
\#sh ipv5 ospf int br
\subsection*{NTP}
\#sh clock\\
\#clock set <hh:mm:ss> <d><m><y>\\
R(config)\#ntp master <NTPHops>\\
R(config)\#ntp server <ip>\\
R(config)\#ntp uppdate-calendar
\subsubsection*{Debug}
\#sh ntp {status,associations}\\
\#debug ntp {events,packts}
\subsection*{Syslog}
Windows - Tftpd32 app\\
R(config)\#logging host <ip>\\
R(config)\#logging trap ?
\subsubsection*{Debug}
\#sh logging
\subsection*{SMTP}
Windows - PowerSNMP Free Manager\\
R(config)\#ip access-list 1 permit host <ip>\\
R(config)\#snmp-server community <string> ro 1\\
R(config)\#snmp-server location <loc>\\
R(config)\#snmp-server contact <contact>\\
R(config)\#snmp-server host <pcIp> ver 2c <string>\\
R(config)\#snmp-server enable traps
\subsubsection*{Debug}
\#sh snmp [community]\\
\#sh running | include snmp
\subsection*{Netflow}
R(config-if)\#ip flow ingress\\
R(config-if)\#ip flow engress\\
\subsubsection*{Export}
R(config)\#ip flow-exp dest <ip><port>\\
R(config)\#ip flow-exp ver 5
\subsubsection*{Wireshark}
EDIT/PREF/PROTO/CFLOW -> add port
\subsubsection*{Debug}
\#sh ip flow [int,export,cache]\\
\#sh ip cache flow
Display the source blob
Display the rendered blob
Raw
\documentclass[9pt,landscape,a4paper]{extarticle}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{tikz}
\usetikzlibrary{shapes,positioning,arrows,fit,calc,graphs,graphs.standard}
\usepackage[nosf]{kpfonts}
\usepackage[t1]{sourcesanspro}
%\usepackage[lf]{MyriadPro}
%\usepackage[lf,minionint]{MinionPro}
\usepackage{multicol}
\usepackage{wrapfig}
\usepackage[top=0mm,bottom=1mm,left=0mm,right=1mm]{geometry}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{microtype}
\usepackage{tcolorbox}
\usepackage{varwidth} %% provides varwidth environment
\tcbset{size=small}
\let\bar\overline
\definecolor{myblue}{cmyk}{1,.72,0,.38}
\definecolor{mygreen}{rgb}{0.0, 0.5, 0.0}
\def\firstcircle{(0,0) circle (1.5cm)}
\def\secondcircle{(0:2cm) circle (1.5cm)}
\colorlet{circle edge}{myblue}
\colorlet{circle area}{myblue!5}
\tikzset{filled/.style={fill=circle area, draw=circle edge, thick},
outline/.style={draw=circle edge, thick}}
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\everymath\expandafter{\the\everymath \color{myblue}}
\everydisplay\expandafter{\the\everydisplay \color{myblue}}
\renewcommand{\baselinestretch}{.8}
\pagestyle{empty}
\global\mdfdefinestyle{header}{%
linecolor=gray,linewidth=1pt,%
leftmargin=0mm,rightmargin=0mm,skipbelow=0mm,skipabove=0mm,
}
\newcommand{\header}{
\begin{mdframed}[style=header]
\footnotesize
\sffamily
CISCO Cheat Sheet,~page~\thepage~of~2
\end{mdframed}
}
\makeatletter
%\usepackage{titlesec}
%\titlespacing*{\section}{0pt}{1.1\baselineskip}{\baselineskip}
% Title spacing
\renewcommand{\section}{\@startsection{section}{1}{0mm}%
{.2ex}%
{.1ex}%x
{\color{myblue}\sffamily\small\bfseries\centering}}
\renewcommand{\subsection}{\@startsection{subsection}{2}{0mm}%
{.3ex}%
{.1ex}%x
{\color{mygreen}\sffamily\bfseries\centering}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0mm}%
{.2ex}%
{.05ex}%x
{\sffamily\bfseries\textit}}
\def\multi@column@out{%
\ifnum\outputpenalty <-\@M
\speci@ls \else
\ifvoid\colbreak@box\else
\mult@info\@ne{Re-adding forced
break(s) for splitting}%
\setbox\@cclv\vbox{%
\unvbox\colbreak@box
\penalty-\@Mv\unvbox\@cclv}%
\fi
\splittopskip\topskip
\splitmaxdepth\maxdepth
\dimen@\@colroom
\divide\skip\footins\col@number
\ifvoid\footins \else
\leave@mult@footins
\fi
\let\ifshr@kingsaved\ifshr@king
\ifvbox \@kludgeins
\advance \dimen@ -\ht\@kludgeins
\ifdim \wd\@kludgeins>\z@
\shr@nkingtrue
\fi
\fi
\process@cols\mult@gfirstbox{%
%%%%% START CHANGE
\ifnum\count@=\numexpr\mult@rightbox+2\relax
\setbox\count@\vsplit\@cclv to \dimexpr \dimen@-1cm\relax
\setbox\count@\vbox to \dimen@{\vbox to 1cm{\header}\unvbox\count@\vss}%
\else
\setbox\count@\vsplit\@cclv to \dimen@
\fi
%%%%% END CHANGE
\set@keptmarks
\setbox\count@
\vbox to\dimen@
{\unvbox\count@
\remove@discardable@items
\ifshr@nking\vfill\fi}%
}%
\setbox\mult@rightbox
\vsplit\@cclv to\dimen@
\set@keptmarks
\setbox\mult@rightbox\vbox to\dimen@
{\unvbox\mult@rightbox
\remove@discardable@items
\ifshr@nking\vfill\fi}%
\let\ifshr@king\ifshr@kingsaved
\ifvoid\@cclv \else
\unvbox\@cclv
\ifnum\outputpenalty=\@M
\else
\penalty\outputpenalty
\fi
\ifvoid\footins\else
\PackageWarning{multicol}%
{I moved some lines to
the next page.\MessageBreak
Footnotes on page
\thepage\space might be wrong}%
\fi
\ifnum \c@tracingmulticols>\thr@@
\hrule\allowbreak \fi
\fi
\ifx\@empty\kept@firstmark
\let\firstmark\kept@topmark
\let\botmark\kept@topmark
\else
\let\firstmark\kept@firstmark
\let\botmark\kept@botmark
\fi
\let\topmark\kept@topmark
\mult@info\tw@
{Use kept top mark:\MessageBreak
\meaning\kept@topmark
\MessageBreak
Use kept first mark:\MessageBreak
\meaning\kept@firstmark
\MessageBreak
Use kept bot mark:\MessageBreak
\meaning\kept@botmark
\MessageBreak
Produce first mark:\MessageBreak
\meaning\firstmark
\MessageBreak
Produce bot mark:\MessageBreak
\meaning\botmark
\@gobbletwo}%
\setbox\@cclv\vbox{\unvbox\partial@page
\page@sofar}%
\@makecol\@outputpage
\global\let\kept@topmark\botmark
\global\let\kept@firstmark\@empty
\global\let\kept@botmark\@empty
\mult@info\tw@
{(Re)Init top mark:\MessageBreak
\meaning\kept@topmark
\@gobbletwo}%
\global\@colroom\@colht
\global \@mparbottom \z@
\process@deferreds
\@whilesw\if@fcolmade\fi{\@outputpage
\global\@colroom\@colht
\process@deferreds}%
\mult@info\@ne
{Colroom:\MessageBreak
\the\@colht\space
after float space removed
= \the\@colroom \@gobble}%
\set@mult@vsize \global
\fi}
\makeatother
\setlength{\parindent}{0pt}
%\setlength{\parskip}{0em}
\setlength{\columnsep}{0cm}
\renewcommand{\baselinestretch}{0.8}
\begin{document}
\small
\begin{multicols*}{4}
\input{ccna}
\end{multicols*}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment