SlideShare a Scribd company logo
www.glcnetworks.com
OSPF on
RouterOS 7
GLC Webinar,
11 Jan 2022
Achmad Mardiansyah
M. Taufik nurhuda
1
www.glcnetworks.com
Agenda
● Introduction
● Review prerequisite knowledge
● OSPF
● OSPF on ROS7
● Live practice
● Q & A
2
www.glcnetworks.com
introduction
3
www.glcnetworks.com
What is GLC?
● Garda Lintas Cakrawala (www.glcnetworks.com)
● Based in Bandung, Indonesia
● Areas: Training, IT Consulting
● Certified partner for: Mikrotik, Ubiquity, Linux foundation
● Product: GLC radius manager
● Regular event
4
www.glcnetworks.com
Trainer Introduction
● Name: Achmad Mardiansyah
● Base: bandung, Indonesia
● Linux user since 1999, mikrotik user since 2007, UBNT
2011
● Mikrotik Certified Trainer
(MTCNA/RE/WE/UME/INE/TCE/IPv6)
● Mikrotik/Linux Certified Consultant
● Website contributor: achmadjournal.com, mikrotik.tips,
asysadmin.tips
● More info:
http://au.linkedin.com/in/achmadmardiansyah
5
www.glcnetworks.com
Past experience
6
● 2021 (PNG, Malaysia): network support, radius/billing
integration
● 2020 (Congo DRC, Malaysia): IOT integration,
network automation
● 2019, Congo (DRC): build a wireless ISP from
ground-up
● 2018, Malaysia: network revamp, develop billing
solution and integration, setup dynamic routing
● 2017, Libya (north africa): remote wireless migration
for a new Wireless ISP
● 2016, United Kingdom: workshop for wireless ISP,
migrating a bridged to routed network
www.glcnetworks.com
About GLC webinar?
● First webinar: january 1, 2010 (title:
tahun baru bersama solaris - new year
with solaris OS)
● As a sharing event with various topics:
linux, networking, wireless, database,
programming, etc
● Regular schedule
● Irregular schedule: as needed
● Checking schedule:
http://www.glcnetworks.com/schedule
● You are invited to be a presenter
○ No need to be an expert
○ This is a forum for sharing: knowledge,
experiences, information
7
www.glcnetworks.com
Please introduce yourself
● Your name
● Your company/university?
● Your networking experience?
● Your mikrotik experience?
● Your expectation from this course?
8
www.glcnetworks.com
Prerequisite
● This presentation requires some prerequisite knowledge
● We assume you already know:
○ Computer networking
○ Mikrotik administration
9
www.glcnetworks.com
Review prerequisite knowledge
10
www.glcnetworks.com
Layer 2 vs Layer 3 addressing
11
Layer 2 Layer 3
● Burned-in address
● Adjacent communication
● Consist of 48 bit binary,
written in HEX format. 1
HEX = 4 bit
● Unique for every physical
port
● 6 first HEX digit ->
represent the manufacturer
● Logical address
● End-to-end communication
● IPv4 32 bit long
● 2 versions: IPv4 (our focus)
and IPv6
● Consist of network part &
host part
● Can be class based IP
address (without subnet)
● Now it is classless IP
address -> VLSM (variable
length subnet mask)
● CIDR (classless inter
domain routing)
www.glcnetworks.com
IP spec (RFC 791)
● Defined long time ago (what 1981?)
● Defines how the IP header looks like
● Still used up to know
● New version -> IPv6
12
www.glcnetworks.com
How the layer 3 address look like?
● IPv4 address is 32 bit long
● Written in binary -> always think in binary
● Displayed to human in decimal every 8 bit (octet).
● Has 2 parts: network part and host part
● Like a phone number 0812 XXXXXXXX -> hierarchical
● All devices in the network will have same network part
● First and last address cannot be used (for network id and broadcast id)
13
Network part host part
www.glcnetworks.com
VLSM RFC
● Variable-Length Subnet Masking
(VLSM)
● Can divide an IP address block into
subnets of different sizes using /
(slash) notation
● Solution the in efficient of classful IP
address (fixed length). No more class
A, B, C
● RFC: 1878 (1895)
● Basis for CIDR
● Example: 23.45.0.0/17
○ 23.45.0.0/25
○ 23.45.0.128/25
14
www.glcnetworks.com
CIDR RFC
● CIDR: Classless Inter-Domain Routing
● Provides a new and more flexible way
to specify network addresses in routers
(using slash as notation)
● allow flexible allocation of Internet
Protocol (IP) addresses.
● CIDR lets a routing table entry
represent an aggregation of networks
that exist in the forward path
● Each IP address has a network prefix
that identifies their network
● RFC: 1519
15
www.glcnetworks.com
Router and Routing
● Router is a network device that is used to forward packets, based on layer 3
information (layer 3 header)
● Routing is the process of selecting a path for traffic in a network, or between
or across multiple networks
16
Physical
router
Router
icon
www.glcnetworks.com
Typical connection (physical)
17
R2
R1
R3
● Router connects layer 2
segments
● Router works on layer 3
● Meaning, each layer 2
segment has network ID
www.glcnetworks.com
Typical connection (logical) and routing table
Routing table:
● A table at router that is used to forward packet
● Available on every devices (router and host)
● Entry is executed sequentially
18
192.168.0.0/26
R1
192.168.0.1/26
192.168.0.3/26
192.168.0.2/26
R3
R2
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
192.168.3.3/24
192.168.3.9/24
192.168.2.9/24
192.168.2.2/24
192.168.1.1/24
192.168.1.9/24
destination gateway
192.168.0.0/26 direct
192.168.1.0/24 direct
192.168.2.0/24 192.168.0.2
192.168.3.0/24 192.168.0.3
192.168.16.3/32 192.168.0.2
0.0.0.0/0 (default gw) 192.168.0.3
www.glcnetworks.com
Forwarding packets using routing table
● It works like a firewall: match and action
● When a packet arrived, routing table is used to forward packets
● You should think in binary to understand how it works
19
destination gateway
192.168.16.3/32
11000000 10101000 00001000 00000011
192.168.0.2
192.168.0.0/26
11000000 10101000 00000000 00
direct
192.168.1.0/24
11000000 10101000 00000001
direct
192.168.2.0/24
11000000 10101000 00000010
192.168.0.2
192.168.3.0/24
11000000 10101000 00000011
192.168.0.3
0.0.0.0/0
(no match)
192.168.0.3
www.glcnetworks.com
A packet arrived at R1… (example)
Destination IP address of the packet is 192.168.2.6, which gateway do we use?
A: 192.168.2.6 = (11000000 10101000 00000010 00000110)
20
destination gateway
192.168.16.3/32
11000000 10101000 00001000 00000011
192.168.0.2
192.168.0.0/26
11000000 10101000 00000000 00
direct
192.168.1.0/24
11000000 10101000 00000001
direct
192.168.2.0/24
11000000 10101000 00000010
192.168.0.2
192.168.3.0/24
11000000 10101000 00000011
192.168.0.3
0.0.0.0/0 192.168.0.3
www.glcnetworks.com
Where routing table lookup happens?
21
www.glcnetworks.com
Administrative distance (analogy)
22
22
CITY 1 100 km
CITY 2 120 km
CITY 2 90 km
CITY 3 500 km
CITY 4 250 km
10.10.10.0/24 192.168.0.1 10
10.10.20.0/24 192.168.0.2 12
10.10.20.0/24 192.168.0.3 9
10.10.30.0/24 192.168.0.3 50
10.10.40.0/24 192.168.0.4 25
www.glcnetworks.com
Administrative distance
● Distance is considered when prefix
length is same
● Lowest distance wins
● Administrative distance policy is
depends on vendor
● Table on the right shows an example of
administrative distance on cisco router
23
www.glcnetworks.com
Static routing
● Entries on routing table is created
manually
● Admin must manage routing table
in all routers
● Admin have full control
24
192.168.0.0/26
R1
192.168.0.1/26
192.168.0.3/26
192.168.0.2/26
R3
R2
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
192.168.3.3/24
192.168.3.9/24
192.168.2.9/24
192.168.2.2/24
192.168.1.1/24
192.168.1.9/24
destination gateway
192.168.0.0/26 direct
192.168.1.0/24 direct
192.168.2.0/24 192.168.0.2
192.168.3.0/24 192.168.0.3
192.168.16.3/32 192.168.0.2
0.0.0.0/0 192.168.0.3
www.glcnetworks.com
Dynamic routing
● Router will talk to each other with routing
protocol (RIP, OSPF, BGP)
● Entries on routing table is created
automatically
● Admin must have a good knowledge about
routing protocol
25
192.168.0.0/26
R1
192.168.0.1/26
192.168.0.3/26
192.168.0.2/26
R3
R2
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
192.168.3.3/24
192.168.3.9/24
192.168.2.9/24
192.168.2.2/24
192.168.1.1/24
192.168.1.9/24
destination gateway
192.168.0.0/26 direct
192.168.1.0/24 direct
192.168.2.0/24 192.168.0.2
192.168.3.0/24 192.168.0.3
192.168.16.3/32 192.168.0.2
0.0.0.0/0 192.168.0.3
www.glcnetworks.com
Autonomous system (AS)
● Is a collection of routers and networks under one administration and apply
single routing policy
● AS is identified by a number (ASN), given by RIR (Regional Internet Registry:
APNIC, ARIN, RIPE, etc)
26
AS1
AS4
AS3
AS2
www.glcnetworks.com
Addressing, IANA, RIR
● Internet is based on IP (internet protocol) addressing scheme -> RFC791
● Addressing has to be unique.
● We need an international body that regulates IP addressing -> IANA (Internet
Assigned Number Authority)
● IANA delegates (some of its authority) to RIR “Regional Internet Registry”
● RIR delegates to country’s
● Every organisation must have IP address block to join the internet and
build a routing scheme among their equipment
27
www.glcnetworks.com
● Currently, routing is done one-way only
● Forwarding process on router is based on destination IP address
● There is no guarantee incoming path is similar to outgoing path
● We can only control outgoing forwarding
Important to note
28
28
R1
192.168.0.1/26
192.168.0.3/26 R3
R2
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24
192.168.3.3/24
192.168.3.9/24
192.168.2.9/24
192.168.2.2/24
192.168.1.1/24
192.168.1.9/24
www.glcnetworks.com
Interior vs exterior routing
29
www.glcnetworks.com
IGP and EGP
● IGP: Interior Gateway Protocols
○ Routing protocol that runs internally within AS
○ Connecting networks within AS
○ Example: RIP, OSPF
● EGP: Exterior Gateway Protocol
○ Routing protocol that runs between AS
○ Connecting an AS to other ASes
○ Example: BGP
30
www.glcnetworks.com
AS1
IGP vs EGP
IGP
● intra-AS routing exchange
● Example: OSPF, RIP
EGP
● inter-AS routing exchange
● Can be used also for intra-AS
● Example: BGP
31
31
AS4
AS3
AS2
www.glcnetworks.com
● Route scope and target scope attributes can be used to resolve nexthop
router.
● Normally nexthops can be resolved only through routes that are on link.
● It is very useful when the gateway is not directly connected
Multiple routing protocol: scope and target scope
32
AS1
R1
AS3
AS2
Indirect
gateway R1
www.glcnetworks.com
How OSPF works
33
www.glcnetworks.com
www.glcnetworks.com
What is OSPF?
• Dynamic routing protocol, link-state, with Dijkstra Algorithm
• Hierarchical routing (using area)
• IGP (interior gateway protocol), all router must have same AS
number
• use protocol number 89
• Used by millions organizations
• Support load balancing
Drawbacks:
• CPU intensive
• More complex (compared to RIP)
34
www.glcnetworks.com
www.glcnetworks.com
Some OSPF terminology
• Neighbor: adjacent router that is running OSPF
• Adjacency: condition where no routing information
exchanged
• Link: refers to network / router interface
• Router-ID: IP address that is used to identify router
• Link-state: status of the link between router
• Cost: the value of each link, depends on bandwidth of
media
35
www.glcnetworks.com
www.glcnetworks.com
Router type on OSPF network?
• Area: collection of networks
• ASBR: AS border router
• ABR: Area border router
• IR: internal router
36
www.glcnetworks.com
www.glcnetworks.com
OSPF cost?
OSPF uses cost to select the best routing entry
CLI: /routing ospf route print
37
www.glcnetworks.com
OSPF tips
● Be careful with DR election
● Stable OSPF
● Make sure parameter is matched on a link
38
www.glcnetworks.com
LIVE practice
39
www.glcnetworks.com
preparation
● SSH client
● SSH parameters
○ SSH address
○ SSH port
○ SSH username
○ SSH password
40
www.glcnetworks.com
Q & A
41
www.glcnetworks.com
Interested? Just come to our training...
● Topics are arranged in systematic and logical way
● You will learn from experienced teacher
● Not only learn the materials, but also sharing experiences, best-practices, and
networking
42
www.glcnetworks.com
End of slides
● Thank you for your attention
● Please submit your feedback: http://bit.ly/glcfeedback
● Find our further event on our website : https://www.glcnetworks.com/en/
● Like our facebook page: https://www.facebook.com/glcnetworks
● Slide: https://www.slideshare.net/glcnetworks/
● Discord (bahasa indonesia): (https://discord.gg/6MZ3KUHHBX)
● Recording (youtube): https://www.youtube.com/c/GLCNetworks
● Stay tune with our schedule
● Any questions?
43

More Related Content

PDF
BGP on mikrotik
PDF
Mikrotik fastpath
PDF
MPLS on Router OS V7 - Part 2
PDF
Mikrotik firewall raw table
PDF
BGP on RouterOS7 -Part 1
PDF
MPLS on Router OS V7 - Part 1
PDF
Mikrotik firewall mangle
PDF
Queue Type on Mikrotik
BGP on mikrotik
Mikrotik fastpath
MPLS on Router OS V7 - Part 2
Mikrotik firewall raw table
BGP on RouterOS7 -Part 1
MPLS on Router OS V7 - Part 1
Mikrotik firewall mangle
Queue Type on Mikrotik

What's hot (20)

PDF
Mikrotik firewall filter
PDF
Mikrotik IP Settings For Performance and Security
PDF
Network LACP/Bonding/Teaming with Mikrotik
PDF
Using Mikrotik Switch Features to Improve Your Network
PDF
ISP load balancing with mikrotik nth
PDF
Mikrotik Bridge Deep Dive
PDF
Policy Based Routing (PBR) on Mikrotik
PDF
Network Monitoring with The Dude and Whatsapp
PDF
Choosing Mikrotik Platform x86 vs chr
PDF
Layer 7 Firewall on Mikrotik
PDF
BGP vs OSPF on Mikrotik
PDF
Mikrotik Load Balancing with PCC
PDF
Mikrotik Fastpath vs Fasttrack
PDF
BGP tuning: Peer with loopback
PDF
ISP Load Balancing with Mikrotik ECMP
PDF
Tunnel vs VPN on Mikrotik
PDF
Deploy MPLS Traffic Engineering
PDF
Stable OSPF: choosing network type.pdf
PDF
Routing fundamentals with mikrotik
PDF
Using mikrotik with radius
Mikrotik firewall filter
Mikrotik IP Settings For Performance and Security
Network LACP/Bonding/Teaming with Mikrotik
Using Mikrotik Switch Features to Improve Your Network
ISP load balancing with mikrotik nth
Mikrotik Bridge Deep Dive
Policy Based Routing (PBR) on Mikrotik
Network Monitoring with The Dude and Whatsapp
Choosing Mikrotik Platform x86 vs chr
Layer 7 Firewall on Mikrotik
BGP vs OSPF on Mikrotik
Mikrotik Load Balancing with PCC
Mikrotik Fastpath vs Fasttrack
BGP tuning: Peer with loopback
ISP Load Balancing with Mikrotik ECMP
Tunnel vs VPN on Mikrotik
Deploy MPLS Traffic Engineering
Stable OSPF: choosing network type.pdf
Routing fundamentals with mikrotik
Using mikrotik with radius
Ad

Similar to OSPF On Router OS7 (20)

PDF
Policy Based Routing with Indirect BGP - Part 1
PDF
Internet Protocol Deep-Dive
PDF
Mikrotik User Meeting Manila: bgp vs ospf
PDF
MTCNA Intro to routerOS
PDF
MTCNA : Intro to RouterOS - Part 1
PDF
Tuning OSPF: Bidirectional Forwarding Detection (BFD)
PDF
Tuning OSPF: Prefix Aggregate
PDF
Tuning OSPF: area hierarchy, LSA, and area type
PDF
Internal BGP tuning: Mesh peering to avoid loop
PDF
BGP Services IP Transit vs IP Peering
PDF
Zabbix for Monitoring
PDF
BGP security tuning: pull-up route
PDF
Steering traffic in OSPF: Interface cost
PDF
BGP troubleshooting: route origin
PDF
Best Current Practice (BCP) 38 Ingress Filtering for Security
PDF
Firewall mangle PBR: steering outbound path similar to inbound
PDF
CCNA : Intro to Cisco IOS - Part 1
PDF
IPv6 with Mikrotik
PDF
Running BGP with Mikrotik
PDF
RouterOS Migration From v6 to v7
Policy Based Routing with Indirect BGP - Part 1
Internet Protocol Deep-Dive
Mikrotik User Meeting Manila: bgp vs ospf
MTCNA Intro to routerOS
MTCNA : Intro to RouterOS - Part 1
Tuning OSPF: Bidirectional Forwarding Detection (BFD)
Tuning OSPF: Prefix Aggregate
Tuning OSPF: area hierarchy, LSA, and area type
Internal BGP tuning: Mesh peering to avoid loop
BGP Services IP Transit vs IP Peering
Zabbix for Monitoring
BGP security tuning: pull-up route
Steering traffic in OSPF: Interface cost
BGP troubleshooting: route origin
Best Current Practice (BCP) 38 Ingress Filtering for Security
Firewall mangle PBR: steering outbound path similar to inbound
CCNA : Intro to Cisco IOS - Part 1
IPv6 with Mikrotik
Running BGP with Mikrotik
RouterOS Migration From v6 to v7
Ad

More from GLC Networks (11)

PDF
Controlling Access Between Devices in the same Layer 2 Segment
PDF
GIT as Mikrotik Configuration Management
PDF
Building a Web Server with NGINX
PDF
EOIP Deep Dive
PDF
Policy Based Routing with Indirect BGP - Part 2
PPTX
Automatic Backup via FTP - Part 2
PDF
Automatic Backup via FTP - Part 1
PDF
Voice Services, From Circuit Switch to VoIP
PDF
BGP on RouterOS7 - Part 2
PDF
OSPF On Router OS7 - Part 2
PDF
Using Zettabyte Filesystem (ZFS)
Controlling Access Between Devices in the same Layer 2 Segment
GIT as Mikrotik Configuration Management
Building a Web Server with NGINX
EOIP Deep Dive
Policy Based Routing with Indirect BGP - Part 2
Automatic Backup via FTP - Part 2
Automatic Backup via FTP - Part 1
Voice Services, From Circuit Switch to VoIP
BGP on RouterOS7 - Part 2
OSPF On Router OS7 - Part 2
Using Zettabyte Filesystem (ZFS)

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Electronic commerce courselecture one. Pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
cuic standard and advanced reporting.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Cloud computing and distributed systems.
PDF
Empathic Computing: Creating Shared Understanding
PDF
MIND Revenue Release Quarter 2 2025 Press Release
Spectroscopy.pptx food analysis technology
Encapsulation_ Review paper, used for researhc scholars
Electronic commerce courselecture one. Pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Programs and apps: productivity, graphics, security and other tools
cuic standard and advanced reporting.pdf
Understanding_Digital_Forensics_Presentation.pptx
Unlocking AI with Model Context Protocol (MCP)
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Cloud computing and distributed systems.
Empathic Computing: Creating Shared Understanding
MIND Revenue Release Quarter 2 2025 Press Release

OSPF On Router OS7

  • 1. www.glcnetworks.com OSPF on RouterOS 7 GLC Webinar, 11 Jan 2022 Achmad Mardiansyah M. Taufik nurhuda 1
  • 2. www.glcnetworks.com Agenda ● Introduction ● Review prerequisite knowledge ● OSPF ● OSPF on ROS7 ● Live practice ● Q & A 2
  • 4. www.glcnetworks.com What is GLC? ● Garda Lintas Cakrawala (www.glcnetworks.com) ● Based in Bandung, Indonesia ● Areas: Training, IT Consulting ● Certified partner for: Mikrotik, Ubiquity, Linux foundation ● Product: GLC radius manager ● Regular event 4
  • 5. www.glcnetworks.com Trainer Introduction ● Name: Achmad Mardiansyah ● Base: bandung, Indonesia ● Linux user since 1999, mikrotik user since 2007, UBNT 2011 ● Mikrotik Certified Trainer (MTCNA/RE/WE/UME/INE/TCE/IPv6) ● Mikrotik/Linux Certified Consultant ● Website contributor: achmadjournal.com, mikrotik.tips, asysadmin.tips ● More info: http://au.linkedin.com/in/achmadmardiansyah 5
  • 6. www.glcnetworks.com Past experience 6 ● 2021 (PNG, Malaysia): network support, radius/billing integration ● 2020 (Congo DRC, Malaysia): IOT integration, network automation ● 2019, Congo (DRC): build a wireless ISP from ground-up ● 2018, Malaysia: network revamp, develop billing solution and integration, setup dynamic routing ● 2017, Libya (north africa): remote wireless migration for a new Wireless ISP ● 2016, United Kingdom: workshop for wireless ISP, migrating a bridged to routed network
  • 7. www.glcnetworks.com About GLC webinar? ● First webinar: january 1, 2010 (title: tahun baru bersama solaris - new year with solaris OS) ● As a sharing event with various topics: linux, networking, wireless, database, programming, etc ● Regular schedule ● Irregular schedule: as needed ● Checking schedule: http://www.glcnetworks.com/schedule ● You are invited to be a presenter ○ No need to be an expert ○ This is a forum for sharing: knowledge, experiences, information 7
  • 8. www.glcnetworks.com Please introduce yourself ● Your name ● Your company/university? ● Your networking experience? ● Your mikrotik experience? ● Your expectation from this course? 8
  • 9. www.glcnetworks.com Prerequisite ● This presentation requires some prerequisite knowledge ● We assume you already know: ○ Computer networking ○ Mikrotik administration 9
  • 11. www.glcnetworks.com Layer 2 vs Layer 3 addressing 11 Layer 2 Layer 3 ● Burned-in address ● Adjacent communication ● Consist of 48 bit binary, written in HEX format. 1 HEX = 4 bit ● Unique for every physical port ● 6 first HEX digit -> represent the manufacturer ● Logical address ● End-to-end communication ● IPv4 32 bit long ● 2 versions: IPv4 (our focus) and IPv6 ● Consist of network part & host part ● Can be class based IP address (without subnet) ● Now it is classless IP address -> VLSM (variable length subnet mask) ● CIDR (classless inter domain routing)
  • 12. www.glcnetworks.com IP spec (RFC 791) ● Defined long time ago (what 1981?) ● Defines how the IP header looks like ● Still used up to know ● New version -> IPv6 12
  • 13. www.glcnetworks.com How the layer 3 address look like? ● IPv4 address is 32 bit long ● Written in binary -> always think in binary ● Displayed to human in decimal every 8 bit (octet). ● Has 2 parts: network part and host part ● Like a phone number 0812 XXXXXXXX -> hierarchical ● All devices in the network will have same network part ● First and last address cannot be used (for network id and broadcast id) 13 Network part host part
  • 14. www.glcnetworks.com VLSM RFC ● Variable-Length Subnet Masking (VLSM) ● Can divide an IP address block into subnets of different sizes using / (slash) notation ● Solution the in efficient of classful IP address (fixed length). No more class A, B, C ● RFC: 1878 (1895) ● Basis for CIDR ● Example: 23.45.0.0/17 ○ 23.45.0.0/25 ○ 23.45.0.128/25 14
  • 15. www.glcnetworks.com CIDR RFC ● CIDR: Classless Inter-Domain Routing ● Provides a new and more flexible way to specify network addresses in routers (using slash as notation) ● allow flexible allocation of Internet Protocol (IP) addresses. ● CIDR lets a routing table entry represent an aggregation of networks that exist in the forward path ● Each IP address has a network prefix that identifies their network ● RFC: 1519 15
  • 16. www.glcnetworks.com Router and Routing ● Router is a network device that is used to forward packets, based on layer 3 information (layer 3 header) ● Routing is the process of selecting a path for traffic in a network, or between or across multiple networks 16 Physical router Router icon
  • 17. www.glcnetworks.com Typical connection (physical) 17 R2 R1 R3 ● Router connects layer 2 segments ● Router works on layer 3 ● Meaning, each layer 2 segment has network ID
  • 18. www.glcnetworks.com Typical connection (logical) and routing table Routing table: ● A table at router that is used to forward packet ● Available on every devices (router and host) ● Entry is executed sequentially 18 192.168.0.0/26 R1 192.168.0.1/26 192.168.0.3/26 192.168.0.2/26 R3 R2 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 192.168.3.3/24 192.168.3.9/24 192.168.2.9/24 192.168.2.2/24 192.168.1.1/24 192.168.1.9/24 destination gateway 192.168.0.0/26 direct 192.168.1.0/24 direct 192.168.2.0/24 192.168.0.2 192.168.3.0/24 192.168.0.3 192.168.16.3/32 192.168.0.2 0.0.0.0/0 (default gw) 192.168.0.3
  • 19. www.glcnetworks.com Forwarding packets using routing table ● It works like a firewall: match and action ● When a packet arrived, routing table is used to forward packets ● You should think in binary to understand how it works 19 destination gateway 192.168.16.3/32 11000000 10101000 00001000 00000011 192.168.0.2 192.168.0.0/26 11000000 10101000 00000000 00 direct 192.168.1.0/24 11000000 10101000 00000001 direct 192.168.2.0/24 11000000 10101000 00000010 192.168.0.2 192.168.3.0/24 11000000 10101000 00000011 192.168.0.3 0.0.0.0/0 (no match) 192.168.0.3
  • 20. www.glcnetworks.com A packet arrived at R1… (example) Destination IP address of the packet is 192.168.2.6, which gateway do we use? A: 192.168.2.6 = (11000000 10101000 00000010 00000110) 20 destination gateway 192.168.16.3/32 11000000 10101000 00001000 00000011 192.168.0.2 192.168.0.0/26 11000000 10101000 00000000 00 direct 192.168.1.0/24 11000000 10101000 00000001 direct 192.168.2.0/24 11000000 10101000 00000010 192.168.0.2 192.168.3.0/24 11000000 10101000 00000011 192.168.0.3 0.0.0.0/0 192.168.0.3
  • 22. www.glcnetworks.com Administrative distance (analogy) 22 22 CITY 1 100 km CITY 2 120 km CITY 2 90 km CITY 3 500 km CITY 4 250 km 10.10.10.0/24 192.168.0.1 10 10.10.20.0/24 192.168.0.2 12 10.10.20.0/24 192.168.0.3 9 10.10.30.0/24 192.168.0.3 50 10.10.40.0/24 192.168.0.4 25
  • 23. www.glcnetworks.com Administrative distance ● Distance is considered when prefix length is same ● Lowest distance wins ● Administrative distance policy is depends on vendor ● Table on the right shows an example of administrative distance on cisco router 23
  • 24. www.glcnetworks.com Static routing ● Entries on routing table is created manually ● Admin must manage routing table in all routers ● Admin have full control 24 192.168.0.0/26 R1 192.168.0.1/26 192.168.0.3/26 192.168.0.2/26 R3 R2 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 192.168.3.3/24 192.168.3.9/24 192.168.2.9/24 192.168.2.2/24 192.168.1.1/24 192.168.1.9/24 destination gateway 192.168.0.0/26 direct 192.168.1.0/24 direct 192.168.2.0/24 192.168.0.2 192.168.3.0/24 192.168.0.3 192.168.16.3/32 192.168.0.2 0.0.0.0/0 192.168.0.3
  • 25. www.glcnetworks.com Dynamic routing ● Router will talk to each other with routing protocol (RIP, OSPF, BGP) ● Entries on routing table is created automatically ● Admin must have a good knowledge about routing protocol 25 192.168.0.0/26 R1 192.168.0.1/26 192.168.0.3/26 192.168.0.2/26 R3 R2 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 192.168.3.3/24 192.168.3.9/24 192.168.2.9/24 192.168.2.2/24 192.168.1.1/24 192.168.1.9/24 destination gateway 192.168.0.0/26 direct 192.168.1.0/24 direct 192.168.2.0/24 192.168.0.2 192.168.3.0/24 192.168.0.3 192.168.16.3/32 192.168.0.2 0.0.0.0/0 192.168.0.3
  • 26. www.glcnetworks.com Autonomous system (AS) ● Is a collection of routers and networks under one administration and apply single routing policy ● AS is identified by a number (ASN), given by RIR (Regional Internet Registry: APNIC, ARIN, RIPE, etc) 26 AS1 AS4 AS3 AS2
  • 27. www.glcnetworks.com Addressing, IANA, RIR ● Internet is based on IP (internet protocol) addressing scheme -> RFC791 ● Addressing has to be unique. ● We need an international body that regulates IP addressing -> IANA (Internet Assigned Number Authority) ● IANA delegates (some of its authority) to RIR “Regional Internet Registry” ● RIR delegates to country’s ● Every organisation must have IP address block to join the internet and build a routing scheme among their equipment 27
  • 28. www.glcnetworks.com ● Currently, routing is done one-way only ● Forwarding process on router is based on destination IP address ● There is no guarantee incoming path is similar to outgoing path ● We can only control outgoing forwarding Important to note 28 28 R1 192.168.0.1/26 192.168.0.3/26 R3 R2 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 192.168.3.3/24 192.168.3.9/24 192.168.2.9/24 192.168.2.2/24 192.168.1.1/24 192.168.1.9/24
  • 30. www.glcnetworks.com IGP and EGP ● IGP: Interior Gateway Protocols ○ Routing protocol that runs internally within AS ○ Connecting networks within AS ○ Example: RIP, OSPF ● EGP: Exterior Gateway Protocol ○ Routing protocol that runs between AS ○ Connecting an AS to other ASes ○ Example: BGP 30
  • 31. www.glcnetworks.com AS1 IGP vs EGP IGP ● intra-AS routing exchange ● Example: OSPF, RIP EGP ● inter-AS routing exchange ● Can be used also for intra-AS ● Example: BGP 31 31 AS4 AS3 AS2
  • 32. www.glcnetworks.com ● Route scope and target scope attributes can be used to resolve nexthop router. ● Normally nexthops can be resolved only through routes that are on link. ● It is very useful when the gateway is not directly connected Multiple routing protocol: scope and target scope 32 AS1 R1 AS3 AS2 Indirect gateway R1
  • 34. www.glcnetworks.com www.glcnetworks.com What is OSPF? • Dynamic routing protocol, link-state, with Dijkstra Algorithm • Hierarchical routing (using area) • IGP (interior gateway protocol), all router must have same AS number • use protocol number 89 • Used by millions organizations • Support load balancing Drawbacks: • CPU intensive • More complex (compared to RIP) 34
  • 35. www.glcnetworks.com www.glcnetworks.com Some OSPF terminology • Neighbor: adjacent router that is running OSPF • Adjacency: condition where no routing information exchanged • Link: refers to network / router interface • Router-ID: IP address that is used to identify router • Link-state: status of the link between router • Cost: the value of each link, depends on bandwidth of media 35
  • 36. www.glcnetworks.com www.glcnetworks.com Router type on OSPF network? • Area: collection of networks • ASBR: AS border router • ABR: Area border router • IR: internal router 36
  • 37. www.glcnetworks.com www.glcnetworks.com OSPF cost? OSPF uses cost to select the best routing entry CLI: /routing ospf route print 37
  • 38. www.glcnetworks.com OSPF tips ● Be careful with DR election ● Stable OSPF ● Make sure parameter is matched on a link 38
  • 40. www.glcnetworks.com preparation ● SSH client ● SSH parameters ○ SSH address ○ SSH port ○ SSH username ○ SSH password 40
  • 42. www.glcnetworks.com Interested? Just come to our training... ● Topics are arranged in systematic and logical way ● You will learn from experienced teacher ● Not only learn the materials, but also sharing experiences, best-practices, and networking 42
  • 43. www.glcnetworks.com End of slides ● Thank you for your attention ● Please submit your feedback: http://bit.ly/glcfeedback ● Find our further event on our website : https://www.glcnetworks.com/en/ ● Like our facebook page: https://www.facebook.com/glcnetworks ● Slide: https://www.slideshare.net/glcnetworks/ ● Discord (bahasa indonesia): (https://discord.gg/6MZ3KUHHBX) ● Recording (youtube): https://www.youtube.com/c/GLCNetworks ● Stay tune with our schedule ● Any questions? 43