ist 220 exam 3 notess2.ist.psu.edu/ist220/exam-3-notes.pdfist 220 exam 3 notes prepared by dan...

17
IST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15 th from 4:40PM – 6:30 PM in 112 Chambers. Chapters covered: 12, 13, 15, 16, 17, 18, 20, 21 Concepts to know: Long Distance Digital Connection Central office Phone switch Analog long-distance circuits (using amplifiers) Digital long-distance circuits (using repeaters) Leased line DSU/CSU T1, T2, T3 circuits OC1, OC2, OC3 WAN technologies WAN WAN switches Why MAC address based forwarding tables are not good for a WAN Hierarchical addressing scheme Why hierarchical addresses can make routing tables much smaller? Packet forwarding in WAN (step-by-step) Routing, routing table Routers Shortest path routing How to building routing tables? Protocols and layering Layering Routing layer headers and payloads NIC layer headers and payloads Nested headers How a message is transmitted across a WAN How routing layer headers are used to do routing OSI reference model: physical layer, data link layer (NIC layer), network layer (routing layer), transport layer, session layer, presentation layer, application layer TCP/IP reference model: physical layer, network interface layer (data link layer), IP layer (network layer), TCP layer (transport layer), application layer What does a WAN do in each layer?

Upload: others

Post on 06-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

IST 220 Exam 3 Notes Prepared by Dan Veltri

The Final Exam is scheduled for Wednesday, December 15th

from 4:40PM – 6:30 PM in 112 Chambers.

Chapters covered: 12, 13, 15, 16, 17, 18, 20, 21 Concepts to know: Long Distance Digital Connection

Central office Phone switch Analog long-distance circuits (using amplifiers) Digital long-distance circuits (using repeaters) Leased line DSU/CSU T1, T2, T3 circuits OC1, OC2, OC3

WAN technologies

WAN WAN switches Why MAC address based forwarding tables are not good for a WAN Hierarchical addressing scheme Why hierarchical addresses can make routing tables much smaller? Packet forwarding in WAN (step-by-step) Routing, routing table Routers Shortest path routing How to building routing tables?

Protocols and layering

Layering Routing layer headers and payloads NIC layer headers and payloads Nested headers How a message is transmitted across a WAN How routing layer headers are used to do routing OSI reference model: physical layer, data link layer (NIC layer), network layer (routing layer), transport layer, session layer, presentation layer, application layer TCP/IP reference model: physical layer, network interface layer (data link layer), IP layer (network layer), TCP layer (transport layer), application layer What does a WAN do in each layer?

pliu
pliu
Page 2: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

Internetworking Internetworks ISP; backbone Physical networks The Internet

IP addresses

Two parts of an IP address: prefix and suffix Five Classes of IP addresses Network Addresses and Broadcast Addresses Maximum numbers of computers or networks within each class How to compute the class of an IP address Dotted Decimal Notation IP Addresses for routers

IP datagram forwarding

Assigning IP addresses to an internetwork How a message is transmitted across an internetwork where IP is used IP layer (i.e., routing layer) headers and payloads Network interface layer (i.e., NIC layer) headers and payloads Routing tables, the mask field

pliu
Page 3: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

Chapter 12: LAN Extended LAN WAN Internet So far, we learned how to build a large LAN. However, many companies have several divisions from east to west coast. Therefore, they need a WAN. In the simplest case,

We need a higher speed. Two solutions:

(1) Leased lines – AT&T (2) Via Internet – VPN technology

A leased line – 1.5 Mbps - $900 per month

However, this setting does not work! Why? Reason 1: This is because LANs are digital, but AT&T is analog. WRONG Because “today,” AT&T switches are digital Correct Answer: Because LAN and phone switches handle digital signals using

different standards.

Page 4: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

We need a digital to digital translator: DSU/CSU – Data Service Unit / Channel Service Unit

It works as follows:

