Upload
adryan-you
View
241
Download
1
Embed Size (px)
Citation preview
7/28/2019 Routing Switching Subnetting
1/32
ROUTING
7/28/2019 Routing Switching Subnetting
2/32
Routing
Routing- process when router receive a packet, analyzethe dest. address info and select the path for the packetand forward to the next router.
Hop- each route that a packet takes to reach the nextdevice is called hop.
Encapsulation- IP header that contains addressinformation and other bits that identify the networklayer PDU.
Decapsulation- Process of removing the Layer 2encapsulation data.
Network protocol- IPv4, IPv6, Novell IPX, AppleTalk,CLNS
Default Gateway- address of a router interface that isconnected to the same network.
7/28/2019 Routing Switching Subnetting
3/32
7/28/2019 Routing Switching Subnetting
4/32
A router takes the following steps:
1) The router first discards the Layer 2encapsulation so that the IP can be examined.
2) The router examined the IP address.
3) The router checks the routing table for a match.
4) If the destination is directly connected network,the packet is forwarded to the interface to whichthe network is connected.
5) If the destination is on remote network, the
router either: Forward the packet to the next-hop
Uses the default route
Drops the packet
7/28/2019 Routing Switching Subnetting
5/32
If a route to a destination does not exists, the packetcannot be forwarded.
The route would only indicate the next-hop router towhich packet is to be forwarded, not the final router.
3 main feature in routing table is Destination network
Next-hop Metric
If there are two or more possible route to the samedestination, the lowest metric route will be choose.
Default route- used when the destination network isnot represent by any other route in routing table. (needto be configured)
7/28/2019 Routing Switching Subnetting
6/32
2 ways router can learn information
about routesStatic routing Dynamic routing
Route information that can be manually
configured.
Learn about routes automatically
Example: Default route Update arrive from other routers without
administrative configuration
Require network admin to initial set up
and configured for any changes of routes
Has higher router processing overhead
Reliable and does not use much
overhead
Reduce administrative cost
Do not update automatically, hence havehigher continuing administrative costs.
If network structure change, these
changes has to be manually update on
every router.
7/28/2019 Routing Switching Subnetting
7/32
IP Routing Protocols
RIP (Routing Information Protocol)
IGRP (Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)
OSPF (Open Shortest Path First)
IS-IS (Intermediate System-to-Intermediate System) BGP (Border Gateway Protocol)
7/28/2019 Routing Switching Subnetting
8/32
RIP (Routing Information Protocol)
Distance vector routing protocol.
Use hop count as its only metrics for path
selection.
Advertise routes with hop counts greater than
15 are considered unreachable.
Routing table updates are broadcast every 30seconds.
7/28/2019 Routing Switching Subnetting
9/32
RIP Operation
1. Request to all RIP neighbor to sent theircomplete routing table.
2. A response message is sent back by all RIP-enabled neighbor.
3. If the route is new entry, the receiving routerinstalls the route in the routing table.
4. If the route is already in the table, the existingentry will be replaced if the new entry has a
better hop count.5. The router then sends a triggered update out
all RPI-enable interface, so that all RIPneighbors can be informed of any new routes.
7/28/2019 Routing Switching Subnetting
10/32
RIP request/response example
7/28/2019 Routing Switching Subnetting
11/32
EIGRP(Enhanced Interior Routing
Protocol)
Distance vector routing protocol.
Provide reliable and unreliable delivery of packet. (RTP)
Used bandwidth and delay as a metrics for pathselection.
Diffusing Update Algorithm(DUAL)- to keep the tableupdated and select a route.
Changes in the routing information, such as a new linkor a link become unavailable, cause a routing update to
occur. EIGRPs DUAL maintain a topology table separate from
the routing table, which includes the best path to adestination network and any backup paths.
7/28/2019 Routing Switching Subnetting
12/32
1. R2 network goes down, R2 sends an EIGRP updatemessage to its neighbor indicating the network its down.
2. RI and R3 return an EIGRP acknowledgement indicatingthat they have received the update from R2.
3. R2 does not have any backup route. So, R2 sends an EIGRPquery to its neighbors asking them whether they have aroute to this downed network.
4. RI and R3 return an EIGRP acknowledgement indicatingthat they have received the query from R2.
5. R1 and R3 send reply message in response to the query.6. R2 returns an acknowledgement indicating that it received
the reply.
DUAL Introduction
7/28/2019 Routing Switching Subnetting
13/32
1. UPDATE 1. UPDATE
Figure 1
2. ACK 2. ACK
Figure 2
3. QUERY 3. QUERY
Figure 3
4. ACK 4.ACK
6. ACK 6. ACK
Figure 4
5. REPLY 5. REPLY
7/28/2019 Routing Switching Subnetting
14/32
OSPF(Open Shortest Path First)
Link state and classless routing protocol.
Fast convergence and scalability to much largernetwork implementation.
Hello Protocol- use to establish neighboradjacencies before OSPF router can flood its linkto other router.
By default, OSPF Hello packet are sent every 10seconds.
Dead interval- is the period when the router willwait to received the Hello packet before declaringthe neighbor down.
7/28/2019 Routing Switching Subnetting
15/32
Each OSPF router maintains a link-state databasecontaining the LSAs received from all other routers.
Then the router built its local link-state database anduse Dijkstras shortest path first algorithm to create anSPF tree.
The SPF algorithm places each router at the root of thetree and calculates the shortest path to each node.
It is based on the cumulative cost required to reacheach node. The cost is based on bandwidth.
OSPF Algorithm
7/28/2019 Routing Switching Subnetting
16/32
7/28/2019 Routing Switching Subnetting
17/32
SWITCHING
7/28/2019 Routing Switching Subnetting
18/32
Switching
Each port of the switch represent a separate
collision domain and provides full media
bandwidth to the nodes that connected on that
port.Throughput increased:
-Dedicated bandwidth to each port
-Collision-free domain
-Full-duplex operation
7/28/2019 Routing Switching Subnetting
19/32
Forwarding Based on the MAC Address
Switch maintains a table, called a MAC table, that mapsdestination MAC addresses with the port to connect toeach node.
The destination MAC address is used by the switch to
determine to which port the frame should beforwarded.
For each incoming frame, the destination MAC addressin the header is compared to the list of addresses inthe MAC table.
And if a match found, the port number in the table thatis paired with the MAC address is used as exit port forthe frame.
7/28/2019 Routing Switching Subnetting
20/32
7/28/2019 Routing Switching Subnetting
21/32
ARP(Address Resolution Protocol)
ARP provide 2 basic function:
Resolving IPv4 addresses to MAC addresses
Maintaining a cache of mapping
7/28/2019 Routing Switching Subnetting
22/32
Resolving IPv4 addresses to MAC
addresses
When IPv4 packet is sent to the data link layer
to be encapsulate into a frame, the device
must identify the data link layer address(MAC)
that is mapped to the destination IPv4address.
To find the MAC address, the node will refer to
a table in its RAM memory called ARPtable/ARP cache.
7/28/2019 Routing Switching Subnetting
23/32
7/28/2019 Routing Switching Subnetting
24/32
Maintaining a Cache of Mappings
There are two ways that a device can gather MACaddresses. One way is to monitor the traffic that occurs on the
local network segment. As a node receives frames
from the media, it can record the source IP and MACaddress as a mapping in the ARP table.
Another way is Layer 2 broadcast ARP request to alldevices on the Ethernet LAN. The frame contains anARP request packet with the IP address of the
destination host. The node receiving will reply packetback to the sender. This response is then used to makea new entry in the ARP table.
7/28/2019 Routing Switching Subnetting
25/32
SUBNETTING
7/28/2019 Routing Switching Subnetting
26/32
Network Address Class
7/28/2019 Routing Switching Subnetting
27/32
Classless Addressing-Example Method 1
Address given 205.16.37.39/28 What is the first address in the block
11001101 00010000 00100101 00100111
(rightmost 32-n bits to 0s)
11001101 00010000 00100101 00100000
205.16.37.32
What is the last address in the block 11001101 00010000 00100101 00100111
(rightmost 32-n bits to 1s)
11001101 00010000 00100101 00101111
205.16.37.47
Find the number of addresses The value of n is 28, which means that number of addresses is 232-28 or
16
7/28/2019 Routing Switching Subnetting
28/32
Classless Addressing-Example Method 2
Address given 205.16.37.39/28
As we know the mask is 255.255.255.240 What is the first address in the block (ANDing the given address with
mask) Address: 11001101 00010000 00100101 00100111
Mask: 11111111 11111111 11111111 11110000
First Address: 11001101 00010000 00100101 00100000
What is the last address in the block (ORing the given address with thecomplement of the mask)
Address: 11001101 00010000 00100101 00100111
Mask comp.: 00000000 00000000 00000000 00001111
Last Address: 11001101 00010000 00100101 00101111
Find the number of addresses (mask comp. change to decimal numberand adding 1)
Mask comp.: 00000000 00000000 00000000 00001111
Number of add.: 15+1 = 16
7/28/2019 Routing Switching Subnetting
29/32
7/28/2019 Routing Switching Subnetting
30/32
7/28/2019 Routing Switching Subnetting
31/32
7/28/2019 Routing Switching Subnetting
32/32