Network

368 views
275 views

Published on

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
368
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Network

  1. 1. Network Layer Functions <ul><li>Key Layer in Internet Architecture </li></ul><ul><li>End-to-end Packets </li></ul><ul><li>Adapt to lower layers </li></ul>1 1 2 2 3
  2. 2. Network Layer <ul><li>Design Goals </li></ul><ul><ul><li>‘Independent’ of layer 1 & 2 implementations </li></ul></ul><ul><ul><li>Hide layer 1 & 2 details from upper layers </li></ul></ul><ul><li>Architecture </li></ul><ul><ul><li>Connection oriented </li></ul></ul><ul><ul><li>Connectionless </li></ul></ul><ul><ul><li>(where should reliability be done?) </li></ul></ul><ul><li>Services </li></ul><ul><ul><li>Routing (Path selection) </li></ul></ul><ul><ul><li>Adaptation to different lower layers </li></ul></ul>
  3. 3. Routing Algorithms <ul><li>Goals </li></ul><ul><ul><li>Optimality </li></ul></ul><ul><ul><li>Fairness </li></ul></ul><ul><ul><li>Stablility </li></ul></ul><ul><ul><li>Robustness </li></ul></ul><ul><ul><li>Correctness </li></ul></ul><ul><ul><li>Simplicity </li></ul></ul><ul><li>Adaptive vs Static </li></ul><ul><li>Congestion Control </li></ul>
  4. 4. Adaptive Routing <ul><li>Centralized </li></ul><ul><li>Isolated </li></ul><ul><li>Distributed </li></ul>
  5. 5. Distributed Routing <ul><li>Metric - Vector Algorithms </li></ul><ul><ul><li>sometimes called shortest path </li></ul></ul><ul><ul><li>Bellman-Ford most famous </li></ul></ul><ul><ul><li>Knowledge of immediate neighbors </li></ul></ul><ul><ul><li>Result is “first step” in path to ultimate destination </li></ul></ul><ul><li>Link State Algorithms </li></ul><ul><ul><li>OSPF {Open Shortest Path First} </li></ul></ul><ul><ul><li>Knowledge of network layer map (connectivity) </li></ul></ul>
  6. 6. Congestion Control <ul><li>RESEARCH ISSUE! </li></ul><ul><li>Resource Reservation </li></ul><ul><li>Packet Discarding </li></ul><ul><li>Flow Control </li></ul>
  7. 7. Routing Information Protocol (RIP) <ul><li>Known as a routing table update protocol </li></ul><ul><li>Developed by Xerox and gained widespread acceptance by the proliferation of TCP/IP’s implementation of it in UNIX. </li></ul><ul><li>Other protocols (AppleTalk, NetWare) adopted RIP as their standard routing update protocol. </li></ul><ul><li>Known as a distance vector protocol. </li></ul><ul><ul><li>Vector is an adjacent router and the distance is how far away (hops) the </li></ul></ul><ul><ul><ul><li>network is. </li></ul></ul></ul><ul><ul><li>One hop is considered one router traversed. </li></ul></ul><ul><li>Devised for relatively stable, small-to-medium size networks (less than 16 routers in diameter) . </li></ul>
  8. 8. Calculating the Cost Network 1 Network 2 Network 3 Network 4 Network Hops 2 1 3 1 1 2 Network Hops 1 1 1 2 Network Hops 1 1 2 3 3 4 2 1 3 2 Transmitted routing table Transmitted routing table Internal routing table Router A Router B Router C
  9. 9. IP Routing <ul><li>Making Decisions </li></ul><ul><li>Gathering Information </li></ul><ul><li>ICMP </li></ul>
  10. 10. Routing Table Network Mask Router Hops Age Port ID 3 255 C 1 30 1 4 255 C 1 30 2 2 255 B 2 15 2 1 255 B 3 45 2
  11. 11. Example: TCP/IP <ul><li>Not the only way to do things ... </li></ul><ul><li>But well tested in the field </li></ul><ul><li>Brief History </li></ul><ul><li>TCP/IP vs ISO protocols </li></ul>
  12. 12. References TCP/IP <ul><li>Overall -- Douglas Comer </li></ul><ul><ul><li>Internetworking with TCP/IP, Vol I, 3d ed. </li></ul></ul><ul><ul><li>Internetworking with TCP/IP, Vol II </li></ul></ul><ul><ul><li>Internetworking with TCP/IP, Vol III (Sockets) </li></ul></ul><ul><ul><li>Internetworking with TCP/IP, Vol III (TLI) </li></ul></ul><ul><li>Unix Programming -- W. Richard Stevens </li></ul><ul><ul><li>Unix Network Programming </li></ul></ul><ul><ul><li>Advanced Unix Network Programming </li></ul></ul><ul><li>Stevens & Wright </li></ul><ul><ul><li>TCP/IP Illustrated Vol I </li></ul></ul><ul><ul><li>TCP/IP Illustrated Vol II </li></ul></ul><ul><ul><li>TCP/IP Illustrated Vol III </li></ul></ul>
  13. 13. TCP/IP Stack 1 2 3 4 5 -7 OSI DIX Ethernet or ... ARP ICMP IP TCP UDP DNS TELNET FTP
  14. 14. Notes on TCP/IP Suite <ul><li>TCP/IP preceded the OSI Reference Model </li></ul><ul><li>Layers 1 & 2 are not part of the standard </li></ul><ul><li>Functions above the Transport Layer are consolidated </li></ul>
  15. 15. Brief Definitions <ul><li>ARP -- Address Resolution Protocol </li></ul><ul><li>IP -- Internet Protocol </li></ul><ul><li>ICMP -- Internet Control Message Protocol </li></ul><ul><li>UDP -- User Datagram Protocol </li></ul><ul><li>TCP -- Transmission Control Protocol </li></ul><ul><li>DNS -- Domain Name System </li></ul><ul><li>FTP -- File Transfer Protocol </li></ul><ul><li>TELNET -- remote terminal </li></ul>
  16. 16. Other TCP/IP Protocols <ul><li>Routing Protocols -- RIP, OSPF, EGP, GGP </li></ul><ul><li>BOOTP - Bootstrap Protocol </li></ul><ul><li>RARP - Reverse ARP </li></ul><ul><li>TFTP - Trivial FTP </li></ul><ul><li>HTTP - Hyper Text Transfer Protocol </li></ul><ul><li>SMTP - Simple Mail Transfer Protocol </li></ul><ul><li>SNMP - Simple Network Management Protocol </li></ul>
  17. 17. Layer Protocols DNS Query DNS Reply SYN SYN/ACK ACK Caller Callee {TCP Establishment} ARP Request ARP Reply
  18. 18. IP Functionality <ul><li>Presents single, virtual network to user </li></ul><ul><li>Connectionless Delivery </li></ul><ul><li>Packet Routing </li></ul><ul><li>Interface to Lower Layers </li></ul>
  19. 19. IP Addresses <ul><li>“ Dotted Decimal” </li></ul><ul><ul><li>32 bit (4 byte) address, written by taking each byte as an unsigned number </li></ul></ul><ul><li>Address Classes [first octet] </li></ul><ul><ul><li>A - <net> < > <host> < > 1-126 </li></ul></ul><ul><ul><li>B - <net> < > <host> < > 128-191 </li></ul></ul><ul><ul><li>C -< > <net> < > <host> 192-223 </li></ul></ul><ul><ul><li>D - special subset of C 224-239 multicast </li></ul></ul><ul><ul><li>E - reserved 240-254 </li></ul></ul><ul><li>Netmask </li></ul><ul><ul><li>a 32 bit value which, when ANDed with an address, selects only the network part </li></ul></ul>
  20. 20. Netmask Usage <ul><li>“ Do a bitwise AND then compare for equality of results” </li></ul><ul><li><src addr> & netmask =?= <dst addr> & netmask </li></ul><ul><li>if comparison is equal, then both src & dst are on same (sub)net. </li></ul>Same netmask
  21. 21. Netmask Examples ? S= 128.194.100.10 M= 255.255.255.0 result 128.194.100.0 D= 128.194.200.10 M= 255.255.255.0 result 128.194.200.0 Not Equal S= 128.194.12.10 M= 255.255.255.0 result 128.194.12.0 S= 67.194.18.10 M= 255.255.240.0 result 67.194.16.0 D= 128.194.12.110 M= 255.255.255.0 result 128.194.12.0 D= 67.194.10.10 M= 255.255.240.0 result 67.194. 0.0 ?
  22. 22. Special Address Conventions <ul><li>This host </li></ul><ul><li>Host on this net </li></ul><ul><li>Limited broadcast </li></ul><ul><li>Directed broadcast </li></ul><ul><li>Loopback </li></ul>all 0’s 127 anything (usually 1) net host all 0’s all 1’s all 1’s
  23. 23. IP Header 0 16 31 VERS HLEN SERVICE TYPE TOTAL LENGTH FLAGS FRAGMENT OFFSET IDENTIFICATION TIME TO LIVE PROTOCOL HEADER CHECKSUM SOURCE IP ADDRESS DESTINATION IP ADDRESS 19 8 4 IP OPTIONS (IF ANY) PADDING DATA ... 24
  24. 24. IP Packet Handling (rcv) receiving Transport Layer (TCP or UDP) Sockets IP Link {DIX Type or 802.3 DSAP} Other Physical
  25. 25. IP Packet Handling (xmit) sending Local or Non-Local ? ARP Search Routing Table Found! Missing! ICMP Error Send locally...
  26. 26. Bridges or Routers A B C D 1 2 3 4 5 Address & Netmask 1: 131.122.24.12 255.255.255.0 2: 131.122.31.253 255.255.255.0 3: 131.121.18.12 255.255.240.0 4: 131.121.24.18 255.255.240.0 5: 131.121.31.254 255.255.240.0
  27. 27. ICMP <ul><li>ping </li></ul><ul><ul><li>ECHO Request/Reply </li></ul></ul><ul><li>traceroute </li></ul><ul><li>traceroute to falcon.ece.utexas.edu (128.83.196.10), </li></ul><ul><li>30 hops max, 40 byte packets </li></ul><ul><li>1 exit_133 (128.194.133.254) 2 ms 2 ms 2 ms </li></ul><ul><li>2 exit_128 (128.194.128.254) 2 ms 3 ms 2 ms </li></ul><ul><li>3 FDDI-T3.TAMU.EDU (128.194.1.13) 3 ms 3 ms 3 ms </li></ul><ul><li>4 FDDI-WAN.TAMU.EDU (165.91.128.17) 5 ms 4 ms 6 ms </li></ul><ul><li>5 sprint-gw-h1-0.the.net (129.117.16.161) 20 ms 5 ms 5 ms </li></ul><ul><li>6 ut8-h1-0.the.net (129.117.16.241) 8 ms 9 ms 21 ms </li></ul><ul><li>7 129.117.20.12 (129.117.20.12) 7 ms 11 ms 7 ms </li></ul><ul><li>8 ens.gw.utexas.edu (128.83.7.132) 16 ms 23 ms 21 ms </li></ul><ul><li>9 ece-e0.gw.utexas.edu (128.83.249.251) 12 ms 9 ms 9 ms </li></ul><ul><li>10 * * * </li></ul>

×