SlideShare a Scribd company logo
IP Routing in Linux
Name:-cyz
Class:-TYIF
Roll no.:-3415
Agenda
•Routing in Linux
IP Forwarding
Routing Cache
Routing table
Rule-Based on Routing
• IP Table
Filter Table
NAT Table
Mangle Table
• IP Chain
Routing in Linux
• IP Forwarding
IP forwarding also known as Internet routing is a
process used to determine which path a packet or
datagram can be sent.
Forwarding is implemented in the Linux Kernel a
task of the IP layer routing is handled on higher
layers routing protocols build on top of transport-
layer protocols.
Routing in Linux(cont.)
• Routing Cache
The routing cache is also known as the forwarding
information base (FIB).
The routing cache stores recently used routing
entries in a fast and convenient hash lookup table,
and is consulted before the routing tables.
If the kernel finds a matching entry during route
cache lookup, it will forward the packet immediately
and stop traversing the routing tables.
Routing in Linux(cont.)
• Routing Table
Routing Table are represented by rather complex
data structures, which manage entries by using a
number of hash tables for different prefix lengths .
Each routing table still operates in the traditional
and expected fashion.
 Linux simply allows you to choose from a number
of routing tables, and to traverse routing tables in a
user-definable sequence until a matching route is
found.
Routing in Linux(cont.)
• Rule-Based on Routing
 Rule-based Routing are set of rules is used to select
which table should be used for what packets Rules a
selector and a type selector chooses .
 Routing Rules rule-based routing uses a set of rules to
decide searched for a suitable entry to forward a
packet .
IP Table
• IP tables is a user-space application program that
allows a system administrator to configure the tables
provided by the Linux kernel firewall and the chains
and rules it stores.
• IP table are contain IP chain and IP chain contain
commands.
• IP Tables is used to set up, maintain, and inspect the
tables of IP packet filter rules in the Linux kernel.
IP Table IP chain Command
IP Table
• IP Table is contain three types.
• Three tables each consists of one or more
chains
• Filter Table
• NAT Table
• Mangle Table
Filter Table
• Consists of three chains
• FORWARD
»For packets forwarded from one network
interface to another network interface
• INPUT
»For packets sent to firewall host
• OUTPUT
»For packets sent by firewall host
NAT Table
• NAT – Network Address Translation
• PREROUTING
»Destination NAT operations
• POSTROUTING
»Source NAT operations
Mangle Table
• Enables the modification of the TOS or the TTL
field and used for load balancing when there
are multiple firewalls
• PREROUTING, OUTPUT chains
»Kernel <= 2.4.17
• PREROUTING, INPUT, FOREWARDING,
OUTPUT and POSTROUTING chains
»Kernel >= 2.4.18
IP Tables Commands
• -A , --append Append rule to chain
• -D , --delete Delete rule from chain
• -I , --insert Insert rule at beginning or at specified
sequence number in chain.
• -R , --replace Replace rule
• -F , --flush Flush all rules
• -Z , --zero Zero byte counters in all chains
• -L , --list List all rules. Add option --line-numbers
for rule number.
• -N , --new-chain Create new chain
• -X , --delete-chain Delete user defined chain
• -P , --policy Set default policy for a chain
• -E , --rename-chain Rename a chain
IP Chains
• IP Chains Associated with a specific table
• A packet can be diverted to a user chain
• The packet is returned to the step after it's
diversion
• Linux IP Firewalling Chains, normally called IP
chains, is free software to control the packet
filter or firewall capabilities in the 2.2 series of
Linux kernels.
IPChains Flow
IP Packet checksum
sanity
DENY
Input
Chain
Route
Decision
Forward
Chain
Outpu
t
Chain ACCEPT
Demasquerade
DENY DENY
Local
lo interface
IP Chains Commands
• Command Description
• -A Add rule to chain
• -D Delete rule from chain
• -I Insert rule
• -R Replace rule
• -F Flush all rules
• -L List all rules
• -N Create new chain
• -X Delete user defined chain
• -P Set default targe
IP Chains Command
• Command Option Description
• -s Source address of packet
• -d Destination address of packet
• -i Interface packet is arriving from
• -p Protocol
• -j Target to send packet to
• -y For -p tcp. Packet is SYN packet.
• --icmp-type For -p icmp.
• -l Log the packet to syslog.
• /var/log/messages Available in Red Hat 6.0+
kernel

