SlideShare a Scribd company logo
1 of 22
Download to read offline
using routing domains / routing tables in a production
network
Peter Hessler
phessler@openbsd.org
OpenBSD
27 September, 2014
rtable vs rdomain
rtable
alternate routing table, usable with the same interfaces
ip addresses cannot overlap
multiple rtables can belong to a single rdomain
can be used for Policy Based Routing
rtable vs rdomain
rdomain
completely independent routing table instance
assign 10.0.0.1/16 a dozen times
interfaces can be assigned to only one rdomain at a time
how we ’know’ which one incoming packets should use
rdomains always contain at least one rtable
rdomains
first added in OpenBSD 4.9, released October 2009
initially was IPv4 only
IPv6 support added in OpenBSD 5.5, released May 2014
vrf-lite vs full vrf
vrf-lite
multiple routing tables
done by hand
very common in smaller enterprises
only needs a single system
...where most of my experience comes from
vrf
vrf-lite vs full vrf
vrf-lite
vrf
also known as ’mpls’
requires bgp, ldpd and large networks
most frequently used to connect multiple sites in a single network
caveats
default routes for all the domains!
seriously
the ’do we have a valid route’ check happens *before* pf
very common mistake
debugging can be painful
which route will be used?
but, how do we send (some) traffic to a different rdomain?
Simple setup
$ ifconfig re0 rdomain 1
$ ifconfig re0 10.0.0.10/16
$ ifconfig lo1 rdomain 1
$ ifconfig lo1 127.0.0.1/8
$ route -T 1 add default 10.0.0.1
$ route -T 1 exec /usr/sbin/sshd
Simple setup
$ ifconfig em0
em0: flags=28843<UP,BROADCAST,...> rdomain 1 mtu 1500
lladdr 28:d2:44:ac:5d:59
priority: 0
media: Ethernet autoselect (none)
status: no carrier
inet 10.0.0.1 netmask 0xffff0000 broadcast 10.0.255.255
$ ifconfig lo1
lo1: flags=28049<UP,LOOPBACK,...> rdomain 1 mtu 32768
priority: 0
groups: lo
inet 127.0.0.1 netmask 0xff000000
Simple setup
$ netstat -T1 -rnf inet
Routing tables
Internet:
Destination Gateway Flags ~ Prio Iface
default 10.0.0.1 GS ~ 8 em0
10.0/16 link#1 C ~ 4 em0
10.0.0.1 28:d2:44:ac:5d:59 HLl ~ 1 lo0
10.0.255.255 link#1 HLb ~ 1 em0
127.0.0.1 127.0.0.1 UH ~ 4 lo1
Simple setup
pf.conf:
anchor "cust1.example.com" on rdomain 15 {
block
pass proto icmp
pass proto tcp from any to any port 80
}
pass in on rdomain 2 rtable 4
pass out from 10.0.0.0/16 to any nat-to (egress) rtable 20
shared infrastructure (vrf-lite)
very common
just a management network
two rdomains, one pipe
backup servers
monitoring
etc
full vrf
ldpd
label distribution protocol daemon
distributes mpls label mappings
bgpd
distibute our networks over the mpls ”tunnel”
production: discovering pitfalls
route -T 1 exec
adding rdomain to an interface
ftp-proxy
source and destination rdomains matter
ntpd
on rdomain
production: discovering pitfalls
route -T 1 exec
originally for testing and hacking, turned out to be very useful
recommended method to start a daemon in a second rdomain
...except a few network tools and a limited number of daemons
adding rdomain to an interface
ftp-proxy
source and destination rdomains matter
ntpd
on rdomain
production: discovering pitfalls
route -T 1 exec
adding rdomain to an interface
erases IP address config
vlan vs parent interface
carp
ftp-proxy
source and destination rdomains matter
ntpd
on rdomain
production: discovering pitfalls
route -T 1 exec
adding rdomain to an interface
ftp-proxy
sometimes, you simply want to ftp from *and* to different rdomains
source and destination rdomains matter
ntpd
on rdomain
production: discovering pitfalls
route -T 1 exec
adding rdomain to an interface
ftp-proxy
source and destination rdomains matter
ntpd
normal solution to needing services in a second rdomain? run the
daemon again
running a second ntpd to provide time? Holy clock-skew Batman!
on rdomain
production: discovering pitfalls
route -T 1 exec
adding rdomain to an interface
ftp-proxy
source and destination rdomains matter
ntpd
on rdomain
you want to match packets traveling on an rdomain
best practices
default routes for all the things
as i said, real common mistake
pf.conf tricks
spend extra time in the planning stages
very special thanks
henning@ for adding the multiple routing table support
claudio@ writing the code and for putting up with all of my asinine
questions when we first tested
reyk@ for lots of work in bringing this into the tree and funding this
via his (former) company
Questions?

