Sie sind auf Seite 1von 16

IP Addresses

What is an IP Address?
• An Internet Protocol (IP) address is a numerical
identification (logical address) that is assigned to
devices participating in a computer network
utilizing the Internet Protocol for communication
between its nodes
• It is in many ways similar to your house street
address, if you want mail delivered you need an
address and you need to give that address out
to people who might want to send you mail.
Where can I find an IP address?

There are 4.3 billion possible combinations


of IP addresses.
• Every machine on the Internet­has a unique
identifying number, called an IP Address. A
typical IP address looks like this:

216.27.61.137
Methods used to assign IP
addresses
• Static IP addresses
– Static IP addresses are manually assigned to
a computer by an administrator

• Dynamic IP Addresses
– Dynamic IP addresses are most frequently
assigned on LANs and broadband networks
by Dynamic Host Configuration Protocol
(DHCP) servers
• To make it easier for us humans to
remember, IP addresses are normally
expressed in decimal format as a "dotted
decimal number" like the one above. But
computers communicate in binary form.
Look at the same IP address in binary:

11011000.00011011.00111101.10001001
• The four numbers in an IP address are
called octets, because they each have
eight positions when viewed in binary
form.
• If you add all the positions together, you
get 32, which is why IP addresses are
considered 32-bit numbers..
• So each octet can contain any value
between 0 and 255.
• The octets serve a purpose other than
simply separating the numbers. They are
used to create classes of IP addresses
• The octets are split into two sections: Net
and Host.
• The Net section always contains the first
octet. It is used to identify the network that a
computer belongs to.
• Host (sometimes referred to as Node)
identifies the actual computer on the
network. The Host section always contains
the last octet
Classes of IP addresses
• Default
– The IP address of 0.0.0.0 is used for the default network.
• Class A
– addresses are for a large network
• Class B
– addresses are for a medium network
• Class C
– addresses are for a small network
• Class D
– addresses are for Multicast addresses
How do I find IP addresses?
• Download and experiment with these
programs.
– ANGRY IP SCANNER
– NMAP
Forwarding versus Routing
• Forwarding is the process of taking a packet
from the input and sending it on the appropriate
output.
• Routing -- in contrast -- is the process of building
tables that allow the determination of the correct
output.
Datagram forwarding
A node that gets a datagram first tries to establish whether the
destination is on the same physical network.
• Compare network part of the destination address with the network
part of its own interfaces.
• If they are the same, destination is on the same physical network.
• If yes, deliver packet.
• If no, choose the appropriate router to forward packet.
– Next Hop --> router
– Consult what is called the forwarding table that contains entries that
look like < Network Number, Next Hop>.
– Also a default router (possible only default exists).
Our example network
• H1 --> H2, same
network number in IP
Network 1 (Ethernet)

address -- deliver via


Ethernet.
H7 R3 H8
H1 H2 H3

• H1 --> H8. How ?


Network 4
Network 2 (Ethernet) (point-to-point)
R1

R2

H4
Network 3 (FDDI)
• H1 --> R1 default router over Ethernet.
• R1 knows it cannot deliver directly.
H5 H6
• R1 has to deliver it to a default router
-- R2.
Example Continued
• Let us look at R2’s
Network 1 (Ethernet)
forwarding table.
H7 R3 H8
H1 H2 H3
Network Next Hop
Network 4 Number
Network 2 (Ethernet) (point-to-point)
R1 2 R1
R2

H4 1 R3
Network 3 (FDDI)

H5 H6 • Thus, R2 --> R3 via PPP and


then, finally, R3 --> H8 via
Ethernet.
Directly Connected Nets
• It is possible to include information with regard to the directly connected
networks in forwarding table.

• As an example, let PPP


Network 1 (Ethernet)
interface of R2 be Int 1 and let
the FDDI interface be Int 2.
Then, the table looks like:
H7 R3 H8
H1 H2 H3

Network 4
(point-to-point)
Net Next
Network 2 (Ethernet)
R1 Num Hop

R2
1 R3
H4 2 R1
Network 3 (FDDI)
3 Int 2
4 Int 4
H5 H6
Address Resolution
• Physical interface hardware understands only the “link
addresses” of the particular network.
• Thus, IP addresses have to be translated into a link layer
address prior to sending a datagram to a destination or an
intermediate router.
• Remember Ethernet address == 48 bits -- one way is to
encode the host physical address in host part of IP address.
– This is however not scalable -- not always possible.
• A second way is to maintain a static table that maps an IP
address to a physical address -- maintained by our sys
admin. The table is copied onto every host.
Dynamic address resolution using ARP
• Dynamic resolution is possible using the Address
Resolution Protocol or ARP.
– Protects against the possibility that Ethernet cards may be
replaced.
• ARP requires that a dynamic table that maps IP
addresses onto physical addresses is refreshed every
15 minutes or so.
• It takes advantage of the “broadcast” nature of the link.

Das könnte Ihnen auch gefallen