Presentation is loading. Please wait.

Presentation is loading. Please wait.

IP Routing Table (Linux) eth0 eth0 UG UG 0.0.0.0 0.0.0.0144.16.64.1 lo lo U 255.0.0.0 255.0.0.0 0.0.0.0 0.0.0.0 127.0.0.0 127.0.0.0 eth0 eth0 U255.255.224.0.

Similar presentations


Presentation on theme: "IP Routing Table (Linux) eth0 eth0 UG UG 0.0.0.0 0.0.0.0144.16.64.1 lo lo U 255.0.0.0 255.0.0.0 0.0.0.0 0.0.0.0 127.0.0.0 127.0.0.0 eth0 eth0 U255.255.224.0."— Presentation transcript:

1 IP Routing Table (Linux) eth0 eth0 UG UG 0.0.0.0 0.0.0.0144.16.64.1 lo lo U 255.0.0.0 255.0.0.0 0.0.0.0 0.0.0.0 127.0.0.0 127.0.0.0 eth0 eth0 U255.255.224.0 0.0.0.0 0.0.0.0144.16.64.0 Intfc Intfc Flags Flags Genmask Genmask Gateway Gateway Dest Dest The routing table mask

2 IP Routing Tables In Linux, a Gateway entry of 0.0.0.0 indicates that the destination is directly connected In Linux, a Gateway entry of 0.0.0.0 indicates that the destination is directly connected Also, a Genmask of 0.0.0.0 and a destination of 0.0.0.0 indicate a default entry Also, a Genmask of 0.0.0.0 and a destination of 0.0.0.0 indicate a default entry –Any “dest addr” & 0.0.0.0 = 0.0.0.0 –So any dest addr matches this entry –Hence “default entry”

3 IP Routing Tables The “Destination” column in the routing table is better called network prefix The “Destination” column in the routing table is better called network prefix Stores the pattern against which a match of Stores the pattern against which a match of packet D.A & genmask is attempted is attempted Possible for Possible for packet D.A & genmask to match multiple entries in col network prefix? to match multiple entries in col network prefix?

4 IP Routing Tables Longest prefix match Longest prefix match Most specific match determines how the packet will be handled Most specific match determines how the packet will be handled Presence of the H flag … Presence of the H flag … network prefix is 32 bits long network prefix is 32 bits long Most specific match possible Genmask = 255.255.255.255

5 Routing Table Masks The routing table was that of a machine whose interface address is 144.16.68.2 and subnet mask is 255.255.224.0 The routing table was that of a machine whose interface address is 144.16.68.2 and subnet mask is 255.255.224.0 1st row: R.T.mask = subnet mask 1st row: R.T.mask = subnet mask 2nd and 3rd rows: R.T.mask not equal to subnet mask 2nd and 3rd rows: R.T.mask not equal to subnet mask

6 Broadcast addresses What is the limited broadcast address that machine X will use? What is the limited broadcast address that machine X will use? –255.255.255.255 What is the subnet-directed broadcast address that machine X will use? What is the subnet-directed broadcast address that machine X will use? –144.16.95.255

7 Link layer Number of hosts accessible via the link OneMore than one (Serial links) (Ethernet, FDDI, …)

8 Ethernet Data (IP, ARP, RARP …) CRC Dest addr (6 bytes) Source addr (6 bytes)Type 10 Mb/s, 100 Mb/s, 1 Gb/s

9 Ethernet D.A.S.A. Type CRC ARPRARPIP

10 IEEE 802.3 ARP RARP IP D.A.S.A. Length CRC 8 bytesThe type field is part of the additional 8-byte field

11 Ethernet/802.3 addresses 48-bit addresses 48-bit addresses 24 out of the 48 bits are obtained from IEEE 24 out of the 48 bits are obtained from IEEE –IEEE: Official global authority for LAN addresses These 24 bits: Organizationally Unique Identifier (OUI) These 24 bits: Organizationally Unique Identifier (OUI) Radia Perlman, “Interconnections” Radia Perlman, “Interconnections”

12 Ethernet/802.3 addresses 1 bit out of the 24 OUI bits: Group/Individual bit 1 bit out of the 24 OUI bits: Group/Individual bit –1: Address refers to a logical group of stations (ex: multicast Ethernet addresses) –0: Address refers to a particular station Another bit out of the 24 bits: Local/global bit Another bit out of the 24 bits: Local/global bit –0: The address is globally unique –1: The address is locally assigned, no guarantee of global uniqueness

