Title: IP Addressing and Introduction to IP routing
1IP Addressing and Introduction to IP routing
- Avgust Jauk ltjauk_at_arnes.sigt
- ARNES
Budapest, August 99
2Agenda
- Internet topology
- Introduction to addressing
- Idea of routing
- Special address conventions
- Classfull addressing
- Classless addressing
3Internet topology
- Internet - Network of Networks
- Networks
- Based on different technology
- Large or small
- Fast or slow
- Variety of connected nodes
- Routers (Gateways)
- Protocols
4Internet topology
5Routers
- Packet handling
- Packet forwarding
- Routing information processing
- Management
- Miscellaneous functions
6Internet protocol stack
7Internet protocol dependencies
Users
Hardware
8Layering in the Internet
Host A
Host B
Identical message
Application
Application
Identical packet
Transport
Transport
Gateway G
Internet
Internet
Internet
Identical datagram
Identical datagram
Network interface
Identical frame
Identical frame
Network interface
Network interface
Physical Net 1
Physical Net 2
9Internet datagram format
10ICMP datagram format
11ICMP Message types
Type Field ICMP Message Type
0 Echo
Reply 3
Destination Unreachable 4
Source Quench 5
Redirect (change a route)
8 Echo Request
11 Time Exceeded
for Datagram 12
Parametere Problem on a Datagram 13
Timestamp Request
14 Timestamp
Reply 15
Information Request (obsolete) 16
Information Reply
(obsolete) 17
Address Mask Request 18
Address Mask Reply
12Introduction to addressing
- Do I need an address?
- What types of addresses are there?
- Postal address
- Telephone number
- In Computer Networks
- Physical Addresses (Ethernet, FDDI, ...)
- Textual Addresses - Names
- Network level addresses (IP, X.25,...)
13Addressing in the Internet
- Address specifies hosts interface
- 32 bit addresses
- Network part Host part
- Dotted decimal notation 192.164.2.4
14Idea of routing
- Routers forward datagrams between connected
networks - They need to know via which interface to send a
datagram - Routing decisions are based on the information
stored in the routing table
15Routing table
- Tells where to send datagram for a particular
network
Network Next-Hop
Port Metric
194.181.200.0 194.181.208.1 Eth0
1 193.2.1.0 194.181.208.320
Eth1 14 153.5.0.0
194.181.214.25 Fddi0 8 0.0.0.0
194.181.210.1 S0
5
- Next-Hop routers must be directly reachable
16Routing table (cont.)
- Default Route - a special entry in the routing
table - Pass all datagrams for unknown networks to this
router - Represented by the entry for network 0.0.0.0
- Routing uses network part of the address!
17Routing Algorithm
- Extract destination IP address from datagram
- Extract network address from the IP address
- If destination network equals my network
- Send directly to destination using physical
network - Else If destination address matches a
host-specific route in the routing table - Send to the router specified in the routing table
18Routing Algorithm (cont.)
- Else if destionation network matches a network in
the routing table - Send to the router specified in the routing entry
- Else If there is a default route in the routing
table - Send to the router specified in the default route
entry - Else
- Send a No route to host message to the source
19Populating the Routing Table
- Manually by network administrator Static Routes
- No dynamic changes to these routes will accur
- Dynamically by routing protocol
- Routing info is exchanged between routers
- The routing metric is used to find the best
path
20Static Routes
A
B
Manually configured by network administrator
21Static Routes
A
B
Router cannot automatically reroute if path fails
22Routing protocols
- Routers use a common protocol to exchange routing
information - Best path between networks or subnets is
determined by Routing Metric - Automatic adaption to topology changes
23Routing protocols
64 kbps
64 kbps
2 Mbps
2 Mbps
24Special address conventions
- Broadcast Addresses
- Directed broadcast host part all 1s -
194.181.200.255 - Limited broadcast all 1s - 255.255.255.255
- 0 means This
- host part 0 - this host
- network part 0 - this network
- miss used as a broadcast address
25Special address conventions (cont.)
- Loopback Address 127.0.0.1
- for testing and inter-process communication on
the local machine - should never appear on any network
26Summary of special address conventions
This host
Host on this net
Limited broadcast (local net)
Directed broadcast for net
Loopback
27Classess and address formats
0 1 2 3 4
8
16
24
31
netid
hostid
Class A
0
netid
hostid
Class B
0
1
netid
hostid
Class C
0
1
1
multicast address
Class D
0
1
1
1
reserved for future use
Class E
0
1
1
1
1
28Classes How to recognize them
- Class A first byte in range 1-126
- Class B first byte in range 128-191
- Class C first byte in range 192-223
- Class D first byte in range 224-239
- Class E first byte in range 240-255
29Classes Size and Number
- Class A 16.777.214 hosts, 128 networks
- Class B 65.534 hosts, 16.324 networks
- Class C 254 hosts, 2.097.152 networks
30Problems with Classes
- Class A usually to big
- Class C often to small
- Not enough Class Bs
- Inefficient utilisation of address space
- Solution extending the network part of the
address Subnetting
31Subnetting
Class B Address Before Subnetting
Class B
0
1
Class B Address After Subnetting
Class B
0
1
32Subnet mask
- Subnet mask defines the network part
- binary 1 in network bits
- binary 0 in hosts bits
- Subnet mask must be contiguous!
33Subnetting (cont.)
- Not limited to byte border
- Subnets 0 and -1 used to be reserved
- Subnet 0 this subnet
- Subnet -1 broadcast
- Network administrator decides on the subnet size
- Network and subnet numbers used for routing
decisions
34Subnetting and routing
- one subnet mask per particular network
- routing considerations
- all subnets of the same network must be
contiguous - or static routes must be used
- or routing protocol must carry also subnet masks
35Subnetting and routing
- all subnets of the same network must be
contiguous!
C1
C1
C12
C11
B
C13
C14
36Subnet mask bits
128 64 32 16 8 4 2 1
37Binary Numbers
128 64 32 16 8 4 2 1
6
2
Represent 226 decimal in binary
1 1 1 0 0 0 1 0
2
6
128 64 32
2
226
38Subnetting a Class C
split
subnet mask
subnets
hosts/subnet
total hosts
utilis.
39Variable Length Subnet Masks (VLSM)
- Subnets are of different size
- A means for conserving address space
- How to do it
- how big is the biggest subnet?
- split the class into such pieces
- split (sub-subnet ) those peieces further
40VLSM (cont.)
0
255
41VLSM and routing
- Prerequisites
- routing protocol must carry subnet masks
- or static routes must be used
42Classfull Addressing drawbacks
- Classfull Addressing Subnetting
- at least one route per class is advertised in
routing updates - Number of networks is doubling faster than once
per year - Memory is not growing that fast
- Only a few routers were able to keep the such
number of routes - Route flapping
43Classless addressing
- Introduced by CIDR - Classless InterDomain
Routing - Networks are grouped (aggregated) into blocks
- Blocks of networks are advertised
- New way of thinking
- there are no networks numbers, but just address
space prefixes - there are no subnet masks, just prefix lenghts
44Classless addresses notation
- 10.181.215.32 /27
- 10.181.215.32 with mask 255.255.255.224
- binary representation of mask
11111111.11111111.11111111.11100000
45Classless address notation
Hosts . . . 8 16 32 64 128 256 . .
. 4096 8192 16384 32768 65535 . . .
Prefix . . . /29 /28 /27 /26 /25 /24 . .
. /20 /19 /18 /17 /16 . . .
Classful . . . 1 C . . . 16 Cs 32 Cs 64
Cs 128 Cs 1 B . . .
Subnet Mask . . . 255.255.255.248 255.255.255.240
255.255.255.224 255.255.255.192 255.255.255.128 2
55.255.255.0 . . . 255.255.240.0 255.255.224.0 255
.255.192.0 255.255.128.0 255.255.0.0 . . .
46Classless network aggregation - Supernetting
168
0
192
64
Class C 24-bit prefix
11000000
10101000
01000000
00000000
00000000
Common prefix 23 bits
11111111
11111111
11111110
00000000
0 00000000
168
/23
192
64
Classless 23-bit prefix
11000000
10101000
01000000
00000000
0 00000000
Prefix
Host part
47Classless network aggregation (cont.)
- Before aggregation
- 201.222.191.0/24
- 201.222.192.0/24
- 201.222.193.0/24
- After aggregation
- 201.222.191.0/24
- 201.222.192.0/23
48Classless addressing and routing
- Longest match routing
- Route distr. between two protocols, one is not
supporting classless - use a default route
- explode supernet info. into individual network
numbers
49Classes of routing protocols
- The early Arpanet was completelly flat - single
network model - one routing protocol, all routers had all the
routing info - with the growth it become hard to maintaine and
computationally intensive - Solution split the Internet into a set of
Autonomous Systems (AS) - Each Autonomous System is a set of routers and
networks under the same administration
50Classes of routing protocols (cont.)
- Special routers, called Exterior gateways used
to connect ASes - Two classes of routing protocols
- Interior routing protocols (IGP - Interior
Gateway protocols) - Exterior routing protocols (EGP - Exterior
Gateway protocols)
51Interior Routing Protocols (IGPs)
- Used inside an Autonomous System
- Designed to handle more redundant links
- Links are cheaper in a local environment gt one
can afford more redundant links - Designed with a higher bandwidth in mind
- Cheaper bandwidth gt one can use more bandwidth
for the exchange of routing information
52Interior Routing Protocols (cont.)
- They generally contaion less ingformation than
EGPs - IGPs in general (with exeptions) do not have to
know about any other network outside the AS - No policy support
- Inside AS, one generally does not want to aplly
policy - everyone can use every available link
- policies are generally only set on what links
should be preffered
53Interior Routing Protocols (cont.)
- Fairly extensive metric support
- Redudancy gt one has to distinguish between
redundant links - metrics or costs help in the decision proccess
- Designed for fast convergence
- Because of the redudancy, IGPs are designed to
make quick changes if the network topology changes
54Exterior Routing Protocols (EGPs)
- Used to exchange routing information between ASes
- Designed with lower bandwidth in mind
- long distance links are more expensive gt routing
protocol should use less bandwidth for the
exchange of routing information - They generally contain a lot of information
- EGPs have to know about all external networks
- In the Internet that might be 40.000 networks
55Exterior Routing Protocols (cont.)
- They assume a less reliable network
- most of them are connection oriented for reliable
delivery - They are designed to provide policy control
- generally you set routing policy at the border
of your routing domain - They do not run in every single router
- Only at the border of your AS you have to run an
EGP - Internal routers can be less powerfull
56Summary
- We have covered
- Internet topology
- Routing
- static, dynamic
- classes of routing protocols
- Addressing
- classfull
- subnetting
- VLSM
- classless
57Where to get more information
- RFCs (RFC-1880 Internet Official Protocol
Standards) - Books
- D.C.Lynch, M.T.Rose Internet System Handbook
- D.E.Comer Internetworking with TCP/IP
- Mailing lists
- Usenet News