ece 4110 internetwork programming n.
Download
Skip this Video
Download Presentation
ECE 4110 – Internetwork Programming

Loading in 2 Seconds...

play fullscreen
1 / 33

ECE 4110 – Internetwork Programming - PowerPoint PPT Presentation


  • 119 Views
  • Uploaded on

ECE 4110 – Internetwork Programming. TCP/IP Protocol (cont’d). Preamble: Alternating 0’s and 1’s with last bit a l. Destination medium access control (MAC) address: Each receiver DL layer compares this to its own hardwired network interface card (NIC) address.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'ECE 4110 – Internetwork Programming' - alia


Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
ece 4110 internetwork programming

ECE 4110 – Internetwork Programming

TCP/IP Protocol (cont’d)

dix ethernet data frame format
Preamble: Alternating 0’s and 1’s with last bit a l.

Destination medium access control (MAC) address: Each receiver DL layer compares this to its own hardwired network interface card (NIC) address.

Normally a NIC knows its own address and the broadcast address.

Source MAC address: Sender’s NIC address.

Type: Type of data transporting. E.g.: Internet Protocol.

Cyclic Redundancy Check: Used for checking data integrity.

Gap: After the Ethernet Frame, a 12 Byte Interframe Gap must always follow.

Note: Receiver DL layer does not look at data.

Note:Data is in most network technologies called a “packet.”

Preamble

(8 Bytes)

Destination

MAC Address

(6 Bytes)

Source

MAC Address

(6 Bytes)

Type

(2 Bytes)

Data

CRC

(4 Bytes)

Gap

12 Bytes

DIX Ethernet Data Frame Format

ECE 4110 – Internetwork Programming

routing concepts

Network Number (Address)

1

Router

Network

Routing Concepts

B

C

3

Computer

X

Computer

Y

4

2

9

A1

A2

A4

1

5

A

A3

D

6

8

E

7

Computer X on Network wants to send a message to Computer Y on Network .

F

1

5

ECE 4110 – Internetwork Programming

routing concepts cont d

Destination MAC Address

Source

MAC address

IEEE 802.3

Frame

DATA

Preamble

Length

CRC

Destination

5 : Y

Source

1 : X

Other

Stuff

Data

Routing Concepts (cont’d)
  • Network address is software configurable.

ECE 4110 – Internetwork Programming

routing
Routing
  • Service
    • Connection-oriented
    • Connectionless
  • Delivery
    • Direct Delivery
    • Indirect delivery

ECE 4110 – Internetwork Programming

connection oriented vs connectionless
Connection-Oriented vs. Connectionless
  • In connection-oriented services, the network layer protocol first makes a connection.
  • In connectionless services, each packet is treated independently. So, there is no relationship between the packets.

ECE 4110 – Internetwork Programming

direct delivery
Direct Delivery
  • Source and the destination are on the same physical network.
  • Address mapping is between IP and physical address of the final destination.
  • Physical address of the destination is found via ARP.

* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

ECE 4110 – Internetwork Programming

indirect delivery
Indirect Delivery
  • Source and destination are on different networks.
  • Address mapping is between IP and physical address of the next hop.

* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

ECE 4110 – Internetwork Programming

routing methods
Routing Methods
  • Next-hop routing
  • Network-specific routing
  • Host-specific routing
  • Default routing

ECE 4110 – Internetwork Programming

next hop routing
Next-Hop Routing

* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

ECE 4110 – Internetwork Programming

network specific routing
Network-Specific Routing

* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

ECE 4110 – Internetwork Programming

host specific routing
Host-Specific Routing

* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

ECE 4110 – Internetwork Programming

default routing
Default Routing

* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

ECE 4110 – Internetwork Programming

static vs dynamic routing
Static vs. Dynamic Routing
  • In static routing, routing table is constructed manually.
  • In dynamic routing, routing table is constructed automatically using protocols like RIP, OSPF, or BGP.

ECE 4110 – Internetwork Programming

routing table
Routing Table
  • Flags
    • U The router is up and running.
    • G The destination is a gateway (indirect delivery).
    • H Host-specific address.
    • D Added by redirection (by ICMP).
    • M Modified by redirection (by ICMP).

ECE 4110 – Internetwork Programming

routing module
Routing Module

* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

ECE 4110 – Internetwork Programming

routing module cont d
Routing Module (cont’d)
  • Search for route in this order:
    • Direct delivery
    • Host-specific delivery
    • Network-specific delivery
    • Default delivery

ECE 4110 – Internetwork Programming

