1 / 24

IP Addressing & Routing By Lal Paul Systems Administrator CIRM, CUSAT

IP Addressing & Routing By Lal Paul Systems Administrator CIRM, CUSAT. The Internet Protocol (IP). Provides delivery of packets from one host in the Internet to any other host in the Internet, even if the hosts are on different networks

judd
Download Presentation

IP Addressing & Routing By Lal Paul Systems Administrator CIRM, CUSAT

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IP Addressing & Routing By Lal Paul Systems Administrator CIRM, CUSAT

  2. The Internet Protocol (IP) • Provides delivery of packets from one host in the Internet to any other host in the Internet, even if the hosts are on different networks • Internet packets are called “datagrams” and may be up to 64 kilobytes in length (although they are typically much smaller)

  3. IP Addresses • 32 bits long • Notation: • Each byte is written in decimal in MSB order, separated by decimals • 01101001.11111110.00010001.00000001 ( 105.254.17.1 – in decimal notation)

  4. IP Address Classes • Address Classes • Class A, B, C, D, E • Loopback • Broadcast

  5. IP Address Classes Class 32 bits 0 Net Type of Serv. Host A 10 Net Host B 110 Net Host C 1110 Multicast address D 11110 Reserved E

  6. IP Address Classes • Class A: • For very large organizations • 16 million hosts allowed : from 0xxx, or 1 to 126 decimal. • Class B: • For large organizations • 65 thousand hosts allowed : from10xx, or 128 to 191 decimal. • Class C • For small organizations • 255 hosts allowed : from 110x, or 192 to 223 decimal

  7. IP Address Classes (Cont’d) • Class D • Multicast addresses • No network/host hierarchy : 1110, or 224 to 239 decimal. • Class E • Future Use • begin with 1111, or 240 to 254 decimal.

  8. Subnets • Large Network Internet

  9. 192.168.1.0 192.168.2.0 192.168.4.0 192.168.3.0 Subnets • Departments after subnetting B A C D

  10. Subnet Masks • A binary number used to compare the destination address to the local IP address and to determine whether those destinations are on the same subnet or not.

  11. Subnet Masks • Assume your machine is 192.168.1.1 and has a subnet mask 255.255.255.0 and a packet is send to 192.168.1.2 • How to find whether the destination host is on the same subnet or not • Anding the IP Address with the subnet mask will give the Network Address.Hence the both Ips are Anded and the system will determine the network address

  12. 192.168.2.1 255.255.255.0 Net id 192.168.2.0 192.168.1.1 255.255.255.0 Net id 192.168.2.0 192.168.3.1 255.255.255.0 Net id 192.168.2.0 192.168.3.1 && 255.255.255.0 = 192.168.3.0 (Net id) Hence reject 192.168.3.1 && 255.255.255.0 = 192.168.3.0 (Net id) Hence Accept Ping 192.168.3.1

  13. W X Y Z A B C D 2.3 IP Routing How do you get a packet from one network to another? ?

  14. W W X X Y Y Z Z A A B B C C D D IP Routing (cont’d) Answer: with a router (or a series of routers) Case 1: Single hop R Case 2: Multi-hop Network Cloud R R

  15. N1 R1 N2 Deliver directly N3 Deliver directly N4 R3 Example R1 R2 R3 N1 N2 N3 N4 Dest Next hop Routing table @ R2 Actual routing table contains IP addresses, Flags indicating type of entries, net mask etc. (see Stevens pg. 113, sect 9.2)

  16. How packet travels 192.168.2.2 255.255.255.0 Gw:192.168.2.1 192.168.2.0 255.255.255.0 192.168.1.0 255.255.255.0 192.168.1.1 192.168.2.1 No route Packet send back 192.168.1.2 255.255.255.0 Gw:192.168.1.1 10.0.0.1 10.0.0.2 192.168.2.3 255.255.255.0 Gw:192.168.2.1 10.0.0.3 ping 192.168.3.2 192.168.3.2 && 255.255.255.0 192.168.3.0 255.255.255.0 192.168.3.1 = 192.168.3.0 192.168.3.2 255.255.255.0 Gw:192.168.3.1 Packet sent to Gateway

  17. Routing table 192.168.2.0 --> 10.0.0.2 192.168.3.0 --> 10.0.0.3 Routing 192.168.2.2 255.255.255.0 Gw:192.168.2.1 192.168.2.0 255.255.255.0 192.168.1.0 255.255.255.0 192.168.1.1 192.168.2.1 192.168.1.2 255.255.255.0 Gw:192.168.1.1 10.0.0.1 10.0.0.2 192.168.2.3 255.255.255.0 Gw:192.168.2.1 10.0.0.3 ping 192.168.3.2 Routing table 192.168.1.0 --> 10.0.0.1 192.168.3.0 --> 10.0.0.3 192.168.3.2 && 255.255.255.0 =192.168.3.0 192.168.3.0 255.255.255.0 192.168.3.1 Packet sent to Gateway 192.168.3.2 255.255.255.0 Gw:192.168.3.1 Routing table 192.168.1.0 --> 10.0.0.1 192.168.2.0 --> 10.0.0.2

  18. Ping • Uses ICMP echo request/reply • Source sends ICMP echo request message to the destination address • Echo request packet contains sequence number and timestamp • Destination replies with an ICMP echo reply message containing the data in the original echo request message • Source can calculate round trip time (RTT) of packets • If no echo reply comes back then the destination is unreachable

  19. Ping (cont’d) A R1 R2 R3 B Echo request Time Echo reply

  20. Traceroute • Traceroute records the route that packets take • A clever use of the TTL field • When a router receives a packet, it decrements TTL • If TTL=0, it sends an ICMP time exceeded message back to the sender • To determine the route, progressively increase TTL • Every time an ICMP time exceeded message is received, record the sender’s (router’s) address • Repeat until the destination host is reached or an error message occurs

  21. Traceroute (cont’d) Te = Time exceeded Pu = Port unreachable A R1 R2 R3 B TTL=1, Dest = B, port = invalid Te (R1) TTL=2, Dest = B Te (R2) Time TTL=3, Dest = B Te (R3) TTL=4, Dest = B Pu (B)

  22. Traceroute Examle 1 lcsr-gw (128.6.13.21) 1.206 ms 0.973 ms 0.782 ms 2 rucs-gw (165.230.212.129) 0.697 ms 0.569 ms 0.571 ms 3 transition2-gw (165.230.12.145) 2.786 ms 0.994 ms 0.769 ms 4 rutgers-gw.Rutgers.EDU (198.151.130.209) 1.726 ms 2.048 ms Vl1000-sr02-hil l012-svcs.Rutgers.EDU (198.151.130.14) 1.278 ms 5 rutgers-gw.Rutgers.EDU (198.151.130.209) 1.755 ms 1.241 ms 1.828 ms 6 198.151.130.226 (198.151.130.226) 2.748 ms 3.070 ms 2.640 ms 7 clev-nycm.abilene.ucaid.edu (198.32.8.29) 15.162 ms 14.619 ms 14.663 ms 8 ipls-clev.abilene.ucaid.edu (198.32.8.25) 21.220 ms 22.497 ms 21.450 ms 9 kscy-ipls.abilene.ucaid.edu (198.32.8.5) 30.257 ms 30.604 ms 30.969 ms 10 dnvr-kscy.abilene.ucaid.edu (198.32.8.13) 40.823 ms 41.181 ms 41.076 ms 11 snva-dnvr.abilene.ucaid.edu (198.32.8.1) 65.436 ms 66.068 ms 65.569 ms 12 198.32.249.161 (198.32.249.161) 65.673 ms 65.771 ms 66.006 ms 13 BERK--SUNV.POS.calren2.net (198.32.249.13) 67.183 ms 67.131 ms 66.858 ms 14 pos1-0.inr-000-eva.Berkeley.EDU (128.32.0.89) 67.192 ms 66.749 ms 67.720 ms 15 vlan198.inr-201-eva.Berkeley.EDU (128.32.0.194) 67.373 ms 67.067 ms 67.82 1 ms 16 fast8-0-0.inr-210-cory.Berkeley.EDU (128.32.255.122) 67.634 ms 68.735 ms 68.413 ms 17 GE.cory-gw.EECS.Berkeley.EDU (169.229.1.46) 67.575 ms 68.222 ms 67.772 ms 18 gig8-1.snr1.CS.Berkeley.EDU (169.229.3.66) 67.454 ms 67.988 ms 67.177 ms 19 now.CS.Berkeley.EDU (128.32.44.96) 67.892 ms * 67.818 ms

More Related