Skip to main content

Network Fundamentals

[ Insert other notes about learning path ]

[ Insert table outlining abbreviations for port speeds ]

Operating Cisco IOS Software

Cisco IOS Software CLI Functions

  • Accessing the Cisco CLI through a console connection is called out-of_band access because it does not consume network bandwidth.
  • Accessing the Cisco CLI through network protocols such as Telnet or SSH is called in-band access because it does consume network bandwidth.
  • The two primary CLI EXEC modes are known as User Mode and Privileged Mode"

Get Started with Cisco CLI

  • To enter privileged EXEC mode
SW1>en
  • To exit privileged EXEC mode
SW1#disa

Common Cisco IOS Management

CommandFunction
show running-configDisplays the current running configuration. You can also use filters. For example, you can use the show running-config interface GigabitEthernet0/1 command to display only the interface GigabitEthernet0/1 running configuration.
show startup-configDisplays the startup configuration stored in NVRAM.
configure terminalEnters the Global Configuration Mode, where you can interactively change the configuration in RAM (the running-config), using console or remote terminal access.
copy running-config startup-configSaves the running configuration to startup-config file in NVRAM.
copy startup-config running-configStartup configuration from NVRAM is merged into the running configuration.
erase startup-configDeletes the saved startup-config file in NVRAM.
  • The copy command can also copy configuration files to remote destinations using network services such as FTP, SCP, HTTP, TFTP, and other protocols.

Improve User Experience with the CLI

  • The | include command filter.
  • The | exclude command filter.
  • The | begin command filter.
  • The | section command filter.

CLI Editing Keys

CLI Editing Key SequenceDescription
Ctrl-AMoves the cursor to the beginning of the command line
Ctrl-CAborts the current command and exits the configuration mode
Ctrl-EMoves the cursor to the end of the command line
Esc-BMoves the cursor back one word
Esc-FMoves the cursor forward one word
Ctrl-BMoves the cursor back one character
Ctrl-FMoves the cursor forward one character
Ctrl-DDeletes a single character at the cursor
BackspaceRemoves one character to the left of the cursor
Ctrl-RRedisplays the current command line
Ctrl-UErases a line
Ctrl-WErases a word to the left of the cursor
Ctrl-ZEnds the configuration mode and returns to the EXEC prompt
TabCompletes a partially entered command if enough characters have been entered to make it unambiguous
Ctrl-Shift-6Allows the user to interrupt a Cisco IOS process such as ping or traceroute
Ctrl-P or Up ArrowRecalls last (previous) commands
Ctrl-N or Down ArrowRecalls more recent commands

Ethernet Frame Structure

Field Length (Bytes)866246-15004
Typical Ethernet Frame FieldPreambleDestination MACSource MACTypePayloadFCS
  • FCS: The frame check sequence (FCS) field includes a checking mechanism to help ensure that the frame of data has been transmitted without corruption. The checking mechanism that is being used is the cyclic redundancy check (CRC).

LAN Communication Types

The three major types of network communications are as follows:

  • Unicast: Communication in which a frame is sent from one host and is addressed to one specific destination. In a unicast transmission, there is only one sender and one receiver. Unicast transmission is the predominant form of transmission on LANs and within the internet.
  • Broadcast: Communication in which a frame is sent from one address to all other addresses. In this case, there is only one sender, but the information is sent to all the connected receivers. Broadcast transmission is used for sending the same message to all devices on the LAN.
  • Multicast: Communication in which information is sent to a specific group of devices or clients. Unlike broadcast transmission, in multicast transmission, clients must be members of a multicast group to receive the information.

MAC Addresses

  • Hexadecimal or hex is a base 16 numbering system which uses 16 unique symbols as digits. The valid symbols in hex are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F with A-F equaling 10-15 respectively.
  • MAC addresses are composed of 12 hexadecimal numbers meaning that it has a total of 48 bits. Each hexadecimal digit is 4 bits long because it requires 4 bit in binary to count to 15.

Composition

24 bits24 bits
OUIVendor Assigned

Unicast MAC Address

