You are on page 1of 14

cisco ccna1.

Chapter2

Console Related.

 show running-config startup-config // copy run start (shortcut) (running config in RAM , startup in NVRAM).
 erase startup-config -> delete all nvram config.

line con 0 -> password XXXXXXXXX -> login -> exit. // password to global.

IP ADDRESSES

An IPv4 subnet mask is a 32-bit value that separates the network portion of the address from the host portion

The default gateway address is the IP address of the router that the host will use to access remote networks,
including the Internet.

The virtual interface provides a means to remotely manage a switch over a network using IPv4. Each switch comes
with one SVI appearing in the default configuration "out-of-the-box." The default SVI is interface VLAN1.

#Interface vlan 1

To access the switch remotely, an IP address and a subnet mask must be configured on the SVI. To configure an SVI
on a switch, use the interface vlan 1 global configuration command. Vlan 1 is not an actual physical interface but a
virtual one. Next assign an IPv4 address using the ip address ip-address subnet-mask interface configuration
command. Finally, enable the virtual interface using the no shutdown interface configuration command.

Show ip interface brief - > show interfaces ip and states.


Chapter 3

Segment – Transport Layer PDU ( Protocol Data Unit)


Packet – Network Layer PDU
Frame – Data Link Layer PDU
Bits – Physical Layer PDU
The data link, or Layer 2, physical address has a different role. The purpose of the data link address is to deliver the
data link frame from one network interface to another network interface on the same network.

Deci Layer 2 transmite frame-urile de la un NIC la celalalt din ACEEASI RETEA. Frame-ul se schimba mereu cand
se schimba reteaua.
The network layer addresses, or IP addresses, indicate the original source and final destination. An IP address
contains two parts:

 Network portion – The left-most part of the address that indicates which network the IP address is a member.
All devices on the same network will have the same network portion of the address.

 Host portion – The remaining part of the address that identifies a specific device on the network. The host
portion is unique for each device on the network.

Chapter 4.

 The user data is segmented by the transport layer, placed into packets by the network layer, and further
encapsulated into frames by the data link layer.

 The physical layer encodes the frames and creates the electrical, optical, or radio wave signals that represent
the bits in each frame.

There are three basic forms of network media. The physical layer produces the representation and groupings of bits
for each type of media as:

 Copper cable: The signals are patterns of electrical pulses.

 Fiber-optic cable: The signals are patterns of light.

 Wireless: The signals are patterns of microwave transmission

Physical Layer

 Physical components – NICs, cables, wires etc.


 Encoding - converting a stream of data into readable code. EG Manchester Encoding
(high to low voltage is 0 bit and low to high is 1)
 Signaling – the method of representing the bits.

The physical layer produces the representation and groupings of bits as voltages, radio
frequencies, or light pulses

Bandwidth is the capacity of a medium to carry data. Maximum capacity of bits travelling the media / s

Throughput is how many bits actually travel the media. Influenced by latency, traffic type, traffic amount.
COPPER
The timing and voltage values of the electrical pulses are also susceptible to interference from two sources:

 Electromagnetic interference (EMI) or radio frequency interference (RFI) - EMI and RFI signals can distort
and corrupt the data signals being carried by copper media. Potential sources of EMI and RFI include radio
waves and electromagnetic devices, such as fluorescent lights or electric motors.

 Crosstalk - Crosstalk is a disturbance caused by the electric or magnetic fields of a signal on one wire to the
signal in an adjacent wire. In telephone circuits, crosstalk can result in hearing part of another voice
conversation from an adjacent circuit. Specifically, when an electrical current flows through a wire, it creates a
small, circular magnetic field around the wire, which can be picked up by an adjacent wire.

There are three main types of copper media used in networking:

 Unshielded Twisted-Pair (UTP) - UTP cable consists of four pairs of color-coded wires that have been twisted
together and then encased in a flexible plastic sheath that protects from minor physical damage. The twisting of
wires helps protect against signal interference from other wires.

 Shielded Twisted-Pair (S TP) – better noise protection // more expensive.

 Coaxial

UTP TYPES. The following are the main cable types that are obtained by using specific wiring conventions:

 Ethernet Straight-through: The most common type of networking cable. It is commonly used to interconnect a
host to a switch and a switch to a router.

 Ethernet Crossover: A cable used to interconnect similar devices. For example to connect a switch to a
switch, a host to a host, or a router to a router.

 Rollover: A Cisco proprietary cable used to connect a workstation to a router or switch console port.

FIBER
Optical fiber cable transmits data over longer distances and at higher bandwidths than any other networking media.
Unlike copper wires, fiber-optic cable can transmit signals with less attenuation

Light pulses representing the transmitted data as bits on the media are generated by either:

 Lasers

 Light emitting diodes (LEDs)


Fiber-optic cables are broadly classified into two types:

 Single-mode fiber (SMF): Consists of a very small core and uses expensive laser technology to send a single
