Professional Documents
Culture Documents
Ipv4/Ipv6 Routing: - Veerakumar M - 25-03-2019
Ipv4/Ipv6 Routing: - Veerakumar M - 25-03-2019
Ipv4/Ipv6 Routing: - Veerakumar M - 25-03-2019
• Veerakumar M
• 25-03-2019
• What is routing?
• What routing table contains?
• Routing Lookup process
• IP address display
• Routing table display
• Packet forwarding
• When is routing table referred?
• rtnetlink - Linux IPv4/IPv6 routing socket
• Linux Packet processing
• Route lookup in netfilter
• Nokia Troubleshooting help
Yes Yes
Check arp Check
cache routing
cache
No
No
Lookup routing policy
database
Host route - A route to a specific internetwork address (Network ID and Host ID). Host routes are added
automatically when ip address is configured.
ip addr add 10.41.218.0/25 dev br1.192
Ip addr add 10.41.219.0/25 dev br1.193
Default route - A route that is used when no other routes for the destination are found in the routing table.
ip route add default via 10.41.218.3
ip route add default via 10.41.218.3
Ip addr show
br1.192@br1: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
group default qlen 1000
link/ether 60:a8:fe:66:29:23 brd ff:ff:ff:ff:ff:ff
inet 10.41.218.19/25 brd 10.41.218.127 scope global br1.192
valid_lft forever preferred_lft forever
inet6 fe80::62a8:feff:fe66:2923/64 scope link
valid_lft forever preferred_lft forever
br1.193@br1: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
group default qlen 1000
link/ether 60:a8:fe:66:29:23 brd ff:ff:ff:ff:ff:ff
inet 10.41.219.19/25 brd 10.41.219.127 scope global br1.193
valid_lft forever preferred_lft forever
inet6 fe80::62a8:feff:fe66:2923/64 scope link
valid_lft forever preferred_lft forever
Lookup
Order
• NETLINK is a facility in the Linux operating system for user-space applications to communicate with the kernel.
• Netlink is an internal communication protocol.
• Rtnetlink allows the kernel's routing tables to be read and altered.
• Netlink sockets are accessed like any other sockets. Both socket calls and system IO calls will work with netlink
sockets.
• Iproute2 utilities are used to configure link, ip address, neighbor entry and routes
• ip link - RTM_NEWLINK, RTM_DELLINK, RTM_GETLINK
• ip addr - RTM_NEWADDR, RTM_DELADDR, RTM_GETADDR
• ip route - RTM_NEWROUTE, RTM_DELROUTE, RTM_GETROUTE
• ip neigh - RTM_NEWNEIGH, RTM_DELNEIGH, RTM_GETNEIGH
• ip rule - RTM_NEWRULE, RTM_DELRULE, RTM_GETRULE
• rtnetlink - https://www.systutorials.com/docs/linux/man/7-rtnetlink/
• Iproute2 utilities - https://en.wikipedia.org/wiki/Iproute2
• netfilter diagram - https://commons.wikimedia.org/wiki/File:Netfilter-packet-flow.svg
• Routing steps - http://www.firewall.cx/networking-topics/routing/181-routing-process.html