More Related Content

What's hot

Unleashing the Power of Fabric Orchestrating New Performance Features for SR-...
Unleashing the Power of Fabric Orchestrating New Performance Features for SR-...Unleashing the Power of Fabric Orchestrating New Performance Features for SR-...
Unleashing the Power of Fabric Orchestrating New Performance Features for SR-...
Liz Warner
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Adam Dunkels
 
EIGRP, DHCP, OSPF, NAT
EIGRP, DHCP, OSPF, NATEIGRP, DHCP, OSPF, NAT
EIGRP, DHCP, OSPF, NAT
Md. Rakibul Islam
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitch
Te-Yen Liu
 
Conceptos ipv6, direccionamiento
Conceptos ipv6, direccionamientoConceptos ipv6, direccionamiento
Conceptos ipv6, direccionamiento
Edgardo Scrimaglia
 
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGP
Olivier Bonaventure
 
History of L0phtCrack
History of L0phtCrackHistory of L0phtCrack
History of L0phtCrack
cwysopal
 
Building the Internet of Things with Thingsquare and Contiki - day 1, part 2
Building the Internet of Things with Thingsquare and Contiki - day 1, part 2Building the Internet of Things with Thingsquare and Contiki - day 1, part 2
Building the Internet of Things with Thingsquare and Contiki - day 1, part 2
Adam Dunkels
 
Como definir un esquema de direcciones IPv6
Como definir un esquema de direcciones IPv6Como definir un esquema de direcciones IPv6
Como definir un esquema de direcciones IPv6
Edgardo Scrimaglia
 
computer Netwoks - network layer
computer Netwoks - network layercomputer Netwoks - network layer
computer Netwoks - network layer
Sendhil Kumar
 
Making our networking stack truly extensible
Making our networking stack truly extensible Making our networking stack truly extensible
Making our networking stack truly extensible
Olivier Bonaventure
 
Ipx protocol slide share
Ipx protocol slide shareIpx protocol slide share
Ipx protocol slide share
MUHAMMED SIDIBEH
 
L7 64-bit Assembler
L7 64-bit AssemblerL7 64-bit Assembler
L7 64-bit Assembler
Sam Bowne
 
Pilot Use Case 3: BoD services over the intercontinental FIBRE infrastructure
Pilot Use Case 3: BoD services  over the intercontinental FIBRE infrastructurePilot Use Case 3: BoD services  over the intercontinental FIBRE infrastructure
Pilot Use Case 3: BoD services over the intercontinental FIBRE infrastructure
FIBRE Testbed
 
Link State Protocol
Link State ProtocolLink State Protocol
Link State Protocol
Jignesh Patel
 
Sept 2017 boot process
Sept 2017   boot processSept 2017   boot process
Sept 2017 boot process
shahin raj
 
Mecanismos de transicion pv6
Mecanismos de transicion pv6Mecanismos de transicion pv6
Mecanismos de transicion pv6
Edgardo Scrimaglia
 
Ebpf ovsconf-2016
Ebpf ovsconf-2016Ebpf ovsconf-2016
Ebpf ovsconf-2016
Cheng-Chun William Tu
 
Is is
Is isIs is
OpenFlow Extensions
OpenFlow ExtensionsOpenFlow Extensions
OpenFlow Extensions
US-Ignite
 

What's hot (20)

