Networking Ceh
Networking Ceh
Computer Network
A computer network is a system in which multiple computers are connected to each
other to share information and resources.
The physical connection between networked computing devices is established using
either cable media or wireless media.
The best-known computer network is the Internet.
Advantages of networking
• Connectivity and Communication
• Data Sharing
• Hardware Sharing
• Internet Access
• Internet Access Sharing
• Data Security and Management
• Performance Enhancement and Balancing
• Entertainment
Disadvantages of Networking
• The first workable prototype of the Internet came in the late 1960s with the
creation of ARPANET, or the Advanced Research Projects Agency
Network. Originally funded by the U.S. Department of
Defense, ARPANET used packet switching to allow multiple computers to
communicate on a single network.
What is the Internet?
https://www.submarinecablemap.com/
#/
What is the Web?
• The World Wide Web—usually called the Web for short—is a collection
of different websites you can access through the Internet. A website is
made up of related text, images, and other resources. Websites can resemble
other forms of media—like newspaper articles or television programs—or
they can be interactive in a way that's unique to computers.
What is the Telnet?
A terminal emulation that enables a user to connect to a remote host or device using a
telnet client, usually over port 23. For example, typing telnet hostname would
connect a user to a hostname named hostname. Telnet enables a user to manage an
account or device remotely. For example, a user may telnet into a computer that hosts
their website to manage his or her files remotey. In the image is an example of a
telnet session. As shown, a telnet session is a command line.
NETWORK TOPOLOGY
NETWORK TOPOLOGY
• The pattern of interconnection of nodes in a network is called the TOPOLOGY. The
selection of a topology for a network cannot be done in isolation as it affects the choice of
media and the access method used.
• Types of Topology::
Mesh Topology
In mesh topology each device is connected to every other device on the
network through a dedicated point-to-point link. When we say dedicated it means
that the link only carries data for the two connected devices only. Lets say we have
n devices in the network then each device must be connected with (n-1) devices of
the network. Number of links in a mesh topology of n devices would be n(n-1)/2.
Advantages of Mesh Topology
No data traffic issues as there is a dedicated link between two devices
which means the link is only available for those two devices.
Mesh topology is reliable and robust as failure of one link doesn’t affect
other links and the communication between other devices on the network.
Mesh topology is secure because there is a point to point link thus
unauthorized access is not possible.
Fault detection is easy.
TYPES OF NETWORKS
•Local areanetwork, or LAN.
•Wide areanetwork, or WAN.
•Metropolitan areanetwork, or MAN.
•Wireless Local areanetwork, or WLAN.
•Personal areanetwork, or PAN.
•Campus area network, or CAM.
•Storage area network, or SAN
•Enterprise private network, or EPN
•Virtual private network, or VPN
NETWORK MODELS
NETWORK MODELS
In computer networks, reference models give a conceptual
framework that standardizes communication between
heterogeneous networks.
Application Layer
Session Layer
Network Layer
Physical Layer
Layer1: Physical Layer
• The Physical Layer defines the electrical and physical specifications for
devices. In particular, it defines the relationship between a device and a
physical medium.
• This includes the layout of pin, voltages, cable specification, hubs,
repeaters, network adapters, host bus adapters, and more.
• The major functions and services performed by the Physical Layer are:
– Establishment and termination of a connection to a communication medium.
– Participation in the process whereby the communication resources are
effectively shared among multiple users. For example, flow control.
– Modulation, or conversion between the representation of digital data in user
equipment and the corresponding signals transmitted over a communications
channel. These are signals operating over the physical cabling (such as copper
and optical fiber) or over a radio link.
Layer 2: Data Link Layer
• The Data Link Layer provides the functional and procedural means to transfer data
between network entities and to detect and possibly correct errors that may occur in
the Physical Layer.
• Originally, this layer was intended for point-to-point and point-to-multipoint media,
characteristic of wide area media in the telephone system.
• The data link layer is divided into two sub-layers by IEEE.
• The Network Layer provides the functional and procedural means of transferring
variable length data sequences from a source to a destination via one or more
networks, while maintaining the quality of service requested by the Transport Layer.
• The OSI model made this layer responsible for graceful close of sessions, which is
a property of the Transmission Control Protocol, and also for session check
pointing and recovery, which is not usually used in the Internet Protocol Suite. The
Session Layer is commonly implemented explicitly in application environments
that use remote procedure calls.
• The session layer decides when to turn communication on and off between two
computer- it provides the mechanisms that control the data exchange process and
coordinates the interaction between them.
Layer 6: Presentation Layer
The OSI and TCP/IP reference models have much in common. Both are based on the
concept of a stack of independent protocols. Also, the functionality of the layers is
roughly similar. For example, in both models the layers up through and including
the transport layer are there to provide an endto-end, network-independent transport
service to processes wishing to communicate. These layers form the transport
provider.
Again in both models, the layers above transport are application-oriented users of the
transport service. Despite these fundamental similarities, the two models also have
many differences. In this section we will focus on the key differences between the
two reference models. It is important to note that we are comparing the reference
models here, not the corresponding protocol stacks. The protocols themselves will
be discussed later. Three concepts are central to the OSI model:
1. Services.
2. Interfaces.
3. Protocols.
OSI vs TCP/IP
NETWORK ADDRESS
NETWORK ADDRESS
• PHYSICAL ADDRESS
– When referring to computers in general or computer memory,
the physical address is the computer memory address of a
physical hardware device.
• The MAC layer interfaces directly with the network medium. Consequently, each different
type of network medium requires a different MAC layer.
• The chance to see the MAC address is very difficult for any of your equipment.
MAC
• A MAC address is a unique character string, and since it identifies a specific physical device -
one individual NIC -- the MAC address, by convention, never changes for the life of the NIC.
Two NICs never have the same MAC address (unless some manufacturer screws up royally
[which has happened]). Because your NIC's MAC address is permanent, it's often referred to
as the "real" or physical address of a computer.
• If you'd like to see the MAC address and logical address used by the Internet Protocol (IP)
for your Windows computer, you can run a small program that Microsoft provides.
• Go to the "Start" menu, click on "Run," and in the window that appears, type WINIPCFG
(IPCONFIG/ALL for Windows 2000/XP).
• When the gray window appears, click on "More Info" and you'll get information.
Physical Address
LOGICAL ADDRESS
64
IPV4
• The IPv4 address is a 32-bit number that uniquely identifies a
network interface on a machine. An IPv4 address is typically written
in decimal digits, formatted as four 8-bit fields that are separated by
periods. Each 8-bit field represents a byte of the IPv4 address.
Ex: 192.168.1.1
IPV6
• An IPv6 address is represented as eight groups of four hexadecimal
digits, each group representing 16 bits (two octets, a group
sometimes also called a hextet). The groups are separated by colons
(:). An example of an IPv6 address is:
Ex: 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
Difference between IPV4 and IPV6
PROTOCOL
PROTOCOL
• In networking, a protocol is a set of rules for
formatting and processing data. Network
protocols are like a common language for
computers. The computers within a network
may use vastly different software and
hardware; however, the use of protocols
enables them to communicate with each other
regardless.
Address Resolution Protocol (ARP)
Address Resolution Protocol (ARP)
• Address Resolution Protocol (ARP) is a procedure for mapping a dynamic Internet
Protocol address (IP address) to a permanent physical machine address in a local
area network (LAN). The physical machine address is also known as a Media
Access Control or MAC address.
• The job of the ARP is essentially to translate 32-bit addresses to 48-bit addresses
and vice-versa. This is necessary because in IP Version 4 (IPv4), the most common
level of Internet Protocol (IP) in use today, an IP address is 32-bits long, but MAC
addresses are 48-bits long.
• ARP can also be used for IP over other LAN technologies, such as token ring, fiber
distributed data interface (FDDI) and IP over ATM.
• In IPv6, which uses 128-bit addresses, ARP has been replaced by the Neighbor
Discovery protocol.
How ARP works
TCP Features
• Connection-oriented • Full duplex
• Byte-stream • Flow control: keep sender
– app writes bytes from overrunning receiver
– TCP sends segments
– app reads bytes
• Congestion control: keep
• Reliable data transfer
sender from overrunning
network
Write Read
…
…
bytes bytes
TCP TCP
Send buffer Receive buffer
Segment …
Segment Segment
Transmit segments
Segment Format
0 4 10 16 31
SrcPort DstPort
SequenceNum
Acknowledgment
Checksum UrgPtr
Options (variable)
Data
Segment Format (cont)
• Each connection identified with 4-tuple:
– (SrcPort, SrcIPAddr, DsrPort, DstIPAddr)
• Sliding window + flow control
– acknowledgment, SequenceNum, AdvertisedWinow
Data(SequenceNum)
Sender Receiver
Acknowledgment +
AdvertisedWindow
• Flags
– SYN, FIN, RESET, PUSH, URG, ACK
• Checksum is the same as UDP
– pseudo header + TCP header + data
Connection Termination
Three-way Handshake
What is DHCP?
• - a range of IP addresses
• - the IP# is assigned temporarily
• - servers are assigned fixed IP addresses
Why is DHCP Important?
• Important when it comes to adding a machine to a network
• When computer requests an address, the administrator would
have to manually configure the machine
– Mistakes are easily made
– Causes difficulty for both administrator as well as
neighbors on the network
• DHCP solves all the hassle of manually adding a machine to a
network
Advantages of DHCP
• DHCP minimizes the administrative burden
Disadvantages of DHCP
• When DHCP server is unavailable, client is unable to access enterprises
network
• Your machine name does not change when you get a new IP address
DHCP and IPCONFIG
• IPCONFIG/ALL
FQDN, servers (DNS, WINS), node type, etc
NIC description, MAC address, IP address, gateway, subnet
mask
• To handle leases
IP CONFIG/RENEW [adapter]
IP CONFIG/RELEASE [adapter]
if no adapter name is specified, then the IP leases for all
adapters bound to TCP/IP will be released or renewed.
Security problem
• DHCP is an unauthenticated protocol
When connecting to a network, the user is not required to
provide credentials in order to obtain a lease
Malicious users with physical access to the DHCP-enabled
network can instigate a denial-of-service attack on DHCP
servers by requesting many leases from the server, thereby
depleting the number of leases that are available to other
DHCP clients
DNS
DNS
What is DNS?
• The Domain Name System (DNS) is the phonebook of the Internet.
Humans access information online through domain names, like
nytimes.com or espn.com. Web browsers interact through Internet Protocol
(IP) addresses. DNS translates domain names to IP address so browsers can
load Internet resources.
• Each device connected to the Internet has a unique IP address which other
machines use to find the device. DNS servers eliminate the need for
humans to memorize IP addresses such as 192.168.1.1 (in IPv4), or more
complex newer alphanumeric IP addresses such as
2400:cb00:2048:1::c629:d7a2 (in IPv6).
How does DNS work?
There are 4 DNS servers involved in loading a webpage:
DNS recursor - The recursor can be thought of as a librarian who is asked to go find a
particular book somewhere in a library. The DNS recursor is a server designed to receive
queries from client machines through applications such as web browsers. Typically the
recursor is then responsible for making additional requests in order to satisfy the client’s DNS
query.
Root nameserver - The root server is the first step in translating (resolving) human readable
host names into IP addresses. It can be thought of like an index in a library that points to
different racks of books - typically it serves as a reference to other more specific locations.
TLD Nameserver - The top level domain server (TLD) can be thought of as a specific rack of
books in a library. This nameserver is the next step in the search for a specific IP address, and
it hosts the last portion of a hostname (In example.com, the TLD server is “com”).
Yahoo’s DNS
Local DNS
www.yahoo.com
Web Server
PC
Step 1: If the PC does not already have the address for www.yahoo.com in
its own DNS cache, it asks its local DNS server for the IP address
information.
Step 2 Root DNS
Yahoo’s DNS
Local DNS
www.yahoo.com
Web Server
PC
Step 2: If the local DNS server does not already have the address for
www.yahoo.com in its own DNS cache, it asks the root DNS servers for the
IP address of Yahoo’s DNS server.
Step 3 Root DNS
Yahoo’s DNS
Local DNS
www.yahoo.com
Web Server
PC
Step 3: The root DNS server returns the IP address of Yahoo’s DNS server
to the local DNS server.
Step 4 Root DNS
Yahoo’s DNS
Local DNS
www.yahoo.com
Web Server
PC
Step 4: The local DNS server connects to Yahoo’s DNS server and asks for
www.yahoo.com’s IP address.
Step 5 Root DNS
Yahoo’s DNS
Local DNS
www.yahoo.com
Web Server
PC
Yahoo’s DNS
Local DNS
www.yahoo.com
Web Server
PC
Yahoo’s DNS
Local DNS
www.yahoo.com
Web Server
PC
Step 6: The local DNS adds www.yahoo.com’s IP address to its cache and
then returns the IP address info to the PC.
Step 7 Root DNS
Yahoo’s DNS
Local DNS
www.yahoo.com
Web Server
PC 7) PC Connects to www.yahoo.com’s IP
Step 7: The PC adds the IP address info to its local cache and can then
connect to www.yahoo.com using that IP address.
Some DNS records are
• A record -- to Map domain name with IP address will store in A record (version 4)
• AAAA record -- An AAAA record maps a domain name to the IPaddress (Version 6)
• Cname -- Maps an alias name to the canonical name, used to map the subdomain name to the
domain hosting that subdomain.
• MX Record -- Used to identify mail servers, mx record is used by the SMTP protocol to route email
to the proper host.
• SOA(Start Of Authority) Record -- It stores information about the name of the server that supplied
the data for zone. Information like Administrator of the zone, No of seconds a secondary name server
should wait before checking for updates, No of seconds a secondary name server should wait before
retrying a failed zone transfer.
• Stub Zone:
Stub zones are like a secondary zone but only stores partial zone
data. These zones are useful to help reduce zone transfers by
passing the requests to authoritative servers. These zones only
contain the SOA, NS and A records.
• Forward lookup zone:
forward lookup zone provides hostname to IP address resolution.
When you access a system or website by its hostname such as
mcirosoft.com DNS checks the forward lookup zone for the IP
information related to the hostname.
Zone Transfers