CSCI 5273 Computer Networks Stevens, Chapter 9 Routing - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

CSCI 5273 Computer Networks Stevens, Chapter 9 Routing

Description:

Localhost is a direct. connection to itself. using the 'lo0' interface. Not a GATEWAY ... Two host entries (SLIP & localhost) don't match ... – PowerPoint PPT presentation

Number of Views:85
Avg rating:3.0/5.0
Slides: 27
Provided by: DirkGr8
Category:

less

Transcript and Presenter's Notes

Title: CSCI 5273 Computer Networks Stevens, Chapter 9 Routing


1
CSCI 5273Computer NetworksStevens, Chapter
9Routing
  • Dirk GrunwaldAssoc. ProfessorDept. of Computer
    ScienceUniversity of Colorado, Boulder

2
Processing Done at the IP Layer
TCP
UDP
Routingdaemon
Routecommand
Netstatcommand
Our packet (one of ourIP addresses orbroadcast
addrs?
ICMP
ICMPRedirects
Process IP options
RoutingTable
IP Output(calculate next hoprouter if necessary)
IP input queue
Network interface
3
Sample Network
gateway
.1.4
Enet, 140.252.1
.1.183
netb
.1.29
bsdi
sun
slip
svr4
.13.35
.13.34
.13.33
.13.65
Enet, 140.252.13
4
Routes from 140.242.13.34
  • Destination Gateway Flags Ref Use IF
  • 140.252.13.65 140.252.13.35 UGH 0 0 emd0
  • 127.0.0.1 127.0.0.1 UH 1 0 lo0
  • default 140.252.13.33 UG 0 0 emd0
  • 140.252.13.32 140.252.13.34 U 4 25043 emd0

SVR4 is on the samenetwork as BSDI, andBSDI
manages the serialIP connection to SLIP
BSDI
SLIP
U - UPG - Gateway/RouterH - Route to host
5
Sending out a UGH route
  • The G flag designates an indirect route
  • The H flag designates a HOST address
  • When a packet is sent out an indirect route, the
    IP address specifies the final destination, but
    the link layer address specifies the gateway
  • I.e., send it to final destination via the
    gateway
  • The IP address of the link-layer is specified in
    the Gateway entry

6
Routes from 140.242.13.34
  • Destination Gateway Flags Ref Use IF
  • 140.252.13.65 140.252.13.35 UGH 0 0 emd0
  • 127.0.0.1 127.0.0.1 UH 1 0 lo0
  • default 140.252.13.33 UG 0 0 emd0
  • 140.252.13.32 140.252.13.34 U 4 25043 emd0

Localhost is a directconnection to itselfusing
the lo0 interfaceNot a GATEWAYso gateway
lists IP addressof out-going interface
Loopback
Loopback
U - UPH - Route to host
7
Routes from 140.242.13.34
  • Destination Gateway Flags Ref Use IF
  • 140.252.13.65 140.252.13.35 UGH 0 0 emd0
  • 127.0.0.1 127.0.0.1 UH 1 0 lo0
  • default 140.252.13.33 UG 0 0 emd0
  • 140.252.13.32 140.252.13.34 U 4 25043 emd0

SUN is the default routerfor this network since
itcan relay traffic to the internet
Sun
default
U - UPG - Its a router
8
Default Routes
  • The Host Requirements RFC says that IP must
    support multiple default routes.
  • Many implementations dont do this
  • The policy of selecting between routes is not
    specified
  • Solaris uses round-robin

9
Routes from 140.242.13.34
  • Destination Gateway Flags Ref Use IF
  • 140.252.13.65 140.252.13.35 UGH 0 0 emd0
  • 127.0.0.1 127.0.0.1 UH 1 0 lo0
  • default 140.252.13.33 UG 0 0 emd0
  • 140.252.13.32 140.252.13.34 U 4 25043 emd0

All traffic destined forthis network is sent
outthis particular interface. Note that this is
not a ROUTERnor is it a HOSTThus, its a
NETWORK
SVR4 (us!)
network
U - UP
10
Sample Routes from Foobar
  • Route Tree for Protocol Family 2
  • default 128.138.241.65 UG
    6 1924942 tu1
  • 127.0.0.1 127.0.0.1 UH
    1 39091 lo0
  • 128.138.192/26 128.138.241.65 UG
    0 197 tu1
  • 128.138.192.64/26 128.138.241.65 UG
    0 64259 tu1
  • 128.138.192.128/26 128.138.241.65 UG
    0 1091 tu1
  • 128.138.192.192/26 128.138.241.65 UG
    17 2775625 tu1
  • 128.138.193/26 128.138.241.65 UG
    0 2552 tu1

Netmask specification
11
Sample Search SVR4 -gt SUN
  • Sun is resolved as 140.242.13.33
  • Search for matching host entry
  • Two host entries (SLIP localhost) dont match
  • Search for a matching network entry (I.e.,
    140.242.13.32)
  • Match is found
  • EMD0 interface is selected
  • This is a DIRECT (not Gateway route) and thus the
    LINK ADRESS designated the same system as the IP
    address
  • LINK ADDRESS is retrieved from ARP table
  • Frame is sent out EMD0

12
Sample Search SVR4-gtSLIP
  • Host resolves to 140.252.13.65
  • Search through table for HOST address
  • Find match
  • This is a Gateway address. Message will be
    forwarded to the 140.252.13.35 IP address
  • EMD0 interface is selected
  • LINK Address is 140.252.13.35, but IP destination
    is still 140.252.13.65
  • Message arrives at BSDI (13.35) and is routed to
    SLIP (13.65)

13
SVR4 -gt internet
  • Aw.com resolves as 192.207.117.2
  • Search for host address - no match
  • Search for network address - no match
  • Select DEFAULT address
  • Indirect route to 140.252.13.33 using EMD0
  • Link address is for 13.33, IP destination address
    is 192.207.117.2

14
SVR4 -gt SVR4
  • Via 13.32
  • Packet sent to ethernet driver
  • Destined for host IP address, so sent to the
    loopback driver
  • via 127.0.0.1
  • Search matches host address
  • Packet sent to the loopback driver

15
Loopback Devices
IP outputFunction
IP inputFunction
Destination IP addressequals broadcast
addressor multicast address?
Place on IPinput queue
Place on IPinput queue
Yes
LoopbackDriver
Yes
Destination IP addressequals interface address?
No, use ARP toget dest. Ethernetaddress
IP
EthernetDriver
Demultiplex based onEthernet frame type
ARP
ARP
16
Increasing Complexity of Routing Tables
  • Host is not connected - only loopback interface
    is available
  • Host on a single LAN - loopback LAN address
  • I.e., like last entry
  • Host on internet - usually includes a default
  • Host-specific or network-specific routes - looks
    like our example here

17
Sample Routes from SUN (13.33) Router
  • Destination Gateway Flags Ref Use IF
  • 140.252.13.65 140.252.13.35 UGH 0 171 le0
  • 127.0.0.1 127.0.0.1 UH 1 766 lo0
  • 140.252.1.183 140.252.1.29 UH 0 0 sl0
  • default 140.252.1.183 UG 1 2995 sl0
  • 140.252.13.32 140.252.12.33 U 8 99551 le0

Slip IP
netb
The point-to-pointinterface
U - UPH - Its a direct host
18
Sample Routes from SUN (13.33) Router
  • Destination Gateway Flags Ref Use IF
  • 140.252.13.65 140.252.13.35 UGH 0 171 le0
  • 127.0.0.1 127.0.0.1 UH 1 766 lo0
  • 140.252.1.183 140.252.1.29 UH 0 0 sl0
  • default 140.252.1.183 UG 1 2995 sl0
  • 140.252.13.32 140.252.12.33 U 8 99551 le0

SUN
The network route goes through hostspecific
interface
netb
U - UP
19
No route?
  • If theres no route?
  • I.e., not default route specified and no
    specified route
  • If generated on the local machine, a no such
    route message is directly returned
  • If being forwarded, an ICMP host unreachable
    message is sent back to the SOURCE ADDRESS
    specified in the IP header

20
No Destination?
21
No destination?
  • foobar-22 traceroute 192.82.148.1
  • traceroute to 192.82.148.1 (192.82.148.1), 30
    hops max, 40 byte packets
  • 1 cs-gw3-esl (128.138.241.65) 1 ms 1 ms 1 ms
  • 2 cs-gw-dmz (128.138.243.193) 2 ms 2 ms 2 ms
  • 3 engr-cs.Colorado.EDU (128.138.80.141) 1 ms
    2 ms 2 ms
  • 4 hut-engr.Colorado.EDU (128.138.80.201) 2 ms
    2 ms 2 ms
  • 5 cuatm-gw.Colorado.EDU (128.138.80.2) 1 ms 1
    ms 2 ms
  • 6 den-edge-11.inet.qwest.net (205.169.250.49)
    4 ms 2 ms 4 ms
  • 7 den-edge-04.inet.qwest.net (205.171.16.169)
    3 ms 5 ms 5 ms
  • 8 den-core-01.inet.qwest.net (205.171.16.65) 4
    ms 5 ms 5 ms
  • 9 nyc-core-02.inet.qwest.net (205.171.5.17) 43
    ms 44 ms 41 ms
  • 10 nyc-core-03.inet.qwest.net (205.171.17.81)
    42 ms 45 ms 43 ms
  • 11 nyc-core-02.inet.qwest.net (205.171.17.86)
    43 ms 43 ms 44 ms
  • 12 205.171.17.118 (205.171.17.118) 42 ms 42 ms
    44 ms
  • 13
  • 14

22
Example of ICMP Redirect
HOST
1
4
2
R1
R2
3
23
Example of Redirect
gateway
.1.4
Enet, 140.252.1
.1.183
Proxy ARP for SUN
netb
.1.29
bsdi
sun
slip
svr4
.13.35
.13.34
.13.33
.13.65
Enet, 140.252.13
24
Use Default to Get to BSDI
gateway
.1.4
Enet, 140.252.1
.1.183
netb
Solaris
.1.29
bsdi
sun
slip
svr4
.13.35
.13.34
.13.33
.13.65
Enet, 140.252.13
25
Redirect Occurs
gateway
.1.4
Enet, 140.252.1
.1.183
netb
Solaris
.1.29
bsdi
sun
slip
svr4
.13.35
.13.34
.13.33
.13.65
Enet, 140.252.13
26
140.252.13.35 140.252.1.183 UGHD
gateway
.1.4
Enet, 140.252.1
.1.183
netb
Solaris
.1.29
bsdi
sun
slip
svr4
.13.35
.13.34
.13.33
.13.65
Enet, 140.252.13
Write a Comment
User Comments (0)
About PowerShow.com