Unleashing the Power of Fabric Orchestrating New Performance Features for SR-...
Unleashing the Power of Fabric Orchestrating New Performance Features for SR-...Unleashing the Power of Fabric Orchestrating New Performance Features for SR-...
Unleashing the Power of Fabric Orchestrating New Performance Features for SR-...
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
EIGRP, DHCP, OSPF, NAT
EIGRP, DHCP, OSPF, NATEIGRP, DHCP, OSPF, NAT
EIGRP, DHCP, OSPF, NAT
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitch
 
Conceptos ipv6, direccionamiento
Conceptos ipv6, direccionamientoConceptos ipv6, direccionamiento
Conceptos ipv6, direccionamiento
 
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGP
 
History of L0phtCrack
History of L0phtCrackHistory of L0phtCrack
History of L0phtCrack
 
Building the Internet of Things with Thingsquare and Contiki - day 1, part 2
Building the Internet of Things with Thingsquare and Contiki - day 1, part 2Building the Internet of Things with Thingsquare and Contiki - day 1, part 2
Building the Internet of Things with Thingsquare and Contiki - day 1, part 2
 
Como definir un esquema de direcciones IPv6
Como definir un esquema de direcciones IPv6Como definir un esquema de direcciones IPv6
Como definir un esquema de direcciones IPv6
 
computer Netwoks - network layer
computer Netwoks - network layercomputer Netwoks - network layer
computer Netwoks - network layer
 
Making our networking stack truly extensible
Making our networking stack truly extensible Making our networking stack truly extensible
Making our networking stack truly extensible
 
Ipx protocol slide share
Ipx protocol slide shareIpx protocol slide share
Ipx protocol slide share
 
L7 64-bit Assembler
L7 64-bit AssemblerL7 64-bit Assembler
L7 64-bit Assembler
 
Pilot Use Case 3: BoD services over the intercontinental FIBRE infrastructure
Pilot Use Case 3: BoD services  over the intercontinental FIBRE infrastructurePilot Use Case 3: BoD services  over the intercontinental FIBRE infrastructure
Pilot Use Case 3: BoD services over the intercontinental FIBRE infrastructure
 
Link State Protocol
Link State ProtocolLink State Protocol
Link State Protocol
 
Sept 2017 boot process
Sept 2017   boot processSept 2017   boot process
Sept 2017 boot process
 
Mecanismos de transicion pv6
Mecanismos de transicion pv6Mecanismos de transicion pv6
Mecanismos de transicion pv6
 
Ebpf ovsconf-2016
Ebpf ovsconf-2016Ebpf ovsconf-2016
Ebpf ovsconf-2016
 
Is is
Is isIs is
Is is
 
OpenFlow Extensions
OpenFlow ExtensionsOpenFlow Extensions
OpenFlow Extensions
 

Viewers also liked

#FluxFlow
#FluxFlow#FluxFlow
#FluxFlow
Bernardo Najlis
 
Telephone system &amp; multiplexing
Telephone system &amp; multiplexingTelephone system &amp; multiplexing
Telephone system &amp; multiplexing
gamer007
 
Clickstream Analysis
Clickstream AnalysisClickstream Analysis
Clickstream Analysis
intuitiv.de
 
Fraud Detection presentation
Fraud Detection presentationFraud Detection presentation
Fraud Detection presentation
Hernan Huwyler
 
Business intelligence
Business intelligenceBusiness intelligence
Business intelligence
Randy L. Archambault
 
Market segmentation PPT
Market segmentation PPTMarket segmentation PPT
Market segmentation PPT
Aabhas Rastogi
 
Business Intelligence Presentation (1/2)
Business Intelligence Presentation (1/2)Business Intelligence Presentation (1/2)
Business Intelligence Presentation (1/2)
Bernardo Najlis
 
Business intelligence ppt
Business intelligence pptBusiness intelligence ppt
Business intelligence ppt
sujithkylm007
 

