Cisco
Cisco
end devices in a small geographical area, which is typically an enterprise, home, or small
business network owned and managed by an individual or IT department.
• Wide Area Network (WAN) - A network infrastructure that provides access to other
networks over a wide geographical area, which is typically owned and managed by a
telecommunications service provider.
Other
types of
networks include:
• Metropolitan Area Network (MAN) - A network infrastructure that spans a physical area
larger than a LAN but smaller than a WAN (e.g., a city). MANs are typically operated by a
single entity such as a large organization.
• Wireless LAN (WLAN) - Similar to a LAN but wirelessly interconnects users and end
points in a small geographical area.
• Storage Area Network (SAN) - A network infrastructure designed to support file servers
and provide data storage, retrieval, and replication
● A fault tolerant network is one that limits the impact of a failure, so that the fewest number
of devices are affected. It is also built in a way that allows quick recovery when such a
failure occurs. These networks depend on multiple paths between the source and destination
of a message. If one path fails, the messages can be instantly sent over a different link.
Having multiple paths to a destination is known as redundancy.
● A scalable network can expand quickly to support new users and applications without
impacting the performance of the service being delivered to existing users.
● Quality of Service (QoS) is also an ever increasing requirement of networks today. New
applications available to users over internetworks, such as voice and live video
transmissions, create higher expectations for the quality of the delivered services.
● Information security refers to protecting the information contained within the packets being
transmitted over the network and the information stored on network attached devices. In
order to achieve the goals of network security, there are three primary requirements, as
shown in Figure 2:
• Confidentiality - Data confidentiality means that only the intended and authorized
recipients can access and read data.
• Integrity - Data integrity means having the assurance that the information has not
been altered in transmission, from origin to destination.
• Availability - Data availability means having the assurance of timely and reliable
access to data services for authorized users.
BYOD is about end users having the freedom to use personal tools to access information and
communicate across a business network. These personal tools include laptops, netbooks, tablets,
smartphones, and e-readers. These can be devices purchased by the company purchased by the
individual, or both.
Cloud computing allows us to store personal files, even backup our entire hard disk drive on
servers over the Internet. Applications such as word processing and photo editing can be accessed
using the Cloud.
Network security components for a home or small office network should include, at a minimum:
-Antivirus and antispyware – These are used to protect end devices from becoming
infected with malicious software.
-Firewall filtering – This is used to block unauthorized access to the network. This may
include a host-based firewall system that is implemented to prevent unauthorized access to
the end device, or a basic filtering service on the home router to prevent unauthorized access
from the outside world into the network.
-Dedicated firewall systems – These are used to provide more advanced firewall
capabilities that can filter large amounts of traffic with more granularity.
-Access control lists (ACL) – These are used to further filter access and traffic forwarding.
-Intrusion prevention systems (IPS) – These are used to identify fast-spreading threats,
such as zero-day or zero-hour attacks.
-Virtual private networks (VPN) – These are used to provide secure access to remote
workers.
Console – This is a physical management port that provides out-of-band access to a Cisco device.
Out-of-band access refers to access via a dedicated management channel that is used for device
maintenance purposes only.
Secure Shell (SSH) – SSH is a method for remotely establishing a secure CLI connection through a
virtual interface, over a network. Unlike a console connection, SSH connections require active
networking services on the device including an active interface configured with an address.
Telnet - Telnet is an insecure method of remotely establishing a CLI session through avirtual
interface, over a network. Unlike SSH, Telnet does not provide a securely encrypted connection.
User authentication, passwords, and commands are sent over the network in plaintext.
- To
move from user EXEC mode to privileged EXEC mode, use the enable
-Use the disable privileged EXEC mode command to return to user EXEC mode.
line vty 0 15 Virtual terminal (VTY) lines enable remote access to the device.
password 1234 specify the VTY password
login enable VTY access
service password-encryption encrypt passwords,
banner motd # baner informujacy że nie ma się dosępu po nacisnieciu enter należy wpisać treść
banera i nacisnąć #
startup-config - The file stored in Non-volatile Random Access Memory (NVRAM) that contains
all of the commands that will be used by the device upon startup or reboot. NVRAM does not lose
its contents when the device is powered off.
running-config - The file stored in Random Access Memory (RAM) that reflects the current
configuration. Modifying a running configuration affects the operation of a Cisco device
immediately. RAM is volatile memory. It loses all of its content when the device is powered off or
restarted.
show running-config privileged EXEC mode command to view the running configuration file.
show startup-config To view the startup configuration file.
copy running-config startup-config To save changes made to the running configuration to the
startup configuration file
• HTT
P - is
an
application protocol that governs the way a web server and a web client interact. HTTP
defines the content and formatting of the requests and responses that are exchanged between
the client and server. Both the client and the web server software implement HTTP as part of
the application. HTTP relies on other protocols to govern how the messages are transported
between the client and server.
• TCP - is the transport protocol that manages the individual conversations. TCP divides the
HTTP messages into smaller pieces, called segments. These segments are sent between the
web server and client processes running at the destination host. TCP is also responsible for
controlling the size and rate at which messages are exchanged between the server and the
client.
• IP - is responsible for taking the formatted segments from TCP, encapsulating them into
packets, assigning them the appropriate addresses, and delivering them to the destination
host.
• Ethernet - is a network access protocol that describes two primary functions:
communication over a data link and the physical transmission of data on the network media.
Network access protocols are responsible for taking the packets from IP and formatting them
to be transmitted over the media.
1. Warstwa fizyczna
Zapewnia transmisję danych pomiędzy węzłami sieci. Definiuje interfejsy sieciowe i medium
transmisji. Określa m.in. sposób połączenia mechanicznego, elektrycznego, standard fizycznej
transmisji danych. W skład jej obiektów wchodzą min.: przewody, karty sieciowe, modemy,
wzmacniacze, koncentratory.
2. Warstwa łącza danych
Zapewnia niezawodność łącza danych. Definiuje mechanizmy kontroli błędów w przesyłanych
ramkach lub pakietach - CRC (Cyclic Redundancy Check). Jest ona ściśle powiązana z warstwą
fizyczną, która narzuca topologię. Warstwa ta często zajmuje się również kompresją danych. W
skład jej obiektów wchodzą sterowniki urządzeń sieciowych, np.: sterowniki kart sieciowych oraz
mosty i przełączniki.
3. Warstwa sieciowa
Zapewnia metody ustanawiania, utrzymywania i rozłączania połączenia sieciowego. Obsługuje
błędy komunikacji. Ponadto jest odpowiedzialna za trasowanie pakietów w sieci, czyli wyznaczenie
optymalnej trasy dla połączenia. W niektórych warunkach dopuszczalne jest gubienie pakietów
przez tę warstwę. W skład jej obiektów wchodzą min.: rutery.
4. Warstwa transportowa
Zapewnia przezroczysty transfer danych typu point-to-point. Dba o kolejność pakietów
otrzymywanych przez odbiorcę. Sprawdza poprawność przesyłanych pakietów i w przypadku ich
uszkodzenia lub zaginięcia, zapewnia ich retransmisję.
5. Warstwa sesji
Zapewnia aplikacjom na odległych komputerach realizację wymiany danych pomiędzy nimi.
Kontroluje nawiązywanie i zrywanie połączenia przez aplikację. Jest odpowiedzialna za poprawną
realizację zapytania o daną usługę. Do warstwy tej można zaliczyć funkcje API udostępniane
programiście przez bibliotekę realizującą dostęp do sieci na poziomie powyżej warstwy
transportowej takie jak np. biblioteka strumieni i gniazdek BSD.
6. Warstwa prezentacji
Zapewnia tłumaczenie danych, definiowanie ich formatu oraz odpowiednią składnię. Umożliwia
przekształcenie danych na postać standardową, niezależną od aplikacji. Rozwiązuje takie problemy
jak niezgodność reprezentacji liczb, znaków końca wiersza, liter narodowych itp. Odpowiada także
za kompresję i szyfrowanie.
7. Warstwa aplikacji
Zapewnia aplikacjom metody dostępu do środowiska OSI. Warstwa ta świadczy usługi końcowe dla
aplikacji, min.: udostępnianie zasobów (plików, drukarek). Na tym poziomie rezydują procesy
sieciowe dostępne bezpośrednio dla użytkownika.
Wysyłanie wiadomości layer 2
wiadomość wysyła się z pc1 na router
wysyłając wiadomośc z routera 1 na router 2 zmienia się mac źródła(src NIC) i mac docelowy(dest
NIC) ale adresy ip zostają takie same
Shielded Twisted-Pair Cable
Kabel koncentryczny
UTP cable does not use shielding to counter the effects of EMI and RFI. Instead, cable
designers have discovered that they can limit the negative effect of crosstalk by:
• Cancellation: Designers now pair wires in a circuit. When two wires in an electrical circuit
are placed close together, their magnetic fields are the exact opposite of each other.
Therefore, the two magnetic fields cancel each other and also cancel out any outside EMI
and RFI signals.
• Varying the number of twists per wire pair: To further enhance the cancellation effect of
paired circuit wires, designers vary the number of twists of each wire pair in a cable. UTP
cable must follow precise specifications governing how many twists or braids are permitted
per meter of cable. Notice in the figure that the orange/orange white pair is twisted less than
the blue/blue white pair. Each colored pair is twisted a different number of times.
Budowa światłowodu
•
•
• Singl
e-
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.
generated by either:
• Lasers
• Light emitting diodes (LEDs)
Three common types of fiber-optic termination and splicing errors are:
• Misalignment: The fiber-optic media are not precisely aligned to one another when joined.
• End gap: The media does not completely touch at the splice or connection.
• End finish: The media ends are not well polished, or dirt is present at the termination.
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
The data link layer is divided into two sublayers:
• Logical Link Control (LLC) - This upper sublayer communicates with the network layer. It
places information in the frame that identifies which network layer protocol is being used for
the frame. This information allows multiple Layer 3 protocols, such as IPv4 and IPv6, to
utilize the same network interface and media. It is implemented in software,
• Media Access Control (MAC) - This lower sublayer defines the media access processes
performed by the hardware. It provides data link layer addressing and access to various
network technologies.
Physical topology - Refers to the physical connections and identifies how end devices and
infrastructure devices such as routers, switches, and wireless access points are interconnected.
Physical topologies are usually point-to-point or star. See Figure 1.
Logical topology - Refers to the way a network transfers frames from one node to the next. This
arrangement consists of virtual connections between the nodes of a network. These logical signal
paths are defined by data link layer protocols. The logical topology of point-to-point links is
relatively simple while shared media offers different access control methods. See Figure 2.
• Star - End devices are connected to a central intermediate device. Early star topologies
interconnected end devices using Ethernet hubs. However, star topologies now use Ethernet
switches. The star topology is easy to install, very scalable (easy to add and remove end
devices), and easy to troubleshoot.
• Extended Star - In an extended star topology, additional Ethernet switches interconnect
other star topologies. An extended star is an example of a hybrid topology.
• Bus - All end systems are chained to each other and terminated in some form on each end.
Infrastructure devices such as switches are not required to interconnect the end devices. Bus
topologies using coax cables were used in legacy Ethernet networks because it was
inexpensive and easy to set up.
• Ring - End systems are connected to their respective neighbor forming a ring. Unlike the
bus topology, the ring does not need to be terminated. Ring topologies were used in legacy
Fiber Distributed Data Interface (FDDI) and Token Ring networks
• Half-duplex communication - Both devices can transmit and receive on the media but
cannot do so simultaneously. The half-duplex mode is used in legacy bus topologies and
with Ethernet hubs. WLANs also operate in half-duplex. Half-duplex allows only one device
to send or receive at a time on the shared medium and is used with contention-based access
methods. Figure 1 shows half-duplex communication.
• Full-duplex communication - Both devices can transmit and receive on the media at the
same time. 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 can operate
in half-duplex if connecting to a device such as an Ethernet hub. Figure 2 shows full-duplex
communication.
As shown in the figure, the Ethernet MAC sublayer has two primary
responsibilities:
• Data encapsulation
The data encapsulation process includes frame assembly before transmission, and frame
disassembly upon reception of a frame. In forming the frame, the MAC layer adds a header
and trailer to the network layer PDU.
Data encapsulation provides three primary functions:
◦ Frame delimiting - The framing process provides important delimiters that are used to
identify a group of bits that make up a frame. These delimiting bits provide
synchronization between the transmitting and receiving nodes.
◦ Addressing - The encapsulation process contains the Layer 3 PDU and also provides for
data link layer addressing.
◦ Error detection - Each frame contains a trailer used to detect any errors in
transmissions.
• Media Access Control
The second responsibility of the MAC sublayer is media access control. Media access
control is responsible for the placement of frames on the media and the removal of frames
from the media. As its name implies, it controls access to the media. This sublayer
communicates directly with the physical layer.
The underlying logical topology of Ethernet is a multi-access bus; therefore, all nodes
(devices) on a single network segment share the medium. Ethernet is a contention-based
method of networking. A contention-based method means that any device can try to transmit
data across the shared medium whenever it has data to send. The Carrier Sense Multiple
Access/Collision Detection (CSMA/CD) process is used in half-duplex Ethernet LANs to
detect and resolve collisions. Today’s Ethernet LANs use full-duplex switches, which allow
multiple devices to send and receive simultaneously with no collisions.
Budowa ramki ethernet 2
The minimum Ethernet frame size is 64 bytes and the maximum is 1518 bytes
Multicast addresses
allow a source
device to send a packet to a group of devices. Devices that belong to a multicast group are assigned
a multicast group IP address. The range of IPv4 multicast addresses is 224.0.0.0 to
239.255.255.255. The range of IPv6 multicast addresses begin with FF00::/8. Because multicast
addresses represent a group of addresses (sometimes called a host group), they can only be used as
the destination of a packet. The source will always be a unicast address.
As with the unicast and broadcast addresses, the multicast IP address requires a corresponding
multicast MAC address to actually deliver frames on a local network. The multicast MAC address
associated with an IPv4 multicast address is a special value that begins with 01-00-5E in
hexadecimal. The remaining portion of the multicast MAC address is created by converting the
lower 23 bits of the IP multicast group address into 6 hexadecimal characters. For an IPv6 address,
the multicast MAC address begins with 33-33.
Every frame that enters a switch is checked for new information to learn. It does this by examining
the frame’s source MAC address and port number where the frame entered the switch.
• If the source MAC address does not exist, it is added to the table along with the incoming
port number. In Figure 1, PC-A is sending an Ethernet frame to PC-D. The switch adds the
MAC address for PC-A to the table.
• If the source MAC address does exist, the switch updates the refresh timer for that entry. By
default, most Ethernet switches keep an entry in the table for 5 minutes.
Next, 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 known as an unknown unicast. As shown in Figure 2,
the switch does not have the destination MAC address in its table for PC-D, so it sends the
frame out all ports except port 1.
If the destination MAC address is a broadcast or a multicast, the frame is also flooded out all ports
except the incoming port.
Link gdzie moge generować sobie pytania z switcha
https://static-course-assets.s3.amazonaws.com/ITN6/en/index.html#5.2.1.6
Switches use one of the following forwarding methods for switching data between network
ports:
• Store-and-forward switching
• Cut-through switching
switching:
Fast-forward switching - Fast-forward switching offers the lowest level of latency. Fast-forward
switching immediately forwards a packet after reading the destination address. Because fast-
forward switching starts forwarding before the entire packet has been received, there may be times
when packets are relayed with errors. This occurs infrequently, and the destination network adapter
discards the faulty packet upon receipt. In fast-forward mode, latency is measured from the first bit
received to the first bit transmitted. Fast-forward switching is the typical cut-through method of
switching.
Fragment-free switching - In fragment-free switching, the switch stores the first 64 bytes of the
frame before forwarding. Fragment-free switching can be viewed as a compromise between store-
and-forward switching and fast-forward switching. The reason fragment-free switching stores only
the first 64 bytes of the frame is that most network errors and collisions occur during the first 64
bytes. Fragment-free switching tries to enhance fast-forward switching by performing a small error
check on the first 64 bytes of the frame to ensure that a collision has not occurred before forwarding
the frame. Fragment-free switching is a compromise between the high latency and high integrity of
store-and-forward switching, and the low latency and reduced integrity of fast-forward switching.
Two of the most basic settings on a switch are the bandwidth and duplex settings for each
individual switch port. It is critical that the duplex and bandwidth settings match between the
switch port and the connected devices, such as a computer or another switch.
There are two types of duplex settings used for communications on an Ethernet network: half
duplex and full duplex.
• Full-duplex – Both ends of the connection can send and receive simultaneously.
• Half-duplex – Only one end of the connection can send at a time.
Autonegotiation enables two devices to automatically exchange information about speed and
duplex capabilities. The switch and the connected device will choose the highest performance
mode.
duplex Mismatch One of the most common causes of performance issues on 10/100 Mb/s Ethernet
links occurs when one port on the link operates at half-duplex while the other port operates at full-
duplex. This occurs when one or both ports on a link are reset, and the autonegotiation process does
not result in both link partners having the same configuration. It also can occur when users
reconfigure one side of a link and forget to reconfigure the other. Both sides of a link should have
autonegotiation on, or both sides should have it off.
auto-MDIX When the auto-MDIX feature is enabled, the switch detects the type of cable attached
to the port, and configures the interfaces accordingly. Therefore, you can use either a crossover or a
straight-through cable for connections to a copper 10/100/1000 port on the switch, regardless of the
type of device on the other end of the connection.
When the router receives the Ethernet frame, it de-encapsulates the Layer 2 information. Using the
destination IP address, it determines the next-hop device, and then encapsulates the IP packet in a
new data link frame for the outgoing interface. Along each link in a path, an IP packet is
encapsulated in a frame specific to the particular data link technology associated with that link, such
as Ethernet. If the next-hop device is the final destination, the destination MAC address will be that
of the device’s Ethernet NIC.
ARP
ARP is used to determine the destination MAC address. ARP provides two basic functions:
• Resolving IPv4 addresses to MAC addresses
• Maintaining a table of mappings
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 called the ARP table . The ARP table is stored in the RAM of the device.
The sending 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 as the source IPv4 address,
the device will search the ARP table for the destination IPv4 address.
• If the destination IPv4 address is on a different network than the source IPv4 address, 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 entry is found, then the device sends an ARP request.
An ARP request is sent when a device needs a MAC address associated with an IPv4 address
The ARP request message includes:
• Target IPv4 address – This is the IPv4 address that requires a corresponding MAC address.
• Target MAC address - This is the unknown MAC address and will be empty in the ARP
request message.
Because ARP requests are broadcasts, they are flooded out all ports by the switch except the
receiving port. All Ethernet NICs on the LAN process broadcasts. 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 and it will reply to the sending device. IPv4 address and the corresponding MAC
address are added to ARP table.
• 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 by the time 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.
• IPv6 uses a similar process to ARP for IPv4, known as ICMPv6 neighbor discovery.
When the destination IPv4 address is not on the same network as the source IPv4 address, the
source device needs to send the frame to its default gateway. Whenever a source device has a packet
with an IPv4 address on another network, it will encapsulate that packet in a frame using the
destination MAC address of default gateway The IPv4 address of the default gateway address is
stored in the IPv4 configuration of the hosts. When a host creates a packet for a destination, it
compares the destination IPv4 address and its own IPv4 address to determine if the two IPv4
addresses are located on the same Layer 3 network. If the destination host is not on its same
network, the source checks its ARP table for an entry with the IPv4 address of the default gateway.
If there is not an entry, it uses the ARP process to determine a MAC address of the default
gateway. .
show ip arp polecenie pokazujące Tablice ARP router cisco
arp –a pokazuje
tablice arp w
windowsie
ARP Spoofing
This is a
technique used by an attacker to reply to an ARP request for an IPv4 address belonging to another
device, such as the default gateway, as shown in the figure. The attacker sends an ARP reply with its
own MAC address. The receiver of the ARP reply will add the wrong MAC address to its ARP table
and send these packets to the attacker.
Ip encapsulation
IP encapsulates the transport layer segment or other data by adding an IP header. This header is used
to deliver the packet to the destination host. The IP header remains the same from the time the
packet leaves the source host until it arrives at the destination host.
Cechy protokołu IP
On a Windows host, the route print or netstat -r command can be used to display the host routing
table.
When a host sends a packet to another host, it will use 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.
What happens when a packet arrives at the default gateway, which is usually a router? The router
looks at its routing table to determine where to forward packets.
The routing table of a router can store information about:
• Directly-connected routes - These routes come from the active router interfaces. Routers
add a directly connected route when an interface is configured with an IP address and is
activated. Each of the router's interfaces is connected to a different network segment.
• Remote routes - These routes come from remote networks connected to other routers.
Routes to these networks can be manually configured on the local router by the network
administrator or dynamically configured by enabling the local router to exchange routing
information with other routers using a dynamic routing protocol.
• Default route – Like a host, routers also use a default route as a last resort if there is no
other route to the desired network in the routing table.
show ip route Polecenie które wypisuje tabele routingu
Tabela zawiera informacje o tym jak dana trasa została nauczona, wiarygodność trasy oraz „rating”
kiedy trasa ostatnio została używana oraz na jaki interfejs kierować ruch żeby pakiet dotarł do hosta
docelowego. Jeśli jest kilka tras do jednego hosta to decyzja zależy od wartości metric
a b c d e f g
a) jak
trasa
została nauczona (S-static, D- EIGRP , O-ospf)
b) sieć docelowa
c) dystans administracyjny (trustworthiness) zródła trasy. im niższa wart tym wieksza
wiarygodność
d) metric niższa wart oznacza że trasa jest bardziej preferowana
e) IP routera na który należy wysłać pakiet
f) Timestamp – kiedy ostatnio trasa była używana
g) Outgoing interface- jakim interfejsem należy przesłać pakiet
•
•
•
•
•
•
•
RAM - This is volatile memory used in Cisco routers to store applications, processes, and data
needed to be executed by the CPU. Cisco routers use a fast type of RAM called synchronous
dynamic random access memory (SDRAM).
• ROM - This non-volatile memory is used to store crucial operational instructions and a
limited IOS. Specifically, ROM is firmware embedded on an integrated circuit inside the
router which can only be altered by Cisco.
• NVRAM – This is non-volatile memory is used as the permanent storage for the startup
configuration file (startup-config).
• Flash - This non-volatile computer memory used as permanent storage for the IOS and other
system related files such as log files, voice configuration files, HTML files, backup
configurations, and more. When a router is rebooted, the IOS is copied from flash into
RAM.
• show ip route - Displays the contents of the IPv4 routing table stored in RAM.
• show interfaces - Displays statistics for all interfaces on the device.
• show ip interface (brief) - Displays the IPv4 statistics for all interfaces on a router. Można
dopisać brief żeby było krócej
IP i maska
Adres IP identyfikuje określonego hosta ale hosty znajdujące się w tej samej podsieci mają taki sam
początek IP co sprawia że używając maski można ustalić czy 2 hosty znajdują się w tej samej
podsieci. Maska informuje nas ile początkowych bitów jest użyte do identyfikacji
adres sieci - identyfikuje sieć
adresy hostów – można je przypisać urzadzeniom
adres broadcastowy – wysyłając coś na adres broadcastowy wysyłamy to do wszystkich urządzeń w
podsieci
Public IPv4 addresses are addresses which are globally routed between ISP (Internet Service
Provider) However, not all available IPv4 addresses can be used on the Internet. There are blocks of
addresses called private addresses that are used by most organizations to assign IPv4 addresses to
internal hosts.
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.255
It is important to know that addresses within these address blocks are not allowed on the Internet
and must be filtered (discarded) by Internet routers
Specjalne adresy
There are certain addresses such as the network address and broadcast address that cannot be
assigned to hosts. There are also special addresses that can be assigned to hosts, but with restrictions
on how those hosts can interact within the network.
• Loopback addresses (127.0.0.0 /8 or 127.0.0.1 to 127.255.255.254) – More commonly
identified as only 127.0.0.1, these are special addresses used by a host to direct traffic to
itself. For example, it can be used on a host to test if the TCP/IP configuration is operational,
such as shown in the figure. Notice how the 127.0.0.1 loopback address replies to the ping
command. Also note how any address within this block will loop back to the local host, such
as shown with the second ping in the figure.
• Link-Local addresses (169.254.0.0 /16 or 169.254.0.1 to 169.254.255.254) – More
commonly known as the Automatic Private IP Addressing (APIPA) addresses, they are used
by a Windows DHCP client to self-configure in the event that there are no DHCP servers
available.Useful in a peer-to-peer connection.
• TEST-NET addresses (192.0.2.0/24 or 192.0.2.0 to 192.0.2.255) – These addresses are set
aside for teaching and learning purposes and can be used in documentation and network
examples
Klasy IP
Dual stack
–
Translacja – pozwala na komunikacje między hostami IPv4 i IPv6. Odbywa się to w taki sposób że
pakiety IPv4 są tłumaczone na IPv6 oraz na odwrót
Adres IPv6 składa się z 128 bitów i zapisuje się go w postaci szesnastkowej.
Adres zapisujemy w formie x:x:x:x:x:x:x:x gdzie każdy x oznacza jeden oktet(4 licz hex/16 bin)
skracanie zapisu
No leading 0s pomijamy zera z pierwszych miejsc oktetu
Compresed jeden lub kilka oktetów możemy zastąpić podwójnym dwókropkiem
Global unicast A global unicast address is similar to a public IPv4 address. These are globally
unique, Internet routable addresses. Global unicast addresses can be configured statically or
assigned dynamically.
Link-local Link-local addresses are used to
communicate with other devices on the same local link.
With IPv6, the term link refers to a subnet. Link-local
addresses are confined to a single link. Their
uniqueness must only be confirmed on that link
because they are not routable beyond the link. In other
words, routers will not forward packets with a link-
local source or destination address.
Unique local Another type of unicast address is the
unique local unicast address. Unique local addresses
are used for local addressing within a site or between a
limited number of sites. These addresses should not be
routable in the global IPv6 and should not be translated
to a global IPv6 address. Unique local addresses are in the range of FC00::/7 to FDFF::/7.
• Subnet ID The Subnet ID is used by an organization to identify subnets within its site.
The larger the subnet ID, the more subnets available.
• Interface ID The IPv6 Interface ID is equivalent to the host portion of an IPv4 address.
The term Interface ID is used because a single host may have multiple interfaces, each
having one or more IPv6 addresses. It is highly recommended that in most cases /64 subnets
should be used. In other words a 64-bit interface ID as shown in Figure 2.
Adres
Ipv6
można
ustawić
Ping
Ping has a timeout value for the reply. If a reply is not received within the timeout, ping provides a
message indicating that a response was not received. This usually indicates that there is a problem,
but could also indicate that security features blocking ping messages have been enabled on the
network.
inging the Local Loopback
There are some special testing and verification cases for which we can use ping. One case is for
testing the internal configuration of IPv4 or IPv6 on the local host. To perform this test, we ping the
local loopback address of 127.0.0.1 for IPv4 (::1 for IPv6). Testing the IPv4 loopback is shown in
the figure.
A response from 127.0.0.1 for IPv4, or ::1 for IPv6, indicates that IP is properly installed on the
host. This response comes from the network layer. This response is not, however, an indication that
the addresses, masks, or gateways are properly configured. Nor does it indicate anything about the
status of the lower layer of the network stack. This simply tests IP down through the network layer
of IP. An error message indicates that TCP/IP is not operational on the host.
Testing Connectivity to the Local LAN
You can also use ping to test the ability of a host to communicate on the local network.A ping to the
gateway indicates that the host and the router interface serving as the gateway are both operational
on the local network. For this test, the gateway address is most often used because the router is
normally always operational. If the gateway address does not respond, a ping can be sent to the IP
address of another host on the local network that is known to be operational.
If either the gateway or another host responds, then the local host can successfully communicate
over the local network. If the gateway does not respond but another host does, this could indicate a
problem with the router interface serving as the gateway.
One possibility is that the wrong gateway address has been configured on the host. Another
possibility is that the router interface may be fully operational but have security applied to it that
prevents it from processing or responding to ping requests.
Testing Connectivity to Remote
Ping can also be used to test the ability of a local host to communicate across an internetwork. The
local host can ping an operational IPv4 host of a remote network, as shown in the figure.
If this ping is successful, the operation of a large piece of the internetwork can be verified. A
successful ping across the internetwork confirms communication on the local network, the
operation of the router serving as the gateway, and the operation of all other routers that might be in
the path between the local network and the network of the remote host.
Additionally, the functionality of the remote host can be verified. If the remote host could not
communicate outside of its local network, it would not have responded.
Note: Many network administrators limit or prohibit the entry of ICMP messages into the corporate
network; therefore, the lack of a ping response could be due to security restrictions.
Traceroute
Ping is used to test connectivity between two hosts but does not provide information about the
details of devices between the hosts. Traceroute (tracert) is a utility that generates a list of hops that
were successfully reached along the path. This list can provide important verification and
troubleshooting information. If the data reaches the destination, then the trace lists the interface of
every router in the path between the hosts. If the data fails at some hop along the way, the address of
the last router that responded to the trace can provide an indication of where the problem or security
restrictions are found.
Round Trip Time (RTT)
Using traceroute provides round trip time for each hop along the path and indicates if a hop fails to
respond. The round trip time is the time a packet takes to reach the remote host and for the response
from the host to return. An asterisk (*) is used to indicate a lost or unreplied packet.
This information can be used to locate a problematic router in the path. If the display shows high
response times or data losses from a particular hop, this is an indication that the resources of the
router or its connections may be stressed.
IPv4 TTL and IPv6 Hop Limit
Traceroute makes use of a function of the TTL field in IPv4 and the Hop Limit field in IPv6 in the
Layer 3 headers, along with the ICMP time exceeded message.
Play the animation in the figure to see how Traceroute takes advantage of TTL.
The first sequence of messages sent from traceroute will have a TTL field value of 1. This causes
the TTL to time out the IPv4 packet at the first router. This router then responds with an ICMPv4
message. Traceroute now has the address of the first hop.
Traceroute then progressively increments the TTL field (2, 3, 4...) for each sequence of messages.
This provides the trace with the address of each hop as the packets timeout further down the path.
The TTL field continues to be increased until the destination is reached, or it is incremented to a
predefined maximum.
After the final destination is reached, the host responds with either an ICMP port unreachable
message or an ICMP echo reply message instead of the ICMP time exceeded message.
VLSM pozwala na dzielenie podsieci na więcej podsieci
Dzielenie sieci na 8 podsieci należy pożyczyć 3 bity
The 16 bit subnet ID section of the IPv6 global unicast address can be used by an organization to
create internal subnets.
The subnet ID provides more than enough subnets and host support than will ever be needed in one
subnet. For instance, the 16 bit section can:
• Create up to 65,536 /64 subnets. This does not include the possibility of borrowing any bits
from the interface ID of the address.
• Support up to 18 quintillion host IPv6 addresses per subnet (i.e.,
18,000,000,000,000,000,000).
Warstwa transpotrowa
W warswie transportowej każdy zestaw danych płynących między aplikacją zródłową i aplikacją
docelową nazywamy konwersacją.
Host może mieć wiele aplikacji które komunikują się z jednym lub wieloma aplikacjami na jednym
lub wielu komputerach zadaniem warstwy transportowej jest śledzenie i utrzymanie tych
konwersacji.
Segmenting Data and Reassembling Segments
Data must be prepared to be sent across the media in manageable pieces. Most networks have a
limitation on the amount of data that can be included in a single packet. Transport layer protocols
have services that segment the application data into blocks that are an appropriate size This service
includes the encapsulation required on each piece of data. A header, used for reassembly, is added to
each block of data. This header is used to track the data stream. At the destination, the transport
layer must be able to reconstruct the pieces of data into a complete data stream that is useful to the
application layer. The protocols at the transport layer describe how the transport layer header
information is used to reassemble the data pieces into streams to be passed to the application layer.
Identifying the Applications
To pass data streams to the proper applications, the transport layer must identify the target
application (Figure 3). To accomplish this, the transport layer assigns each application an identifier
called a port number. Each software process that needs to access the network is assigned a port
number unique to that host.
Sending some types of data (for example, a streaming video) across a network, as one complete
communication stream, can consume all of the available bandwidth. This will then prevent other
communications from occurring at the same time. It would also make error recovery and
retransmission of damaged data difficult.
The figure shows that segmenting the data into smaller chunks enables many different
communications, from many different users, to be interleaved (multiplexed) on the same network.
To identify each segment of data, the transport layer adds a header containing binary data organized
into several fields. It is the values in these fields that enable various transport layer protocols to
perform different functions in managing data communication.
UDP
• Segmenty nie są numerowane
• nie ma potwierdzenia otrzymania pakietów przez hosta
• nie ma retransmisji
• protokół jest best effort co znaczy że nie ma gwarancji że dane otrymane przez adresata są
prawidłowe ani że w ogóle dotrą
TCP
•
• 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.
Features UDP
nagłówek
udp jest
możliwie
mały
żeby
przesyłać
więcej
danych jednym segmentem
Warstwa transpotrowa umożliwia na wiele oddzielnych konwersacji w tym samym czasie. Jest to
możliwe dzięki numerom portów które znajdują się w nagłówku seegmentu.
Source Port (Port źródłowy) - określa numer portu z którego wysyłana jest wiadomość.
?Jest dynamicznie generowany przez urządzenie wysyłające?(z ccna)
Port docelowy (Destination Port) – nadawca umieszcza numer portu w segmencie żeby
poinformować jakiej usługi jest on żądaniem (np. HTTP port:80, FTP port 21)
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.
During session setup, an initial sequence number (ISN) is set. This ISN represents the starting value
of the bytes for this session that is transmitted to the receiving application. As data is transmitted
during the session, the sequence number is incremented by the number of bytes that have been
transmitted. This data byte tracking enables each segment to be uniquely identified and
acknowledged. Missing segments can then be identified.
Note: The ISN does not begin at one but is effectively a random number. This is to prevent certain
types of malicious attacks. For simplicity, we will use an ISN of 1 for the examples in this chapter.
Segment sequence numbers indicate how to reassemble and reorder received segments, as shown in
the figure.
The receiving TCP process places the data from a segment into a receiving buffer. Segments are
placed in the proper sequence order and passed to the application layer when reassembled. Any
segments that arrive with sequence numbers that are out of order are held for later processing. Then,
when the segments with the missing bytes arrive, these segments are processed in order.
Retransmisja danych
A destination host service using TCP usually only acknowledges data for
contiguous sequence bytes. If one or more segments are missing, only the data
in the first contiguous sequence of bytes is acknowledged. For example, if
segments with sequence numbers 1500 to 3000 and 3400 to 3500 were
received, the ACK number would be 3001. This is because there are segments
with the SEQ numbers 3001 to 3399 that have not been
received.
When TCP at the source host has not received an acknowledgement after a
predetermined amount of time, it returns to the last ACK number received and
retransmits the data from that point forward. The retransmission process is not
specified by the Request for Comments (RFC), but is left up to the particular
implementation of TCP.
acknowledgments. The window size is the number of bytes that the destination device of a TCP
session can accept and process at one time. In this example, PC B’s initial window size for the
TCP session is 10,000 bytes. Starting with the first byte, byte number 1, the last byte PC A can
send without receiving an acknowledgment is byte 10,000. This is known as PC A’s send
window. The window size is included in every TCP segment so the destination can modify the
window size at any time depending on buffer availability.Typically, PC B will not wait until all
10,000 bytes have been received before sending an acknowledgment. This means PC A can
adjust its send window as it receives acknowledgments from PC B. As shown in the figure, when
PC A receives an acknowledgment with the acknowledgment number 2,921, PC A’s send
window will increment another 10,000 bytes (the size of PC B’s current window size) to 12,920.
PC A can now continue to send up to another 10,000 bytes to PC B as long as it does not send
past its new send window at 12,920. The process of the destination sending acknowledgments
as it processes bytes received and the continual adjustment of the source’s send window is
known as sliding windows. If the availability of the destination’s buffer space decreases, it may
reduce its window size to inform the source to reduce the number of bytes it should send
without receiving an acknowledgment.
Retransmisja segmentów
DNS
The DNS server stores different types of resource records used to resolve
names. These records contain the name, address, and type of record. Some of
these record types are:
• A - An end device IPv4 address
• NS - An authoritative name server
• AAAA - An end device IPv6 address (pronounced quad-A)
• MX - A mail exchange record
When a client makes a query, the server’s DNS process first looks at its own records to resolve the
name. If it is unable to resolve the name using its stored records, it contacts other servers to resolve
the name. After a match is found and returned to the original requesting server, the server
temporarily stores the numbered address in the event that the same name is requested again.
The DNS Client service on Windows PCs also stores previously resolved names in memory. The
ipconfig /displaydns command displays all of the cached DNS entries.
Działanie DHCP
FTP
FTP is another commonly used application layer protocol. FTP was developed to
allow for data transfers between a client and a server. An FTP client is an
application that runs on a computer that is used to push and pull data from an
FTP server.
As the figure illustrates, to successfully transfer data, FTP requires two
connections between the client and the server, one for commands and replies,
the other for the actual file transfer:
• The client establishes the first connection to the server for control traffic
using TCP port 21, consisting of client commands and server replies.
• The client establishes the second connection to the server for the actual
data transfer using TCP port 20. This connection is created every time
there is data to be transferred.
The data transfer can happen in either direction. The client can download (pull)
data from the server, or the client can upload (push) data to the server.
ZAGROŻENIA
The four classes of physical threats are:
• Hardware threats - physical damage to servers, routers, switches, cabling plant, and
workstations
• Environmental threats - temperature extremes (too hot or too cold) or humidity extremes
(too wet or too dry)
• Electrical threats - voltage spikes, insufficient supply voltage (brownouts), unconditioned
power (noise), and total power loss
• Maintenance threats - poor handling of key electrical components (electrostatic discharge),
lack of critical spare parts, poor cabling, and poor labeling