A MAC Address which identifies only one NIX on the network and is the Layer 2 destination of the Unicast transmission.

Broadcast MAC Address

A MAC Address which identifies all NICs in the Layer 2 domain and is the format of FF:FF:FF:FF:FF:FF.

Multicast MAC Address

A MAC Address which identifies a group of NICs in the Layer 2 domain and always begins with 00:01:5E.

EtherTypes

EtherTypeCode
ARP0x0806
IPv40x0800
LLDP0x88CC
IPv60x86DD
CDP0x2000

Frame Switching

Switching Frames Procedure

  1. Switch receives a frame from device A on port 1.
  2. Switch enters the MAC address of device A and the switch port that received the frame into the MAC table.
  3. The switch checks the MAC table for the destination device MAC address. If the address is not found, then the switch floods all ports the frame, except for the port which sent the frame.
  4. The destination device with the matching MAC address replies with a unicast frame addressed to device A.
  5. The switch enters the source MAC address of the destination device into the MAC table along with the associated port.
  6. The switch can now forward frames between the source and destination without flooding all the ports again because it now has entries for both devices in the MAC table.
note

When a switch adds a MAC address to the table, it has a default aging timer of 300 seconds. When the timer expires, the MAC address is removed from the table. Any frames with a MAC address in the table will reset the aging timer.

Content Addressable Memory (CAM)

The MAC table is stored in the CAM which is a special type of memory used by Cisco switches.

Duplex Communication

The duplex command is used to specify the duplex mode of operation for switch ports. The following options are supported:

  • The full option sets full-duplex mode.
  • The half option sets the half-duplex mode.
  • The auto option sets auto-negotiation of the duplex mode.

Introducing the TCP/IP Internet Layer, IPv4 Addressing, and Subnets

Internet Assigned Number Authority (IANA)

IANA IPv4 Address Space Registry

Regional Internet Registries

RegistryArea Covered
AFRNICAfrica Region
APNICAsia/Pacific Region
ARINCanada, USA, and some Caribbean Islands
LACNICLatin America and some Caribbean Islands
RIPE NCCEurope, the Middle East, and Central Asia

Decimal and Binary Number Systems

Decimal Numbering

A decimal number 27,39827,398 represents the sum:
(210,000)+(71,000)+(3100)+(910)+(81)(2 * 10,000) + (7 * 1,000) + (3 * 100) + (9 * 10) + (8 * 1).

If you write this with exponents the sum would look like:
(2104)+(7103)+(3102)+(9101)+(8100)(2 * 10^4) + (7 * 10^3) + (3 * 10^2) + (9 * 10^1) + (8 * 10^0).

Binary Numbering

If you take the binary number 1001110011 for example, it represents a sum of:
(124)+(023)+(022)+(121)+(120)(1 * 2^4) + (0 * 2^3) + (0 * 2^2) + (1 * 2^1) + (1 * 2^0)

Which is equal to:
(116)+(08)+(04)+(12)+(11)=19(1 * 16) + (0 * 8) + (0 * 4) + (1 * 2) + (1 * 1) = 19

The Cisco Binary Game

Binary-to-Decimal Conversion

  1. Make a table with all of the 2exponent2^{exponent} values from 0 through 7.
  2. In the second row, list out the value of each exponent. These are the place values.
  3. Insert the given bit sequence into the third row of the table. For example 1000101110001011
  4. For each bit, multiply the place value by the bit value.
  5. Add all the results from the fourth row which will result in the decimal number.
BaseExponentBase^{Exponent}272^7262^6262^6252^5242^4222^2212^1202^0
Place Value12812864643232161688442211
Binary Number1100000011001111
Decimal Number12812800000088002211

Decimal Number: 128+0+0+0+8+0+2+1=139128 + 0 + 0 + 0 + 8 + 0 + 2 + 1 = 139

