Download Internet (IP) Addresses

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Transcript
Internet (IP) Addresses
Naming every interface!
Naming
• Naming every interface in the world is not easy
• Networks evolved from vendors with
DIFFERENT naming schemes.
• Use the same scheme compilers use to solve the
one language … many processors issue
– compilers translate one language -> specific CPU/OS
– translate from universal machine address to vendor
specific machine address
• IP addresses are that universal naming scheme
What does an IP address look like?
• Internet agency responsible for allocation
• 4 byte value (0..255 for each value
– e.g. 137.155.2.10
• first byte determines what KIND of address
– Class A:
– Class B:
– Class C:
0-127
128-191
192-223
• Others have reserved use
27 Class As
214 Class Bs
221 Class Cs
Examples
137.155.2.10
Class B
47.75.2.1
Class A
204.10.1.4
Class C
Interpreting the Address
Think of the address as having 2 parts:
NETWORK : HOST
Which network?
137.155.2.10
Which specific
interface on that
network
Class
A
B
C
#BytesNet
#Nets
#BytesHost
#Host
128
16,000
2x106
3
2
1
17x106
65x103
256
1
2
3
EXAMPLES
137.155.2.10
Class B
47.75.2.1
Class A
204.10.1.4
Class C
Any address in the internet can immediately be classified in that
manner to determine which network and which host.
Some “networks” are too big, so subnetting is used.
Subnet Configuration
ORIGINALLY:
Network:Host
With SUBNETTING:
Network:Subnet:Host
Subnets
•
•
•
•
The “internet” is not aware of subnets
Doesn’t care!
Internal configuration within an IP network.
Used for further segmentation
– performance
– security
– as before with bridges
What does the “outside” internet do?
• Only examine standard Class A/B/C designation
to determine network (first number)
• Route all messages in the network to the same
destination
What does the “inside” internet do?
• Use internal (extra) info to determine subnetting
• Has the freedom to manage the addresses with
additional flexibility
Subnet Masks
So exactly how does the subnet
concept work
• First define what a mask is.
• Apply the mask to determine what subnet
the address is on.
• Use that to determine how to route the
message (later)
Masks
a means of selecting bits
Lots of examples of this.
One is determining Class A from Class B and Class C addresses.
0xxxxxxx -> These value are all less than 128 (0-127).
10xxxxxx -> These values are between 128-191.
110xxxxx -> These values are between 192-223.
A mask will enable one to select specific bits. In this example
It will enable determination of a class A/B/C address.
Background .. Logical and
Consider a BITWISE and operation:
1100
0110
--------0100
Consider a slightly different view:
Value
Mask
1100
0110
--------0100
Ones let the value through
Zeros stop the value
How do masks work?
Define a mask to select the bits you want.
Then and the mask with the value.
To determine if Class C, the mask would be 1 1 1 0 0 0 0 0.
( 195)
Mask
192
11000011
11100000
----------------11000000
Yes this is Class C
( 130)
Mask
128
10000010
11100000
----------------10000000
No.. this is Class B
So how does this impact setting
up a subnet?
• The fundamental question is how does one
determine to which subnet an address
belongs.
• Apply the subnet mask to the address and
what is left indicates which subnet the
address indicates.
Example
Typical class B mask: 255.255.255.0
255
.
255
.
255
.
0
11111111.11111111.11111111.00000000
Typical class B address:
137
.
155
137.155.2.20
.
2
.
20
10001001.10011011.00000010.00010100
Apply the mask
10001001.10011011.00000010.00010100
137.155.2.20
11111111.11111111.11111111.00000000
10001001.10011011.00000010.00000000 137.155.2.0
Result -> Given the IP address, this calculates the
corresponding subnet address.
This 255.255.255.0 mask is a typical Class B subnet approach.
It’s NOT the only one.
Now what?
• Now we can answer the question:
“What subnet is this address on?”
• This will be a fundamental element of routing
• Recall that subnet masks are only used internal to
the address (inside CNU)
• Used to allow flexibility for internal routing
configurations
• Not relevant outside the network
– outside 137.155.2.x for CNU