Viewers also liked (8)

#FluxFlow
#FluxFlow#FluxFlow
#FluxFlow
 
Telephone system &amp; multiplexing
Telephone system &amp; multiplexingTelephone system &amp; multiplexing
Telephone system &amp; multiplexing
 
Clickstream Analysis
Clickstream AnalysisClickstream Analysis
Clickstream Analysis
 
Fraud Detection presentation
Fraud Detection presentationFraud Detection presentation
Fraud Detection presentation
 
Business intelligence
Business intelligenceBusiness intelligence
Business intelligence
 
Market segmentation PPT
Market segmentation PPTMarket segmentation PPT
Market segmentation PPT
 
Business Intelligence Presentation (1/2)
Business Intelligence Presentation (1/2)Business Intelligence Presentation (1/2)
Business Intelligence Presentation (1/2)
 
Business intelligence ppt
Business intelligence pptBusiness intelligence ppt
Business intelligence ppt
 

Similar to IP routing in linux

IP tables and Filtering
IP tables and FilteringIP tables and Filtering
IP tables and Filtering
Aisha Talat
 
Open vSwitch Introduction
Open vSwitch IntroductionOpen vSwitch Introduction
Open vSwitch Introduction
HungWei Chiu
 
Iptables the Linux Firewall
Iptables the Linux Firewall Iptables the Linux Firewall
Iptables the Linux Firewall
Syed fawad Gillani
 
[2019.01.12] hst iptables 101 to 301
[2019.01.12] hst   iptables 101 to 301[2019.01.12] hst   iptables 101 to 301
[2019.01.12] hst iptables 101 to 301
Chia-Hao Tsai
 
Routing in Internet Protocol networks.ppt
Routing in Internet Protocol networks.pptRouting in Internet Protocol networks.ppt
Routing in Internet Protocol networks.ppt
ShahidMehmood285010
 
Packet Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing ConferencePacket Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing Conference
Cengage Learning
 
How to convert your Linux box into Security Gateway - Part 1
How to convert your Linux box into Security Gateway - Part 1How to convert your Linux box into Security Gateway - Part 1
How to convert your Linux box into Security Gateway - Part 1
n|u - The Open Security Community
 
15 ia64
15 ia6415 ia64
15 ia64
dilip kumar
 
Routing basics/CEF
Routing basics/CEFRouting basics/CEF
Routing basics/CEF
Dmitry Figol
 
Iptables fundamentals
Iptables fundamentalsIptables fundamentals
Iptables fundamentals
ram_b17
 
NetApp C-mode for 7 mode engineers
NetApp C-mode for 7 mode engineersNetApp C-mode for 7 mode engineers
NetApp C-mode for 7 mode engineers
subtitle
 
Dik acn presentation
Dik acn presentationDik acn presentation
Dik acn presentation
dikshagupta111
 
LISP and NSH in Open vSwitch
LISP and NSH in Open vSwitchLISP and NSH in Open vSwitch
LISP and NSH in Open vSwitch
mestery
 
Novell Netware Protocol suite
Novell Netware Protocol suiteNovell Netware Protocol suite
Novell Netware Protocol suite
Omar Isaid
 
SDN Networks Programming Languages
SDN Networks Programming LanguagesSDN Networks Programming Languages
SDN Networks Programming Languages
Flavio Vit
 
Network
NetworkNetwork
IPv6 Transition & Deployment, including IPv6-only in cellular and broadband
IPv6 Transition & Deployment, including IPv6-only in cellular and broadbandIPv6 Transition & Deployment, including IPv6-only in cellular and broadband
IPv6 Transition & Deployment, including IPv6-only in cellular and broadband
APNIC
 
Network troubleshooting
Network troubleshootingNetwork troubleshooting
Network troubleshooting
Skillspire LLC
 
ENC_254_PPT_ch04.pdf
ENC_254_PPT_ch04.pdfENC_254_PPT_ch04.pdf
ENC_254_PPT_ch04.pdf
shaker402
 
