Q and A for Ch. 17

52
Q and A for Ch. 17 CS 332, Spring 2016

description

Q and A for Ch. 17. CS 332, Spring 2014. Fiber Modems. Q: Why use fiber modem extensions? Is it to save money on not having to use as much fiber (otherwise wouldn't it be easier to use all fiber)? - PowerPoint PPT Presentation

Transcript of Q and A for Ch. 17

Page 1: Q and A for Ch. 17

Q and A for Ch. 17

CS 332, Spring 2016

Page 2: Q and A for Ch. 17

Intro: What is a LAN?

Q: What is a LAN?

A: A local area network is a layer-2 network, where any machine can send data directly to any other machine on the LAN. I.e., each packet can be addressed with the destination’s address and sent to it without any changes to the packet’s addressing.

Page 3: Q and A for Ch. 17

Frame vs. Packet

Q: What is a “frame”? Is it different than a ”packet”?

A: A frame is just a layer-2 packet. A generic term for frames/packets/messages/etc. is PDU: protocol data unit.

Page 4: Q and A for Ch. 17

What is a bridge?

Q: How many network ports are there?A: 2Q: How many machines does it assume are reachable on each port?A: Multiple.Q: Does it connect 2 LANs?A: It connects 2 LAN segments in 1 LAN.Q: What is the difference between a bridge and a switch?A: A bridge has only 2 ports. A switch has more.

Page 5: Q and A for Ch. 17

Different layered devices

Identify which layer the following devices operate at:• switch• repeater • modem• bridge• hub• VLAN switch

Page 6: Q and A for Ch. 17

Unlearn?

Q: Can a bridge unlearn a device?

A: Yes, sort of. Bridges and switches use a cache, and caches must time out or replace entries. Bridges and switches keep a timestamp on each entry and remove it when it gets too old.

Page 7: Q and A for Ch. 17

Figure 17.4 (p. 297)

• Error: “Frame Sent” should be “Frame Seen”.• Q: How does the bridge find out about

computer C?• A: Error: it doesn’t!

• Q: Do the computers (A, B, C, X, Y, Z) know the bridge is there?

• A: No!

Page 8: Q and A for Ch. 17

What is a hub?

Q: Can you draw a picture of the connectivity within and outside of a hub?

A: Yes! A hub is a “bus in a box”. It converts what appears to be a star topology into a bus topology. (section 15.10)

Page 9: Q and A for Ch. 17

Which device when?

Q: Can you go over which device is best to use when?

A: Sure. Use a VLAN switch when you have to connect machines within a network – like a floor of a small company or a lab.Use a router when you need to connect multiple LANS.Note: many devices do switching and routing now, although you can buy very cheap switches, but typically not very cheap routers.

Page 10: Q and A for Ch. 17

Multiple transmissions at once?

Q: How can a switch send multiple transmissions at once?

A: A switch can send out multiple ports at once. If it has n ports, it can handle up to n / 2 “conversations” between pairs of hosts.

Page 11: Q and A for Ch. 17

Distributed Spanning TreeQ: Can you explain it more technically?

A: Sure! • Bridges/switches run this protocol automatically. • Each has a unique identifier from the factory.• They all send to a prescribed multicast MAC address. • They somehow elect a leader.• They agree to turn off some ports so that there are not loops. Those

ports are not used for bcasts or flooded unicasts (when the dest MAC is not known).

• The spanning tree is computed using Prim’s or Kruskal’s algorithm.• You don’t have to know any of this…

Page 12: Q and A for Ch. 17

Addressing and switches

Q: How does addressing work with switches? Do they get IP addresses from DHCP?

A: Switches don’t necessarily get IP addresses. In fact, switches don’t even need MAC addresses, as they are “never” sent packets – they exist “covertly”.

Page 13: Q and A for Ch. 17

Switch vs. Managed Switch

• A regular switch just does its work – no way to manually intervene or configure anything, or get stats from it, etc.

• A managed switch runs a TCP/IP stack, so that you can log in to it and configure it (assign VLANs, e.g.), get stats, etc.

• The management network will typically be on VLAN 1 (the default VLAN).

Page 14: Q and A for Ch. 17

Broadcast Domain vs. Collision Domain

Q: What is a broadcast domain? (p 301)A: A set of computers such that a layer-2 broadcast message from any machine in that set reaches all the others. (This is perhaps another definition of a LAN.)Q: What is a collision domain?A: A set of computers where if any two computers try to use the network at the same time, there is a collision.

Page 15: Q and A for Ch. 17

VLANs and Physical vs. Logical

• A Virtual LAN really separates the physical topology from the logical topology.

• Can put machines on one physical LAN (wire) into multiple VLANs.

• Can put machines on multiple physical LANs into one VLAN.– These physical LANs could even be very far apart

geographically.

Page 16: Q and A for Ch. 17

Configuring a VLAN

• Assigning a machine’s interface to a VLAN depends on physical topology.– Bus: have to configure the machine itself.– Switched (star): • Port-based VLANs: assign ports to VLANs and forward

only to those in the same VLAN.• Or, MAC-based VLANs: assign MACs to VLANs. (Compare

adv/disadv. of MAC-based vs. Port-based.)• And/or can alter the Ethernet frame, inserting the 802.1q

header with the assigned VLAN before forwarding it. (trunking).

Page 18: Q and A for Ch. 17

Old Slides

Page 19: Q and A for Ch. 17

Hub modifications?

Q: Can the network hub be modified to improve the bandwidth that is received by computers in the network, in the case where there are multiple computers connected to that hub?

A: Not sure about this. I’d like to hear more.

Page 20: Q and A for Ch. 17

Extensions and repeaters

Q: Are technologies such as fiber modem extensions and repeaters being built in to computers?A: Not desktop/laptop computers. These are less sophisticated devices the repeat signals.Q: Is there any advantage to using fiber modem extensions as opposed to a repeater or vice-versa?A: Converting to fiber extends the reach of a LAN. I’m not sure how “smart” a fiber modem is, though…

Page 21: Q and A for Ch. 17

Going over the top

Q: What exactly would happen if you tried to connect more than four repeaters (above the limit)? Would it be possible to implement other tools to offset or work around the delay?

A: Did the text say there was a limit on repeaters? Anyway, there must be a limit, theoretical or practical. If you go over the limit, my guess would be that you’d get very bad/flaky connectivity – lost packets, corrupted packets, timeouts, etc.

Page 22: Q and A for Ch. 17

Repeaters at Calvin?

Q: Does Calvin have repeaters on campus?

A: I don’t know… I doubt it.

Page 23: Q and A for Ch. 17

Bridges at Calvin

Q: Does Calvin use bridges for its separate networks?

A: No. No one uses bridges anymore. People don’t even use hubs anymore. Everyone uses switches.

Page 24: Q and A for Ch. 17

Learning Bridges

Q: When the text talks about simultaneous activity on attached segments, is it saying that the computers attached to hub 1 (figure 17.3) can all talk without being interrupted by computers attached to hub 2?A: Yes! That is correct. Note: typo in figure 17.4.

Page 25: Q and A for Ch. 17

Bridge vs. switch

Q: Why use a bridge over a switch?

A: No good reason, really. Cost, maybe? I don’t think bridges are made anymore.

Page 26: Q and A for Ch. 17

Info kept after disconnection

Q: One of the questions that came up in lab yesterday was whether or not there are devices, such as bridges, which continue to store computer locations even after network cables have been disconnected.A: I don’t know *for sure*, but I think when a cable is disconnected, the device will clear any info it has learned about machines on that port.

Page 27: Q and A for Ch. 17

Switch Fabric

Q: What is a switching fabric?A: http://etherealmind.com/what-is-the-definition-of-switch-fabric/

This helps, but does not explain everything to me. It is (mostly, I think) a hardware thing, which is not my forte…

Page 28: Q and A for Ch. 17

Switch: what layer?

Q: What does it mean for a switch to operate at layer 2?A: It means it knows about Ethernet packets – not just voltages. It reads source MAC addresses, stores packets in queues, etc. It is much smarter than a hub.NOTE: It *still* maintains the broadcast domain that Ethernet requires.NOTE: computers connected by a switch/hub/bridge do NOT know that the devices are there.

Page 29: Q and A for Ch. 17

Switch is stupid or smart?

Q: During the predictive activity, I remember you saying ""assume the switch is stupid;"" however, from the book, the switch is actually smart. A: Everything is relative. The switch is stupid compared to a router, but smart compared to a hub. The switch does *not* generate any packets on its own. It is “passive”.

Page 30: Q and A for Ch. 17

N/2 transfers max?

Q: Why can only up to N/2 transfers occur at the same time with a switch that has N ports connected to N computers?A: I would have preferred that the textbook said “up to N/2 conversations can occur at the same time.”, because for every packet it, it must go out, so 2 ports are used.

Page 31: Q and A for Ch. 17

VLAN switches

Q: Can you please shed some more light on how the VLAN switch works? A: A VLAN can be made by assigning multiple ports in a switch to a LAN – i.e., to participate in one broadcast domain. So, when a bcast packet comes from one port, or when a packet to an unknown dest MAC comes in on that port, the packet is duplicated and sent on only the other ports in the VLAN. This is port-based VLANs.Another way to think about it: the switch acts like multiple switches, one per LAN.

Page 32: Q and A for Ch. 17

Types of VLANs

• Port-based VLANs.• MAC-based VLANs. Have to specify exactly which

MAC addresses belong to which VLANs.– Very good for moving a workstation to a new part of the

company/institution.• Protocol-based VLAN: switch looks at layer 3 type (in

the layer 2 header) to see what protocol is used and switches based on that…

• IP-subnet-based VLAN: switch looks at layer 3 source IP address subnet (!) and switches based on that.

Page 33: Q and A for Ch. 17

VLANs as firewalls

Q: Can firewalls be installed only when there is a VLAN? (pg. 301)A: I think a VLAN is a simple kind of firewall – isolating some traffic from other traffic. There are *very* sophisticated and better firewalls, too.

Page 34: Q and A for Ch. 17

ISPs

Q: What connected ISPs?

A: ISPs connected to each other via fiber/copper between routers, not switches. This is because each ISP has its own LAN, and you cannot connect LANs together with layer 2 devices.

Page 35: Q and A for Ch. 17

Even Older Slides

Page 36: Q and A for Ch. 17

Fiber modems

Q: Do fiber modems convert/translate Ethernet packets to optical fiber packets via encapsulation?

A: I don’t think so. I think they just forward them over the fiber using the fiber’s physical layer 1 specs. (But, a fiber modem might be a layer 2 device – I’m not sure!)

Page 37: Q and A for Ch. 17

Common LAN extension

Q: What is the most common form of LAN extension. Is there a most common form or is it based on circumstances? A: I think the most common form is a switch with twisted pair ports and one fiber port. So you have twisted pair in a building and fiber between buildings.

Page 38: Q and A for Ch. 17

Repeaters

Q: So do the repeater make it so that the signal can stay stronger for a longer distance? Does it give the signal as extra push?A: Yes, that is correct. It boosts the signal.Q: How many repeaters can you have before errors can occur? A: I don’t know the answer to that… Hardware stuff…

Page 39: Q and A for Ch. 17

Analog?

Q: What exactly is “analog” (what kinds of devices use it) and how does it amplify in repeater devices for long distances? And why do repeaters now use infrared receivers?A: Analog is voltages on a wire – not interpreted into bits or frames. It means it is layer 1. Repeaters simply operate at layer 1.(I don’t think Ethernet repeaters use infrared. The book just uses that as an example.)

Page 40: Q and A for Ch. 17

LAN Segment

Q: The book says that a bridge is a mechanism that connects two LAN segments. What is meant by "LAN segments"? Are they together part of one LAN or are they both different LANS?A: LAN segment is collision domain. That is, it is all machines that when they send a packet, no other packet can send at the same time, or there will be a collision. E.g., a bus or hub with many computers connected.

Page 41: Q and A for Ch. 17

Bridge with > 2 ports?

Q: Could there exist a bridge that forwards between more than just two hubs?

A: Yes! It is called a “switch”. It can have connected to it as many LAN segments as it has ports.

Page 42: Q and A for Ch. 17

Do we have bridges/switches?

Q: In our lab, where are these "bridging" devices seen?

A: Over in the corner. All the yellow cables go to one switch and all the green/blue cables go to another. Each forms a separate LAN.(We also have a drawer full of hubs/switches, for this Friday’s lab.)

Page 43: Q and A for Ch. 17

Offline computers?

Q: A bridge sounds kind of like what we did for the activity we did in class with the switch. How then does a bridge know if a computer is offline? Or is it exactly what we talked about in class since a bridge is associated with a switch?A: A bridge/switch does not know if a computer is offline. But, if it does not hear from a computer for a while, it removes its entry from its forwarding table.

Page 44: Q and A for Ch. 17

Figure 17.4

Q: Can you explain the process in Figure 17.4 (pg.297)? (Why is the bridge involved when packets/frames are being sent within each segment?)

A: There is a mistake in the table. The heading “Frame Sent” should be “Frame Seen”.

Page 45: Q and A for Ch. 17

Advantages of a hub?

Q: The chapter also seems to paint switches in a very good light. Are there any advantages to using a hub instead of a switch?A: The only advantage I know of is that a hub repeats everything everywhere, so you can use it to snoop packets between other computers.

Page 46: Q and A for Ch. 17

Building connectivity

Q: And how are buildings connected by bridges (Is there a third building that hosts the bridging device?)? A: First, “no one” uses bridges anymore (bridges have only 2 ports). Buildings are connected by having a switch in each building and a switch/router in one main building (CIT) to forward packets between all. Or they may have multiple connections, and then use DST.

Page 47: Q and A for Ch. 17

Broadcasting with switches

Q: Can you explain how broadcasting with bridges works a little bit more?A: When a bridge/switch receives a broadcast packet, it sends to all (other) ports.(A switch also sends to all other ports when it receives a packet for a host it does not know about.)This behavior allows the switch to emulate the same broadcast domain as a bus/hub.

Page 48: Q and A for Ch. 17

Simultaneous transmission

Q: Could you please elaborate on this "A bridge permits simultaneous transmission on each segment" ?A: On a bus/hub topology, only one computer can talk at a time, or you have a collision. With a switch, you only have collision domains on each segment connected to the switch’s ports.

Page 49: Q and A for Ch. 17

Queue overflow

Q: Can the queue within a switch grow to be too long and therefore drop packets?

A: Yes! This is how you get congestion, increased latency (delay), and dropped packets.

Page 50: Q and A for Ch. 17

Switch vs. VLAN switch

Q: When would you want to use a switch rather than a VLAN switch?

A: A regular old plain-Jane switch is going to be cheaper than a VLAN switch. A VLAN switch has to be a “managed” switch – something you can log in to and configure. Many cheapo switches aren’t manageable.

Page 51: Q and A for Ch. 17

Repeater speeds

Q: It says in the book that a repeater can actually speed up a network by allowing bidirectional communication. However, since the repeater is a another node that a given message needs to pass through, doesn't it slow down each direction it transmits?A: Theoretically, I suppose it does. But, a repeater, at layer 1, is very fast… I might be able to keep up (“operate at line speed”).

Page 52: Q and A for Ch. 17

DST/STP

Q: Could you explain the Distributed Spanning Tree?

A: Spanning Tree Protocol (STP) is 802.1d. A spanning tree is the set of links that connect all devices, without any loops. Each switch is configured (at the factory) to belong to a special multicast MAC group. The switches send many messages to each other to determine who is connected to whom, and which ports should be put in “backup” state so that a loop is broken.