Adv. Comp. Network-22520 .-Chapter-1 - 2 Question Bank Q. Sketch Diagram of VPN Configuration Used in The Software Industry
Adv. Comp. Network-22520 .-Chapter-1 - 2 Question Bank Q. Sketch Diagram of VPN Configuration Used in The Software Industry
OR
Virtual private network (VPN): is an encrypted connection over the Internet from a device
to a network. The encrypted connection helps ensure that sensitive data is safely
transmitted. It prevents unauthorized people from eavesdropping on the traffic and allows
the user to conduct work remotely.
Use of a Wi-Fi network, one that is unsecured, means potential exposure of personal
information to third parties, some of which may have malicious intentions
Mobile virtual private networks are used in settings where an endpoint of the VPN is not
fixed to a single IP address, but instead roams across various networks such as data
networks from cellular carriers or between multiple Wi-Fi access points without dropping
the secure VPN session or losing application sessions.
• masks Internet protocol (IP) address,
• creates a private connection from a public wi-fi connection.
• one of the best tools for privacy and anonymity for a user connected to any public
internet service because it establishes secure and encrypted connections.
Functioning of VPN:
• VPNs use virtual connections to create a private network,
• Keeps any device you connect to a public wi-fi safe from hackers and malware,
• protecting sensitive information from unauthorized viewing or interception. A VPN
routes your device’s connection through a private server rather than the ISP, so that
when your data reaches the Internet, it’s not viewable as coming from your device.
• A virtual network keeps your data private using encryption, which turns your
information into unreadable form only decipherable using a key, which is known to
only your device.
• Different VPNs use somewhat different encryption processes, but the general
process includes tunnelling and data is encoded as it travels between client device
and the server, which then decrypts the data and sends it on to your destination,
• such as a website. The encryption process prevents anyone who may intercept the
data between you and the server, such as a government agency or hacker, from
being able to decipher its contents.
The following considerations should help guide selection of a VPN service /
Following features are needed in a well−designed VPN:
• Security
• Reliability
• Scalability
• Network Management
• Policy Management
Drawback: But in some cases, organizations may choose to installing a VPN Blocker to
prevent employees from accessing sites that may hinder their productivity, such as social
networking or shopping sites.
Use of Virtual Private Network (VPN):
Use of the Internet is now essential to global business, from shopping to banking to
medicine to entertainment. Using Internet services involves transmitting very important
information online, including credit card and social security numbers, and personal
information, such as medical histories or home addresses.
VPNs keep your Internet use safe from different attacks, and, when used in a corporate
setting, help keep business information from getting into the wrong hands.
• provide improved security overall, improved remote access,
• VPNs also provide safe and secure data sharing between employees and with
individuals and groups outside of the business when necessary.
Q. List types of VPN and explain any one concept in short.
Most users encounter VPNs depending on their use as individual, personal, or
corporate.
1. Remote Access VPN
A remote access VPN enables the user to connect their device to a network from outside
their organization’s office. This device-to-network approach typically involves a user
connecting their laptop, smartphone, or tablet to a network through their VPN.
Increasingly, advances in VPN technology enable security checks to be carried out to
ensure the device is secure before it is granted permission to connect.
Remote access VPNs include cloud VPNs, which enable users to securely access
applications and data via their web browser.
The limitations of remote access business VPN connections include increased lag time
depending on the user's distance from the central network. A user may experience severe
latency issues causing signal-quality degradation and disruptions for intensive data
transmissions, such as video conference calls.
Individual VPN
Individual VPNs refer to services meant for the personal use of individuals. Basic remote
access networks, for example, allow users to connect to a secure remote server to access
a private network. Reputable services include encryption to ensure the individual’s security
isn’t compromised.
2. Site-to-Site VPN / Business VPN
A site-to-site VPN enables connections between multiple networks. This network-to-
network approach is typically used to connect multiple offices or branch locations to a
central office. Site-to-site VPN encryption is useful for organizations with several offices
based in various geographical locations. It enables them to share resources from a primary
network, such as email servers or data storage facilities, across multiple locations. It also
allows access to all users as if servers were located in the physical office.
Site-to-site enterprise VPN/ Business:
• improve transmission speeds and reduce latency with higher bandwidth connection
speeds and faster encryption.
• intended for use by businesses in protecting their users and devices.
• Remote access business VPN creates a temporary VPN connection that encrypts
data transmissions.
• After the data transmission stops, the business VPN disbands.
• provide multiple users in various locations with the ability to securely access each
other’s resources.
• Secure communication among business departments, including those in different
countries, is critical for corporate security, business continuity, and employee
productivity.
The greater use of cloud services and applications increases the cybersecurity risk of
relying solely on perimeter-based security protections. When using cloud services,
enterprises using a corporate VPN also rely on cloud network security. Any unencrypted
transmission or storage may cause a data breach.
Types of VPN protocols
· Two VPN types are based on different VPN security protocols.
· Each of these VPN protocols offer different features and levels of security,
1. Internet Protocol Security or IPSec:
· IPSec is used to secure Internet communication across an IP network.
· Secures Internet Protocol communication by authenticating the session and
· Encrypts each data packet during the connection.
· IPSec operates in two modes, Transport mode and Tunnelling mode, to protect data
transfer between two different networks.
· The transport mode encrypts the message in the data packet and
· the tunnelling mode encrypts the entire data packet.
· Also used with other security protocols to enhance the security system.
2. Layer 2 Tunnelling Protocol (L2TP):
· is a tunnelling protocol that is usually combined with another VPN security protocol like
IPSec to create a highly secure VPN connection.
· creates a tunnel between two L2TP connection points and
· IPSec protocol encrypts the data and handles secure communication between the tunnel.
3. Point – to – Point Tunnelling Protocol (PPTP):
· Creates a tunnel and encapsulates the data packet.
· It uses a Point-to-Point Protocol (PPP) to encrypt the data between the connection.
· is one of the most widely used VPN protocol and
· has been in use since the time of Windows 95. Apart from Windows, PPTP is also
supported on Mac and Linux.
4. Secure Sockets Layer (SSL) and Transport Layer Security (TLS):
SSL (Secure Sockets Layer) and TLS (Transport Layer Security)
· Create a VPN connection where the web browser acts as the client and user access is
restricted to specific applications instead of entire network.
· is most commonly used by online shopping websites and service providers.
· Web browsers switch to SSL with ease and with almost no action required from the user,
since web browsers come integrated with SSL and TLS. SSL connections have https in
the beginning of the URL instead of http.
5. OpenVPN:
· is an open source VPN that is useful for creating Point-to-Point and Site-to-Site
connections.
· uses a custom security protocol based on SSL and TLS protocol.
6. Secure Shell (SSH):
· Secure Shell or SSH creates the VPN tunnel through which the data transfer happens
and also ensures that the tunnel is encrypted.
· SSH connections are created by a SSH client and data is transferred from a local port on
to the remote server through the encrypted tunnel.
OR
Process of Mobile IP:
The mobile IP process has following three main phases, which are:
1. Agent Discovery: During the agent discovery phase the HA and FA advertise their
services on the network by using the ICMP router discovery protocol (IROP). Mobile IP
defines two methods: agent advertisement and agent solicitation which are in fact router
discovery methods plus extensions. o Agent advertisement: For the first method, FA and
HA advertise their presence periodically using special agent advertisement messages.
These messages advertisement can be seen as a beacon broadcast into the subnet. For
this advertisement internet control message protocol (ICMP) messages according to RFC
1256, are used with some mobility extensions. o Agent solicitation: If no agent
advertisements are present or the inter arrival time is too high, and an MN has not received
a COA, the mobile node must send agent solicitations. These solicitations are again bases
on RFC 1256 for router solicitations.
2. Registration The main purpose of the registration is to inform the home agent of the
current location for correct forwarding of packets. Registration can be done in two ways
depending on the location of the COA. o If the COA is at the FA, the MN sends its
registration request containing the COA to the FA which is forwarding the request to the
HA. The HA now set up a mobility binding containing the mobile node's home IP address
and the current COA. Additionally, the mobility biding contains the lifetime of the
registration which is negotiated during the registration process. Registration expires
automatically after the lifetime and is deleted; so a mobile node should register before
expiration. After setting up the mobility binding, the HA send a reply message back to the
FA which forwards it to the MN. o If the COA is co-located, registration can be very simpler.
The mobile node may send the request directly to the HA and vice versa. This by the way
is also the registration procedure for MNs returning to their home network.
3. Tunneling A tunnel is used to establish a virtual pipe for data packets between a tunnel
entry and a tunnel endpoint. Packets which are entering in a tunnel are forwarded inside
the tunnel and leave the tunnel unchanged. Tunneling, i.e., sending a packet through a
tunnel is achieved with the help of encapsulation. Tunneling is also known as "port
forwarding" is the transmission and data intended for use only within a private, usually
corporate network through a public network.
State steps followed at Senders side for CHECK-SUM computation.
CHECKSUM
● The error detection method used by most TCP/IP protocols is called the checksum.
● The checksum protects against the corruption that may occur during the transmission of
a packet. It is redundant information added to the packet.
● The checksum is calculated at the sender and the value obtained is sent with the packet.
The receiver repeats the same calculation on the whole packet including the checksum. If
the result is satisfactory (see below), the packet is accepted; otherwise, it is rejected.
Checksum Calculation at the Sender
● At the sender, the packet header is divided into n-bit sections (n is usually 16).
● These sections are added together using one’s complement arithmetic resulting in a
sum that is also n bits long. ● The sum is then complemented (all 0s changed to 1s and all
1s to 0s) to produce the checksum.
To create the checksum the sender does the following:
• The packet is divided into k sections, each of n bits.
• All sections are added together using one’s complement arithmetic.
• The final result is complemented to make the checksum.
State steps followed at Receiver’s side for CHECK-SUM computation.
The packet is divided into k sections, each of n bits.
All sections are added together using one’s complement arithmetic.
The final result is complemented to make the checksum.
Checksum Calculation at the Receiver
● The receiver divides the received packet into k sections and adds all sections.
● It then complements the result. If the final result is 0, the packet is accepted;
otherwise, it is rejected.
Fig. shows what happens at the sender and the receiver.
● when the receiver adds all of the sections and complements the result, it should get
zero if there is no error in the data during transmission or processing. ● This is true because
of the rules in one’s complement arithmetic. ● Assume that a number called T when we
add all the sections in the sender. When we
complement the number in one’s complement arithmetic, we get the negative of
the number. This means that if the sum of all sections is T, the
checksum is −T.
The checksum
• How to compute a checksum?
• Put a 0 in the checksum field.
• Add each 16-bit value together.
• Add in any carry
• Inverse the bits and put that in the checksum field.
• To check the checksum:
• Add each 16-bit value together (including the checksum).
• Add in carry.
• Inverse the bits.
• The result must be 0.
• Remember, only the bits in the header are calculated in the IP checksum.
Example:
Consider the following IP header, with source IP address of 146.149.186.20 and
destination address of 169.124.21.149. All values are given in hex:
45 00 00 6c
92 cc 00 00
38 06 00 00
92 95 ba 14
a9 7c 15 95
45 00 00 6c
92 cc 00 00
38 06 e4 04
92 95 ba 14
a9 7c 15 95
So, first add all 16-bit values together, So, we get: 5ce8 + 1 = 5ce9.
adding in the carry each time: 5ce9
4500 + a97c
+ 006c ----
---- 10665 <---Again, we have a carry here! So,
456c remove the leftmost bit
+ 92cc and add it back in. So, we get: 0665 + 1 =
---- 0666.
d838 0666
+ 0000 + 1595
---- ----
d838 1bfb
+ 3806 Now we have to inverse the bits.
---- 1bfb = 0001 1011 1111 1011
1103e <---But, we have a carry inverse bits: 1110 0100 0000 0100 = e404
here! So, remove the leftmost bit So, the checksum is e404. So, the IP header
and add it back in. So, we get: 103e + we send looks like:
1 = 103f. 45 00 00 6c
103f 92 cc 00 00
+ 0000 38 06 e4 04
---- 92 95 ba 14
103f a9 7c 15 95
+ 9295 As an exercise, please act as the receiver,
---- compute the checksum on that packet, and
a2d4 make sure the result is 0!
+ ba14
----
15ce8 <---Again, we have a carry
here! So, remove the leftmost bit and
add it back in.
Q. Describe the concept of fragmentation with proper data and assume MTU.
OR
IP Fragmentation
● Note: the total_length field in the IP header is 16 bits. that means the max size of of an
IP datagram is 65535 bytes.
● BUT, the physical layer may not allow a packet size of that many bytes (for example, a
max ethernet packet is 1500 bytes)
● SO, IP must sometimes fragment packets.
● When an IP datagram is fragmented, each fragment is treated as a separate datagram.
o it is reassembled at the final destination, not at a router!
o it does that because the router may have to fragment it again!
● Each fragment has its own header.
● The identification number is copied into each fragment.
● One bit in the "flags" field says "more fragments are coming. If that bit is 0, then it signifies
this is the last fragment.
● The "fragment offset" field contains the offset of the data. o Fragment flag of 0 and offset
of 0 means the datagram is not fragmented.
o Fragment offset is measured in units of 8 bytes (64 bits). That is because the fragment
offset field is 3 bits shorter than the total length field (and 2^3 is 8).
● The entire flags field looks like this:
Example:
● Suppose we have a physical layer that can transmit a maximum of 660 bytes. And,
suppose IP wants to send 1460 bytes of data. So, the IP datagram is a total of 1480 bytes,
including the 20 byte IP header:
● In that packet, "fragment flag" is 0, offset is 160. The offset is 160 because (160 * 8) is
1280, so the offset of that data is 1280 byes into the packet.
● Note: all other fields of the IP header are identical to the first packet except the
checksum.
● IMPORTANT: The routers see 3 separate packets. The final destination reassembles the
packet before passing the packet to the upper layers.
Rules:
• The number of blocks must be a power of 2 (1, 2, 4, 8, 16, . . .).
• The blocks must be contiguous in the address space (no gaps between the blocks).
• The third byte of the first address in the superblock must be evenly divisible by the
number of blocks.
• In other words, if the number of blocks is N, the third byte must be divisible by N.
Q. Explain following types of OPTIONs for routing with proper diagram (any TWO)
i) Record route ii) Strict Route iii) Loose source Route iv) Timestamp
OPTIONS:
The header of the IP datagram is made of two parts:
• a fixed part- The fixed part is 20 bytes long and was discussed in the previous
section.
• a variable part-The variable part comprises the options, which can be a maximum
of 40 bytes.
Options,
• as the name implies, are not required for a datagram.
• They can be used for network testing and debugging.
• Although options are not a required part of the IP header, option processing is
required of the IP software.
• This means that all implementations must be able to handle options if they are
present in the header.
Format
The format of an option is composed of:
• A 1-byte type field,
• A 1-byte length field, and
• A variable-sized value field.
The three fields are often referred to as Type-Length-Value or TLV.
Fig.: The format of the record route option: Both the code and length fields have been
described
• The pointer field is an offset integer field containing the byte number of the
first empty entry/ it points to the first available entry.
• The source creates empty fields for the IP addresses in the data field of the option.
When the datagram leaves the source, all of the fields are empty.
• The pointer field has a value of 4, pointing to the first empty field.
• When the datagram is traveling, each router that processes the datagram
compares the value of the pointer with the value of the length.
• If the value of the pointer is greater than the value of the length, the option is
full and no changes are made.
• However, if the value of the pointer is not greater than the value of the length,
the router inserts its outgoing IP address in the next empty field
• (Remember that a router has more than one IPaddress).
In this the router adds the IP address of its interface from which the datagram is
leaving.
The router then increments the value of the pointer by 4.
Fig.: Record Route Concept:An entry as the datagram travels left to right from router
to router.
A strict-source-route option is
• Used by the source to predetermine a route for the datagram as it travels through
the Internet. Dictation of a route by the source can be useful for several purposes.
• The sender can choose a route with a specific type of service, such as minimum
delay or maximum throughput. Alternatively, it may choose a route that is safer
or more reliable for the sender’s purpose. For example, a sender can choose a
route so that its datagram does not travel through a competitor’s network.
• If a datagram specifies a strict source route, all of the routers defined in the option
must be visited by the datagram. A router must not be visited if its IP address is not
listed in the datagram.
• If the datagram visits a router that is not on the list, the datagram is discarded and
an error message is issued.
• If the datagram arrives at the destination and some of the entries were not visited,
it will also be discarded and an error message issued.
• Regular users of the Internet, however, are not usually aware of the physical
topology of the Internet. Consequently, strict source routing is not the choice of most
users.
Q. Explain following types of OPTIONs for routing: i) Record route ii) Strict Route iii)
Loose source Route iv) Timestamp
Loose-Source-Route Option
• A loose-source-route option is similar to the strict source route, but it is more
relaxed.
• Each router in the list must be visited, but the datagram can visit other routers as
well.
Stateless Auto-configuration:
• Stateless Address Configuration (IP Address, Default Router Address)
• Routers sends periodic Router Advertisement
• Node gets prefix information from the Router advertisement and generates the
complete address using its MAC address
• Global Address=Link Prefix + EUI 64 Address
• Router Address is the Default Gateway Stateless Autoconfiguration
Example
• MAC address: 00:0E:0C:31:C8:1F
• EUI 64 Address: 20E:0CFF:FE31:C81F
• Router Solicitation is sent on FF01::2 (All Router Multicast Address) and
• Advertisement sent on FF01::1 (All Node Multicast Address)
Dual Stack It is recommended that all hosts, before migrating completely to version 6,
have a dual stack of protocols. In other words, a station must run IPv4 and IPv6
simultaneously until all the Internet uses IPv6. The layout of a dual-stack configuration is
:
Dual Stack It is recommended that all hosts, before migrating completely to version 6,
have a dual stack of protocols. In other words, a station must run IPv4 and IPv6
simultaneously until all the Internet uses IPv6. The layout of a dual-stack configuration is
:
• To determine which version to use when sending a packet to a destination, the
source host queries the DNS.
• If the DNS returns an IPv4 address, the source host sends an IPv4 packet.
• If the DNS returns an IPv6 address, the source host sends an IPv6 packet.
Tunnelling: Is a strategy used when two computers using IPv6 want to communicate with
each other and the packet must pass through a region that uses IPv4. To pass through
this region, the packet must have an IPv4 address. So the IPv6 packet is encapsulated in
an IPv4 packet when it enters the region, and it leaves its capsule when it exits the
region. It seems as if the IPv6 packet passes goes through a tunnel at one end and
emerges at the other end. To make it clear that the IPv4 packet is carrying an IPv6 packet
as data, the protocol value is set to 41.
Header Translation is necessary when the majority of the Internet has moved to IPv6 but
some systems still use IPv4. The sender wants to use IPv6, but the receiver does not
understand IPv6. Tunnelling does not work in this situation because the packet must be
in the IPv4 format to be understood by the receiver. In this case, the header format must
be totally changed through header translation. The header of the IPv6 packet is converted
to an IPv4 header
Header translation uses the mapped address to translate an IPv6 address to an IPv4
address. The following lists some rules used in transforming an IPv6 packet header to an
IPv4 packet header.
• The IPv6 mapped address is changed to an IPv4 address by extracting the
rightmost 32 bits.
• The value of the IPv6 priority field is discarded.
• The type of service field in IPv4 is set to zero.
• The checksum for IPv4 is calculated and inserted in the corresponding field.
• The IPv6 flow label is ignored.
• Compatible extension headers are converted to options and inserted in the IPv4
header. Some may have to be dropped.
• The length of IPv4 header is calculated and inserted into the corresponding field.
• The total length of the IPv4 packet is calculated and inserted in the corresponding
field.
Q. Explain Any two IPv6 address representations.
IPv6 Address Representation
Examples:
2031:0000:130F:0000:0000:09C0:876A:130B
2031:0:130f::9c0:876a:130B
FF01:0:0:0:0:0:0:1 >>> FF01::1 0:0:0:0:0:0:0:1 >>> ::1
0:0:0:0:0:0:0:0 >>> ::
Notations in 128 bit
• Dotted decimal 123.145.20.34
• hexadecimal notation. 23BA:1234:00B1:0000:BF30:3456:000A:FFFF
• Mixed representation 23BA:1234:123:56:BF30:3456:000A:FFFF
• CIDR notation. FDC1:AB23:0:FFFF/27
Q. Draw diagram of IPv6 header format and explain version and payload length.
IPv6 Packet Header Format
The IPv6 protocol defines a set of headers, including the basic IPv6 header and the IPv6
extension headers. The following figure shows the fields that appear in the IPv6 header
and the order in which the fields appear. Figure 11-3 IPv6 Basic Header Format
Q. Explain any two of the following terms: i) Unicast ii) Multicast iii) Anycast iv)
Broadcast
There are three types of addresses in IPV6:
1. Unicast Addresses: Single computer as a destination, means packet delivered to
specific address. In IPV6 it is possible to assign unicast addresses to the interfaces.
2. Anycast Addresses: Used to define group computers with addresses which have the
same prefix. It delivers the packets only one of the member of the group which is
closest or the most easily accessible. No special or separate address block is assigned
for any casting in IPV6. These are assigned for blocks of unicast addresses.
3. Multicast addressing: Defines group of computers which may or may not share the
same prefix and may not connected to the same physical network. Packet sent by this
is meant to be delivered to each of the group. There is a broadcast address as
multicast performs the same function. Type of address is determined by leading bits.
OR
1. Unicast Address is for a single interface. o IPv6 has several types (for
2. Anycast Addresses: example, global and IPv4 mapped).
OR
2. Anycast o One-to-nearest (allocated from unicast address space).
• Multiple devices share the same address.
• All anycast nodes should provide uniform service.
• Source devices send packets to anycast address.
• Routers decide on the closest device to reach that destination.
• Suitable for load balancing and content delivery services.
3. Multicast
• One-to-many o Enables more efficient use of the network
• Uses a larger address range
Q. Explain in short Router solicitation and Router advertisement using diagram.
There are two main types of ICMPv6 Messages related with Router Discovery (RD) in
IPv6.
One is Router Solicitation (RS) Message and the other is Router Advertisement (RA)
Message. Router Solicitation (RS) Messages are sent by the hosts on the network to find
routers on an IPv6 network.
Router Advertisement (RA) Messages are sent by routers to hosts to inform about the
Default Gateway IPv6 address and other router related parameters. IPv6 network hosts
can learn about the presence of routers in the network, upon receiving Router
Advertisement (RA) Messages from the routers.
Following table explains about Router Solicitation (RS) Message in detail.
The format for Router Solicitation (RS) Message is defined in RFC 4861. The format for a
Router Solicitation (RS) Message is based on a normal ICMPv6 message format.
Following image shows the format for Router Solicitation (RS) Message.
Type 8 bits Type field value denots the type of the 133
ICMPv6 message. Type field value for a
Router Solicitation (RS) is 133.
The format for Router Advertisement (RA) Message is defined in RFC 4861. The format
for a Router Advertisement (RA) Message is different than a normal ICMPv6 message
format.
Router Advertisement (RA) Message fields are explained in below table.
Type 8 bits Type field value denotes the type of the ICMPv6 133
message. Type field value for a Router
Advertisement (RA) Message is 134.
Cur Hop Limit 8 bits The default value that the router recommending
to devices, that should be placed in the Hop
Count field of the IPv6 header for outgoing IPv6
packets. If 0, the router is not recommending a
Hop Limit value in this Router Advertisement.