ray of light, as shown in Figure 1. Popular in long-distance situations spanning hundreds of kilometers, such as
those required in long haul telephony and cable TV applications.

 Multimode fiber (MMF): Consists of a larger core and uses LED emitters to send light pulses. Specifically, light
from an LED enters the multimode fiber at different angles, as shown in Figure 2. Popular in LANs because
they can be powered by low-cost LEDs. It provides bandwidth up to 10 Gb/s over link lengths of up to 550
meters.

The Data Link Layer

The data link layer of the OSI model (Layer 2), as shown in Figure 1, is responsible for:

 Allowing the upper layers to access the media

 Accepting Layer 3 packets and packaging them into frames

 Preparing network data for the physical network

 Controlling how data is placed and received on the media

 Exchanging frames between nodes over a physical network media, such as UTP or fiber-optic

 Receiving and directing packets to an upper layer protocol

 Performing error detection

It is subdivided in two sublayers

- Logical Link Control (LLC ) -> comunica cu L3


- Media Access Control (MAC ) -> comunica cu tehnologiile de access ( Ethernet, Wifi etc)

Data Link Layer Protocol descriebe how to format a frame in order to be accessed on different media.

La fiecare nod, un dispozitiv intermediar accepta frameul venit, il dezencapsuleaza si trimite pachetul in
alt frame. Fiecare header din frameurile schimbate e specific unui canal anume(media).
At each hop along the path, a router:

 Accepts a frame from a medium

 De-encapsulates the frame

 Re-encapsulates the packet into a new frame

 Forwards the new frame appropriate to the medium of that segment of the physical network

Physical Topologies
-Star -> all devices connected to an intermediate device(switch).
-Extended star -> Many star topologies interconnected.
-Bus -> Toate deviceurile end to end sunt conectate intre ele. Fara switchuri.
-Ring -> End systems are connected to their respective neighbor forming a ring. Unlike the bus
topology, the ring does not need to be terminated.

Half Duplex -> in bus topos and in WLAN , hubs.


Full Duplex -> switches
The data link layer prepares a packet for transport across the local media by encapsulating it
with a header and a trailer to create a frame. The description of a frame is a key element of
each data link layer protocol. Although there are many different data link layer protocols that
describe data link layer frames, each frame type has three basic parts:

 Header
 Data
 Trailer

generic frame field types include:

 Frame start and stop indicator flags - Used to identify the beginning and end limits of the frame.

 Addressing - Indicates the source and destination nodes on the media.

 Type - Identifies the Layer 3 protocol in the data field.

 Control - Identifies special flow control services such as quality of service (QoS). QoS is used to give
forwarding priority to certain types of messages. Data link frames carrying voice over IP (VoIP) packets
normally receive priority because they are sensitive to delay.
 Data - Contains the frame payload (i.e., packet header, segment header, and the data).

 Error Detection - These frame fields are used for error detection and are included after the data to form the
trailer.

The TCP/IP network access layer is the equivalent of the OSI data link layer (Layer 2) and the physical layer (Layer
1).
Chapter 4: Network Access REZUMAT

The TCP/IP network access layer is the equivalent of the OSI data link layer (Layer 2) and the physical layer (Layer 1).

The OSI physical layer provides the means to transport the bits that make up a data link layer frame across the network media. The physical components are the electronic hardware devices, media, and other
connectors that transmit and carry the signals to represent the bits. Hardware components such as network adapters (NICs), interfaces and connectors, cable materials, and cable designs are all specified in
standards associated with the physical layer. The physical layer standards address three functional areas: physical components, frame encoding technique, and signaling method.

Using the proper media is an important part of network communications. Without the proper physical connection, either wired or wireless, communications between any two devices will not occur.

Wired communication consists of copper media and fiber cable:

 There are three main types of copper media used in networking: unshielded-twisted pair (UTP), shielded-twisted pair (STP), and coaxial cable. UTP cabling is the most common copper networking
media.

 Optical fiber cable has become very popular for interconnecting infrastructure network devices. It permits the transmission of data over longer distances and at higher bandwidths (data rates) than any
other networking media. Unlike copper wires, fiber-optic cable can transmit signals with less attenuation and is completely immune to EMI and RFI.

Wireless media carry electromagnetic signals that represent the binary digits of data communications using radio or microwave frequencies.

The number of wireless-enabled devices continues to increase. For this reason, wireless has become the medium of choice for home networks and is quickly gaining in popularity in enterprise networks.

The data link layer handles the exchange of frames between nodes over a physical network media. It allows the upper layers to access the media and controls how data is placed and received on the media.

Among the different implementations of the data link layer protocols, there are different methods of controlling access to the media. These media access control techniques define if and how the nodes share the
media. The actual media access control method used depends on the topology and media sharing. LAN and WAN topologies can be physical or logical. It is the logical topology that influences the type of network
framing and media access control used. WANs are commonly interconnected using the point-to-point, hub and spoke, or mesh physical topologies. In shared media LANs, end devices can be interconnected
using the star, bus, ring, or extended star physical topologies.

