21
1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

Embed Size (px)

Citation preview

Page 1: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

1

TCP/IP Internetworking (Part 2)

(February 9, 2015)

© Abdou Illia – Spring 2015

Page 2: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

2

Border Router vs. Internal Router

ISP Network60.x.x.x

Subnet 192.168.2.x

Subnet 192.168.3.x

Subnet192.168.1.xInternal

Router

BorderRouter

Corporate network 192.168.x.x

Border routers connect different networks In this case network 192.168.x.x and network 60.x.x.x). An “x” indicates anything

Page 3: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

3

Border Router vs. Internal Router (cont.)

Internal routers connect different subnets in a network In this case, subnets: 192.168.1.x, 192.168.2.x, and

192.168.3.x.

ISP Network60.x.x.x

Subnet 192.168.2.x

Subnet 192.168.3.x

Subnet192.168.1.xInternal

Router

BorderRouter

Corporate network 192.168.x.x

Page 4: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

4

IP Routing

Network60.x.x.x

Packet to 60.3.47.129

Router B

Router C

Interface1

Interface2

Network60.x.x.x

IP Routing

Network60.3.x.x

Route

123456

IP AddressRange

60.3.x.x128.171.x.x60.3.47.x10.5.3.x

128.171.17.x10.4.3.x

Metric

928622

Router A

Routing Table for Router A

Host60.3.45.129

Next-HopRouter

BBCB

LocalC

Routing

Matches

Host60.3.47.129

Because of multiple alternative routes in router meshes,routers may have several rows that match an IP address.

Routers must find All matches and then select the BEST ONE.This is slow and therefore expensive compared to switching.

Router A

Page 5: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

5

IP Routing (cont.)

The Routing Table Each router has a routing table that it uses to

make routing decisions Routing Table Rows

Each row represents a route for a RANGE of IP addresses—often a network or subnet

All packets with destination addresses in this range are routed according to that row

RouteIP Address Range

Governed by the routeMetric

Next-HopRouter

1 60.3.x.x 9 B

Page 6: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

6

The Routing Table Routing Table Columns

Row (route) number: Not in real routing tables IP address range governed by the row Metric for the quality of the route (cost, speed, etc.) Next-hop router that should get the packet next if the

row is selected as the best match

Route IP AddressRange

Metric Next-HopRouter

1 60.3.x.x 9 B

2 128.171.x.x 2 B

IP Routing (cont.)

Page 7: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

7

A Routing Decision The router looks at the destination IP address in

an arriving packet (in this case, 60.3.47.129). 1. The router determines which rows match (have

an IP address range containing the packet’s destination IP address)

The router must check ALL rows for possible matches

Route IP AddressRange

Metric Next-HopRouter

1 60.3.x.x 9 B

2 128.171.x.x 2 B

Arriving Packet60.3.47.129

Match

No Match

IP Routing (cont.)

3 60.3.47.x 8 C Match

Page 8: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

8

A Routing Decision 2. After finding all matches, the router then

determines the BEST MATCH row 2A. Selects the row with the LONGEST MATCH

60.3.x.x has 16 bits of match 60.3.47.x has 24 bits of match so is a better

match

2B. If two or more rows tie for the longest match, router uses the METRIC column value

If cost, lowest metric value is best If speed, highest metric value is best Etc.

IP Routing (cont.)

Page 9: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

9

A Routing Decision 3. After selecting the best-match row, the router

sends the packet on to the next-hop router indicated in the best-match row—Next-Hop Router C in this example.

Route IP AddressRange

Metric Next-HopRouter

1 60.3.x.x 9 B

2 128.171.x.x 2 B

Send Packetout to

NHR B

IP Routing (cont.)

3 60.3.47.x 8 C Best-Match Row

Page 10: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

10

Vertical Communication on Routers

Port 1DL

Port 2DL

Port 3DL

Port 4DL

PHY PHY PHY PHY

Internet Layer Process Packet

Frame

Router 1A

Decapsulation

Notes:A. Router R1 receives frame in Port 1.

Port 1 Data Link decapsulates the IP packet.Port 1 Data Link passes packet to internet Layer.

Page 11: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

11

Vertical Communication on Routers

Port 1DL

Port 2DL

Port 3DL

Port 4DL

PHY PHY PHY PHY

Internet Layer Process Packet