routing module algorithm
Routing Module (algorithm)
  • For each entry in RT:
    • Apply the mask to destination address
    • If result of mask matches the destination field in the entry in RT, find next-hop address as follows:
      • If G flag is set
        • Use next-hop field in RT
      • Else
        • Use destination address in the packet (direct delivery)
      • Send packet to fragmentation module with the next-hop address
      • Stop
  • Else, send ICMP error message
  • Stop

ECE 4110 – Internetwork Programming

example topology
Example Topology

* From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

routing table for r1

MaskDestination Next HopInterface

255.0.0.0 111.0.0.0 - m0

255.255.255.224 193.14.5.160 - m2

255.255.255.224 193.14.5.192 - m1

255.255.255.255 194.17.21.16 111.20.18.14 m0

255.255.255.0 192.16.7.0 111.15.17.32 m0

255.255.255.0 194.17.21.0 111.20.18.14 m0

0.0.0.0 0.0.0.0 111.30.31.18 m0

Routing Table for R1

ECE 4110 – Internetwork Programming

example 1
Example 1
  • Router R1 receives 500 packets for destination 192.16.7.14; the algorithm applies the masks row by row to the destination address until a match (with the value in the second column) is found.

ECE 4110 – Internetwork Programming

example 1 solution
Example 1 (Solution)
  • Direct delivery

192.16.7.14 & 255.0.0.0  192.0.0.0 no match

192.16.7.14 & 255.255.255.224  192.16.7.0 no match

192.16.7.14 & 255.255.255.224  192.16.7.0 no match

  • Host-specific

192.16.7.14 & 255.255.255.255  192.16.7.14 no match

  • Network-specific

192.16.7.14 & 255.255.255.0  192.16.7.0 match

ECE 4110 – Internetwork Programming

example 2
Example 2
  • Router R1 receives 100 packets for destination 193.14.5.176; the algorithm applies the masks row by row to the destination address until a match is found.

ECE 4110 – Internetwork Programming

example 2 solution
Example 2 (Solution)
  • Direct delivery

193.14.5.176 & 255.0.0.0  193.0.0.0 no match

193.14.5.176 & 255.255.255.224  193.14.5.160 match

ECE 4110 – Internetwork Programming

example 3
Example 3
  • Router R1 receives 20 packets for destination 200.34.12.34; the algorithm applies the masks row by row to the destination address until a match is found.

ECE 4110 – Internetwork Programming

example 3 solution
Example 3 (Solution)
  • Direct delivery

200.34.12.34 & 255.0.0.0  200.0.0.0 no match

200.34.12.34 & 255.255.255.224  200.34.12.32 no match

200.34.12.34 & 255.255.255.224  200.34.12.32 no match

  • Host-specific

200.34.12.34 & 255.255.255.255  200.34.12.34 no match

  • Network-specific

200.34.12.34 & 255.255.255.0  200.34.12.0 no match

200.34.12.34 & 255.255.255.0  200.34.12.0 no match

  • Default

200.34.12.34 & 0.0.0.0  0.0.0.0 match

ECE 4110 – Internetwork Programming

example 4
Example 4
  • Make the routing table for router R1

ECE 4110 – Internetwork Programming

example 4 solution
Example 4 (Solution)

MaskDestinationNext HopInterface

255.255.0.0 134.18.0.0 - m0

255.255.0.0 129.8.0.0 222.13.16.40 m1

255.255.255.0 220.3.6.0 222.13.16.40 m1

0.0.0.0 0.0.0.0 134.18.5.2 m0

ECE 4110 – Internetwork Programming

example 5
Example 5
  • Make the routing table for router R1

ECE 4110 – Internetwork Programming

example 5 solution
Example 5 (Solution)

MaskDestinationNext HopInterface

255.255.255.0 200.8.4.0 - m2

255.255.255.0 80.4.5.0 201.4.10.3 m1

or 200.8.4.12 or m2

255.255.255.0 80.4.6.0 201.4.10.3 m1

or 200.4.8.12 or m2

0.0.0.0 0.0.0.0 ???????????? m0

ECE 4110 – Internetwork Programming

example 6
Example 6
  • Given the routing table in the next slide, draw the topology.

ECE 4110 – Internetwork Programming

example 6 cont d
Example 6 (cont’d)

MaskDestinationNext HopInterface

255.255.0.0 110.70.0.0 - m0

255.255.0.0 180.14.0.0 - m2

255.255.0.0 190.17.0.0 - m1

255.255.0.0 130.4.0.0 190.17.6.5 m1

255.255.0.0 140.6.0.0 180.14.2.5 m2

0.0.0.0 0.0.0.0 110.70.4.6 m0

ECE 4110 – Internetwork Programming

example 6 solution
Example 6 (Solution)

ECE 4110 – Internetwork Programming