Title: IP Addressing and Introduction to IP routing
1IP Addressing and Introduction to IP routing
- Avgust Jauk ltjauk_at_arnes.sigt
- ARNES
Bratislava, August 98
2Agenda
- Internet topology
- Introduction to addressing
- Idea of routing
- Special address conventions
- Classfull addressing
- Classless addressing
- Routing protocols IGPs and EGPs
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
8Internet protocol dependencies
9Layering 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
10Internet datagram format
11ICMP datagram format
12ICMP 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
13Introduction 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,...)
14Addressing in the Internet
- Address specifies hosts interface
- 32 bit addresses
- Network part Host part
- Dotted decimal notation 192.164.2.4
15Idea 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
16Routing 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
17Routing 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!
18Routing 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
19Routing 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
20Populating 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
21Static Routes
A
B
Manually configured by network administrator
22Static Routes
A
B
Router cannot automatically reroute if path fails
23Routing 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
24Routing protocols
64 kbps
64 kbps
2 Mbps
2 Mbps
25Special 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
26Special 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
27Summary of special address conventions
This host
Host on this net
Limited broadcast (local net)
Directed broadcast for net
Loopback
28Classess 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
29Classes 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
30Classes 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
31Problems 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
32Subnetting
Class B Address Before Subnetting
Class B
0
1
Class B Address After Subnetting
Class B
0
1
33Subnet mask
- Subnet mask defines the network part
- binary 1 in network bits
- binary 0 in hosts bits
- Subnet mask must be contiguous!
34Subnetting (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
35Subnetting and routing
- one subnet mask per particular class
- routing considerations
- all subnets of the same class must be contiguous
- or static routes must be used
- or routing protocol must carry also subnet masks
36Subnetting and routing
- all subnets of the same class must be contiguous!
C1
C1
C12
C11
B
C13
C14
37Subnet mask bits
128 64 32 16 8 4 2 1
38Binary 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
39Subnetting a Class C
split
subnet mask
subnets
hosts/subnet
total hosts
utilis.
40Variable 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
41VLSM (cont.)
0
255
42VLSM and routing
- Prerequisites
- routing protocol must carry subnet masks
- or static routes must be used
43Classfull 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 can keep the current number of
routes - Route flapping
44Classless 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
45Classless 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
46Classless 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 . . .
47Classless network aggregation - Supernetting
168
0
192
64
Class C 24-bit prefix
11000000
10101000
01000000
00000000
00000000
Common prefix 23 bits
11111111
11111111
1111111
0 00000000
168
/23
192
64
Classless 23-bit prefix
11000000
10101000
0100000
0 00000000
Prefix
Host part
48Classless 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
49Classless 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
50Classes 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
51Classes 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)
52Interior 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
53Interior 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
54Interior 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
55Exterior 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
56Exterior 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
57Summary
- We have covered
- Internet topology
- Routing
- static, dynamic
- classes of routing protocols
- Addressing
- classfull
- subnetting
- VLSM
- classless
58Where 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
59Network troubleshooting
- Ping ICMP echo-request
- Traceroute
- UDP to an non-existing port
- start with TTL1
- increase by 1
- can get back
- ICMP time exceeded
- ICMP port unreachable
- TCPdump, trace utilities in routers, ...
60Track 1 Initial configuration
- Domain name ceews.ceu.hu
- PC names tr1pcxy
- x row number (1 to 7)
- y a number of a PC inside a row (1 to 3)
- IP address 193.225.220.(x8y)
- Network mask 255.255.255.0
- Default Gateway 193.225.220.1
- DNS 193.225.218.100
61Domain Name System
- Domain Names vislava.ceenet.waw.pl
- IP addresses 194.181.200.2
- Need for automatic conversion
- Conversion table (/etc/hosts)
- Distributed Hierarhical Database
- Client-Server model
- Server Name Server
- Client Name Resolver