Frame

Router 1

Router 2

B

Encapsulation

B. Internet layer sends packet out on Port 4.Data Link process on Port 4 encapsulates packet in a DL frame.Data Link process passes frame to Port 4 PHY.

Page 12: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

12

Summary Questions (Part 1)

How many layers are there in a router? Can a router be a software program? Suppose that Computer 1 sends a message to

Computer 2. Assume that there are two routers (R1 and R2) along the route that leads to Computer 2. Assume that a frame from the message is received by R1 in Port 2. Which of the following will happen next?

a) The Data Link layer process in Port 1 will de-encapsulate the IP packet from the frame

b) The Physical layer will pass the frame to the Data Link layer process in Port 2

c) The Data Link layer process in Port 2 will de-encapsulate the IP packet from the frame

d) None of the above

Page 13: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

13

IP Addresses

NetworkBrowser

Packet

Router

Packet

Route

WebserverSoftware

User PC(Host)IP Address=128.150.50.9

Webserver(Host)

IP Address=139.67.14.57Host name=eiu.edu

Page 14: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

14

IP Address IP is a connectionless protocol IP address is like postal addresses

Postal addresses are hierarchical: state, city, postal zone, street, house address

IP Addresses have the following hierarchy Network number (tells what network the host is on)

Subnet number (tells what segment of network the host is on)

Computer number (identifies a particular computer on the segment)

Routers look at network part (and segment part for some) to make routing decisions

Final router looks at Host part

Page 15: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

15

Hierarchical IP Address

Network Part (not always 16 bits)

Subnet Part (not always 8 bits)

Host Part (not always 8 bits)

Total always is 32 bits.

139.67.130.13

Host 13139.67.130.13

School of Business Subnet(130)

EIU Network(139.67)

The Internet 13

Page 16: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

16

IP Address notations IP addresses

Are really strings of 32 bits (1s and 0s) Example: 10000000101010100001000100001101

Usually represented by four number segments separated by dots: dotted decimal notation

Example: 128.171.17.13

127.18.47.145127.47.17.47

Page 17: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

17

IP Address structure

Each IP Address has two main parts:

Each Organization is given the Network Part by an IP address Registrar (see www.arin.net)

For Eastern Illinois University, this is 139.67 All IP Addresses for Eastern’s computers begin

with that Network Part

IP Address139.67

Network Part Local Part

American Registry for Internet Numbers Check EIU’s IP registration info

Page 18: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

18

IP Address structure

Network Parts is 8 to 24 bits long For Eastern, it is 16 bits long

16 bits is only an example

Local Part Total address is 32 bits, so if the network part is 8 bits, the

local part is 24 bits

Network Part(8 to 24 bits)

Page 19: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

19

Assigning Parts

Most Organizations have multiple segments within the organizational network

So, usually Local Part is broken in two parts a Segment Part to represent each segment Remaining Bits are the Host Part, designating

a particular computer on that segment

Network Part Segment Part

IP Address (32 bits total)

Host Part

Local Part

Page 20: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

20

Network classes

Class A

Class B

Class C

0.x.x.x to 127.x.x.x

128.0.x.x to 191.255.x.x

192.0.0.x to 223.255.255.x

Class Address range

0xxx

10xx

110x

Leftmost bits

8 bits

16 bits

24 bits

Network Part Length

Classful IP Addressing

Classless IP Addressing (since 1993) Most networks too big for "class C“. Therefore received a

"class B" set of addresses instead. With the rapid growth of the Internet, there is a shortage

of class B addresses Classful IP addressing is replaced by Classless IP

addressing e.g., instead of a full class B, business gets "a set of /16

addresses"

# of networks

# of host/network

Question: Determine the number of maximum networks and hosts for each class.

Page 21: 1 TCP/IP Internetworking (Part 2) (February 9, 2015) © Abdou Illia – Spring 2015

21

IP Address Spoofing

Trusted Server60.168.4.6

Victim Server60.168.47.47

1. Trust Relationship

From: 60.168.4.6To: 60.168.47.47

2. Spoofed Source IP Address

60.168.4.6 is used.

Attacker’s Client PC1.34.150.37

Reasons for IP spoofing: Anonymity Exploiting trust relationship

IP address spoofing is sending a message with a false IP address with the intent to mislead the receiving device and gain access