Download Addressing, Internetworking

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

Internet protocol suite wikipedia , lookup

Peering wikipedia , lookup

Wireless security wikipedia , lookup

SIP extensions for the IP Multimedia Subsystem wikipedia , lookup

VMEbus wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Network tap wikipedia , lookup

Deep packet inspection wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

Airborne Networking wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

IEEE 1355 wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Computer network wikipedia , lookup

AppleTalk wikipedia , lookup

Dynamic Host Configuration Protocol wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

I²C wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Transcript
Internet Protocol
1
Connectionless Network Layers
• Destination, source, hop count
• Maybe other stuff
–
–
–
–
–
fragmentation
options (e.g., source routing)
error reports
special service requests (priority, custom routes)
congestion indication
• Real diff: size of addresses
2
IPv4 Packet Header
Version (4 b) hdr lnth (4 b)
2
TOS
total length
2
pkt id
1
df mf (3 b)
Don’t Fragment
More Fragments
offset
1
offset (cont’d)
1
TTL (time to live)
2
4
4
Variable (<40B)
variable
protocol
hdr checksum
source
destination
options
padding
TCP,
UDP
3
Collection of Subnetworks
The Internet is an interconnected collection of many networks.
4
IP Addresses
• IP addresses are given to
– Computers
– Router interfaces
• Each address comprises network address and host
address
• Mask comprises ones in the positions of a network
address and zeros in the positions of a host
address. It is “anded” with the packet IP
destination address, and routed based on the
network address.
5
Classful IP Addresses
IP address formats.
Class A: 126 networks with 16 million users
Class B: 16384 networks with 64K users
Class C: 2 million networks with 256(-2) users
6
Special IP Addresses
Network
0 0
…
0 0
Network address
7
Subnets
A campus network consisting of LANs for
various departments.
Switch, repeater
8
Subnets
• A part of the host address is used as the subnet
address
• Each router interface is given an IP address and a
mask that corresponds to the subnet address.
• Packets are routed based on subnet addresses.
• The number of addresses in the router memory is
significantly decreased. Routing decision
simplified.
9
Subnets
A class B network subnetted into 64 subnets with 1022 hosts.
Example starts at 243.15.24.1/22 to 243.15.27.254/22
10
CIDR – Classless Inter Domain Routing
• Subnets can be arbitrary sizes, masks arbitrary
lengths.
• Packets of one subnet are most often routed
toward different subnet.
• Routers match the IP destination address with
subnet addresses. Packet is routed toward the
subnet whose address is the longest prefix of the
IP destination address, and which is stored in the
observed router.
11
CIDR
5-59
194.24.0.0/20
ISP Provider
12
ARP– The Address Resolution Protocol
• User knows only IP address of the destination
(which is learnt from a DNS server), but it needs
the destination MAC address.
• It broadcasts ARP request with the destination IP
address, and the destination responds with its
address.
• Alternatively if the destination is not on the same
LAN, router sends ARP response (proxy ARP)
with its MAC address, or user knows from the IP
address that its destination is not on LAN, it sends
a frame to the router MAC address.
13
ARP– The Address Resolution
Protocol
Three interconnected /24 networks: two
Ethernets and an FDDI ring.
14
User Learns its Own Address
• User should learn its own IP address.
• RARP (Reverse ARP): user broadcasts
request for the IP address providing its
MAC address.
• BOOTP: user sends the request for its IP
address to the designated router, which
forwards the request to the network.
Administrator has to assign IP for each
MAC address manually.
15
DHCP- Dynamic Host Configuration
Protocol
• User broadcasts request for IP address.
• DHCP relay agent learns about the
request, and sends it to the remote
DHCP server which leases to the user
first available address.
16
DHCP- Dynamic Host Configuration
Protocol
Operation of DHCP.
17
IPv6
vers
(4 bits)
TOS
(8 bits)
payload length (2 B)
flow label (20 bits)
Next (1 B) Hops (1 B)
Source (128 bits)
Destination (128 bits)
hop by hop hdr, or dest info, or authentication hdr,
or fragmentation hdr ...
18
Distance Vector Routing
• Rtr knows
– own ID
– how many cables hanging off box
– cost, for each cable, of getting to nbr
cost 3
cost 2
m cost 2
j
k
I am “4”
n
cost 7
19
Distance Vector (DV) Routing
• Initialize distances to all rtrs in the network to be
0, except to its nbrs.
• Rtr learns from nbrs their distances to all nodes in
the network, calculate own distances, and forward
the distance vector to nbrs. This repeats until the
distance vector converges.
• Rtr updates the distance vector whenever it
receives different distance vector from some nbr,
or whenever some link breaks.
• Distance vector is either sent periodically or when
the network configuration changes.
20
Example of DV Routing
cost 3
m cost 2
j
I am “4”
cost 7
k
n
distance vector rcv’d from cable j
cost 2
cost 3
12 3 15 3 12 5 3 18 0 7
distance vector rcv’d from cable k
cost 2
5 8 3 2 10 7 4 20 5 0
distance vector rcv’d from cable m
cost 2
0 5 3 2 19 9 5 22 2 4
distance vector rcv’d from cable n
cost 7
6 2 0 7 8 5 8 12 11 3
your own calculated distance vector
15
2 6 5 0 12 8 6 19 3 ?
your own calculated forwarding table
m j m 0 k j k/j n j ?
?
15
7
2
?
21
Link State Routing
• Construct Link State Packet (LSP)
– who you are
– list of (nbr, cost) pairs
• Broadcast LSPs to all rtrs
• Store latest LSP from each rtr received from
nbrs
• Compute Routes
• Forward LSPs from each nbr to other nbrs
22