All data link layer protocols encapsulate the Layer 3 PDU within the data field of the frame. However, the structure of the frame and the fields contained in the header and trailer vary according to the protocol.
O firma a primit 10.0.0.0 / 8 pentru reteaua lor.
Asta inseamna ca au 2^24 (32-8) nr de hosturi disponibile.
Daca ar vrea sa imparta in subneturi de /16, ar putea sa aiba 2^8 subneturi(16-8), adica 256.

10.0.0.0 /16 de la 10.0.0.1/16 pana la 10.0.255.254 cu 10.0.255.255 broadcast.


10.1.0.0 /16 de la 10.1.0.1/16 pana la 10.1.255.254 cu 10.1.255.255 broadcast
………………………….
10.255.0.0 / 16 de la 10.255.0.1/16 pana la 10.255.255.254 cu 10.255.255.255 broadcast.

Daca ar vrea sa imparta in subneturi de /24, ar putea sa aiba 2^16 subneturi(24-8), adica 65536

10.0.0.0/24 de la 10.0.0.1/24 pana la 10.0.0.254 cu 10.0.0.255 broadcast


10.0.1.0/24 e la 10.0.1.1/24 pana la 10.0.1.254 cu 10.0.1.255 broadcast
….
10.1.0.0/24 ….

10.2.0.0/24..
Etc
With TCP, there are three basic operations of reliability:

 Numbering and tracking data segments transmitted to a specific host from a specific application

 Acknowledging received data

 Retransmitting any unacknowledged data after a certain period of time

tcp

TCP is a stateful protocol. A stateful protocol is a protocol that keeps track of the state of the communication
session.

Each TCP segment has 20 bytes of overhead in the header encapsulating the application layer data:

 Source Port (16 bits) and Destination Port (16 bits) - Used to identify the application.

 Sequence number (32 bits) - Used for data reassembly purposes.

 Acknowledgment number (32 bits) - Indicates data has been received and the next byte expected from
the source.

 Header length (4 bits) - Known as ʺdata offsetʺ. Indicates the length of the TCP segment header.

 Reserved (6 bits) - This field is reserved for the future.


 Control bits (6 bits) - Includes bit codes, or flags, which indicate the purpose and function of the TCP
segment.

 Window size (16 bits) - Indicates the number of bytes that can be accepted at one time.

 Checksum (16 bits) - Used for error checking of the segment header and data.

 Urgent (16 bits) - Indicates if data is urgent.

UDP provides the basic functions for delivering data segments between the appropriate applications, with very little
overhead and data checking

udp

UDP is a stateless protocol, meaning neither the client, nor the server, is obligated to keep track of the state of the
communication session.

One of the most important requirements for delivering live video and voice over the network is that the data
continues to flow quickly. Live video and voice applications can tolerate some data loss with minimal or no noticeable
effect, and are perfectly suited to UDP.

UDP is connectionless which means that it doesn't care about dropped packets and packets
received out of order, it is a best effort protocol but it does care about the integrity of the
packets it receives. This is why it has a FCS.
PORTS

The combination of the source IP address and source port number, or the destination IP address and destination port
number is known as a socket.

The socket on a web server might be: 192.168.1.7:80

- Well known ports 0-1023


- Registered ports 1024-49151 – specific apps
- Dynamic/ Private Ports – 49152- 65535 – specific apps

netstat to list the protocols in use, the local address and port numbers, the foreign address and
port numbers, and the connection state.

A TCP connection is established in three steps:

Step 1 - The initiating client requests a client-to-server communication session with the server.

Step 2 - The server acknowledges the client-to-server communication session and requests a server-to-client
communication session.

Step 3 - The initiating client acknowledges the server-to-client communication session.


When the communication stops.

Step 1 - When the client has no more data to send in the stream, it sends a segment with the FIN flag set.

Step 2 - The server sends an ACK to acknowledge the receipt of the FIN to terminate the session from client to
server.

Step 3 - The server sends a FIN to the client to terminate the server-to-client session.

Step 4 - The client responds with an ACK to acknowledge the FIN from the server.

Segmentele TCP pot fi primate in alta ordine decat cea corecta, de aceea se foloseste sequence number, aflat in
headerul fiecarui segment. ISN e un nr random initializat la inceput care se incrementeaza dupa fiecare data trimisa.
Astfel se contorizeaza ordinea.

In cadrul unui transfer:

Host 1 host2

Se trimite segment 1 se primeste, se verfica daca e 1, se trimite ack

DAca se primeste ack, // asteapta segment2

Trimite urmatorul segment,

Daca nu, retrimite segment 1

The transport layer provides transport-related services by:

 Dividing data received from an application into segments

 Adding a header to identify and manage each segment

 Using the header information to reassemble the segments back into application data

 Passing the assembled data to the correct application


Specifically, the private address blocks are:

 10.0.0.0 /8 or 10.0.0.0 to 10.255.255.255

 172.16.0.0 /12 or 172.16.0.0 to 172.31.255.255

 192.168.0.0 /16 or 192.168.0.0 to 192.168.255.25

You might also like