How quick can it be? Copper wires T1 – 1.544 Mbps T2 – 6.312 Mbps T3 – 44.736 Mbps Fiber Optic OC1 – 51.840 Mbps OC3 – 155.5 Mbps OC12 – 672 Mbps OC24 – 1 Gbps OC48 – 2 Gbps Last notes: You can use leased lines based on your budget. If you cannot afford a T1 ($900), you can use a fractional T1 whose bandwidth is split among companies. Signals from each LAN are multiplexed at the Central Office and later demultiplexed at the destination Central Office. It works perfectly.

Page 5: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

If T1 is too slow, but T2 is too expensive, you get multiple T1s. At the central office, the LAN signal is split to the multiple T1s by an inverse multiplexer, which is later recombined by an inverse demultiplexor. Chapter 13: WANs use a WAN interface (a special NIC) Details of a WAN Switch:

Page 6: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

Note: This WAN has 3 LANs, 6 LAN segments, 11 computers Note: NIC 1-1 is a WAN NIC (cost about $150) NIC 1-3 is a LAN NIC (cost about $10) Q1. What if we also connect S1 and S3? Pros: LAN is more robust Cons: LAN is more expensive Q2. How to make this WAN work? Answer: use LAN switch technology. This is, we just need to make the

forwarding table larger… Then, the WAN should run! Idea: S2 uses a single forwarding table to forward all possible messages in the WAN correctly. Since a message may be sent to any computer in this WAN, the MAC address of every computer should be in the forwarding table. Q3. For this WAN, how many entries should be in the forwarding table? Answer: All three forwarding tables have the same size, 11 entries, size of FT =

the number of computers in the WAN. So, if a WAN has 10,000 computers, each forwarding table will have 10,000 entries.