Tutorial: IPv6-only transition with demo
Tutorial: IPv6-only transition with demoTutorial: IPv6-only transition with demo
Tutorial: IPv6-only transition with demo
APNIC
 

Similar to IP routing in linux (20)

IP tables and Filtering
IP tables and FilteringIP tables and Filtering
IP tables and Filtering
 
Open vSwitch Introduction
Open vSwitch IntroductionOpen vSwitch Introduction
Open vSwitch Introduction
 
Iptables the Linux Firewall
Iptables the Linux Firewall Iptables the Linux Firewall
Iptables the Linux Firewall
 
[2019.01.12] hst iptables 101 to 301
[2019.01.12] hst   iptables 101 to 301[2019.01.12] hst   iptables 101 to 301
[2019.01.12] hst iptables 101 to 301
 
Routing in Internet Protocol networks.ppt
Routing in Internet Protocol networks.pptRouting in Internet Protocol networks.ppt
Routing in Internet Protocol networks.ppt
 
Packet Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing ConferencePacket Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing Conference
 
How to convert your Linux box into Security Gateway - Part 1
How to convert your Linux box into Security Gateway - Part 1How to convert your Linux box into Security Gateway - Part 1
How to convert your Linux box into Security Gateway - Part 1
 
15 ia64
15 ia6415 ia64
15 ia64
 
Routing basics/CEF
Routing basics/CEFRouting basics/CEF
Routing basics/CEF
 
Iptables fundamentals
Iptables fundamentalsIptables fundamentals
Iptables fundamentals
 
NetApp C-mode for 7 mode engineers
NetApp C-mode for 7 mode engineersNetApp C-mode for 7 mode engineers
NetApp C-mode for 7 mode engineers
 
Dik acn presentation
Dik acn presentationDik acn presentation
Dik acn presentation
 
LISP and NSH in Open vSwitch
LISP and NSH in Open vSwitchLISP and NSH in Open vSwitch
LISP and NSH in Open vSwitch
 
Novell Netware Protocol suite
Novell Netware Protocol suiteNovell Netware Protocol suite
Novell Netware Protocol suite
 
SDN Networks Programming Languages
SDN Networks Programming LanguagesSDN Networks Programming Languages
SDN Networks Programming Languages
 
Network
NetworkNetwork
Network
 
IPv6 Transition & Deployment, including IPv6-only in cellular and broadband
IPv6 Transition & Deployment, including IPv6-only in cellular and broadbandIPv6 Transition & Deployment, including IPv6-only in cellular and broadband
IPv6 Transition & Deployment, including IPv6-only in cellular and broadband
 
Network troubleshooting
Network troubleshootingNetwork troubleshooting
Network troubleshooting
 
ENC_254_PPT_ch04.pdf
ENC_254_PPT_ch04.pdfENC_254_PPT_ch04.pdf
ENC_254_PPT_ch04.pdf
 
Tutorial: IPv6-only transition with demo
Tutorial: IPv6-only transition with demoTutorial: IPv6-only transition with demo
Tutorial: IPv6-only transition with demo
 

Recently uploaded

CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
GauravCar
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
TaghreedAltamimi
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
SakkaravarthiShanmug
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
integral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdfintegral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdf
gaafergoudaay7aga
 

Recently uploaded (20)

CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Software Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.pptSoftware Quality Assurance-se412-v11.ppt
Software Quality Assurance-se412-v11.ppt
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
integral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdfintegral complex analysis chapter 06 .pdf
integral complex analysis chapter 06 .pdf
 

