Review of IPv4 Routing Veena S, MCA Dept, PESIT Mar 09-10, 2013
Review of IPv4 General Networking Overview –Network Configuration –IPv4 Addressing * 1981 IP was standardized * Dotted Decimal Notation * Classful addressing - wastage 2
Growth of the Internet In 1985 (RFC 950) subnetting concept was introduced. In 1987 VLSM (RFC 1009) It uses longest prefix match It allows Route aggregation 3 Subnet Address Hierarchy Extended-Network-Prefix
Growth of the Internet By 1992 IETF identified the exponential growth of the internet. Three serious problems - Exhaustion of Class B address space - Rapid growth of Backbone Routing tables - Exhaustion of 32 bit IPv4 address space In 1993 CIDR was officially documented - Supernetting - Extensively supports Route aggregation IETF started the IPng working group for IPv6 4
Growth of the Internet 5 Figure 1: Assigned and Allocated Network Numbers Figure 2: Growth of Internet Routing Tables
Review of IPv4 Routing Routing - Routers – Multi Homing - Multiple interfaces Routing v/s Forwarding Routing tables –Destination network –Destination mask –Outgoing interface –Next hop –Metric 6
Review of IPv4 Routing Steps to be followed - Configure all interfaces - Fill the Routing Table Routers will make the Decision based on the entries available in the Routing table at that time. 7 HaHa HbHb R1R1 R2R2 n/w-1n-w-3 n/w-2 Visual/Logical connectivity
Review of IPv4 Routing 8
Configure the network address in Ha sudo ip addr add /24 dev eth1 Configure the network address in R1 sudo ip addr add /24 dev eth1 sudo ip addr add /24 dev eth2 Configure the network address in Hb sudo ip addr add /24 dev eth1 To add the Routing Table entry in Ha sudo ip route add /24 via To add the Routing Table entry in Hb sudo ip route add /24 via E nable routing in multi homed machine (m/c with 2+ interfaces) sysctl -w net.ip4v.ip_forward=1 9
Review of IPv4 Routing 10
VLSM 11
12 Network Setup HaHa HbHb R1R1 R2R2 n/w-1n-w-3 n/w-2 Visual/Logical connectivity HaHa R1R1 Swit ch R2R2 HbHb Physical connectivity eth 1 eth 2 eth 1
13 IPv4 Routing Use the iproute2 package i.e. command ‘ ip -4’ to build the IPv4 network –option ‘-4’ is default, and thus need not be specified We will use following private local address space for our lab –prefix /16 Group 1: /24 to /24 Group 2: /24 to /24 : Group 15: /24 to /24 Use the following host part of address –.1 for frouter interface and.201 for host address –example: , for Network , for Network , for Network3
Network Setup 14
15 Network Setup Building actual routers –Middle two m/c have two ethernet network cards These will be converted to routers We will limit to static routing –The IP addresses are assigned manually How to identify which i/f is eth0, eth1 or eth2 etc. –Issue ‘ip addr show’ command –look at the MAC address starting 50:e5:49 This corresponds to i/f on mother board in the o/p of ‘ ip addr’, it may show as eth1 or eth2 Enable routing in multi homed machine (m/c with 2+ interfaces) sysctl -w net.ip4v.ip_forward=1
16 Network Setup We are not using the backbone network - better delete the address x/21 –These are backbone addresses (College network) with default gateway of Should we not use commands like ifconfig, route, arp etc. –These are deprecated commands, use commands from iproute2 pkg. ip addr [options] ip route [options] ip neigh [options]
17 Utilities/Tools Wireshark nc tcpdump ping
18 Wireshark It is a network packet analyser In late 1997 Gerald Combs started writing Ethereal for his use 1998 version was released later several patches, plug-ins were added In 2006 it is renamed as wireshark Users - Administrators - Security Engineers - Developers - Ordinary users Main window: Main menu bar The main toolbar The filter toolbar (Display filter) The packet list pane The packet details pane The packet byte pane The status bar
19 Wireshark Main window: Main menu bar The main toolbar The filter toolbar (Display filter) The packet list pane The packet details pane The packet byte pane The status bar
Wireshark capture
21 Utilities/Tools Go to capture option Specify the interface Specify the capture filter (otherwise you will get too much traffic) Examples of good capture filters –for capturing a traffic for a given network or networks net /24 or /24 –for capturing specific source and/or destination src and dst –for capture specific protocol or applications or TCP/UDP port no http port 80 or port 8080
22 Utilities/Tools Difference between the capture filter and the display filter –Capture filters are used for capturing only relevant packets –display filters are used for displaying selected packets from what is captured. these may be used to analyze a subset of packets e.g. –packets on a TCP Connection –looking at only TCP SYN/RST packets etc We can save captured data and analyse To check the connectivity we can use ping command with –c N option nc command can be used
Summary Growth of internet IPv4 addressing IPv4 Routing Building IPv4 network Analysis 23
Thank You