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
Command | Function |
---|---|
show running-config | Displays 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-config | Displays the startup configuration stored in NVRAM. |
configure terminal | Enters 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-config | Saves the running configuration to startup-config file in NVRAM. |
copy startup-config running-config | Startup configuration from NVRAM is merged into the running configuration. |
erase startup-config | Deletes 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 Sequence | Description |
---|---|
Ctrl-A | Moves the cursor to the beginning of the command line |
Ctrl-C | Aborts the current command and exits the configuration mode |
Ctrl-E | Moves the cursor to the end of the command line |
Esc-B | Moves the cursor back one word |
Esc-F | Moves the cursor forward one word |
Ctrl-B | Moves the cursor back one character |
Ctrl-F | Moves the cursor forward one character |
Ctrl-D | Deletes a single character at the cursor |
Backspace | Removes one character to the left of the cursor |
Ctrl-R | Redisplays the current command line |
Ctrl-U | Erases a line |
Ctrl-W | Erases a word to the left of the cursor |
Ctrl-Z | Ends the configuration mode and returns to the EXEC prompt |
Tab | Completes a partially entered command if enough characters have been entered to make it unambiguous |
Ctrl-Shift-6 | Allows the user to interrupt a Cisco IOS process such as ping or traceroute |
Ctrl-P or Up Arrow | Recalls last (previous) commands |
Ctrl-N or Down Arrow | Recalls more recent commands |
Exploring the TCP/IP Link Layer
Ethernet Frame Structure
Field Length (Bytes) | 8 | 6 | 6 | 2 | 46-1500 | 4 |
---|---|---|---|---|---|---|
Typical Ethernet Frame Field | Preamble | Destination MAC | Source MAC | Type | Payload | FCS |
- 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 bits | 24 bits |
---|---|
OUI | Vendor 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
EtherType | Code |
---|---|
ARP | 0x0806 |
IPv4 | 0x0800 |
LLDP | 0x88CC |
IPv6 | 0x86DD |
CDP | 0x2000 |
Frame Switching
Switching Frames Procedure
- Switch receives a frame from device A on port 1.
- Switch enters the MAC address of device A and the switch port that received the frame into the MAC table.
- 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.
- The destination device with the matching MAC address replies with a unicast frame addressed to device A.
- The switch enters the source MAC address of the destination device into the MAC table along with the associated port.
- 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.
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
Registry | Area Covered |
---|---|
AFRNIC | Africa Region |
APNIC | Asia/Pacific Region |
ARIN | Canada, USA, and some Caribbean Islands |
LACNIC | Latin America and some Caribbean Islands |
RIPE NCC | Europe, the Middle East, and Central Asia |
Decimal and Binary Number Systems
Decimal Numbering
A decimal number represents the sum:
.
If you write this with exponents the sum would look like:
.
Binary Numbering
If you take the binary number for example, it represents a sum of:
Which is equal to:
The Cisco Binary Game
Binary-to-Decimal Conversion
- Make a table with all of the values from 0 through 7.
- In the second row, list out the value of each exponent. These are the place values.
- Insert the given bit sequence into the third row of the table. For example
- For each bit, multiply the place value by the bit value.
- Add all the results from the fourth row which will result in the decimal number.
Place Value | ||||||||
Binary Number | ||||||||
Decimal Number |
Decimal Number:
Decimal-to-Binary Conversion
- Make a table with all of the values from 0 through 7.
- In the second row, list out the value of each exponent. These are the place values.
- When looking at the place value, determine what is the value which is less than or equal to the binary number.
- Calculate the remainder by subtracting the place value from the decimal number.
- Continue moving down each place value until you reach the end and the remaining decimal number is 0.
- When place values can be subtracted from the decimal value, insert a 1 for the bit value.
- 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:
Operation | Bit |
---|---|
1 | |
0 | |
1 | |
1 | |
1 | |
0 | |
1 | |
1 |
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 = (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 = (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
Reliable | Best-Effort | |
---|---|---|
Protocol | TCP | UDP |
Connection Type | Connection-Oriented | Connectionless |
Sequencing | Yes | No |
Uses | Email, FTP, Web browsing, Downloading | VOIP, DHCP, TFTP |
TCP Three-Way Handshake
- 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.
- 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.
- 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
- 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.
- 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.
- 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.
- 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