Problem: it uses a lot of RAM and is slow. This solution is NOT GOOD, FORGET MAC addresses for forwarding Hence, we need (1) much smaller forwarding table (2) much quicker forwarding. How to do this? Answer: We need to use hierarchical addresses! Hierarchical addresses are composed of 3 numbers (Switch #, Segment #, Computer #) Example: Because segment 4 is the first segment connected to switch 2, the h-address of computer F should be 2,1,1.

Destination Address NIC A 1,1,1 2,1 B 1,1,2 2,1 C 1,2,1 2,1 D 1,2,2 2,1 E 1,3,1 2,1 F 2,1,1 2,3 G 2,1,2 2,3 … … …

Computers that use the same NIC (example: computers A-E) are merged in the forwarding table (example: 1,*,* | 2,1)

Page 7: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

Today, we will begin using new names

(a.) when the forwarding table uses hierarchical addresses like 1,1,2, it is called a routing table

(b.) When a WAN switch uses a routing table, it is called a router

Assume computer A is sending “I like you” to computer D Step 1: P-A composes the packet

Step 2: NIC-A adds a preamble, CRC, and uses CSMA/CD to send out the packet Step 3: NIC 1-1 in R1 will:

(a.) Demodulate cache (b.) length checking (c.) CRC checking (d.) Strip off preamble and CRC (e.) queue

Step 4: P-R1 will use the routing table and the header of the packet to forward the packet Routing Table: Destination Address NIC 1,*,* 1,1 2,*,* 1,2 3,*,* 1,2 - tricky 4,*,* 1,2 - tricky Now the routing table is a tricky issue because there are multiple routes from R1 to R4. Example: R1 R2 R4 700 miles – best route (uses NIC 1,2 on R1)

R1 R3 R4 900 miles

pliu
eot
pliu
soh
Page 8: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

R1 R2 R3 R4 800 miles R1 R3 R2 R4 1000 miles In this class, we use route with lowest total distance to determine best route.

*We assume the best routing criteria is the shortest distance, but this not the only option. Other good criteria include shortest transmission time or lowest amount of congestion.

Here we assume that static routing is being done, that is, each routing table is prepared by the network administrator. Only he can change the table. Nowadays, the internet does dynamic routing, where the routing table is dynamically changed by software when the network situation is changed. Step 4B: P-R1 matches the destination address of the packet. Namely 4,1,2 with the routing table. Since the record is matched, P-R1 forwards the packet to NIC 1,2. Step 5: NIC 1-2 will add the preamble, CRC modulate send out (no CSMA/CD) Step 6: NIC 2-1 will demodulate cache length check CRC strip off queue Step 7: P-R2 will do shortest path routing, based on its routing table

Destination Address NIC 1,*,* 2,1 2,*,* 2,4 3,*,* 2,2 4,*,* 2,3

This process continues until the packet reaches computer D for a total of 13 steps. The DEADLY problem: In the last lecture, the packet will never be able to reach P-D, because, if the packet could reach NIC-D, it would be using hierarchical addresses. However, this packet will be discarded by NIC-D during address filtering because address filtering is only based on the physical (MAC) address. (NIC cards are built this way. Even worse problem: Actually, NIC 1-1, NIC 3-1, and NIC 4-2 will also do address filtering; So, the packet can’t even reach NIC-D. The fundamental reason is:

(a) we need hierarchical addresses to do routing (b) but we need physical (MAC) addresses to do address filtering

So, we need to use BOTH addresses! The idea of layering is to break down a complicated solution into small pieces or steps, then solve the problem step-by-step.

Page 9: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

Assume computer A is to send “ER” to computer B: The packet will follow this path: P-A NIC-A NIC 1-1 Queue in R1 P-R1 NIC 1-3 NIC 3-1 Queue in R3

P-R3 NIC 3-3 NIC 4-2 Queue in R4 P-R4 NIC 4-3 NIC-D P-D Step 1: (At P-A) According to layering, P-A will go thorough two steps to compose the packet.

(a.) P-A adds the router layer header.

(b.) P-A adds the NIC layer header.

“Nested header” means that the routing layer header is nested inside the NIC layer payload.

Step 2: NIC-A will add preamble and CRC CSMA/CD Q1: CRC is based on which part of the packet?

a. NIC layer header b. Router layer header c. NIC layer payload d. Router layer payload

Step 3: NIC 1-1 demodulate cache address filtering length checking CRC checking strip off preamble and CRC queue Q2: In this NIC layer header, what should be the destination?

a. NIC-D’s MAC b. NIC-A’s MAC c. NIC1-1’s MAC

Step 4: P-R1 will also go through several steps (a.) strip off the NIC layer header (b.) use the routing table to determine where to forward based on “shortest path

routing”. The answer is: NIC 1-3 (c.) P-R1 will add a new NIC layer header

pliu
(c) P-A adds soh and eot
pliu
(0) P-R1 will first strip off soh and eot
pliu
(d) P-A adds soh and eot
Page 10: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

Step 5: NIC 1-3 will add the preamble and CRC modulate send out Step 6: NIC 3-1 will do exactly the same thing as NIC 1-1 Step 7: P-R3 will do exactly the same thing as P-R1, except that

(a.) use his routing table (b.) add a different NIC layer header

Step 8: NIC 3-3 will exactly the same thing as NIC 1-3 Step 9: NIC 4-2 will do exactly the same thing as NIC 3,1 Step 10: P-R4 will do exactly the same thing as P-R3, except it will change the NIC layer header with destination address of NIC-D and sender address of NIC 4-3. Step 11: NIC 4,3 will add will add the preamble and CRC CSMA/CD Step 12: NIC-D will do exactly the same thing as NIC 4-2 Step 13: P-D will

(a.) strip off the NIC layer header (b.) after knowing the sender, strip off the routing layer header (c.) display the message on the computer!

“ER” add routing header add NIC header add CRC, preamble Cable address filtering, length, CRC Strip off NIC layer do routing add a new NIC header add preamble, CRC Cable to R3 Idea: different devices will do the same type of things on the same layer. OSI 7 layer model: app layer presentation session transport network data link

physical IST 4 layer model: app layer routing NIC physical Chapter 17: Internetworking When there are several WAN, wanting to connect with each other, we will get an internetwork. The largest internetwork is the Internet.

Page 11: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

Challenge: How to interconnect the three WANs Solution 1: connect their routers directly Problems:

(a.) not very open (b.) a lot of hassles to add a new WAN (c.) not friendly to individual users and small businesses

Solution 2: ask a third party to be the ISP. Each WAN uses an ISP to connect to a backbone of the internet How to make it work? Idea 1: we can directly apply our WAN technology to do this job

Problem: (a.) there are several “R1” confuse senders and receivers (b.) there are several “1,1,1” more confusing

Solution: we need a unique identifier for every router and computer on the internet IP addresses

• proposed by International Organization • agreed upon by all the people

Technical details:

1. IP addresses are hierarchical addresses so IP routing is efficient 2. Every IP address has two parts

a. Prefix – indicates which physical network b. Suffix – indicates which computer in the physical network

For example: consider a situation where we have 3 physical networks; we can use the following IP address. 10 bit IP address:

Page 12: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

Rule 1: All the computers in the same physical network will have the same prefix. Ex. IBM WAN prefix: 0,1 Microsoft WAN prefix: 1,0 Sun WAN prefix: 1,1 Note: based on the prefix, we easily see the computer is on IBM, MS, or Sun. Mini-IP (1):

Q1. At most, how many physical networks can be addressed by this mini-IP? Answer: 4 (prefix possibilities: 0,0 0,1 1,0 1,1) Q2. Can the mini-IP of computer 1 be 0101? Answer: No, because all computers in Toy A physical network must have the same prefix, which is 00. Q3. At most, how many computers in Toy C physical network can get a mini-IP? Answer: 4 (suffix possibilities: 0,0 0,1 1,0 1,1) Mini-IP (2):

Q4. At most, how many physical networks can be addressed by this mini-IP? Answer: 2 Q5. At most, how many computers in Toy C physical network can get a mini-IP? Answer: 8 (2^3 = 8) # of network/computer possibilities = 2 ^ length of prefix/suffix respectively In summary, if the total address length is fixed, putting more bits in the prefix part gives us more physical networks, but each physical network must have fewer computers. As a result: For a big company prefer longer suffix For a smaller company prefer longer prefix Answer to problem: Have 5 classes of IP addresses.

Page 13: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

We break down the set of all IP addresses into 5 groups (classes A,B,C,D,E,F); each class has a collection of IP addresses.

• No two classes will share any IP addresses • Class A is for big companies • Class C is for small companies • Every IP has 32 bits • Different classes have different formats

The properties of each class are as follows:

Class Prefix Suffix A 7 bits 24 bits B 14 bits 16 bits C 21 bits 8 bits

Q1. Which physical network is the largest?

Answer: Class A Q2. Which class does this address belong to?

Page 14: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

Answer: Class B (look at the class identifier in the beginning) Q3. What is the decimal notation of IP address? Step 1: Split it into 4 parts; each part has 8 bits Step 2: translate every part into a decimal number Q4. 192.100.100.100 belongs to what class? Answer: Translate 192 into 11000000 class C identifier Assume both R1 and R2 are owned by an ISP. Then, there are 3 physical networks.

Now we can assign IP addresses:

(a.) every computer has a unique IP NIC-A: 166.200.122.1 NIC-B: 167.234.15.35 NIC-D: 168.16.24.115

As a result, each NIC is associated with 2 addresses (1.) IP address (2.) MAC address

Page 15: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

Q1. How to assign IP address to R1? Answer: both NIC 1,1 and NIC 1,2 should have an IP address because NIC 1,1 is part of physical network 1. The prefix of his IP address must be the same as the prefix of computer A’s IP address. Q2. What’s the prefix of A’s IP? Answer: IP = 166.200.122.1, 166 “01010000” (class B identifier). Computer A is a Class B address. So the first 16 bits (2 digits) is the prefix (including the class identifier). So the answer = 166.200 Hence, NIC 1,1’s IP = 166.200.3.3 Similarly, NIC 1,2’s IP = 167.234.11.10 Moreover, in each physical network, we have 2 special IP addresses which are reserved. Network address: 166.200.0.0 (166.200 is prefix, 0.0 is the suffix) Broadcast address: 166.200.255.255 (166.200 is prefix, 255.255 is suffix) A quick way to identify IP class: 1st Digits Class 0-127 A 128-191 B 192-223 C 224-239 D 240-255 E Q3. IP address is 100.100.100.100. What’s the prefix? Answer: prefix = 100 (class A) Network address = 100.0.0.0 Computer A “I like you” Computer D Step1a: P-A will add the routing layer header Step 1b: P-A will add the NIC layer header. Step 2: At NIC-A add CRC, preamble use CSMA/CD Step 3: NIC 1,1 demodulate cache add filtering length CRC strip off CRC, preamble Queue Step 4a: P-R1 will strip off the NIC header. Step 4b: P-R1 will do routing based on the routing table. Destination Next Hop 166.200.0.0 NIC 1,1 166.234.0.0 NIC 1,2 168.16.0.0 NIC 1,2 *(1) we use the Net Address (2) We still do shortest path routing

Page 16: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

Step 5: Now we match computer D’s IP address 168.16.24.115 against the routing table and find it matches to row 3. Mask Field in routing tables (IP mask) Q1. Why do we need Mask? Answer: Humans can easily see that 168.16.24.115 matches 168.16.0.0 because they have the same prefix, BUT it is very hard for computers to do this smart matching! To enable a computer to do this matching we need to use mask. Ultimate Routing Table (no more lies) Destination Mask Next Hop 166.200.0.0 255.255.0.0 NIC 1,1 167.234.0.0 255.255.0.0 NIC 1,2 168.16.0.0 255.255.0.0 NIC 1,2 Computer A is sending message “I like you” to computer D Step 1: P-A adds two headers

Step 2: NIC-A Step 3: NIC 1,1 Step 4: (at P-R1)

a. strip off NIC header b. do routing: match the destination IP address, namely 168.16.24.116, with the

routing table: Destination Mask Next Hop 166.200.0.0 255.255.0.0 NIC 1,1 167.234.0.0 255.255.0.0 NIC 1,2 168.16.0.0 255.255.0.0 NIC 1,2

c. P-R1 needs to add a new NIC layer header.

Step 5: NIC1,2 preamble, CRC CSMA/CD

pliu
pliu
pliu
and soh and eot
pliu
soh
pliu
eot
pliu
pliu
soh
pliu
eot
pliu
Page 17: IST 220 Exam 3 Notess2.ist.psu.edu/ist220/EXAM-3-NOTES.pdfIST 220 Exam 3 Notes Prepared by Dan Veltri The Final Exam is scheduled for Wednesday, December 15th from 4:40PM – 6:30

Step 6: NIC 2,1, the same as NIC 1,1 Step 7: P-R2 the same as P-R1 except that when P-R2 adds the new NIC header

Step 8: NIC 2,2 adds the preamble, CRC CSMA/CD Step 9: NIC-L will not do address filtering Step 10: P-Bridge finds that the packet should go to NIC-R. Note: P-B does not strip off the NIC layer header Step 11: NIC-R will add the preamble, CRC CSMA/CD Step 12: NIC-D demodulate cache add filtering length checking CRC

Strip off Step 13: P-D will strip off the 2 headers and get the message. The mask of record 1 (routing rule 1) is defined as follows: Step 1: Determine the class of the physical network. Here the net address is 166.200.0.0 class B Step 2: Determine the prefix part. (166.200.0.0) Step 3: Mask = 255.255.0.0 Q1. What is the Mask for 195.0.50.0? Answer: 255.255.255.0 Q2. Why do we need the Mask?

Answer: Without Mask, it is hard for P-R1 to know that 168.16.24.115 matches 168.16.0.0 because they are not identical!

With Mask, it’s so quick and so easy. When 168.16.24.115 is matched against 168.16.0.0, Step 1: P-R1 will calculate 168.16.24.115 AND 255.255.0.0 = 168.16.0.0 (the result will always be a network address.) Step 2: P-R1 will do an exact match.

pliu
eot
pliu
soh
pliu
pliu