IP routing in linux

  • 1. IP Routing in Linux Name:-cyz Class:-TYIF Roll no.:-3415
  • 2. Agenda •Routing in Linux IP Forwarding Routing Cache Routing table Rule-Based on Routing • IP Table Filter Table NAT Table Mangle Table • IP Chain
  • 3. Routing in Linux • IP Forwarding IP forwarding also known as Internet routing is a process used to determine which path a packet or datagram can be sent. Forwarding is implemented in the Linux Kernel a task of the IP layer routing is handled on higher layers routing protocols build on top of transport- layer protocols.
  • 4. Routing in Linux(cont.) • Routing Cache The routing cache is also known as the forwarding information base (FIB). The routing cache stores recently used routing entries in a fast and convenient hash lookup table, and is consulted before the routing tables. If the kernel finds a matching entry during route cache lookup, it will forward the packet immediately and stop traversing the routing tables.
  • 5. Routing in Linux(cont.) • Routing Table Routing Table are represented by rather complex data structures, which manage entries by using a number of hash tables for different prefix lengths . Each routing table still operates in the traditional and expected fashion.  Linux simply allows you to choose from a number of routing tables, and to traverse routing tables in a user-definable sequence until a matching route is found.
  • 6. Routing in Linux(cont.) • Rule-Based on Routing  Rule-based Routing are set of rules is used to select which table should be used for what packets Rules a selector and a type selector chooses .  Routing Rules rule-based routing uses a set of rules to decide searched for a suitable entry to forward a packet .
  • 7. IP Table • IP tables is a user-space application program that allows a system administrator to configure the tables provided by the Linux kernel firewall and the chains and rules it stores. • IP table are contain IP chain and IP chain contain commands. • IP Tables is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel. IP Table IP chain Command
  • 8. IP Table • IP Table is contain three types. • Three tables each consists of one or more chains • Filter Table • NAT Table • Mangle Table
  • 9. Filter Table • Consists of three chains • FORWARD »For packets forwarded from one network interface to another network interface • INPUT »For packets sent to firewall host • OUTPUT »For packets sent by firewall host
  • 10. NAT Table • NAT – Network Address Translation • PREROUTING »Destination NAT operations • POSTROUTING »Source NAT operations
  • 11. Mangle Table • Enables the modification of the TOS or the TTL field and used for load balancing when there are multiple firewalls • PREROUTING, OUTPUT chains »Kernel <= 2.4.17 • PREROUTING, INPUT, FOREWARDING, OUTPUT and POSTROUTING chains »Kernel >= 2.4.18
  • 12. IP Tables Commands • -A , --append Append rule to chain • -D , --delete Delete rule from chain • -I , --insert Insert rule at beginning or at specified sequence number in chain. • -R , --replace Replace rule • -F , --flush Flush all rules • -Z , --zero Zero byte counters in all chains • -L , --list List all rules. Add option --line-numbers for rule number. • -N , --new-chain Create new chain • -X , --delete-chain Delete user defined chain • -P , --policy Set default policy for a chain • -E , --rename-chain Rename a chain
  • 13. IP Chains • IP Chains Associated with a specific table • A packet can be diverted to a user chain • The packet is returned to the step after it's diversion • Linux IP Firewalling Chains, normally called IP chains, is free software to control the packet filter or firewall capabilities in the 2.2 series of Linux kernels.
  • 14. IPChains Flow IP Packet checksum sanity DENY Input Chain Route Decision Forward Chain Outpu t Chain ACCEPT Demasquerade DENY DENY Local lo interface
  • 15. IP Chains Commands • Command Description • -A Add rule to chain • -D Delete rule from chain • -I Insert rule • -R Replace rule • -F Flush all rules • -L List all rules • -N Create new chain • -X Delete user defined chain • -P Set default targe
  • 16. IP Chains Command • Command Option Description • -s Source address of packet • -d Destination address of packet • -i Interface packet is arriving from • -p Protocol • -j Target to send packet to • -y For -p tcp. Packet is SYN packet. • --icmp-type For -p icmp. • -l Log the packet to syslog. • /var/log/messages Available in Red Hat 6.0+ kernel