Computer Networking Essentials Week 2
Computer Networking Essentials Week 2
Network protocols and communications
- Encoding:
In the realm (an area of knowledge) of data communication, encoding refers to the process of converting information or data from one format to another. This conversion is crucial because different systems or mediums may require data to be in different formats for successful transmission and reception.
In your reference, the process begins with messages being converted into binary data (bits) by the sending host. Each bit (0 or 1) is then encoded into a pattern of signals which could be sound waves, light waves, or electrical impulses, depending on the type of network medium in use. These mediums could be copper wires, fiber optic cables, or wireless signals, each having its own way of representing data.
For instance, in an ethernet cable (copper wire), these bits might be represented by a change in voltage levels. In fiber optic cables, changes in light intensity or the phase of light could represent different bits. In a wireless setup, different frequencies or phase changes could represent these bits.
The receiving host then decodes these signals back into bits to interpret the message. The encoding and decoding processes are governed by specific rules, or protocols, which both the sending and receiving hosts must understand and adhere to. - Encapsulation:
Encapsulation is the process of adding headers (and sometimes trailers) to data as it moves down the layers in the OSI model, from the application layer towards the physical layer. Each layer in the OSI model has a specific function and requires different information to perform its function. This information is included in the headers and trailers.
In the given reference, the process of encapsulation is likened to (to compare one thing or person to another and say they are similar) putting a letter into an addressed envelope. When a message is prepared for transmission over a network, it is packaged in a specific format, referred to as a frame. This frame can be compared to an envelope that provides both the source address (where it’s coming from) and the destination address (where it’s going to).
As data moves from the higher layers to the lower layers, it’s encapsulated into Protocol Data Units (PDUs) specific to each layer, each with its own header (and sometimes trailer) information. At Layer 4 (Transport Layer), data is broken into segments; at Layer 3 (Network Layer), packets are formed; at Layer 2 (Data Link Layer), frames are created; and at Layer 1 (Physical Layer), these frames are converted into bits for transmission.
Each encapsulation stage includes vital information required for the data to be properly routed, delivered, and interpreted at the destination. When the encapsulated data reaches its destination, the reverse process, known as de-encapsulation, takes place. The recipient device peels off the headers and trailers at each layer, interpreting the enclosed information until the original message is revealed. - Protocol Suits:
A protocol suite, also known as a protocol stack, is a set of protocols that work together to provide a set of network capabilities. Each protocol in the suite typically specializes in certain functions, and when combined, these protocols can provide comprehensive networking services.
The protocols in a suite are usually designed to work together and are often developed and implemented as a matched set by the same organization. They work in different layers of a network architecture, and each layer corresponds to one or more protocols.
One of the most well-known protocol suites is the TCP/IP suite, which is the foundation of the modern internet. This suite includes, among other protocols, the Transmission Control Protocol (TCP), which handles reliable delivery of data, and the Internet Protocol (IP), which routes data across networks. These protocols, along with others such as HTTP for web browsing, SMTP for email, and FTP for file transfer, comprise the TCP/IP suite and allow for a vast range of internet services.
Another common protocol suite is the OSI model (Open Systems Interconnection model). While not a protocol suite in the same sense as TCP/IP (it doesn’t specify the exact protocols to use), the OSI model provides a framework for understanding and describing how different network protocols interact and work together.
In summary, a protocol suite is like a toolkit for network communication. Each tool (protocol) has its role, and together they allow devices to communicate effectively over a network. - TCP/IP Protocol Suites:
- Internet Standards:
- Internet Society (ISOC): Founded in 1992, ISOC is a global non-profit organization dedicated to ensuring the open development, evolution, and use of the Internet for everyone. It supports and promotes Internet standards, policy, education, and access initiatives. ISOC also provides a platform for discussions on important Internet issues including privacy, security, and the role of the Internet in society. (promotes open development and evolution of Internet use globally.)
- Internet Architecture Board (IAB): The IAB is a committee of the Internet Engineering Task Force (IETF) and provides architectural oversight of the IETF activities. It also advises the Internet Society on technical, architectural, procedural, and (where appropriate) policy matters pertaining to the Internet and its enabling technologies.(management and development of Internet standards.)
- Internet Engineering Task Force (IETF): Established in 1986, IETF is an open, international community of network designers, operators, vendors, and researchers concerned with the evolution of Internet architecture and the smooth operation of the Internet. Its key responsibility includes the development and promotion of voluntary Internet standards and protocols. It’s responsible for many of the protocols used on the internet today, such as TCP/IP, HTTP, and SMTP. (develops, updates, and maintains Internet and TCP/IP technologies.)
- Internet Research Task Force (IRTF): The IRTF promotes research on topics important to the evolution of the Internet. While the IETF primarily focuses on the short-term issues of engineering and standards making, the IRTF focuses on longer-term research issues related to the Internet. It comprises a number of focused, long-term research groups working on topics such as network protocols, security, and network congestion. (focused on long-term research related to Internet and TCP/IP protocols.)
- Internet Corporation for Assigned Names and Numbers (ICANN): ICANN is a non-profit organization that coordinates the Internet’s global domain name system. Established in 1998, its key responsibilities include managing the root zone of the domain name system, coordinating the allocation and assignment of IP addresses and AS numbers, and managing the system of top-level domain names.
- Internet Assigned Numbers Authority (IANA): The IANA is a function of ICANN, responsible for coordinating some of the key elements that keep the Internet running smoothly. This includes the allocation of IP addresses, assignment of protocol parameters, management of the DNS Root and the .int and .arpa domains, and managing the list of Internet number resource registries.
- AS numbers:
AS stands for “Autonomous System.” An Autonomous System is a collection of IP networks and routers under the control of one entity (or sometimes more) that presents a common routing policy to the Internet. For example, an Internet Service Provider (ISP), a large company’s network, or a university’s network might each be an Autonomous System.
Now, an AS number or ASN (Autonomous System Number) is a unique identifier that’s associated with an Autonomous System. These numbers allow that system to exchange exterior routing information with other neighboring Autonomous Systems. Essentially, each Autonomous System has a unique AS number, and this number is used in Border Gateway Protocol (BGP) routing to identify the network the routing information is coming from and going to.
The Internet Assigned Numbers Authority (IANA) oversees the allocation of AS numbers globally. Initially, AS numbers were 16-bit numbers, which allowed for a maximum of 65,536 allocations. As the internet grew, a larger AS number space was required, so an extended format was introduced, which is 32 bits in length, increasing the number of possible AS numbers significantly. - Electronics and Communications Standard Organizations:
- Institute of Electrical and Electronics Engineers (IEEE): Dedicated to advancing technological innovation and creating standards in a wide area of industries including networking. Eg. IEEE 802.11 (Wireless)
- Electronic Industries Alliance (EIA): Standards related to electrical wiring, connectors, and network racks.
- Telecommunications Industry Association (TIA): Standards for radio equipment, cellular towers, Voice over IP (VoIP) devices, and satellite communications.
- International Telecommunications Union-Telecommunication Standardization Sector (ITU-T): Standards for video compression, Internet Protocol Television (IPTV), and broadband communications.
- The Benefits of Using a Layered Model:
A layered model, such as the OSI (Open Systems Interconnection) or TCP/IP model used in networking, provides a conceptual framework that helps understand the complex interactions that occur in a network. Each layer of these models has a specific role, with set functions that communicate with the layers above and below it. This layered architecture offers several benefits:- Assisting in Protocol Design: In a layered model, each layer is responsible for a distinct function and has its unique protocols to execute that function. This separation simplifies the process of designing and implementing protocols, as each can be developed independently according to the function of that layer. For example, the Transport layer in the OSI model is where protocols like TCP and UDP operate, managing the end-to-end communication between the source and destination devices.
- Fostering Competition: A layered model encourages competition because it allows products from different vendors to interoperate. As long as each product adheres to the protocols and standards defined for each layer, they can work together seamlessly. This interoperability means that consumers and businesses can select the best product or solution for each layer, regardless of the manufacturer.
- Preventing Changes in One Layer from Affecting Others: A critical benefit of the layered model is its ability to isolate each layer from the others. If there are changes or advancements in technology at one layer, it doesn’t necessarily impact the other layers. For example, if a new physical transmission medium (Layer 1 in the OSI model) is developed, the higher layers that handle data transport, network routing, and application services don’t need to change their operation.
- Providing a Common Language: A layered model provides a standardized framework to describe the different functions and operations in a network. This standardization creates a common language that network professionals can use to understand and describe complex network interactions. It ensures everyone is on the same page when discussing network designs, issues, and solutions.
In conclusion, the use of a layered model helps in designing and managing complex networks by simplifying protocol design, encouraging vendor competition, and isolating layers from technological changes. It also aids in communication among network professionals by providing a standardized language for describing network functions and operations.
- Protocol Data Unit (PDU):
A Protocol Data Unit (PDU) represents the data form at each layer of a network model, whether it’s the OSI model or the TCP/IP model. Each layer treats data differently and adds its specific information to ensure that the data is correctly sent and received. These changes in form are essential for data to be successfully transmitted over a network. The different types of PDUs at each layer include:
- Data: At the Application layer (in the OSI model) or the Application layer (in the TCP/IP model), the PDU is referred to as “data.” This layer interacts with software applications that implement a communicating component. Here, data is in the form that users interact with, such as a web page or an email.
- Segment: The Transport layer PDU is referred to as a “segment” or sometimes “datagram” in the case of UDP. This layer is responsible for end-to-end connections and reliability, offering services like error checking and data recovery. Segments contain data from the Application layer along with transport layer headers for information such as the source and destination ports.
- Packet: At the Network layer, the PDU becomes a “packet.” This layer is responsible for routing and transferring data across networks. Packets include the original data, transport layer headers, and a network layer header, which contains source and destination IP addresses for routing purposes.
- Frame: The Data Link layer’s PDU is known as a “frame.” This layer is responsible for the transmission of data across the physical link in a network. Frames encapsulate the packet data from the Network layer and add a header and a footer around it. The header contains information like the source and destination MAC addresses, while the footer typically includes a Frame Check Sequence (FCS) for error detection.
- Bits: Finally, at the Physical layer, the PDU is simply “bits.” The Physical layer is responsible for the actual transmission of data over the network medium. Here, frames are converted into a series of electrical or optical signals (i.e., 0s and 1s) that can be transmitted over the physical medium (like a cable or wireless).
- Network portion and Host portion:
The concepts of “Network portion” and “Host portion” primarily relate to the structure of IP addresses. An IP address, especially in the context of IPv4, is a 32-bit number that uniquely identifies a device on a network.
An IP address is divided into two parts:- Network Portion: This part of the IP address identifies the specific network or subnet to which the device belongs. All devices on the same network share the same network portion of their IP addresses. The network portion of the IP address is determined by the subnet mask, which designates which part of the IP address represents the network and which part represents the host.
- Host Portion: This part of the IP address identifies the specific device (or “host”) within the network. The host portion of the IP address is unique to each device within the network or subnet.
Let’s take an example IP address: 192.168.1.105 with a subnet mask of 255.255.255.0. In this case:
- The “Network Portion” is 192.168.1, as all devices on this network will have an IP address that starts with 192.168.1.
- The “Host Portion” is 105, as this identifies the specific device on the 192.168.1 network.
This division of the IP address into network and host portions is what allows routers to effectively route data across the internet. By first identifying the correct network (using the network portion) and then the correct device on that network (using the host portion), data packets can be accurately directed to their intended destination.
In the context of IPv6, the concept is similar, but the address space is much larger (128 bits) and the addresses are divided between the network prefix (which identifies the network) and the interface identifier (which identifies the host).
Building a Simple Network
- Copper Straight-Through Cable:
In a straight-through cable, the arrangement of the color-coded wires is the same at both ends. This type of cable is used to connect devices that use different types of data transmissions. For instance, when connecting a computer (which transmits data on pair 1-2 and receives on pair 3-6 of the Ethernet standard) to a switch (which receives data on pair 1-2 and transmits on pair 3-6), a straight-through cable is typically used. The same logic applies to connections between a router and a switch or a computer and a router. - Copper Cross-Over Cable:
A cross-over cable has its transmit and receive pairs crossed from one end to the other. This type of cable is used to connect devices that use the same type of data transmission, such as a switch to another switch, or a computer to another computer. In this case, since both devices transmit and receive on the same pairs, the cable needs to cross these pairs over so that the transmit pair at one end is connected to the receive pair at the other end, and vice versa. - Auto-MDIX (Automatic Medium-Dependent Interface Crossover):
As for your question about why straight-through cables are used to connect switches in your school’s computer lab, the answer likely lies in the type of switches being used. Many modern switches (and some other networking devices) have a feature called Auto-MDIX (Automatic Medium-Dependent Interface Crossover). This technology detects the type of cable plugged into the port (straight-through or crossover) and automatically configures the port into an appropriate mode. This means that with Auto-MDIX enabled, you can use either type of cable to connect devices, and the switch will adjust accordingly. - Serial in Putty: Putty is a free and open-source terminal emulator, serial console and network file transfer application. It supports several network protocols, including SCP, SSH, Telnet, rlogin, and raw socket connection. It also supports “serial” connection type.
The “serial” in this context refers to a serial communication protocol, where data is sent over a serial port one bit at a time. It’s one of the oldest types of communication and is still widely used due to its simplicity and reliability.
A serial connection in Putty is typically used when you are directly connecting to a device, like a router or a switch, through a serial port on your computer or via a USB to serial converter. This is commonly done in network management for tasks like initial device configuration, troubleshooting, or when network connectivity is not available.
When you select “Serial” as your connection type in Putty, you will need to specify the serial line to connect to and the speed (baud rate). The serial line will often be something like “COM1” on Windows, and the speed will depend on the configuration of the device you’re connecting to, but common values are 9600, 19200, or 115200.
Remember that in order to establish a successful serial connection, both devices must agree on several parameters, including baud rate, data bits, parity, and stop bits (often referred to collectively as “serial line settings”). - Why you better to disable the DNS lookup when configuring Switch: When you’re configuring a switch or router from the command-line interface (CLI), the system interprets text you enter as either a command or argument to a command. If you make a typo or enter an unrecognized command, the system might interpret that mistyped command as a hostname. By default, if it interprets something as a hostname, it attempts to resolve this “hostname” by using the Domain Name System (DNS).
For example, if you’re in the CLI and you type “shwo runn” instead of “show run” (a common command to show the running configuration), the system doesn’t recognize “shwo” as a command. It then assumes “shwo” might be a hostname and tries to look it up in DNS.
This DNS lookup can be time-consuming and annoying because it delays the return of the command prompt while the switch/router attempts to resolve the unknown command as a hostname. This can be especially problematic if you’re in the middle of troubleshooting an issue or trying to make configuration changes quickly.
By entering the “no ip domain-lookup” command, you’re instructing the switch to disable this DNS lookup process. After this command is entered, when you make a typo or enter an unrecognized command, the switch will immediately return an error message and the command prompt, allowing you to correct your mistake without any delay.
So the primary purpose of the “no ip domain-lookup” command is to enhance the user experience on the CLI, making it more efficient and less frustrating. - Understanding Password Configuration in Cisco Switches:In the configuration you’ve provided, there are two types of passwords being set: the enable secret password and the console line password. These passwords serve different purposes in the context of switch management and access control.
- Enable Secret Password: The enable secret password is used to protect access to privileged EXEC mode on a Cisco device. In other words, it’s the password that’s required when someone tries to switch from user EXEC mode (the basic level of interface after logging into the device) to privileged EXEC mode (which gives higher-level access, including the ability to view and modify the device’s configuration). The command enable secret class sets the password for this mode to “class”.
- Console Line Password: The console line password is used to protect console access to the switch. When you connect to a switch via the console port (such as when using a console cable from a computer), the console line password is required to gain access to any level of the command-line interface (CLI). In this example, the commands line con 0, password cisco, and login configure the switch to require the password “cisco” for anyone trying to access the switch via the console port.
In essence, the enable secret password is a second layer of security for those who have already gained access to the switch’s CLI, while the console line password is a first line of defense against unauthorized access via the console port.
By setting both passwords, you’re adding two layers of protection against unauthorized changes to your switch’s configuration. This is an essential part of good security practice in network management. - Understanding Synchronous Logging in Cisco Devices: Synchronous logging is a feature in Cisco devices that improves the user experience while working in the command line interface (CLI). When a user is typing commands or configuration entries in the CLI, system messages generated by the device (like error messages, debugging messages, interface status messages, etc.) are displayed as they occur. Without synchronous logging, these system messages can interrupt the command or configuration entry you’re typing and cause confusion.
Let’s say you’re in the middle of typing a long command or configuration entry, and a system message appears. Without synchronous logging, the system message would simply be inserted right where you were typing, splitting your command or entry into two parts and making it harder to read. Moreover, the CLI prompt wouldn’t reappear automatically—you’d have to press Enter to get it back.
When you enable synchronous logging with the logging synchronous command, the system behaves more politely. If a system message occurs while you’re typing, the device will let you finish typing your command or configuration entry, then it will display the system message, and finally it will reprint your command or configuration entry on a new line, making it easier to see what you were doing. This makes your interaction with the CLI much smoother and more coherent, especially in environments where system messages are frequent.
So, in the configuration example you provided, logging synchronous is being enabled on the console line (con 0) to enhance the user experience when interacting with the switch via the console port.
Commands
- ipconfig /all:
This is a command used on Windows operating systems. It displays all current TCP/IP network configuration values, including the IP address, subnet mask, default gateway, DNS server, and other information about all network interfaces on the system. - ping 192.168.1.11:
This command sends a network request to the IP address 192.168.1.11 to check whether the host at that address is reachable and how long it takes for the data to travel to that host and back. This is a basic tool for troubleshooting network connectivity. - enable:
This command is used in Cisco devices to enter the privileged EXEC mode from user EXEC mode. Privileged EXEC mode (also known as enable mode) allows full control over the device, with access to all commands and features.Switch> enable Switch#
- configuration terminal:
This command is also used in Cisco devices. It is used in privileged EXEC mode to enter global configuration mode, where you can modify the system’s configuration.Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#
- hostname
Switch(config)# hostname S1 S1(config)#
- no ip domain-lookup:
S1(config)# no ip domain-lookup S1(config)#
- Set the enable secret password:
S1(config)# enable secret class
- Configure the console line:
S1(config)# line con 0 S1(config-line)# password cisco S1(config-line)# login S1(config-line)# exit S1(config)#
- logging synchronous:
S1(config)# line con 0 S1(config-line)# logging synchronous S1(config-line)# exit S1(config)#
- banner motd:
In the context of a Cisco device, this command sets a “Message of the Day” banner that will be displayed to all users who log into the device. This is often used to display legal notices or other important information.S1(config)# banner motd ’Unauthorised access is strictly prohibited and prosecuted to the full extent of the law.’ S1(config)# exit S1#
- show running-config:
This command, used in Cisco devices, displays the current configuration of the system. This includes all settings and changes that are currently in effect but may not yet have been saved to the device’s startup configuration.S1# show running-config
- show version:
On a Cisco device, this command displays information about the device’s hardware and software, including the version of the Cisco IOS (Internetwork Operating System) being used, the device’s uptime, its hardware configuration, and other information.S1# show version
- show ip interface brief:
This command, used in Cisco devices, displays a summary of the device’s network interfaces, including their IP addresses and status (up or down). This is useful for quickly checking the network configuration and status of a device.S1# show ip interface brief