Decimal-to-Binary Conversion

  1. Make a table with all of the 2exponent2^{exponent} values from 0 through 7.
  2. In the second row, list out the value of each exponent. These are the place values.
  3. When looking at the place value, determine what is the value which is less than or equal to the binary number.
  4. Calculate the remainder by subtracting the place value from the decimal number.
  5. Continue moving down each place value until you reach the end and the remaining decimal number is 0.
  6. When place values can be subtracted from the decimal value, insert a 1 for the bit value.
  7. When place values cannot be subtracted from the decimal value, insert a 0 for the bit value and move to the next place value.

Example Decimal Number: 187187

OperationBit
187128=59187 - 128 = 591
5964\xcancel{59 - 64}0
5932=2759 - 32 = 271
2716=1127 - 16 = 111
118=311 - 8 = 31
34\xcancel{3 - 4}0
32=13 - 2 = 11
11=01 - 1 = 01

Implementing Subnetting

The CIDR prefix for the network corresponds to the total number of bits in the network portion of the IP address.

Example:

/24
11111111.11111111.11111111.00000000
255.255.255.0

/25
11111111.11111111.11111111.10000000
255.255.255.128

/26
11111111.11111111.11111111.11000000
255.255.255.192

/27
11111111.11111111.11111111.11100000
255.255.255.224

Each time a bit is borrowed from the host bits, the number of subnets created increases and the number of hosts decreases.

Calculating Available Subnets

The following formula can be used to calculate the number of subnets that are created by borrowing a given number of host bits:

Number of subnets = 2s2^s (where s is the number of bits which are borrowed)

Calculating Available Hosts

The following formula can be used to calculate the number of available hosts available in a subnet after borrowing bits.

Number of hosts = 2h22^h - 2 (where h is the number of host bits which remain after bits are borrowed)

Explaining the TCP/IP Transport Layer and Application Layer

Reliable vs. Best-Effort Transport

ReliableBest-Effort
ProtocolTCPUDP
Connection TypeConnection-OrientedConnectionless
SequencingYesNo
UsesEmail, FTP, Web browsing, DownloadingVOIP, DHCP, TFTP

TCP Three-Way Handshake

  1. SYN: The client initiates the connection by sending a SYN (synchronize) packet to the server. This packet contains the initial sequence number for the connection, which is used to synchronize the sequence numbers between the client and server.
  2. SYN-ACK: Upon receiving the SYN packet, the server responds with a SYN-ACK (synchronize-acknowledge) packet. This packet acknowledges the client's SYN packet (with an ACK number that is one more than the received sequence number) and includes the server's own sequence number for the connection.
  3. ACK: Finally, the client sends an ACK (acknowledge) packet back to the server, acknowledging the server's SYN-ACK packet. This ACK packet contains the sequence number that is one more than the received sequence number from the server.

DHCP for IPv4

Understanding DORA

  1. Discovery: The client device broadcasts a DHCPDISCOVER message on the network to discover available DHCP servers. This message is sent because the client is searching for a DHCP server from which it can obtain an IP address and other network configuration details.
  2. Offer: DHCP servers on the network respond to the DHCPDISCOVER broadcast with a DHCPOFFER message. This message contains the IP address that the server is offering to the client, along with other network configuration settings such as subnet mask, DNS server, and default gateway. If multiple DHCP servers respond, the client typically accepts the first offer it receives.
  3. Request: After choosing an offer, the client responds to the DHCP server with a DHCPREQUEST message. This message is broadcasted to inform all DHCP servers on the network of its acceptance of the offer from one DHCP server and rejection of offers from any others. It includes the IP address offered by the selected server, effectively requesting that specific IP address and configuration.
  4. Acknowledgment: In response to the DHCPREQUEST, the DHCP server sends a DHCPACK message to the client. This message acknowledges the assignment of the IP address and configuration to the client. It may also include lease duration information, indicating how long the client can use the assigned IP address before it needs to renew it. Alternatively, if the server is unable to fulfill the request (e.g., if the IP address has already been assigned to another device), it sends a DHCPNAK (negative acknowledgment), prompting the client to start the process over by sending a new DHCPDISCOVER message.

Inspect TCP/IP Applications

Show the open ports on a Cisco router

show control-plan host open-ports

Show users on a Cisco Router

show users

Show tcp connections

show tcp brief all

Show udp connections

show udp