Transparent Bridges Reading Chapter 12 Fall 2004 FSU
Transparent Bridges Reading: Chapter 12 Fall 2004 FSU CIS 5930 Internet Protocols 1
Basics of Transparent bridges • Work at Data-Link Layer – Different MAC layers can be used on different subnet (port) of a bridge • Transparent – Stations/routers need not to know the existence of a bridge • Forwarding and filtering – Only forward packet to necessary subnet Fall 2004 FSU CIS 5930 Internet Protocols 2
An example Linux bridge LAN 1 LAN 2 802. 3 u Station A Station B LAN 3 802. 11 Fall 2004 FSU CIS 5930 Internet Protocols 3
Forwarding function • Forwarding table – MAC address • If destination MAC is in table – Forward to the corresponding subnet ONLY • Otherwise – Flooding to all ports except the incoming port Fall 2004 FSU CIS 5930 Internet Protocols 4
Forwarding function (example 1) A B A LAN 1 LAN 2 Station A Station B Station C Fall 2004 B LAN 3 FSU CIS 5930 Internet Protocols 5
Forwarding (example 2) A C LAN 1 LAN 2 Station A Station B Station C Fall 2004 LAN 3 FSU CIS 5930 Internet Protocols 6
Forwarding (example 3) A E A LAN 1 E LAN 2 Station A Station B LAN 3 Station C A Fall 2004 E FSU CIS 5930 Internet Protocols 7
Learning Function • How the forwarding table is populated – Static configuration – Self-learning • Backward learning – Learning the address of someone when he is talking – MAC address, no hierarchical structure – Time stamp to delete “old” entries Fall 2004 FSU CIS 5930 Internet Protocols 8
Implementation • • Architecture Data structures Forwarding function Learning new MAC address Fall 2004 FSU CIS 5930 Internet Protocols 9
Architecture of Bridge Implementation Higher layers dev. c br_fdb. c, br_if. c, br_stp_bpdu, . . . br_ioctl. c netif_rx Spanning Tree Protocol Forwarding Data. Base br_input. c br_pass_frame_up br_fdb_get(. . ) br_ioctl Bridge Configuraion br_handle_ stp_pdu br_send_tcn_bpdu(. . ) br_send_config_bpdu(. . ) br_forward. c br_handle_frame br_forward br_flood dev. c net_rx_action Fall 2004 dev_queue_xmit FSU CIS 5930 Internet Protocols 10
Data structures bridge_list net_bridge next lock port_list dev statistics hash_lock hash[BR_HASH_SIZE] Spanning Tree. . . timer 1 forward_delay_timer hold_timer message_timer net_bridge_port next net_bridge net_device port_no Spanning Tree. . . forward_delay_timer hold_timer message_timer Fall 2004 net_bridge_fdb_entry 0 next_hash pprev_hash use_counter addr dst aging_timer is_local is_static 1 2 . . . BR_HASHSIZE -1 net_bridge_fdb_entry net_bridge_port FSU CIS 5930 Internet Protocols net_bridge_fdb_entry next_hash pprev_hash use_counter addr dst aging_timer is_local is_static 11
Bridge forwarding function • net_rx_action() when soft IRQ is handled – For a bridge, it calls br_handle_frame_hook(), which points to br_handle_frame() • Check if the packet needs to be forwarded – By br_fdb_get() – If so, br_forward() • Learning the position of the source by br_fdb_put() • If the packet is for ourselves, br_pass_frame_up() Fall 2004 FSU CIS 5930 Internet Protocols 12
Forwarding fuctions • • • br_handle_frame() br_forward() br_flood() br_pass_frame_up() br_fdb_get() Fall 2004 FSU CIS 5930 Internet Protocols 13
Learning MAC addresses • br_fdb_insert() – br_mac_hash() • br_fdb_cleanup() • gc_timer – gc_interval Fall 2004 FSU CIS 5930 Internet Protocols 14
- Slides: 14