tcp/ip address overview end stations communicate seamlessly with servers or other stations each node...
Post on 15-Jan-2016
220 views
TRANSCRIPT
TCP/IP Address Overview
• End stations communicate seamlessly with servers or other stations
• Each node uses a unique 32 bit IP address
IP Datagrams
• Include a unique source IP address and Destination IP address
• IP addresses identify the source and destination network and host
Internetwork
• Each company listed on the internetwork must be reached before an individual host within that company can be contacted
• Host populating that network share the same network bits but are identified by a uniqueness of the remaining bits
IP Address
• 32 bits in length
• Contains two parts– Network number– Host number
• Binary in nature
• Expressed in a format that can be read by the human eye
IP Address Sections
• Broken into 4 sections of 8 bits called octets
• Each octet is converted to decimal format and is separated by dots
• 255.255.255.255
11111111|11111111|11111111|11111111
• 172.16.122.204
10101100|00010000|01111010|11001100
Octets
• Minimum octet value is 0 – all zeros
• Maximum octet value is 255 – all ones
Address Allocation
• Addresses are allocated by a central authority, the American Registry of Internetwork Numbers (ARIN)
• See www.arin.net for more information
Early IP Addresses
• Early IP addresses did not use classes because there weren’t very many networks
• Now a class system is necessary to increase the number of available IP addresses
IP Address Classes
8 Bits 8 Bits 8 Bits 8 Bits
Class A Network Host Host Host
Class B Network Network Host Host
Class C Network Network Network Host
Class D Multicast
Class E Research
Analysis of Class System
• Class A networks have only 8 network bits and 24 host field bits
• Therefore, there are few Class A networks• There are more Class B networks and even more
yet Class C networks each with fewer hosts• Class system allows addresses to be assigned
based on the size of the network• There are many more small networks than there
are large networks
Address ClassificationBits: 1 8 9 16 17 24 25 32
Class A: 0NNNNNNN Host Host Host
Range(1–126)
Bits: 1 8 9 16 17 24 25 32
Class B: 10NNNNNN Network Host Host
Range(128–191)
Bits: 1 9 16 17 24 25 32
Class C 110NNNNN Network Network Host
Range(192–223)
Class Ranges
Class A Class B Class C
Starts with:
0 10 110
Range: 1.0.0.0 to
126.0.0.0
128.0.0.0 to
191.255.0.0
192.0.0.0 to
223.255.255.0
Networks: 127 (1-126)
127 is reserved
16,384 2,097,152
Hosts: 16,777,216 – 2 65,536 – 2 256 – 2
Class D – Multicast Addresses
Bits: 1 8 9 16 17 24 25 32
Class D: 1110MMMM Multicast Grp
Multicast Grp
Multicast Grp
Range(224–239)
Includes the following range of network numbers: 224.0.0.0 to 239.255.255.255
Class E – Research Addresses
Bits: 1 8 9 16 17 24 25 32
Class E: 11110RRR Research Grp Research Grp Research Grp
Range(240–247)
Includes the following range of network numbers: 240.0.0.0 to 247.255.255.255
Reserved Addresses
• RFC 1918 defines the following as reserved addresses:
• 10.0.0.0 through 10.255.255.255
• 172.16.0.0 through 172.31.255.255
• 192.168.0.0 through 192.168.255.255
Host Addresses
10.250.8.11Router
10.6.24.2
E1
10.180.30.118
172.16.2.100
E0
172.16.2.1
172.16.12.12
172.16.3.10
10.1.1.1
Routing Table
Network Interface
172.16.0.0
E0
10.0.0.0 E1
Host Address Conventions
• Host address of 0 means this network or wire address, i.e., 172.16.0.0
• Router uses network address to identify subnet
• Routing table contains entries for each network
• All 1s is a broadcast address.• Number of addresses in network is 2N – 2
Default Subnet Masks
Class Format Default Subnet Mask
A network.node.node.node 255.0.0.0
B network.network.node.node 255.255.0.0
C network.network.network.node
255.255.255.0
Subnet Example
172.16.3.100Router
172.16.3.1
E1
172.16.3.150
172.16.2.200
E0
172.16.2.1
172.16.2.160
172.16.2.2
172.16.3.5
Routing Table
Network Interface
172.16.2.0
E0
172.16.3.0
E1
Subnet Mask Example
network network host host
IP Address 172 16 0 0
network network host host
Default Mask 255 255 0 0
written as: /16
network network subnet host
Subnet Mask 255 255 255 0
written as: /24
Subnet Mask Numbering
• 1 for network bits
• 1 for subnet bits
• 0 for host bits
Methods of Representation
• Dotted Decimal – 172.16.0.0 255.255.0.0
• Bit Count – 172.16.0.0/16
• Hexadecimal – 172.16.0.0xFFFF0000
Possible Subnet Mask Values
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
Calculating Network Number – No Subnet Bits /16
network network host host
172.16.2.160 10101100
00010000
00000010
10100000
255.255.0.0 11111111
11111111
00000000
00000000
10101100
00010000
00000000
00000000
Network Number
172 16 0 0
Calculating Subnet Number – 8 Subnet Bits /24
network network host host
172.16.2.160 10101100
00010000
00000010
10100000
255.255.0.0 11111111
11111111
11111111
00000000
10101100
00010000
00000010
00000000
Subnet Number 172 16 2 0
Calculating Subnet Number – 10 Subnet Bits /26
network network subnet host
172.16.2.160 10101100
00010000
000000 10
100000
255.255.0.0 11111111
11111111
111111 11
000000
10101100
00010000
000000 10
000000
Subnet Number 172 16 2 128
Class B Broadcasts
From 172.16.1.12
• Local to Subnet 1 – 255.255.255.255
• Specific to Subnet 3 – 172.16.3.255
• To All Subnets – 172.16.255.255
Defining Class B Subnet – /26
172.16.2.160 10101100
00010000
00000010 10
100000
host
255.255.255.192
11111111
11111111
11111111 11
000000
mask
172.16.2.128 10101100
00010000
00000010 10
000000
subnet
172.16.2.191 10101100
00010000
00000010 10
111111
broadcast
171.16.2.129 10101100
00010000
00000010 10
000001
first
171.16.2.190 10101100
00010000
00000010 10
111110
last
Defining Class B Subnet – /24
172.16.2.121 10101100
00010000
00000010
10100000
host
255.255.255.0 11111111
11111111
11111111
00000000
mask
172.16.2.0 10101100
00010000
00000010
00000000
subnet
172.16.2.255 10101100
00010000
00000010
11111111
broadcast
171.16.2.1 10101100
00010000
00000010
00000001
first
171.16.2.254 10101100
00010000
00000010
11111110
last
Possible Class B Combinationsbits subnet mask subnet
shosts
2 255.255.192.0 2 16382
3 255.255.224.0 6 8190
4 255.255.240.0 14 4094
5 255.255.248.0 30 2046
6 255.255.252.0 62 1022
7 255.255.254.0 126 510
8 255.255.255.0 254 254
9 255.255.255.128 510 126
10 255.255.255.192 1022 62
11 255.255.255.224 2046 30
12 255.255.255.240 4094 14
13 255.255.255.248 8190 6
14 255.255.255.252 16382 2
Network Design
• Class C Network with address 172.16.2.121
• Supports at least 20 subnets – 5 bits
• Each Subnet has at least 5 hosts – 3 bits
Class C Network Specifications – /29
network network network subnet host
192.168.5.121 11000000
10101000
00000101
01111 001 host
255.255.255.248
11111111
11111111
11111111
11111 000 mask
192.168.5.120 11000000
10101000
00000101
01111 000 subnet
192.168.5.127 11000000
10101000
00000101
01111 111 broadcast
192.168.5.121 11000000
10101000
00000101
01111 001 first
192.168.5.126 11000000
10101000
00000101
01111 110 last
Possible Class C Combinations
bits subnet mask subnets
hosts
2 255.255.255.192 2 62
3 255.255.255.224 6 30
4 255.255.255.240 14 14
5 255.255.255.248 30 6
6 255.255.255.252 62 2
Configuring IP Addresses
• Assign logical network address and default gateway to a switch
• Assign logical network address to a router interface
• Specify the subnet mask format• Assign host names to IP addresses• Define name servers• Display a list of host names and addresses
Logical Network Address – Switch
Use ip address global command to establish a logical network on a series 1900 switch:
Switch(confid)#ip address ip-address subnet mask
– ip-address is a 32-bit dotted-decimal number
– subnet-mask is a 32-bit dotted-decimal number used to identify the network/subnet or host
Default Gateway
Use the ip default-gateway command to define a default gateway on a switch such as the Catalyst 1900 series
Switch(config)#ip default-gateway ip-address
Logical Network Address – Router
Use the router ip address interface configuration command to establish a logical network address on a router interface
Router(config-if)#ip address ip-address subnet-mask
Subnet Mask Format• show commands display an IP address and subnet mask in dotted
decimal, bit count or hexadecimal notation. • Subnet masks are displayed in dotted decimal notation by default• To specify a format for the current session:
Router#term ip netmask-format {bitcount|decimal|hexadecimal}
• To specify a format for a specific line:
Router(config-line)#ip netmask-format {bitcount|decimal|hexadecimal}
• Although you can display subnet masks in bitcount, decimal, and hexadecimal formats, you can only configure an IP and subnet mask with the dotted decimal format
Assigning Host Names
• Cisco IOS software maintains a table of host names and their corresponding address that is called the host name-to-address mapping
• Higher-layer protocols such as Telnet might use host names to identify network devices (hosts)
• Host names and IP addresses can be associated through either static or dynamic means
Manual Host Name Examples
• The following manually assigns a hostname:
Router(config-line)#ip host name [tcp-port-number] address [address]
• Name is the name that describes the host location
• tcp-port-number is an optional TCP number that identifies the TCP port to use with EXEC connect or Telnet command
• address is the IP address where the name can be reached. Each device can have up to eight different addresses to identify a host
Host Name Examples
• Example 1 – associates the name Norine with two IP addresses. The router will attempt to connect with 172.16.3.1 first when Telnetting to Norine
• Router(config-line)#ip host Norine 172.16.3.1 192.168.3.1
• Example 2 – associates the name Roger with 172.16.3.1
• Router(config-line)#ip host Roger 172.16.3.1
Defining Name Servers
• The ip name-server command defines which hosts can provide name service
• A maximum of six IP addresses can be specified:
Router(config)#ip name-server server address [server address]
Domain LookupRouter(config)#ip domain-lookup
Router(config)#end
Router#pat
Translating “pat” … domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
Router#config t
Router(config)#no ip domain-lookup
Router(config)#end
Router#pat
Translating “pat”
% Unknown command or computer name, or unable to find computer address
Router#
Displaying Host Names and AddressesRouter#show hosts
Default domain is not set
Name/address lookup uses domain service
Name servers are 255.255.255.255
Host Flags Age Type Address(es)
Norine (perm, OK) 0 IP 172.16.100.100
Roger (perm, OK) 0 IP 172.16.100.101
Frank (perm, OK) 0 IP 172.16.200.200
Bob (Perm, OK) 0 IP 172.16.200.201
Show Hosts FieldsShow hosts Command Field Description
Host Names of learned hosts
Flags How host info was learned and status
perm Manually configured in static host table
temp Acquired from DNS use
OK Entry is current
Ex Entry has aged out (expired)
Age Time measured in hours since software referred to entry
Type Protocol field
Address(es) Logical addresses associated with name of host
Inter-VLAN Routing
• Routers can be used to interconnect networks with IP
• In a switched VLAN, packets are switched only between ports in the same “broadcast domain”
• Inter VLAN communication cannot occur without a network layer device (router)
• Router attached to a core switch is called a “router on a stick”
VLAN Routing Using ISL
10.2.2.2
Fast
E0/0
ISLRouter on a Stick
10.1.1.2
VLAN 2VlAN 1
Switch
VLAN Routing Requirements
• Router must know how to reach all interconnected VLANs
• Each end device must be addressed with a network layer address such as an IP address
• The router already knows about directly connected networks. It must learn routes to networks that are not directly connected
• There must be a separate physical connection for each VLAN or trunking must be enabled on a single physical connection (Chapter 8)
ISL Router Configurationinterface fastethernet 0/0 no ip address!interface fastethernet 0/0.1 ip address 10.1.1.1 255.255.255.0 encapsulation isl 1interface fastethernet 0/0.2 ip address 10.2.2.2 255.255.255.0 encapsulation isl 2
To Configure “Router on a Stick”
• Enable ISL on the switch port connecting to the router
• Enable ISL encapsulation on the router’s Fast Ethernet subinterface
• Assign a network layer address to each subinterface
Note: the router must sometimes learn routes either statically or dynamically (Chapter 8)
Routing Across a WAN
10.2.2.2
ISL
Router
10.1.1.2
VLAN 2VlAN 1
Switch Router172.16.1.1
S0 172.16.1.2
To Set Up a WAN Connection
• Encapsulate a dat link searial WAN protocol on the WAN interface
• Assign a network layer address to each interface or subinterface
interface Serial0
ip address 172.16.1.1 255.255.255.0
TCP/IP Command SummaryCommand Description
ip address Sets a switch or router interface IP host address
ip default-gateway Defines a default gateway at the 1900 switch
term ip netmask-format
Changes the subnet mask output for a session
ip netmask-format Changes the subnet mask output for a line
ip host Allows static association of a IP host name to an address
ip name-server Sets the DNS server
no ip domain-lookup Prevents the router from doing IP name lookups
encapsulation isl Defines ISL encapsulation on an Ethernet interface