Complete question is:
Assume there is a machine with the IP address 129.82.102.63 with netmask /23, and with a parent NW whose netmask is 255.255.224.0.
For each answer, do not include any spaces, give full IP addresses/netmasks where these are requested, give the "/" as part of the answer for slash notation.
a. What is the parent NW's netmask in dotted decimal notation?
b. What is the parent NW's netmask in slash notation?
c. What is the child NW's (subnet's) netmask in dotted decimal notation?
d. What is the child NW's (subnet's) netmask in slash notation?
e. How many bits are there for host # portion for the parent NW? (Another way to say the same thing is How many bits do we manage - on the parent NW?)
f. How many bits are there for NW# portion (within the parent address space) for the subnet?
g. How many bits are there for host # portion for the subnet?
h. How many addresses can we assign to machines/interfaces on this subnet?
Answer:
a. 255.255.224.0
b. /19
255.255 amounts to 16 bits being 1. .224 means 3 more bits are 1. So, in total 19 bits are 1. Hence, total network bits are 16 + 3 = 19.
c. 255.255.254.0
/23 means 8 + 8 + 7 that means
first 2 octets are 1s and 7 bits out of the 3rd octet are 1s. Hence, /23 means 255.255.254.0
d. /23
e. 13 bits are reserved for hosts
Parent network mask is /19, so total 32-19 = 13 bits
f. 19 bits are reserved for the network in the parent address.
g. 9 bits
Subnetwork's mask is /23, so total 32-23 = 9 bits for the host portion.
h. Since 9 bits are reserved for hosts, a total of 29 -2 = 510 machines can be assigned the IP addresses. Two addresses will be network and broadcast addresses for the subnet that can't be allocated to any device.
Explanation:
the pivot point
the toolbar area
the view editor
the info header
7. You cannot use the manipulator widget to translate, define, rotate, or scale an object. (1 point)
true
false
Answer:
#include<iostream>
using namespace std;
//main function
int main(){
//initialization
float a1,a2;
//display the message
cout<<"Enter the first number: ";
cin>>a1; //store the value
cout<<"Enter the second number: ";
cin>>a2; //store the value
//display the calculation result
cout<<"The sum is: "<<a1+a2<<endl;
cout<<"The Subtraction is: "<<a1-a2<<endl;
cout<<"The product is: "<<a1*a2<<endl;
cout<<"The Quotient is: "<<a1/a2<<endl;
}
Explanation:
Create the main function and declare the two variables of float but we can enter the integer as well.
display the message on the screen and then store the input enter by the user into the variable using the cin instruction.
the same process for second input as well, display the message and store the input.
after that, print the output of the calculation. the operator '+' is used to add the two numbers like a1+a2, it adds the number stored in the variable.
similarly, the subtraction operator is '-', product '*' and quotient operator '/'.
and finally, we get the desired output.
Answer:
a. 7 bits
b. 8 bits
c. 9 bits
d. 24 bits
Explanation:
Required
Number of bits per word
The formula to get the number of bits per word is:
Where
n = bits
N = numbers
Solving (a) 0 to 100
There are 101 digits between 0 and 100 (inclusive)
So:
Substitute 101 for N in
101 can not be expressed as an exponent of 2.
So, we substitute 101 for the closest number greater than 101 that can be expressed as an exponent of 2.
So:
Express 128 as an exponent of 2
Apply law of indices
Hence, 7 bits are required
Solving (b): 0 through 255
There are 256 digits between 0 and 255 (inclusive)
So:
Substitute 256 for N in
Express 256 as an exponent of 2
Apply law of indices
Hence, 8 bits are required
Solving (c): 0 through 256
There are 257 digits between 0 and 256 (inclusive)
So:
Substitute 257 for N in
257 can not be expressed as an exponent of 2.
So, we substitute 257 for the closest number greater than 101 that can be expressed as an exponent of 2.
So:
Express 512 as an exponent of 2
Apply law of indices
Hence, 9 bits are required
Solving (d): 0 through 10000000
There are 10000001 digits between 0 and 10000000 (inclusive)
So:
Substitute 10000000 for N in
10000000 can not be expressed as an exponent of 2.
So, we substitute 10000000 for the closest number greater than 101 that can be expressed as an exponent of 2.
So:
Express 16777216 as an exponent of 2
Apply law of indices
Hence, 24 bits are required
B. Discuss whether such an attack would succeed in systems protected by SSL.
Answer:
A. No, it would not succeed.
B. Yes, the attack will succeed.
Explanation:
In the seven-layer OSI model of computer networking, packet strictly refers to a protocol data unit at layer 3, the network layer. So if an attacker wants to insert bogus/ fake packets this will happen at the network layer.
A. IPSec works on network layer (the IP layer) of the OSI model protecting and authenticating IP packets. It provides data integrity, authentication and confidentiality between participating peers at the IP layer.
Thus, inserting bogus packets into the communications by an attacker will not have any affect on security of a system which has IPSec security and therefore it will not succeed.
B. SSL/TLS is an application layer protocol that fits into layer 5 to 7 of the OSI model. However, an attack by inserting bogus packets into the communications will succeed as SSL only provides protection for layer 5 to 7 and not the network layer.
Answer:
Explanation:
#include <iostream>
#include <string>
#include<vector>
using namespace std;
vector<int> permute(vector<int>, vector<int>);
string encrypt(vector<int>s1 , vector<int> t1, string p);
string decrypt(vector<int>s1, vector<int> t1, string p);
int main() {
string plaintext = "cryptology";
string plaintext2 = "RC4";
vector<int> S(256);
vector<int> T(256);
int key[] = { 1,2,3,6 };
int key2[] = { 5,7,8,9 };
int tmp = 0;
for (int i = 0; i < 256;i++) {
S[i] = i;
T[i] = key[( i % (sizeof(key)/sizeof(*key)) )];
}
S = permute(S, T);
for (int i = 0; i < 256 ;i++) {
cout << S[i] << " ";
if ((i + 1) % 16 == 0)
cout << endl;
}
cout << endl;
string p = encrypt(S, T, plaintext);
cout << "Message: " << plaintext << endl;
cout << "Encrypted Message: " << " " << p << endl;
cout << "Decrypted Message: " << decrypt(S, T, p) << endl << endl;
tmp = 0;
for (int i = 0; i < 256;i++) {
S[i] = i;
T[i] = key2[(i % (sizeof(key) / sizeof(*key)))];
}
S = permute(S, T);
for (int i = 0; i < 256;i++) {
cout << S[i] << " ";
if ((i + 1) % 16 == 0)
cout << endl;
}
cout << endl;
p = encrypt(S, T, plaintext2);
cout << "Message: " << plaintext2 << endl;
cout << "Encrypted Msg: " << p << endl;
cout << "Decrypted Msg: "<<decrypt(S, T, p) << endl << endl;
return 0;
}
string decrypt(vector<int>s1, vector<int> t1, string p) {
int i = 0;
int j = 0;
int tmp = 0;
int k = 0;
int b;
int c;
int * plain = new int[p.length()];
string plainT;
for (int r = 0; r < p.length(); r++) {
i = (i + 1) % 256;
j = (j + s1[i]) % 256;
b = s1[i];
s1[i] = s1[j];
s1[j] = b;
tmp = (s1[i] + s1[j]) % 256;
k = s1[tmp];
c = ((int)p[r] ^ k);
plain[r] = c;
plainT += (char)plain[r];
}
return plainT;
}
string encrypt(vector<int>s1, vector<int> t1, string p) {
int i = 0;
int j = 0;
int tmp = 0;
int k = 0;
int b;
int c;
int * cipher = new int [p.length()];
string cipherT;
cout << "Keys Generated for plaintext: ";
for (int r = 0; r < p.length(); r++) {
i = (i + 1) % 256;
j = (j + s1[i]) % 256;
b = s1[i];
s1[i] = s1[j];
s1[j] = b;
tmp = (s1[i] + s1[j]) % 256;
k = s1[tmp];
cout << k << " ";
c = ((int)p[r] ^ k);
cipher[r] = c;
cipherT += (char)cipher[r];
}
cout << endl;
return cipherT;
}
vector<int> permute(vector<int> s1, vector<int> t1) {
int j = 0;
int tmp;
for (int i = 0; i< 256; i++) {
j = (j + s1[i] + t1[i]) % 256;
tmp = s1[i];
s1[i] = s1[j];
s1[j] = tmp;
}
return s1;
}