Internet Working Session I
Internet Working Session I
Internet Working Session I
IP Network layer
Token Frame
Ethernet ATM X.25 PPP HDLC
Ring Relay
Data link layer
Corresponding layers in the
OSI and TCP/IP models
7 Application
Mail, Web, etc.
6 Presentation Application
5 Session
4 Transport Transport TCP/UDP – end to end reliability
OSI TCP/IP
IP Addressing
Purpose of an IPv4 address
Unique Identification of:
Source
So the recipient knows where the message is from
Sometimes used for security or policy-based filtering of
data
Destination
So the networks know where to send the data
Network Independent Format
IP over anything
Purpose of an IPv4 Address
Identifies a machine’s connection to a network
Physically moving a machine from one
network to another requires changing the IP
address
Unique; assigned in a hierarchical fashion
IANA to RIRs (AfriNIC, ARIN, RIPE, APNIC,
LACNIC)
RIR to ISPs and large organisations
ISP or company IT department to end users
IPv4 uses unique 32-bit addresses
Basic Structure of an IPv4 Address
32 bit number (4 octet number):
(e.g. 133.27.162.125)
Decimal Representation:
Binary Representation:
10000101 00011011 10100010 01111101
Hexadecimal Representation:
85 1B A2 7D
Addressing in Internetworks
The problem we have
More than one physical network
Different Locations
Larger number of computers
Need structure in IP addresses
“network part” of the address identifies which
network in the internetwork (e.g. the Internet)
“host part” identifies host on that network
Hosts or routers connected to the same link-layer
network will have IP addresses with the same
network part, but different host part.
Address Structure Revisited
Hierarchical Division in IP Address:
Network Part (Prefix) – high order bits (left)
describes which physical network
Host Part (Host Address) – low order bits (right)
describes which host on that network
205 . 154 . 8 1
11001101 10011010 00001000 00000001
Network Host
Fragment
Identification Flags
Offset Next
Payload Length Hop Limit
Header
Time to
Protocol Header Checksum
Live
Source Address
Source Address
Destination Address
Options Padding
IPv4
32 bits
= 4,294,967,296 possible addressable devices
IPv6
128 bits: 4 times the size in bits
= 3.4 x 1038 possible addressable devices
= 340,282,366,920,938,463,463,374,607,431,768,211,456
∼ 5 x 1028 addresses per person on the planet
IPv6 Address Representation
16 bit fields in case insensitive colon hexadecimal
representation
2031:0000:130F:0000:0000:09C0:876A:130B
Leading zeros in a field are optional:
2031:0:130F:0:0:9C0:876A:130B
Successive fields of 0 represented as ::, but only once
in an address:
2031:0:130F::9C0:876A:130B is ok
2031::130F::9C0:876A:130B is NOT ok (two “::”)
Global Unicast
0010 ... 2000::/3
Address
Link Local
1111 1110 10... FE80::/10
Unicast Address
Unique Local 1111 1100 ...
FC00::/7
Unicast Address 1111 1101 ...
001
Registry
ISP prefix
Site prefix
LAN prefix
0.0.0.0/0
matches all possible destinations, but is usually not the
longest match
Static vs. Dynamic routing
• Static routes • Dynamic routes
– Set up by administrator – Provided by routing
– Changes need to be protocols
made by administrator – Changes are made
– Only good for small automatically
sites and star topologies – Good for network
– Bad for every other topologies which have
topology type redundant links (most!)
Dynamic Routing
Routers compute routing tables dynamically
based on information provided by other
routers in the network
Routers communicate topology to each other
via different protocols
Routers then compute one or more next hops
for each destination – trying to calculate the
most optimal path
Automatically repairs damage by choosing an
alternative route (if there is one)
A Large ISP with more than one
upstream provider
Upstream Upstream
USA ISP ISP
Europe
Large ISP
Africa
Why does an ISP need BGP?
Multi-homing – connecting to multiple
providers
upstream providers
local networks – regional peering to get local traffic
Policy discrimination
controlling how traffic flows
do not accidentally provide transit to non-
customers
Aggregation
Defining BGP
BGP = Border Gateway Protocol
BGP is an exterior routing protocol
Focus on routing policy, not topology
BGP can make ‘groups’ of networks
(Autonomous Systems)
Good route filtering capabilities
Ability to isolate from other’s problems
BGP Protocol Basics
Peering
A C
AS 100 AS 101
B D
Routing Protocol used between
ASes
E
If you aren’t connected to
multiple ASes you don’t need
BGP
AS 102
Runs over TCP
BGP Protocol Basics
Uses Incremental updates
sends one copy of the RIB at the beginning, then
sends changes as they happen
Path Vector protocol
keeps track of the AS path of routing information
Many options for policy enforcement
Terminology
Transit – carrying network traffic across a network, usually for a
fee
Peering – exchanging routing information and traffic
your customers and your peers’ customers network information only.
not your peers’ peers; not your peers’ providers.
Peering also has another meaning:
BGP neighbour, whether or not transit is provided
Default – where to send traffic when there is no explicit route in
the routing table
What is an Exchange Point
Network Access Points (NAPs) established at
end of NSFnet
The original “exchange points”
Major providers connect their networks and
exchange traffic
High-speed network or ethernet switch
Simple concept – any place where providers
come together to exchange traffic
Internet Exchange Points
ISP A
IXP 1 IXP 2
ISP B
ISP Router
Why use an IXP?
KEEP LOCAL TRAFFIC LOCAL!!!
ISPs within a region peer with each other at the
local exchange
No need to have traffic go overseas only to come
back
Much reduced latency and increased performance
Why use an IXP?
VASTLY IMPROVES PERFORMANCE!!!
Network RTTs between organisations in the local
economy is measured in milliseconds, not seconds
Packet loss becomes virtually non-existent
Customers use the Internet for more products,
services, and activities
Why use an IXP?
Countries or regions with a successful IXP
have a successful Internet economy
Local traffic stays local
Money spent on local ‘net infrastructure
Service Quality not an issue
•SPARKY 128.4.13.9
•UCB-MAILGATE 4.98.133.7
•FTPHOST 200.10.194.33
•... etc
usr/local/src
kcct.ac.ke www.isoc.org
Add to
Cache
62.8.88.72
www.my.co.ke A?
KENIC Server
Contention Ratio
Definition
The ratio of the potential maximum demand (usage)
to the actual bandwidth available - ref wikipedia
Also referred to as Overbooking ratio
Call it the bandwidth sharing ratio
Most service providers do not disclose this ratio
In the UK its 50:1 on BT home ADSL and 20:1 on
business subscribers
The ratio is higher in the US - re Comcast case
No Data on Kenyan ISPs contention ratio
Argument for contention ratio is that 10% of
subscribers utilize over 80% of bandwidth available
What does it mean?
In the ratio of 50:1 it means if you have a
1Mbps link you are most likely sharing such
(transit) with 49 other subscribers.
Therefore if all users were online
simultaneously you would get a speed of
20Kbps
The easiest way to observe downloads at peak
hours and off-peak hours
Also locally hosted content would be subject
to lower content ratios
Monitoring and Measurement
Tools
Why Monitoring is important
To check network health status
Identify network bottlenecks
Plan for growth and expansion
Address security issues
Open Source Monitoring tools
MRTG & Cacti for bandwidth utilization
Nagios for service monitoring
Smokeping for RTT and availability
FlowD, NFSEN for protocol analysis and utilization
Webalizer - Web-server log monitoring
Rancid - router management
Snort - intrusion detection
Wireshark - tcdump analysis and log file
Open Source Measurement Tools
Ping - one-way RTT and reachability
Traceroute - one-way reachability
Mtr - one-way path attributes, packet loss,
Netperf - client/server bandwidth,
throughput
Iperf - client/server bandwidth, throughput
Pathchar - one-way bandwidth, through put
Iperf sample
michuki:~ michuki$ iperf -c wavu.kixp.or.ke
------------------------------------------------------------
Client connecting to wavu.kixp.or.ke, TCP port 5001
TCP window size: 65.0 KByte (default)
------------------------------------------------------------
[ 3] local 10.0.1.2 port 62134 connected with 80.240.194.142 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-13.6 sec 232 KBytes 139 Kbits/sec
Netperf
michuki:~ michuki$ sudo netperf -H wavu.kixp.or.ke -f k
Password:
TCP STREAM TEST to wavu.kixp.or.ke
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^3bits/sec
65536 65535 65535 27.35 54.64
Thank you for your attention!
Most of the slides used are lifted from the AfNOG training material
available at:
www.ws.afnog.org