More Related Content

What's hot

Network configuration
Network configurationNetwork configuration
Network configurationengshemachi
 
Arp Dan Ipconfig Syntax
Arp Dan Ipconfig  SyntaxArp Dan Ipconfig  Syntax
Arp Dan Ipconfig Syntaxguestcc37e8c
 
บทที่ 2 โพรโตคอล (protocol)
บทที่  2 โพรโตคอล (protocol)บทที่  2 โพรโตคอล (protocol)
บทที่ 2 โพรโตคอล (protocol)chrisman77
 
Linux networking commands
Linux networking commandsLinux networking commands
Linux networking commandsSayed Ahmed
 
Juniper JNCIA – Juniper RIP and OSPF Route Configuration
Juniper JNCIA – Juniper RIP and OSPF Route ConfigurationJuniper JNCIA – Juniper RIP and OSPF Route Configuration
Juniper JNCIA – Juniper RIP and OSPF Route ConfigurationHamed Moghaddam
 
Linux internet server security and configuration tutorial
Linux internet server security and configuration tutorialLinux internet server security and configuration tutorial
Linux internet server security and configuration tutorialannik147
 
Tonehammer Requiem Professional [KONTAKT] .rar
Tonehammer Requiem Professional [KONTAKT] .rarTonehammer Requiem Professional [KONTAKT] .rar
Tonehammer Requiem Professional [KONTAKT] .rarDeborahPadilla1
 
import rdma: zero-copy networking with RDMA and Python
import rdma: zero-copy networking with RDMA and Pythonimport rdma: zero-copy networking with RDMA and Python
import rdma: zero-copy networking with RDMA and Pythongroveronline
 
Juniper JNCIA – Juniper OSPF Route Configuration
Juniper JNCIA – Juniper OSPF Route ConfigurationJuniper JNCIA – Juniper OSPF Route Configuration
Juniper JNCIA – Juniper OSPF Route ConfigurationHamed Moghaddam
 
101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processes101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processesAcácio Oliveira
 
Configuration of Smtp Server On CentOS 8
Configuration of Smtp Server On CentOS 8Configuration of Smtp Server On CentOS 8
Configuration of Smtp Server On CentOS 8Kaan Aslandağ
 
Kernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uringKernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uringAnne Nicolas
 
Writing and using php streams and sockets
Writing and using php streams and socketsWriting and using php streams and sockets
Writing and using php streams and socketsElizabeth Smith
 
Razor: provision like a boss (Build-a-cloud edition)
Razor: provision like a  boss (Build-a-cloud edition)Razor: provision like a  boss (Build-a-cloud edition)
Razor: provision like a boss (Build-a-cloud edition)lutter
 

What's hot (20)

6.Routing
6.Routing6.Routing
6.Routing
 
Network configuration
Network configurationNetwork configuration
Network configuration
 
Arp Dan Ipconfig Syntax
Arp Dan Ipconfig  SyntaxArp Dan Ipconfig  Syntax
Arp Dan Ipconfig Syntax
 
บทที่ 2 โพรโตคอล (protocol)
บทที่  2 โพรโตคอล (protocol)บทที่  2 โพรโตคอล (protocol)
บทที่ 2 โพรโตคอล (protocol)
 
Linux networking commands
Linux networking commandsLinux networking commands
Linux networking commands
 
Juniper JNCIA – Juniper RIP and OSPF Route Configuration
Juniper JNCIA – Juniper RIP and OSPF Route ConfigurationJuniper JNCIA – Juniper RIP and OSPF Route Configuration
Juniper JNCIA – Juniper RIP and OSPF Route Configuration
 
