Upload
mavis-chapman
View
222
Download
3
Tags:
Embed Size (px)
Citation preview
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
• Unique addressing allows communication between end stations
• Path choice is based on location• Location is represented by an address
Introduction to TCP/IP Addresses
UNIX HostUNIX Host
Company ACompany B
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
IP Addressing
32 Bits
Network Host
8 Bits
172 . 16 . 122 . 204
8 Bits 8 Bits 8 Bits
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
• Class A:
• Class B:
• Class C:
• Class D: for multicast
• Class E: for research
N = Network number H = Host number
IP Address Classes
N H H H
N N H H
N N N H
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
IP Address Bit Patterns
1 7 24
Class A:
# Bits
1 14 161
Class B:
# Bits
1 21 811
Class C:
# Bits
0 network # host #
1 network # host #0
1 network # host #1 0
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
Recognizing Classes in IP Addresses (First Octet Rule)
High OrderBits
Octet inDecimal
AddressClass
0
10
110
1 – 126
128 – 191
192 – 223
A
B
C
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
Host Addresses172.16.2.1
172.16.3.10
172.16.12.12
IP: 172.16.2.1
10.1.1.1
10.250.8.11
10.180.30.118
IP: 10.6.24.2
E0 E1
172.16 12 12
Network Host
. . Network Interface
172.16.0.0
10.0.0.0
E0
E1
Routing Table
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
• Network 172.16.0.0
172.16.0.0
Addressing without Subnets
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
• Network 172.16.0.0
Addressing with Subnets
172.16.1.0 172.16.2.0
172.16.3.0
172.16.4.0
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
Subnet Addressing172.16.2.200
172.16.2.2
172.16.2.160
IP: 172.16.2.1
172.16.3.5
172.16.3.100
172.16.3.150
IP: 172.16.3.1
E0 E1
172.16 2 160
Network Host
. . Network Interface
172.16.2.0
172.16.3.0
E0
E1
New Routing Table
Subnet
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
Subnet Mask
172 16 0 0
255 255 0 0
255 255 255 0
IPAddress
DefaultSubnet
Mask
8-bitSubnet
Mask
Network Host
Use host bits, starting at thehigh order bit position
Network Host
Network Subnet Host
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
Decimal Equivalents of Bit Patterns
1 0 0 0 0 0 0 0 = 128
1 1 0 0 0 0 0 0 = 192
1 1 1 0 0 0 0 0 = 224
1 1 1 1 0 0 0 0 = 240
1 1 1 1 1 0 0 0 = 248
1 1 1 1 1 1 0 0 = 252
1 1 1 1 1 1 1 0 = 254
1 1 1 1 1 1 1 1 = 255
128 64 32 16 8 4 2 1
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
Network Host
172.16.2.160
255.255.0.0
172 16 0 0
10101100
11111111
10101100
00010000
11111111
00010000
00000000
00000000
10100000
00000000
00000000
• Subnets not in use—the default
00000010
Subnet Mask without Subnets
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
Network Host
172.16.2.160
255.255.255.0
172 16 2 0
Subnet
11111111 11111111 0000000011111111
• Network number extended by eight bits
10101100
10101100
00010000
00010000 00000010
10100000
00000000
00000010
Subnet Mask with Subnets
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
IP Host Address: 172.16.2.120Subnet Mask: 255.255.255.0
• Subnet Address = 172.16.2.0• Host Addresses = 172.16.2.1–172.16.2.254• Broadcast Address = 172.16.2.255• Eight bits of subnetting
Network Subnet Host
172 16 2 0
172.16.2.120:
255.255.255.0:
10101100
11111111
Subnet: 10101100 00010000
00010000
11111111
00000010
00000010
11111111
01111001
00000000
00000000
Class B Subnet Planning Example
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
IP Host Address: 201.222.5.121Subnet Mask: 255.255.255.248
Network Subnet Host
201 222 5 120
201.222.5.121: 11001001
11111111
Subnet: 11001001 11011110
11011110
11111111
00000101
00000101
11111111
01111 001
11111 000
01111 000
255.255.255.248:
Class C Subnet Planning Example
• Subnet Address = 201.222.5.120• Host Addresses = 201.222.5.121–201.222.5.126• Broadcast Address = 201.222.5.127• Five Bits of Subnetting
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
Broadcast Addresses
172.16.1.0
172.16.2.0
172.16.3.0
172.16.4.0
172.16.3.255(Directed broadcast)
255.255.255.255(Local network broadcast)
XX
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
Written Exercise: Broadcast Addresses
Address Class Subnet Broadcast
201.222.10.60 255.255.255.248
Subnet Mask
15.16.193.6 255.255.248.0
128.16.32.13 255.255.255.252
153.50.6.27 255.255.255.128
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
Subnetting Example
Cisco A Cisco B
E0 S0 E0S0 To0
Cisco A
E0: 172.16.2.1 S0: 172.16.1.1
S0: 172.16.1.2 E0: 144.254.4.1 To0: 144.254.16.1
Cisco B
Mask
255.255.255.0
Subnet
172.16.2.0172.16.1.0
172.16.1.0
144.254.16.0144.254.4.0
Mask Subnet
255.255.255.0
255.255.255.0 255.255.252.0 255.255.252.0
TokenRing
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
IP Address ConfigurationRouter(config-if)#
• Assigns an address and subnet mask• Starts IP processing on an interface
ip address ip-address subnet-maskip address ip-address subnet-mask
Router(config-if)#
ip netmask-format { bitcount | decimal | hexadecimal } ip netmask-format { bitcount | decimal | hexadecimal }
• Sets format of network mask for a specific line
Router#
term ip netmask-format { bitcount | decimal | hexadecimal } term ip netmask-format { bitcount | decimal | hexadecimal }
• Sets format of network mask for current session
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
Router(config)#
• Defines static host name to IP address mapping
• Hosts/interfaces selectable by name or IP address
IP Host Names
ip host name [ tcp-port-number ] address [ address ]…ip host name [ tcp-port-number ] address [ address ]…
ip host P1R1 1.0.0.5 2.0.0.8ip host P1R2 1.0.0.4ip host P1R1 1.0.0.5 2.0.0.8ip host P1R2 1.0.0.4
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
• Specifies one or more hosts that supply host name to logical address resolution
Router(config)#
Name Server Configuration
ip name-server server-address1 [[ server-address2 ]... server-address6 ]ip name-server server-address1 [[ server-address2 ]... server-address6 ]
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
Verifying Address Configuration
Application
Transport
Internet
Network Interface
Hardware
Telnet
ICMPtrace
ping
Application
Transport
Internet
Network Interface
Hardware
Telnet
ICMP trace
telnet
trace
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
• Tests IP network connectivity
Simple Ping
Router> ping 172.16.101.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.16.101.1, timeout is 2 seconds:.!!!!Success rate is 80 percent, round-trip min/avg/max = 6/6/6 msRouter>
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
• Ping supported for several protocols
Extended Ping
Router# pingProtocol [ip]:Target IP address: 192.168.101.162Repeat count [5]:Datagram size [100]:Timeout in seconds [2]:Extended commands [n]: ySource address:Type of service [0]:Set DF bit in IP header? [no]: yesData pattern [0xABCD]:Loose, Strict, Record, Timestamp, Verbose[none]:Sweep range of sizes [n]:Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.101.162, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 24/26/28 msRouter#
Co
nn
ecti
ng
Pe
op
le T
o In
form
ati
on
• Shows interface addresses used to reach the destination
IP Trace
Router# trace aba.nyc.milType escape sequence to abort.Tracing the route to aba.nyc.mil (26.0.0.73)
1 debris.cisco.com (172.16.1.6) 1000 msec 8 msec 4 msec2 barrnet-gw.cisco.com (172.16.16.2) 8 msec 8 msec 8 msec3 external-a-gateway.stanford.edu (192.42.110.225) 8 msec 4 msec 4 msec4 bb2.su.barrnet.net (131.119.254.6) 8 msec 8 msec 8 msec5 su.arc.barrnet.net (131.119.3.8) 12 msec 12 msec 8 msec6 moffett-fld-mb.in.mil (192.52.195.1) 216 msec 120 msec 132 msec7 aba.nyc.mil (26.0.0.73) 412 msec * 664 msec