Sunday, March 25, 2018

Default Gateway



Can the IP Address talk with the default Gateway, which is the next hop in our Network

So the first question is, is the default gateway in the same network ?

We calculate the CIDR, Network ID , Broadcast ID and check the information.



1) Find the increments and list the network IDs
2) Are the addresses in the same network ?
3) Is either address a Network ID ?
4) Is either address a Broadcast Address ?


CIDR 5

Question:
How can I get the CIDR if only IP Address given without prefix?


You cannot possibly get the subnet mask or CIDR with just having the IP address. If you KNEW for a fact that you were not subnetting, then it would be easy, because the CIDR would be /8 for a Class A, /16 for a Class B, and /24 for a Class C, but with subnetting, all bets are off.



Question :
Does 195.251.117.155/25 have a next Network ID or is completed because the multiple of 128 brought it over 255 ?



Joal Diaz - the cidr 25 shows the subnet mask at 255.255.255.128, so the first subnet would start at 195.251.117.0 and go to 195.251.117.127. The second subnet would start at 195.251.117.128 and go to 195.251.117.255 which completes the array. The broadcast addresses are 117.127 and 117.255..



Joal Diaz so that is the last subnet, because the next one would take it to 195.251.117.256, which you can't have. so that is a 2 subnet network!


CIDR4 Example

Source https://www.youtube.com/watch?v=iDiGBIOq7ec

24.10.178.233/10


We have 10 1's from the CIDR notation

11111111.11000000.00000000.00000000

Subnet MASK
255.192.0.0

1) Find the increment
    The last 1 is 64's place, so we have  i = 64

2) Find the Network ID

24.0.0.0
24.64.0.0  --- This is way higher than 24.10
So 24.0.0.0  would be our Network ID

3) Find the First IP, we need to ADD 1 to our Network ID
So we ADD 1 to our Right Hand side
 24.0.0.1

4)  The last IP would be  24.64.0.0   minus 2
                          So 24.63.255.254
5) The Broadcast IP would be   24.63.255.255

The Next number after the broadcast ip  24.64.0.0

Which is the beginning or the Network ID of your next subnet



CIDR3 Example


Find the Network ID, First IP, Last IP and the Broadcast Address  for the following

190.95.209.90/22

From the CIDR, we see that there are 22 1's

1) CIDR Conversion
11111111.11111111.11111100.00000000
So we write it down

255.255.252.0

2) Find the Increment

The last 1 is in the 3rd OCTET
and it is in the 4's, so the Increment is 4


3)  List the networks until you find the correct network
   190.95.4.0
190.95.8.0
.
.
.
.
190.95.200.0
190.95.204.0
190.95.208.0        - 209 is between these two
190.95.212.0

 - This is  higher than the given ip , so going with the previous IP

190.95.208.0  is the Network ID

4) The First Host is   190.95.208.1

5) The last Host is  tricky
190.95.212.0    2  below this
190.95.211.254  - Would be the Last Ip Address

6) The Broadcast IP Address would be

190.95.211.255




CIDR2 Example


The ip address given is   as follows
97.201.50.188/27

Find the Network id, First host , last host and the broadcast address

1) Conversion and finding the subnet mask

97.201.50.188/27

27 1's
11111111.11111111.11111111.11100000

So we get  255.255.255.224

2) Find the increment
The increment is the last 1 
128,64,32
The last 1 is under the 32 column, so our increment is 32
 i = 32   { i is the increment }

3) Find the Network ID
The network ID is  found as below
97.201.50.0
97.201.50.32
97.201.50.64
97.201.50.96
97.201.50.128
97.201.50.160
97.201.50.192

As 192 is greater than 188,  The Network ID is going to be 97.201.50.160

4) Our first Host would be 1 more
97.201.50.161

5) Our last Host, would be last but 2, that is 97.201.50.190

6) Our broadcast address would be 1 less than  192 , so  97.201.50.191

 



CIDR


Source:
https://www.youtube.com/watch?v=m7osap3K_MU&list=PLjrF25Df7idwxvJzLpECBc2rZjQLOazgV&index=3

CIDR Notation
Classness interdomain routing
its the way we write out ips without the subnet mask

Its nothing but an ip written out without the slash and the Number

The slash and the number is called the ip prefix or the network prefix

Example A:

192.17.15.6/18  <--- This is CIDR notation

18 means , the first 18 bits are the network address ( 18 1's )

11111111.11111111.11000000.00000000    < --- We write down the 18 1's  and the rest of them are zeroes
Convert that from binary to decimal, you will end up with subnet mask
255.255.192.0 
This is a class B
Technically - its a 192 , 192 is a C , so its a class C subnet
#--------------------------------------------------------------------------------------------------------------

Example B:
190.75.18.70/25    < ---- CIDR Notation

25 1's
11111111.11111111.11111111.10000000
255.255.255.128   --- < This is the subnet MASK
This is a class C


Anything that is not a 255 ends up being your host.


#---------------------------------------------------------------------------------------------------------------

Given the IP Address and the CIDR   find the following

1) Network ID
2) First Host - The
3) Last Host
4) Broadcast Address
Inside of that subnet, what address broad casts to every ip inside of that subnet ?

The machine need not have a network ID
The network ids are typically held by routers

You need a router when connecting between two networks.
For within the network, you need a switch.


We have an ip address of  195.251.117.155/25   { 25 is the CIDR }

Once defined the Network id, the first number the work station can have, the last number the work station can have

No workstation can hold the network id or the Broadcast Address
You dont want them to have them
Network IDs are typically held by the routers.

1) First thing is to convert the CIDR notation into classful MASK
We are going to turn it to binary and figureout what our subnet is

25 1's   So we come up with

11111111.11111111.11111111.10000000
255.255.255.128   <  -- This is our subnet MASK


2) We have to find what is called the increment.
What is the last place that  LAST 1 SITS in ?

The last 1 is in the  128th column, so the increment is 128    i = 128

3) Find the networks, where the ip fits /sits in ?
LIST the networks until you find the correct network.

195.251.117.0   ---
Then we add 128 to it
195.251.117.128

Adding 128 to the above subnet gives us the next range
Now we cant go any higher,  195.251.117.256  - This cant be done as the end of the subnet is 255

So now we know  195.251.117.155 is part of    195.251.117.128  Subnet

So our Network ID is    195.251.117.128

Ths 128

The first ip our work stations can hold is 1 number higher that is 129

195.251.117.129

4) The last ip is 2 digits lower than the end of the network
In this case it is going to be 254

195.251.117.254



5) The broadcast address is 255
195.251.117.255

No machine needs to have this number  195.251.117.255   < ---

If a machine has this number  195.251.117.255,  then it is going to broadcast to all the hosts between 128 and 255, we dont want that


AWS Certified Solutions Architect

The following information is used for Solutions architect training

Certified solutions architect associate - 2018
AWS Certificate
--------------------

1) 

netstat

A copy from there - TCP Connection States 
 Following is a brief explanation of this handshake. In this context the "client" is ...