Linux network configuration
Linux network configurationLinux network configuration
Linux network configuration
 
Linux internet server security and configuration tutorial
Linux internet server security and configuration tutorialLinux internet server security and configuration tutorial
Linux internet server security and configuration tutorial
 
Tonehammer Requiem Professional [KONTAKT] .rar
Tonehammer Requiem Professional [KONTAKT] .rarTonehammer Requiem Professional [KONTAKT] .rar
Tonehammer Requiem Professional [KONTAKT] .rar
 
import rdma: zero-copy networking with RDMA and Python
import rdma: zero-copy networking with RDMA and Pythonimport rdma: zero-copy networking with RDMA and Python
import rdma: zero-copy networking with RDMA and Python
 
Juniper JNCIA – Juniper OSPF Route Configuration
Juniper JNCIA – Juniper OSPF Route ConfigurationJuniper JNCIA – Juniper OSPF Route Configuration
Juniper JNCIA – Juniper OSPF Route Configuration
 
101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processes101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processes
 
DNS SERVER
DNS SERVERDNS SERVER
DNS SERVER
 
Slim Server Practical
Slim Server PracticalSlim Server Practical
Slim Server Practical
 
Configuration of Smtp Server On CentOS 8
Configuration of Smtp Server On CentOS 8Configuration of Smtp Server On CentOS 8
Configuration of Smtp Server On CentOS 8
 
Sup intro
Sup introSup intro
Sup intro
 
Kernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uringKernel Recipes 2019 - Faster IO through io_uring
Kernel Recipes 2019 - Faster IO through io_uring
 
Writing and using php streams and sockets
Writing and using php streams and socketsWriting and using php streams and sockets
Writing and using php streams and sockets
 
Razor: provision like a boss (Build-a-cloud edition)
Razor: provision like a  boss (Build-a-cloud edition)Razor: provision like a  boss (Build-a-cloud edition)
Razor: provision like a boss (Build-a-cloud edition)
 
11
1111
11
 

Similar to Using routing domains / routing tables in a production network by Peter Hessler

Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking ExplainedThomas Graf
 
Linux Network commands
Linux Network commandsLinux Network commands
Linux Network commandsHanan Nmr
 
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...Maximilan Wilhelm
 
Tutorial of SF-TAP Flow Abstractor
Tutorial of SF-TAP Flow AbstractorTutorial of SF-TAP Flow Abstractor
Tutorial of SF-TAP Flow AbstractorYuuki Takano
 
Puppet Camp Boston 2014: Network Automation with Puppet and Arista (Beginner)
Puppet Camp Boston 2014: Network Automation with Puppet and Arista (Beginner) Puppet Camp Boston 2014: Network Automation with Puppet and Arista (Beginner)
Puppet Camp Boston 2014: Network Automation with Puppet and Arista (Beginner) Puppet
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksLaurent Bernaille
 
CSS L17 - DOS COMMANDS IN COMPUTER NETWORKING
CSS L17 - DOS COMMANDS IN COMPUTER NETWORKINGCSS L17 - DOS COMMANDS IN COMPUTER NETWORKING
CSS L17 - DOS COMMANDS IN COMPUTER NETWORKINGMarvin Bronoso
 
FreeBSD, ipfw and OpenVPN 2.1 server
FreeBSD, ipfw and OpenVPN 2.1 serverFreeBSD, ipfw and OpenVPN 2.1 server
FreeBSD, ipfw and OpenVPN 2.1 serverTomaz Muraus
 
