Cisco – Chapter 10

Download Report

Transcript Cisco – Chapter 10

Cisco – Chapter 8&9 - Ethernet
Technologies
and Ethernet Switching
TCP/IP
IP Addressing
ARP and RARP
American Registry for Internet
Numbers
•
•
•
•
•
•
Some are set aside, not to be used
Class A 1-126
Class B 128 – 191
Class C 192 – 223
Class D 224-239 Multicasting
Class E >240
Research
Hierarchical Addressing
• Telephone System
– Hop 1
– Hop 2
– Hop 3
Area Code
Local Exchange
Local Number
• IP
– Network Address
– Subnetwork Address
– Host Address
Routers
• Layer 3 Devices
–
–
–
–
Use IP address
Make best path determination
Switch packet from incoming to outgoing port
Connect separate networks
• Routing sometimes referred to as Layer 3
switching
Router Decisions
• Use Routing Tables
– Process is called routing the packet
• Decisions based on
– Available paths
– Traffic density
– Speed of segment (bandwidth)
Two-tier addressing
• MAC address
– Unique identifier for each host – Layer 2
• Like your name – does not change
• IP address
– Net.subnet.host – Layer 3
– Like your address – changes when you move
• Dynamic
DHCP - assigned as needed & temporary
– Older protocol was Bootstrap – BOOTP
» DHCP and BOOTP are similar; DHCP uses unused field as a flag
field
– Allows fewer addresses to serve large number of hosts
• Static assigned by network administrator
• ties activity to a particular host
ARP and RARP
• ARP – Address Resolution Protocol
– IP address is known; MAC is not known
• ARP tables are maintained by hosts and routers
• ARP request package contains header & message
• RARP – Reverse Address Resolution Proto
– MAC address is known; IP is not known
• Requires RARP server be on network
• Header structure: hardware type, protocol type, HLEN, Plen,
Operation, Sender and target hardware and protocol address
Addressing Schemes
• Flat (physical)
– NIC card address – burned in
• Hierarchical (logical)
– Network address assigned
• Subnet address determined by network administrator
• Host address determined by network administrator
Example: Postal with zip + 4
Network Packet Fields
•
•
•
•
•
•
•
Type of service
Total Length
Identification
Flags
Offset
Time to Live
Header Protocol
Header checksum
Source Address
Destination Address
IP Options
Data
Padding
IP Addresses
• Header field – source and destination are
each 32 bits
– 4 octets
• Each octet has 8 binary digits
• Each octet expressed as decimal equivalent of
binary
• Usually expressed in dotted decimal form
– 123.0.0.0
Examples
•
•
•
•
•
•
•
•
•
Class A
01111110.00000000.00000000.00000000
126.0.0.0
Class B
10111110.11110000.00000000.00000000
190.240.0.0
Class C
11000001.11111000.10000000.0
193.248.128.0
Network Addresses
• Network Portion
– Network address and Subnet Address
• Host Portion
Example: 152.128.0.0 is assigned network #
152.128.200.0 is subnet #
152.128.200.2 is subnet with host
nnnnnnnn.nnnnnnnn.nnnnhhhh.hhhhhhhh
Broadcast Addresses
•
•
•
•
•
•
Class C
194.45.45.255
Class B
134.44.255.255
Class A
123.255.255.255
Number of Hosts
• Class C
– 2**8 – 2 = 254
• Class B
– 2**15 – 2 = 65,534
• Class C
– 2**24 – 2 = 16,777,214
• First address is actual network address
• Final address is reserved for broadcasts
Subnet Masks
• Borrow bits from HOST section of address to
form subnets
– Maximum bits to borrow is 2 less than total bits in Host
portion of address
– Minimum bits to borrow is 2
• Subnets reduce size of broadcast domain
• A subnet mask is 32 bits long
– 4 octets
– All 1s in network and subnet portion of address
Subnetting
• Always plan for scalability
– If you need four subnets, plan 8-12
• Borrow bits from the hosts portion of
address
– Borrow bits on the right
– Assign decimal equivalent as if you used all 8
bits
Subnetting
• Outside world looks only at IP portion of
address
• Local router resolves Subnet address using
subnet mask and routes to correct subnet
• Number of subnets = n**2 –2 where n is the
number of bits borrowed from host
Boolean AND –
No big deal
• !+1 = 1
• 1+0 = 0
• That’s all there is to it
Subnetting Results
• Lose potential hosts
• Maximum number is when host bits =
subnet bits
– Work out an example