Networking
Networking
Network Components
Every computer on a network is called a host or end device.
Servers are computers that provide information to end devices:
• email servers
• web servers
• file server
Clients are computers that send requests to the servers to retrieve information:
• web page from a web server
• email from an email server
Peer-to-Peer
It is possible to have a device be a client and a server in a Peer-to-Peer Network.
This type of network design is only recommended for very small networks.
End Devices
An end device is where a message originates from or where it is received. Data originates with an end device, flows through the network, and arrives at an end
device.
Note: Often, the terms port and interface are used interchangeably
Topology Diagrams
Physical topology diagrams illustrate the physical location of intermediary devices
and cable installation.
Logical topology diagrams illustrate devices, ports, and the addressing scheme of
the network.
.
Internet Connections
Internet Access Technologies
There are many ways to connect users and organizations to the internet:
• Popular services for home users and small offices include broadband cable, broadband digital subscriber line (DSL), wireless WANs, and mobile services.
• Organizations need faster connections to support IP phones, video conferencing and data center storage.
• Business-class interconnections are usually provided by service providers (SP) and may include: business DSL, leased lines, and Metro Ethernet.
Converged networks can deliver data, voice, and video over the same network
infrastructure. The network infrastructure uses the same set of rules and standards.
Reliable Network
Network Architecture refers to the technologies that support the infrastructure that moves data across the network.
There are four basic characteristics that the underlying architectures need to address to meet user expectations:
• Fault Tolerance
• Scalability
• Quality of Service (QoS)
• Security
Fault Tolerance
A fault tolerant network limits the impact of a failure by limiting the number of affected devices. Multiple paths are required for fault tolerance.
Reliable networks provide redundancy by implementing a packet switched network:
• Packet switching splits traffic into packets that are routed over a network.
• Each packet could theoretically take a different path to the destination.
This is not possible with circuit-switched networks which establish dedicated circuits.
Scalability
A scalable network can expand quickly and easily to support new users and applications without impacting the performance of services to existing users.
Network designers follow accepted standards and protocols in order to make the networks scalable.
Quality of Service
Voice and live video transmissions require higher expectations for those services being delivered.
Have you ever watched a live video with constant breaks and pauses? This is caused when there is a higher demand for bandwidth than available –and QoS isn’t
configured.
• Quality of Service (QoS) is the primary mechanism used to ensure reliable delivery of content for all users.
• With a QoS policy in place, the router can more easily manage the flow of data and voice traffic.
Network Security
There are two main types of network security that must be addressed:
• Network infrastructure security
• Physical security of network devices
• Preventing unauthorized access to the devices
• Information Security
• Protection of the information or data transmitted over the network
Network Security
Security Threats
• Network security is an integral part of networking regardless of the size of the network.
• The network security that is implemented must take into account the environment while securing the data, but still allowing for quality of service that is
expected of the network.
• Securing a network involves many protocols, technologies, devices, tools, and techniques in order to secure data and mitigate threats.
• Threat vectors might be external or internal.
External Threats:
• Viruses, worms, and Trojan horses
• Spyware and adware
• Zero-day attacks
• Threat Actor attacks
• Denial of service attacks
• Data interception and theft
• Identity theft
Internal Threats:
• lost or stolen devices
• accidental misuse by employees
• malicious employees
Security Solutions
Security must be implemented in multiple layers using more than one security solution.
Network security components for home or small office network:
• Antivirus and antispyware software should be installed on end devices.
• Firewall filtering used to block unauthorized access to the network.
The study of network security starts with a clear understanding of the underlying switching and routing infrastructure.
GUI
• A GUI allows the user to interact with the system using an environment of graphical icons, menus, and windows.
• A GUI is more user-friendly and requires less knowledge of the underlying command structure that controls the system.
• Examples of these are: Windows, macOS, Linux KDE, Apple iOS and Android.
• GUIs can fail, crash, or simply not operate as specified. For these reasons, network devices are typically accessed through a CLI.
Purpose of an OS
Access Methods
• Console–A physical management port used to access a device in order to
provide maintenance, such as performing the initial configurations.
• Secure Shell (SSH) –Establishes a secure remote CLI connection to a device,
through a virtual interface, over a network. (Note: This is the recommended
method for remotely connecting to a device.)
• Telnet–Establishes an insecure remote CLI connection to a device over the
network. (Note: User authentication, passwords and commands are sent
over the network in plaintext.)
Password Guidelines
• The use of weak or easily guessed passwords are a security concern.
• All networking devices should limit administrative access by securing privileged EXEC, user EXEC, and remote
Telnet access with passwords. In addition, all passwords should be encrypted and legal notifications provided.
Password Guidelines:
• Use passwords that are more than eight characters in length.
• Use a combination of upper and lowercase letters, numbers, special characters, and/or numeric sequences.
• Avoid using the same password for all devices.
• Do not use common words because they are easily guessed.
Configure Passwords
Securing user EXEC mode access:
• First enter line console configuration mode using the line console 0 command in global configuration mode.
• Next, specify the user EXEC mode password using the password password command.
• Finally, enable user EXEC access using the login command.
Note: VTY lines enable remote access using Telnet or SSH to the device. Many Cisco switches support up to 16 VTY lines that are numbered 0 to 15.
Encrypt Passwords
The startup-config and running-config files display most passwords in plaintext.
To encrypt all plaintext passwords, use the service password-encryption global
config command.
Use the show running config command to verify that the passwords on the device
are now encrypted.
Communications Protocols
• All communications are governed by protocols.
• Protocols are the rules that communications will follow.
• These rules will vary depending on the protocol.
Rule Establishment
• Individuals must use established rules or agreements to govern the conversation.
• The first message is difficult to read because it is not formatted properly. The second shows the message properly formatted
Common computer protocols must be in agreement and include the following requirements:
• Message encoding
• Message formatting and encapsulation
• Message size
• Message timing
• Message delivery options
Message Encoding is the process of converting information into another acceptable form for transmission. Decoding reverses this process to interpret the
information.
Message Formatting and Encapsulation
•When a message is sent, it must use a specific format or structure.
•Message formats depend on the type of message and the channel that is used to deliver the message.
Encapsulation is the place one message inside another message for transfer from the source to the destination
Message Timing
Message timing includes the following:
Flow Control – Manages the rate of data transmission and defines how much information can be sent and the speed
at which it can be delivered.
Response Timeout – Manages how long a device waits when it does not hear a reply from the destination.
Protocol Suites
Network Protocol Suites
Protocols must be able to work with other protocols.
Protocol suite:
• A group of inter-related protocols necessary to perform a communication function
• Sets of rules that work together to help solve a problem
Layered Network models prevents technology in one layer from affecting other layers.
Protocol Suites such as TCP/IP and OSI provide a set of rules required for specific types of communications to occur.
Sequencing messages is the process of numbering the segments so that the message may be reassembled at the destination. TCP is responsible for sequencing
the individual segments.
Data Access
Addresses
Both the data link and network layers use addressing to deliver data from source to destination.
Network layer source and destination addresses-Responsible for delivering the IP packet from original source to the final destination.
Data link layer source and destination addresses –Responsible for delivering the data link frame from one network interface card (NIC) to another NIC on the
same network.
When devices are on the same network the source and destination will have the same number in
network portion of the address.
• PC1 –192.168.1.110
• FTP Server –192.168.1.9
When devices are on the same Ethernet network the data link frame will use the actual
MAC address of the destination NIC. MAC addresses are physically embedded into the
Ethernet NIC and are local addressing.
• The Source MAC address will be that of the originator on the link.
• The Destination MAC address will always be on the same link as the source, even if the
ultimate destination is remote.
The Physical Components are the hardware devices, media, and other connectors that transmit the signals that represent the bits.
• Hardware components like NICs, interfaces and connectors, cable materials, and cable designs are all specified in standards associated with the physical layer.
Encoding
• Encoding converts the stream of bits into a format recognizable by the next device in the network path.
• This ‘coding’ provides predictable patterns that can be recognized by the next device.
• Examples of encoding methods include Manchester (shown in the figure), 4B/5B, and 8B/10B.
Signaling
• The signaling method is how the bit values, “1” and “0” are represented on the physical medium.
• The method of signaling will vary based on the type of medium being used.
Bandwidth
• Bandwidth is the capacity at which a medium can carry data.
• Digital bandwidth measures the amount of data that can flow from one place to another in a given amount of time; how many bits can be transmitted in a
second.
• Physical media properties, current technologies, and the laws of physics play a role in determining available bandwidth.
Bandwidth Terminology
Latency
• Amount of time, including delays, for data to travel from one given point to another
Throughput
• The measure of the transfer of bits across the media over a given period of time
Goodput
• The measure of usable data transferred over a given period of time
• Goodput = Throughput -traffic overhead
Wireless Media
Properties of Wireless Media
It carries electromagnetic signals representing binary digits using radio or microwave frequencies. This provides the greatest mobility option. Wireless
connection numbers continue to increase.
Wireless LAN
In general, a Wireless LAN (WLAN) requires the following devices:
•Wireless Access Point (AP) -Concentrate wireless signals from users and connect to the existing copper-based network infrastructure
•Wireless NIC Adapters -Provide wireless communications capability to network hosts
There are a number of WLAN standards. When purchasing WLAN equipment, ensure compatibility, and interoperability.
Network Administrators must develop and apply stringent security policies and processes to protect WLANs from unauthorized access and damage.
The Data Link Layer
• The Data Link layer is responsible for communications between end-device network interface cards.
• It allows upper layer protocols to access the physical layer media and encapsulates Layer 3 packets (IPv4 and IPv6) into Layer 2 Frames.
• It also performs error detection and rejects corrupts frames.
The Data Link Layer consists of two sublayers. Logical Link Control (LLC)and Media Access Control (MAC).
• The LLC sublayer communicates between the networking software at the upper layers and the device hardware at the lower layers.
• The MAC sublayer is responsible for data encapsulation and media access control.
Full-duplex communication
Both devices can simultaneously transmit and receive on the shared media. The data link layer assumes that the media is available for transmission for both
nodes at any time. Ethernet switches operate in full-duplex mode by default, but they can operate in half-duplex if connecting to a device such as an Ethernet
hub.
In summary, half-duplex communications restrict the exchange of data to one direction at a time. Full-duplex allows the sending and receiving of data to happen
simultaneously. It is important that two interconnected interfaces, such as a host NIC and an interface on an Ethernet switch, operate using the same duplex
mode. Otherwise, there will be a duplex mismatch creating inefficiency and latency on the link.
Controlled access
• Deterministic access where each node has its own time on the medium.
• Used on legacy networks such as Token Ring and ARCNET.
CSMA/CD
• Used by legacy Ethernet LANs.
• Operates in half-duplex mode where only one device sends or receives at a time.
• Uses a collision detection process to govern when a device can send and what happens if multiple devices send at the same time.
Ethernet Frames
Ethernet Encapsulation
• Ethernet operates in the data link layer and the physical layer.
• It is a family of networking technologies defined in the IEEE 802.2 and 802.3 standards.
MAC Sublayer
The MAC sublayer is responsible for data encapsulation and accessing the media.
Data Encapsulation
IEEE 802.3 data encapsulation includes the following:
1. Ethernet frame-This is the internal structure of the Ethernet frame.
2. Ethernet Addressing-The Ethernet frame includes both a source and destination MAC address to deliver the Ethernet frame from Ethernet NIC to Ethernet \
NIC on the same LAN.
3. Ethernet Error detection-The Ethernet frame includes a frame check sequence (FCS) trailer used for error detection.
MAC Sublayer
Media Access
• The IEEE 802.3 MAC sublayer includes the specifications for different Ethernet communications standards over various types of media including copper and
fiber.
• Legacy Ethernet using a bus topology or hubs, is a shared, half-duplex medium. Ethernet over a half-duplex medium uses a contention-based access method,
carrier sense multiple access/collision detection (CSMA/CD).
• Ethernet LANs of today use switches that operate in full-duplex. Full-duplex communications with Ethernet switches do not require access control through
CSMA/CD.
Note: If the source MAC address does exist in the table but on a different port, the switch treats this as a new entry. The entry is replaced using the same MAC
address but with the more current port number.
Find the Destination MAC Address
If the destination MAC address is a unicast address, the switch will look for a match between the destination MAC address of the frame and an entry in its MAC
address table. If the destination MAC address is in the table, it will forward the frame out the specified port. If the destination MAC address is not in the table,
the switch will forward the frame out all ports except the incoming port. This is called an unknown unicast.
Note: If the destination MAC address is a broadcast or a multicast, the frame is also flooded out all ports except the incoming port.
As a switch receives frames from different devices, it is able to populate its MAC address table by examining the source MAC address of every frame. When the
MAC address table of the switch contains the destination MAC address, it is able to filter the frame and forward out a single port.
Unit 3 – Communicating Between Networks
Network Layer Characteristics
The Network Layer
Provides services to allow end devices to exchange data
IP version 4 (IPv4) and IP version 6 (IPv6) are the principle network layer communication protocols.
The network layer performs four basic operations:
• Addressing end devices
• Encapsulation
• Routing
• De-encapsulation
IP Encapsulation
• IP encapsulates the transport layer segment.
• IP can use either an IPv4 or IPv6 packet and not impact the layer 4 segment.
• IP packet will be examined by all layer 3 devices as it traverses the network.
• The IP addressing does not change from source to destination.
Note: NAT will change addressing, but will be discussed in a later module.
Characteristics of IP
IP is meant to have low overhead and may be described as:
• Connectionless
• Best Effort
• Media Independent
IP is Connectionless
• IP does not establish a connection with the destination before sending the packet.
• There is no control information needed (synchronizations, acknowledgments, etc.).
• The destination will receive the packet when it arrives, but no pre-notifications are sent by IP.
• If there is a need for connection-oriented traffic, then another protocol will handle this (typically TCP at the transport layer).
IP is Best Effort
• IP will not guarantee delivery of the packet.
• IP has reduced overhead since there is no mechanism to resend data that is not received.
• IP does not expect acknowledgments.
• IP does not know if the other device is operational or if it received the packet.
Media Independent
IP is unreliable:
• It cannot manage or fix undelivered or corrupt packets.
• IP cannot retransmit after an error.
• IP cannot realign out of sequence packets.
• IP must rely on other protocols for these functions.
IP is media Independent:
• IP does not concern itself with the type of frame required at the data link layer or the
media type at the physical layer.
• IP can be sent over any media type: copper, fiber, or wireless.
The network layer will establish the Maximum Transmission Unit (MTU).
• Network layer receives this from control information sent by the data link layer.
• The network then establishes the MTU size.
Fragmentation is when Layer 3 splits the IPv4 packet into smaller units.
• Fragmenting causes latency.
• IPv6 does not fragment packets.
• Example: Router goes from Ethernet to a slow WAN with a smaller MTU
IPv4 Packet
IPv4 Packet Header
IPv4 is the primary communication protocol for the network layer. The network header has many purposes:
• It ensures the packet is sent in the correct direction (to the destination).
• It contains information for network layer processing in various fields.
• The information in the header is used by all layer 3 devices that handle the packet
Recall that IPv4 is a 32-bit address written in a dotted decimal notation and can range from 0.0.0.0 – 255.255.255.255
Examples of IPv4 address:
IPv6 Packets
Limitations of IPv4
IPv4 has three major limitations:
• IPv4 address depletion –We have basically run out of IPv4 addressing.
• Lack of end-to-end connectivity –To make IPv4 survive this long, private addressing and NAT were created. This ended direct communications with public
addressing.
• Increased network complexity –NAT was meant as temporary solution and creates issues on the network as a side effect of manipulating the network
headers addressing. NAT causes latency and troubleshooting issues.
IPv6 Overview
• IPv6 was developed by Internet Engineering Task Force (IETF).
• IPv6 overcomes the limitations of IPv4.
• Improvements that IPv6 provides:
• Increased address space –based on 128 bit address, not 32 bits
• Improved packet handling –simplified header with fewer fields
• Eliminates the need for NAT –since there is a huge amount of addressing,
there is no need to use private addressing internally and be mapped to a shared public address
Default Gateway
The default gateway is the network device (i.e., router or Layer 3 switch) that can route traffic to other networks. If you use the analogy that a network is like a
room, then the default gateway is like a doorway. If you want to get to another room or network you need to find the doorway.
A router or layer 3 switch can be a default-gateway.
Features of a default gateway (DGW):
• It must have an IP address in the same range as the rest of the LAN.
• It can accept data from the LAN and is capable of forwarding traffic off of the LAN.
• It can route to other networks.
If a device has no default gateway or a bad default gateway, its traffic will not be able to leave the LAN.
A default gateway is required to send traffic outside of the local network. Traffic cannot be forwarded outside the local network if there is no default gateway,
the default gateway address is not configured, or the default gateway is down.
Introduction to Routing
Router Packet Forwarding Decision
What happens when the router receives the frame from the host device?
Most networks also contain routers, which are intermediary devices. Routers also contain routing tables. When a host sends a packet to another host, it consults
its routing table to determine where to send the packet. If the destination host is on a remote network, the packet is forwarded to the default gateway, which is
usually the local router.
Static Routing
Static Route Characteristics:
• Must be configured manually
• Must be adjusted manually by the
administrator when there is a change in the topology
• Good for small non-redundant networks
• Often used in conjunction with a dynamic routing
protocol for configuring a default route
Static routes are route entries that are manually configured. The figure shows an example
of a static route that was manually configured on router R1. The static route includes the
remote network address and the IP address of the next hop router. STATIC ROUTING
Dynamic Routing
Dynamic Routes Automatically:
• Discover remote networks
• Maintain up-to-date information
• Choose the best path to the destination
• Find new best paths when there is a topology change
Dynamic routing can also share static default routes with the other routers.
DYNAMIC ROUTING
A dynamic routing protocol allows the routers to automatically
learn about remote networks, including a default route, from
other routers. Routers that use dynamic routing protocols
automatically share routing information with other routers and compensate for any topology changes without involving the network administrator. If there is a
change in the network topology, routers share this information using the dynamic routing protocol and automatically update their routing tables.
Dynamic routing protocols include OSPF and Enhanced Interior Gateway Routing Protocol (EIGRP). The figure shows an example of routers R1 and R2
automatically sharing network information using the routing protocol OSPF.
A directly connected route is automatically created when a router interface is configured with IP address information and is activated. The router adds two route
entries with the codes C (i.e., the connected network) and L (i.e., the local interface IP address of the connected network). The route entries also identify the exit
interface to use to reach the network. The two directly connected networks in this example are 192.168.10.0/24 and 209.165.200.224/30.
Routers R1 and R2 are also using the OSPF dynamic routing protocol to exchange router information. In the example routing table, R1 has a route entry for the
10.1.1.0/24 network that it learned dynamically from router R2 via the OSPF routing protocol.
A default route has a network address of all zeroes. For example, the IPv4 network address is 0.0.0.0. A static route entry in the routing table begins with a code
of S*, as highlighted in the example.
MAC and IP
Destination on Same Network
There are two primary addresses assigned to a device on an Ethernet LAN:
• Layer 2 physical address (the MAC address)–Used for NIC to NIC communications on the same Ethernet network.
o MAC/Hardware/Physical Address (48-bits)
• Layer 3 logical address (the IP address)–Used to send the packet from the source device to the destination device.
o IPv4 (32-bits)
o IPv6 (64-bits)
Layer 2 addresses are used to deliver frames from one NIC to another NIC on the same network. If a destination IP address is on the same network, the
destination MAC address will be that of the destination device.
ARP
ARP Overview
To send a packet to another host on the same local IPv4 network, a host must know the IPv4 address and the MAC address of the destination device. Device
destination IPv4 addresses are either known or resolved by device name. However, MAC addresses must be discovered.
A device uses ARP to determine the unknown destination MAC address of a local device when it knows its IPv4 address. ARP provides two basic functions:
• Resolving IPv4 addresses to MAC addresses
• Maintaining an ARP table of IPv4 to MAC address mappings
ARP Functions
When a packet is sent to the data link layer to be encapsulated into an Ethernet frame, the device refers to a table in its memory to find the MAC address that is
mapped to the IPv4 address. This table is stored temporarily in RAM memory and called the ARP table or the ARP cache.
To send a frame, a device will search its ARP table for a destination IPv4 address and a corresponding MAC address.
• If the packet’s destination IPv4 address is on the same network, the device will search the ARP table for the destination IPv4 address.
• If the destination IPv4 address is on a different network, the device will search the ARP table for the IPv4 address of the default gateway.
• If the device locates the IPv4 address, its corresponding MAC address is used as the destination MAC address in the frame.
• If there is no ARP table entry is found, then the device sends an ARP request.
ARP Request
An ARP request is sent when a device needs to determine the MAC address that is associated with an IPv4 address, and it does not have an entry for the IPv4
address in its ARP table.
ARP messages are encapsulated directly within an Ethernet frame. There is no IPv4 header. The ARP request is encapsulated in an Ethernet frame using the
following header information:
Destination MAC address – This is a broadcast address FF-FF-FF-FF-FF-FF requiring all Ethernet NICs on the LAN to accept and process the ARP request.
Source MAC address – This is MAC address of the sender of the ARP request.
Type - ARP messages have a type field of 0x806. This informs the receiving NIC that the data portion of the frame needs to be passed to the ARP process.
Because ARP requests are broadcasts, they are flooded out all ports by the switch (Note: when a layer 2 device received a broadcast frame, it forwards to all
ports except the port on which it received the frame.), except the receiving port. All Ethernet NICs on the LAN process broadcasts and must deliver the ARP
request to its operating system for processing. Every device must process the ARP request to see if the target IPv4 address matches its own. A router will not
forward broadcasts out other interfaces.
Only one device on the LAN will have an IPv4 address that matches the target IPv4 address in the ARP request. All other devices will not reply.
ARP Reply
Only the device with the target IPv4 address associated with the ARP request will respond with an ARP reply. The ARP reply is encapsulated in an Ethernet frame
using the following header information:
Destination MAC address – This is the MAC address of the sender of the ARP request.
Source MAC address – This is the MAC address of the sender of the ARP reply.
Type - ARP messages have a type field of 0x806. This informs the receiving NIC that the data portion of the frame needs to be passed to the ARP process.
Only the device that originally sent the ARP request will receive the unicast ARP reply. After the ARP reply is received, the device will add the IPv4 address and
the corresponding MAC address to its ARP table. Packets destined for that IPv4 address can now be encapsulated in frames using its corresponding MAC
address.
If no device responds to the ARP request, the packet is dropped because a frame cannot be created.
Entries in the ARP table are time stamped. If a device does not receive a frame from a particular device before the timestamp expires, the entry for this device is
removed from the ARP table.
Additionally, static map entries can be entered in an ARP table, but this is rarely done. Static ARP table entries do not expire over time and must be manually
removed.
Note: IPv6 uses a similar process to ARP for IPv4, known as ICMPv6 Neighbor Discovery (ND). IPv6 uses neighbor solicitation and neighbor advertisement
messages, similar to IPv4 ARP requests and ARP replies.
Commands may also be used to manually remove some or all of the entries in the ARP table. After an entry has been removed, the process for sending an ARP
request and receiving an ARP reply must occur again to enter the map in the ARP table.
• The show ip arp command displays the ARP table on a Cisco router.
• The arp –a command displays the ARP table on a Windows 10 PC.
Note: The fifth ICMPv6 ND message is a redirect message which is used for better next-hop selection. This is beyond the scope of this course.