[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network TroubleshootingOpen Source Consulting
 
Npppd: easy vpn with OpenBSD
Npppd: easy vpn with OpenBSDNpppd: easy vpn with OpenBSD
Npppd: easy vpn with OpenBSDGiovanni Bechis
 
Visual Log Analysis - DefCon 2006
Visual Log Analysis - DefCon 2006Visual Log Analysis - DefCon 2006
Visual Log Analysis - DefCon 2006Raffael Marty
 
RIP (routing information protocol)
RIP (routing information protocol)RIP (routing information protocol)
RIP (routing information protocol)Netwax Lab
 

Similar to Using routing domains / routing tables in a production network by Peter Hessler (20)

Cisco ios-cont
Cisco ios-contCisco ios-cont
Cisco ios-cont
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
Linux Network commands
Linux Network commandsLinux Network commands
Linux Network commands
 
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...
Fun with PRB, VRFs and NetNS on Linux - What is it, how does it work, what ca...
 
Tutorial of SF-TAP Flow Abstractor
Tutorial of SF-TAP Flow AbstractorTutorial of SF-TAP Flow Abstractor
Tutorial of SF-TAP Flow Abstractor
 
Services
ServicesServices
Services
 
Puppet Camp Boston 2014: Network Automation with Puppet and Arista (Beginner)
Puppet Camp Boston 2014: Network Automation with Puppet and Arista (Beginner) Puppet Camp Boston 2014: Network Automation with Puppet and Arista (Beginner)
Puppet Camp Boston 2014: Network Automation with Puppet and Arista (Beginner)
 
Deeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay NetworksDeeper dive in Docker Overlay Networks
Deeper dive in Docker Overlay Networks
 
Using linux as_a_router
Using linux as_a_routerUsing linux as_a_router
Using linux as_a_router
 
CSS L17 - DOS COMMANDS IN COMPUTER NETWORKING
CSS L17 - DOS COMMANDS IN COMPUTER NETWORKINGCSS L17 - DOS COMMANDS IN COMPUTER NETWORKING
CSS L17 - DOS COMMANDS IN COMPUTER NETWORKING
 
CN 1.docx
CN 1.docxCN 1.docx
CN 1.docx
 
Open Source Debugging v1.3.2
Open Source Debugging v1.3.2Open Source Debugging v1.3.2
Open Source Debugging v1.3.2
 
FreeBSD, ipfw and OpenVPN 2.1 server
FreeBSD, ipfw and OpenVPN 2.1 serverFreeBSD, ipfw and OpenVPN 2.1 server
FreeBSD, ipfw and OpenVPN 2.1 server
 
nwlab-ex1.pdf
nwlab-ex1.pdfnwlab-ex1.pdf
nwlab-ex1.pdf
 
Ltsp talk
Ltsp talkLtsp talk
Ltsp talk
 
[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting[오픈소스컨설팅] Linux Network Troubleshooting
[오픈소스컨설팅] Linux Network Troubleshooting
 
Mpls basic
Mpls basicMpls basic
Mpls basic
 
Npppd: easy vpn with OpenBSD
Npppd: easy vpn with OpenBSDNpppd: easy vpn with OpenBSD
Npppd: easy vpn with OpenBSD
 
Visual Log Analysis - DefCon 2006
Visual Log Analysis - DefCon 2006Visual Log Analysis - DefCon 2006
Visual Log Analysis - DefCon 2006
 
RIP (routing information protocol)
RIP (routing information protocol)RIP (routing information protocol)
RIP (routing information protocol)
 

More from eurobsdcon

EuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program FrontEuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program Fronteurobsdcon
 
EuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & FridayEuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & Fridayeurobsdcon
 
EuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia WelcomeEuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia Welcomeeurobsdcon
 
EuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talkEuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talkeurobsdcon
 
Submitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas ChobanovSubmitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas Chobanoveurobsdcon
 
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois TigeotPorting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeoteurobsdcon
 
University of Oslo's TSD service - storing sensitive & restricted data by D...
  University of Oslo's TSD service - storing sensitive & restricted data by D...  University of Oslo's TSD service - storing sensitive & restricted data by D...
University of Oslo's TSD service - storing sensitive & restricted data by D...eurobsdcon
 
secure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenthersecure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenthereurobsdcon
 
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbelleurobsdcon
 
The LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed MasteThe LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed Masteeurobsdcon
 
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao UebayashiPorting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashieurobsdcon
 
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander NasonovMultiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonoveurobsdcon
 
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał DubielOpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał Dubieleurobsdcon
 
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann SionneauPorting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneaueurobsdcon
 
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...eurobsdcon
 
Bugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps DzonsonsBugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps Dzonsonseurobsdcon
 
Cross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste DaroussinCross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste Daroussineurobsdcon
 
Building packages through emulation by Sean Bruno
Building packages through emulation by Sean BrunoBuilding packages through emulation by Sean Bruno
Building packages through emulation by Sean Brunoeurobsdcon
 
Making OpenBSD Useful on the Octeon Network Gear by Paul Irofti
Making OpenBSD Useful on the Octeon Network Gear by Paul IroftiMaking OpenBSD Useful on the Octeon Network Gear by Paul Irofti
Making OpenBSD Useful on the Octeon Network Gear by Paul Iroftieurobsdcon
 
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. TanenbaumA Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaumeurobsdcon
 

More from eurobsdcon (20)

EuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program FrontEuroBSDCon 2014 Program Front
EuroBSDCon 2014 Program Front
 
EuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & FridayEuroBSDCon 2014 tutorials program Thursday & Friday
EuroBSDCon 2014 tutorials program Thursday & Friday
 
EuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia WelcomeEuroBSDCon 2014 Sofia Welcome
EuroBSDCon 2014 Sofia Welcome
 
EuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talkEuroBSDCon 2014 Sofia Closing talk
EuroBSDCon 2014 Sofia Closing talk
 
Submitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas ChobanovSubmitting documents anonymously by Atanas Chobanov
Submitting documents anonymously by Atanas Chobanov
 
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois TigeotPorting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
Porting the drm/kms graphic drivers to DragonFlyBSD by Francois Tigeot
 
University of Oslo's TSD service - storing sensitive & restricted data by D...
  University of Oslo's TSD service - storing sensitive & restricted data by D...  University of Oslo's TSD service - storing sensitive & restricted data by D...
University of Oslo's TSD service - storing sensitive & restricted data by D...
 
secure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenthersecure lazy binding, and the 64bit time_t development process by Philip Guenther
secure lazy binding, and the 64bit time_t development process by Philip Guenther
 
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell  The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
The entropic principle: /dev/u?random and NetBSD by Taylor R Campbell
 
The LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed MasteThe LLDB Debugger in FreeBSD by Ed Maste
The LLDB Debugger in FreeBSD by Ed Maste
 
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao UebayashiPorting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
Porting Valgrind to NetBSD and OpenBSD by Masao Uebayashi
 
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander NasonovMultiplatform JIT Code Generator for NetBSD by Alexander Nasonov
Multiplatform JIT Code Generator for NetBSD by Alexander Nasonov
 
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał DubielOpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
 
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann SionneauPorting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
Porting NetBSD to the LatticeMico32 open source CPU by Yann Sionneau
 
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
 
Bugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps DzonsonsBugs Ex Ante by Kristaps Dzonsons
Bugs Ex Ante by Kristaps Dzonsons
 
Cross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste DaroussinCross Building the FreeBSD ports tree by Baptiste Daroussin
Cross Building the FreeBSD ports tree by Baptiste Daroussin
 
Building packages through emulation by Sean Bruno
Building packages through emulation by Sean BrunoBuilding packages through emulation by Sean Bruno
Building packages through emulation by Sean Bruno
 
Making OpenBSD Useful on the Octeon Network Gear by Paul Irofti
Making OpenBSD Useful on the Octeon Network Gear by Paul IroftiMaking OpenBSD Useful on the Octeon Network Gear by Paul Irofti
Making OpenBSD Useful on the Octeon Network Gear by Paul Irofti
 
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. TanenbaumA Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
A Reimplementation of NetBSD Based on a Microkernel by Andrew S. Tanenbaum
 

Recently uploaded

Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Using routing domains / routing tables in a production network by Peter Hessler

  • 1. using routing domains / routing tables in a production network Peter Hessler phessler@openbsd.org OpenBSD 27 September, 2014
  • 2. rtable vs rdomain rtable alternate routing table, usable with the same interfaces ip addresses cannot overlap multiple rtables can belong to a single rdomain can be used for Policy Based Routing
  • 3. rtable vs rdomain rdomain completely independent routing table instance assign 10.0.0.1/16 a dozen times interfaces can be assigned to only one rdomain at a time how we ’know’ which one incoming packets should use rdomains always contain at least one rtable
  • 4. rdomains first added in OpenBSD 4.9, released October 2009 initially was IPv4 only IPv6 support added in OpenBSD 5.5, released May 2014
  • 5. vrf-lite vs full vrf vrf-lite multiple routing tables done by hand very common in smaller enterprises only needs a single system ...where most of my experience comes from vrf
  • 6. vrf-lite vs full vrf vrf-lite vrf also known as ’mpls’ requires bgp, ldpd and large networks most frequently used to connect multiple sites in a single network
  • 7. caveats default routes for all the domains! seriously the ’do we have a valid route’ check happens *before* pf very common mistake debugging can be painful which route will be used? but, how do we send (some) traffic to a different rdomain?
  • 8. Simple setup $ ifconfig re0 rdomain 1 $ ifconfig re0 10.0.0.10/16 $ ifconfig lo1 rdomain 1 $ ifconfig lo1 127.0.0.1/8 $ route -T 1 add default 10.0.0.1 $ route -T 1 exec /usr/sbin/sshd
  • 9. Simple setup $ ifconfig em0 em0: flags=28843<UP,BROADCAST,...> rdomain 1 mtu 1500 lladdr 28:d2:44:ac:5d:59 priority: 0 media: Ethernet autoselect (none) status: no carrier inet 10.0.0.1 netmask 0xffff0000 broadcast 10.0.255.255 $ ifconfig lo1 lo1: flags=28049<UP,LOOPBACK,...> rdomain 1 mtu 32768 priority: 0 groups: lo inet 127.0.0.1 netmask 0xff000000
  • 10. Simple setup $ netstat -T1 -rnf inet Routing tables Internet: Destination Gateway Flags ~ Prio Iface default 10.0.0.1 GS ~ 8 em0 10.0/16 link#1 C ~ 4 em0 10.0.0.1 28:d2:44:ac:5d:59 HLl ~ 1 lo0 10.0.255.255 link#1 HLb ~ 1 em0 127.0.0.1 127.0.0.1 UH ~ 4 lo1
  • 11. Simple setup pf.conf: anchor "cust1.example.com" on rdomain 15 { block pass proto icmp pass proto tcp from any to any port 80 } pass in on rdomain 2 rtable 4 pass out from 10.0.0.0/16 to any nat-to (egress) rtable 20
  • 12. shared infrastructure (vrf-lite) very common just a management network two rdomains, one pipe backup servers monitoring etc
  • 13. full vrf ldpd label distribution protocol daemon distributes mpls label mappings bgpd distibute our networks over the mpls ”tunnel”
  • 14. production: discovering pitfalls route -T 1 exec adding rdomain to an interface ftp-proxy source and destination rdomains matter ntpd on rdomain
  • 15. production: discovering pitfalls route -T 1 exec originally for testing and hacking, turned out to be very useful recommended method to start a daemon in a second rdomain ...except a few network tools and a limited number of daemons adding rdomain to an interface ftp-proxy source and destination rdomains matter ntpd on rdomain
  • 16. production: discovering pitfalls route -T 1 exec adding rdomain to an interface erases IP address config vlan vs parent interface carp ftp-proxy source and destination rdomains matter ntpd on rdomain
  • 17. production: discovering pitfalls route -T 1 exec adding rdomain to an interface ftp-proxy sometimes, you simply want to ftp from *and* to different rdomains source and destination rdomains matter ntpd on rdomain
  • 18. production: discovering pitfalls route -T 1 exec adding rdomain to an interface ftp-proxy source and destination rdomains matter ntpd normal solution to needing services in a second rdomain? run the daemon again running a second ntpd to provide time? Holy clock-skew Batman! on rdomain
  • 19. production: discovering pitfalls route -T 1 exec adding rdomain to an interface ftp-proxy source and destination rdomains matter ntpd on rdomain you want to match packets traveling on an rdomain
  • 20. best practices default routes for all the things as i said, real common mistake pf.conf tricks spend extra time in the planning stages
  • 21. very special thanks henning@ for adding the multiple routing table support claudio@ writing the code and for putting up with all of my asinine questions when we first tested reyk@ for lots of work in bringing this into the tree and funding this via his (former) company