13 Framing How to distinguish between successive frames? How to distinguish between successive frames? Where does a frame start and where does it end? Where does a frame start and where does it end? –Special characters as delimiters? –Anything else?

14 Ethernet frame Data Header Trailer Medium In Ethernet, gaps between frames act as delimiters…inter-frame gap How would a station detect the beginning of the “gap”? Drop in power level in the medium

15 Frame Length Fixed or variable length? Fixed or variable length? –Ethernet frames are of variable length –Minimum: 64 bytes (including 14 bytes of header and 4 bytes of CRC) –Maximum: 1518 bytes –Maximum Transmission Unit (MTU): 1500 bytes How can we know the length of a frame? How can we know the length of a frame?

16 If the beginning and end of the frame can be identified (delimiters), then the frame can be parsed properly If the beginning and end of the frame can be identified (delimiters), then the frame can be parsed properly Length Data From the beginning of the frame: first 6 bytes -- D.A., next 6 bytes -- S.A. etc; From the end of the frame: last 4 bytes -- CRC

17 Error Detection How to handle errors on the link? How to handle errors on the link? –Error detection –CRC: Cyclic Redundancy Check “Reliable” link or “unreliable” link “Reliable” link or “unreliable” link –Error detection is the first step –If reliable link: sender retransmits

18 Reliability & Flow Control –ARQ (Automatic Repeat Request) –Acks / Nacks must be sent back to the sender –Ethernet: no reliability Flow Control Flow Control –Receiver stops a fast sender –IEEE 802.3 defines a PAUSE frame for this

19 Cyclic Redundancy Check Code Cyclic Redundancy Check Code Simple parity check codes Simple parity check codes –Odd and even parity; modulo-2 sum Horizontal and vertical parity check code Horizontal and vertical parity check code CRC Row parity bit Column parity bit

20 CRC Can generalize the horizontal and vertical check code to a general parity check code Can generalize the horizontal and vertical check code to a general parity check code –Parity bits are calculated on subsets of the data bits In a CRC, the string of data bits and the code bits are viewed as polynomials In a CRC, the string of data bits and the code bits are viewed as polynomials –Data string = 1101, poly = (D^3 + D^2 + 1)

21 CRC New entity: generator polynomial New entity: generator polynomial L-bit CRC L-bit CRC Generator polynomial g(D) : of degree L in the variable D Generator polynomial g(D) : of degree L in the variable D s(D): data polynomial s(D): data polynomial

22 CRC To get the CRC polynomial c(D) To get the CRC polynomial c(D) –Obtain s(D)*(D^L) –Divide s(D)*(D^L) by g(D) –c(D) = Remainder when s(D)*(D^L) is divided by g(D) “Data Networks” – Bertsekas and Gallager “Data Networks” – Bertsekas and Gallager –Chap 2

23 ARP “Protocol address” Ex: IP address “Hardware address” Ex: Ethernet address RFC 826

24 ARP S.A.D.A. Type CRC ARP Sender h/w Sender proto Target h/w Target proto

25 ARP header Hardware type (2 octets) Hardware type (2 octets) –Value =1 for Ethernet Protocol type (2 octets) Protocol type (2 octets) –Value = 0x0800 for IP Hardware address size in bytes (1 octet) Hardware address size in bytes (1 octet) –Value = 6 for Ethernet Protocol address size in bytes (1 octet) Protocol address size in bytes (1 octet) –Value = 4 for IP

26 ARP header Opcode Opcode –ARP request –ARP reply –RARP request –RARP reply

27 ARP cache Before issuing an ARP request, a machine always checks its ARP cache to see if the desired hardware address is present Before issuing an ARP request, a machine always checks its ARP cache to see if the desired hardware address is present If no such address mapping is found, then the ARP request is issued If no such address mapping is found, then the ARP request is issued Timeout for cache entries Timeout for cache entries arp –a shows all the ARP cache entries arp –a shows all the ARP cache entries


Download ppt "IP Routing Table (Linux) eth0 eth0 UG UG 0.0.0.0 0.0.0.0144.16.64.1 lo lo U 255.0.0.0 255.0.0.0 0.0.0.0 0.0.0.0 127.0.0.0 127.0.0.0 eth0 eth0 U255.255.224.0."

Similar presentations


Ads by Google