Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 4110 – Internetwork Programming TCP/IP Protocol (cont’d)

Similar presentations


Presentation on theme: "ECE 4110 – Internetwork Programming TCP/IP Protocol (cont’d)"— Presentation transcript:

1 ECE 4110 – Internetwork Programming TCP/IP Protocol (cont’d)

2 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 2 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

3 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 3 Computer X on Network wants to send a message to Computer Y on Network. 1 Routing Concepts 5 7 9 3 6 5 4 8 2 A4 Computer X Computer Y F E D C B A1 A A2 1 Network Number (Address) Router Network 1 A3

4 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 4 Destination 5 : Y Source 1 : X Other Stuff Data IEEE 802.3 Frame Preamble Destination MAC Address Source MAC address Length DATA CRC Routing Concepts (cont’d) Network address is software configurable.

5 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 5 Routing Service Connection-oriented Connectionless Delivery Direct Delivery Indirect delivery

6 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 6 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.

7 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 7 * From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall 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.

8 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 8 * From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall Indirect Delivery Source and destination are on different networks. Address mapping is between IP and physical address of the next hop.

9 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 9 Routing Methods Next-hop routing Network-specific routing Host-specific routing Default routing

10 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 10 * From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall Next-Hop Routing

11 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 11 * From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall Network-Specific Routing

12 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 12 Host-Specific Routing * From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

13 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 13 Default Routing * From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

14 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 14 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.

15 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 15 Routing Table Flags UThe router is up and running. GThe destination is a gateway (indirect delivery). HHost-specific address. DAdded by redirection (by ICMP). MModified by redirection (by ICMP).

16 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 16 Routing Module * From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall

17 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 17 Routing Module (cont’d) Search for route in this order: Direct delivery Host-specific delivery Network-specific delivery Default delivery

18 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 18 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

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

20 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 20 Routing Table for R1 MaskDestinationNext HopInterface 255.0.0.0111.0.0.0 - m0 255.255.255.224193.14.5.160 - m2 255.255.255.224193.14.5.192 - m1 255.255.255.255194.17.21.16111.20.18.14 m0 255.255.255.0192.16.7.0111.15.17.32 m0 255.255.255.0194.17.21.0111.20.18.14 m0 0.0.0.00.0.0.0111.30.31.18 m0

21 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 21 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.

22 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 22 Example 1 (Solution) Direct delivery 192.16.7.14 & 255.0.0.0  192.0.0.0no match 192.16.7.14 & 255.255.255.224  192.16.7.0no match Host-specific 192.16.7.14 & 255.255.255.255  192.16.7.14no match Network-specific 192.16.7.14 & 255.255.255.0  192.16.7.0match

23 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 23 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.

24 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 24 Example 2 (Solution) Direct delivery 193.14.5.176 & 255.0.0.0  193.0.0.0no match 193.14.5.176 & 255.255.255.224  193.14.5.160match

25 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 25 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.

26 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 26 Example 3 (Solution) Direct delivery 200.34.12.34 & 255.0.0.0  200.0.0.0no match 200.34.12.34 & 255.255.255.224  200.34.12.32no match Host-specific 200.34.12.34 & 255.255.255.255  200.34.12.34no match Network-specific 200.34.12.34 & 255.255.255.0  200.34.12.0no match Default 200.34.12.34 & 0.0.0.0  0.0.0.0match

27 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 27 Example 4 Make the routing table for router R1

28 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 28 MaskDestinationNext HopInterface 255.255.0.0134.18.0.0 - m0 255.255.0.0129.8.0.0222.13.16.40 m1 255.255.255.0220.3.6.0222.13.16.40 m1 0.0.0.00.0.0.0134.18.5.2 m0 Example 4 (Solution)

29 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 29 Example 5 Make the routing table for router R1

30 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 30 MaskDestinationNext HopInterface 255.255.255.0200.8.4.0 - m2 255.255.255.080.4.5.0201.4.10.3 m1 or 200.8.4.12 or m2 255.255.255.080.4.6.0201.4.10.3 m1 or 200.4.8.12 or m2 0.0.0.00.0.0.0???????????? m0 Example 5 (Solution)

31 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 31 Example 6 Given the routing table in the next slide, draw the topology.

32 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 32 MaskDestinationNext HopInterface 255.255.0.0110.70.0.0 - m0 255.255.0.0180.14.0.0 - m2 255.255.0.0190.17.0.0 - m1 255.255.0.0130.4.0.0190.17.6.5 m1 255.255.0.0140.6.0.0180.14.2.5 m2 0.0.0.00.0.0.0110.70.4.6 m0 Example 6 (cont’d)

33 Spring 2003 Tuna Tugcu ECE 4110 – Internetwork Programming 33 Example 6 (Solution)


Download ppt "ECE 4110 – Internetwork Programming TCP/IP Protocol (cont’d)"

Similar presentations


Ads by Google