Download presentation
Presentation is loading. Please wait.
Published byRandall Thornton Modified over 9 years ago
1
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 19
2
ICOM 6115©Manuel Rodriguez-Martinez Lecture Objectives Finish Loose end on 802.11b Present Local Internetworking –Bridges –VLANs Introduction to Global Internetworking –Layer 3 – The Network Layer –IP Protocol
3
ICOM 6115©Manuel Rodriguez-Martinez Collisions and IEEE 802.11 802.11 is a collision avoidance system –Sender A and receiver B first negotiate and agree to start a session –Nearby hosts notice this and refrain themselves from speaking Also they won’t talk to either A or B until getting “permission” –Collisions are avoided hosts first ask permission to speak –Details on book …
4
ICOM 6115©Manuel Rodriguez-Martinez Local Internetworking Problem: –LANs can quickly grow to 100s or 1000s of hosts –Switches, hubs and lines cannot handle this –Too much traffic going around Increase chance of collisions Solution: –Segment the LAN into regions –Each region has related hosts i.e. Department, floor, laboratory –Isolate and filter traffic for better performance
5
ICOM 6115©Manuel Rodriguez-Martinez How is this done? Bridges and Switches –Devices that do forwarding at Layer 2 Recall that routers do forwarding at Layer 3 Bridges –Devices that connect different LAN segments Switches –Connect computers and create virtual LANs (VLANs) inside the switch Coloring scheme to identify hosts on a VLAN
6
ICOM 6115©Manuel Rodriguez-Martinez Example: LANs segmented via bridges
7
ICOM 6115©Manuel Rodriguez-Martinez Benefits of bridges Transparency –Hosts need not be aware of bridges Scalability –Limits collisions and control traffic Reliability –Isolate hardware and link failures to a segment Security –Control what frames can be seen Put all sensitive machine on a given segment Ease of Management –Organize staff by segments
8
ICOM 6115©Manuel Rodriguez-Martinez Bridges on different Layer 2 LANs An 802.11 Access Point can act as a bridge between 802.3 and 802.11 LANs
9
ICOM 6115©Manuel Rodriguez-Martinez Learning Bridges Bridges must learn the hosts on each LAN they connect –Data is kept in forwarding tables HostPort A1 B1 C1 X2 Y2 Z2 Forwarding Table Bridged LAN
10
ICOM 6115©Manuel Rodriguez-Martinez A More Complex Example Port 1 Port 2 Port 1 Port 3
11
ICOM 6115©Manuel Rodriguez-Martinez Tables for Bridges A and B HostPort A1 B1 C2 D2 E2 F2 G2 H2 HostPort A1 B1 C1 D3 E3 F2 G2 H2 Bridge A Forwarding TableBridge B Forwarding Table
12
ICOM 6115©Manuel Rodriguez-Martinez Frame Forwarding on this LAN Port 1 Port 2 Port 1 Port 3 A to B B to C H to E E to A
13
ICOM 6115©Manuel Rodriguez-Martinez Data Structures for Forwarding Forwarding Table is a hash table –MAC Address is used to make a key to table Each record in table has –MAC Address of host –Port to reach it interface connected to LAN where host resides –Time-to-Live (TTL) of the entry Expire to accommodate reconfiguration of LAN or mobility of hosts –Key binding – id of the record derived from MAC Address
14
ICOM 6115©Manuel Rodriguez-Martinez Operational Aspects Initially hash table is empty Bridge moves all frames over all ports Bridge will always –Inspect the frame to try to store a record for MAC Address of source in the table In the future, Bridge will –First look up the table to find MAC Address –If found, forward to the appropriate port –Otherwise, send over all ports
15
ICOM 6115©Manuel Rodriguez-Martinez Bridge operational algorithm For each frame F received inputPort = Get input port from which F came entry = forwardTable.find(F.srcMAC); if (entry == NULL){ // not on table entry = new TableEntry(F.srcMAC, inputPort, TTL); forwardTable.add(entry); copy F to all ports except inputPort; // flooding } else { if (entry.portNumber != inputPort){ forwardTable.refresh(F.srcMAC); copy F to port entry.portNumber; } // otherwise, ignore it }
16
ICOM 6115©Manuel Rodriguez-Martinez Other Issues If source and destination are on same segment, bridge will not forward frame –destination will get frame anyway! Periodically, a routine will be run by bridge to purge forwarding table –All entries get TTL reduced by amount X –If TTL of an entry gets to 0, the entry is removed Keep the table up to date Bridge is constantly learning what is out there
17
ICOM 6115©Manuel Rodriguez-Martinez LANs with Multiple Redundant Bridges How can we prevent frames to be copied unnecessarily?
18
ICOM 6115©Manuel Rodriguez-Martinez Spanning Tree Bridges
19
ICOM 6115©Manuel Rodriguez-Martinez Traffic Management on LANs Problem –Originally hosts got assigned a particular segment of a LAN based on location –Host on same building or floor are on same segment –What happens when people on same department work at different buildings? They got connected to different LAN segments Makes it hard to isolate and filter traffic
20
ICOM 6115©Manuel Rodriguez-Martinez Example: Wiring Closet for 10BaseT LAN
21
ICOM 6115©Manuel Rodriguez-Martinez Virtual LANs Allow switches to implement LAN topology in software –Bridges can also do it But everybody is going “switched” VLAN is a logical LAN –All machines are part of the same group Each port on a switch is associated with a logical LAN (virtual LAN) –Colors are used to identify each VLAN Each VLAN has its own identifier –Differentiate logical LAN from physical LAN
22
ICOM 6115©Manuel Rodriguez-Martinez VLAN Example A C B D G E H F Three VLANs: RED, BLUE and GREEN Each one is considered a separate LAN R,G Port
23
ICOM 6115©Manuel Rodriguez-Martinez VLAN Example 2 Bridge-based VLAN Switch-based VLAN
24
ICOM 6115©Manuel Rodriguez-Martinez How is traffic controlled? Layer 2 see VLAN as a single entity (LAN) Traffic between VLANs is done by Layer 3 Recall that switch can put frame on a specific output port –Plug-In card takes care of this When a frame F is received from a port colored X, it is forwarded to all ports colored X –Also send to other switches that have X ports
25
ICOM 6115©Manuel Rodriguez-Martinez Identifying VLANs Port Coloring MAC Address Table Layer 3 Payload Inspection
26
ICOM 6115©Manuel Rodriguez-Martinez Port Coloring Each port is colored with the VLAN it belongs to Works fine if only one machine per port is used Breaks down if a hub or other switch is connected to the port –Multiple VLANs might be reachable
27
ICOM 6115©Manuel Rodriguez-Martinez MAC Address VLAN Table Every MAC Address is assigned a VLAN color A Table inside switch stores –MAC Address of each host connected to it –VLAN on which MAC Address is assigned When a Frame F arrives, –MAC address of sender is looked up –Frame is send to VLAN of sender
28
ICOM 6115©Manuel Rodriguez-Martinez Layer 3 Payload Inspection Each Layer 3 is assigned a VLAN –Switch must inspect frame to determine Layer 3 header and forward packet to hosts that use that Layer 3 Protocol IP AppleTalk –Switch must inspect IP addresses Groups of IP addresses might form a VLAN Problem: –Layer 2 should not be aware of Layer 3 Changes in Layer 3 will break the switch
29
ICOM 6115©Manuel Rodriguez-Martinez IEEE 802.1Q: VLAN Standard VLAN is identified as part of the Frame Header Easy to do in 802.11 and 802.16 –Header has some bytes for flags –Can use these to put VLAN information But, Ethernet does not … –Need to change the frame format –802.1Q is a new Ethernet frame format To support VLANs
30
ICOM 6115©Manuel Rodriguez-Martinez WHAT??? Changing Frames??? It is scary but –Only switches and bridges are affected These are the only ones that need to deal with VLANs –New Ethernet cards will have it Gigabit Ethernet Cards Thus, VLAN aware bridge or switch will transform original Ethernet frame into a VLAN frame –MAC Address based VLAN or Layer 3 VLAN –If needed (Good hack!)
31
ICOM 6115©Manuel Rodriguez-Martinez Ethernet Frame Striping Host that is 802.3 sends frame to 802.1Q switch (or bridge) This switch will convert frame to 802.1Q Move the frame over set of switches that are 802.1Q complaint The switch to which destination is attached to will map the frame back to 802.3 –If necessary
32
ICOM 6115©Manuel Rodriguez-Martinez From Legacy Ethernet to VLAN-aware Ethernet
33
ICOM 6115©Manuel Rodriguez-Martinez Comparison of frame formats VLAN Protocol Id – value of 0x8100 used to identify frame as 802.1Q –Tells that frame is not 802.3 (2-bytes long) Pri – priority field used to specify QoS (3-bit long) CFI – Format indicator for MAC Address (Big vs Little Endian) (1-bit) VLAN Identifier – id of the VLAN, used by switched to index forwarding Table (12-bit long)
34
ICOM 6115©Manuel Rodriguez-Martinez Making Sense of all these things Application Gateway Transport Gateway Router Bridge, Switch Repeater, Hub Physical Layer Data Link Layer Network Layer Transport Layer Application Layer Ethernet Header IP Header TCP Header User Data CRC IP Packet Ethernet Frame
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.