venkman@jet:~$ bc < bc.data 16 16 1048576 1048576 <------ 1M or 1Meg, about 1 million 1073741824 1073741824 <------ 1G or 1Gig, about 1 billion venkman@jet:~$ 1,048,576 is close to 1 million but 1,024 squared is bigger than 1,000 squared. 1,073,741,824 is around 1 billion, but 2 to the 10th, or 1,024 when you cube it, is for sure larger than 1,000 cubed. Here is what bc program on cowboy.cns.uni.edu looks like when you do NOT redirect the input using < like venkman@jet:~$ bc < bc.data venkman@jet:~$ bc bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. 2003+10 2013 2^10 1024 obase=2 <------ output base (obase) will be base 2, binary 255-31 11100000 255-15 11110000 obase=10 <------ output base (obase=10) will be decimal again. 255-31 224 255-15 240 venkman@jet:~$ venkman@jet:~$ bc ibase=2 <----------- ibase=2 means input base will be binary so all input is in base 2. 11111110 254 11111100 252 11111000 <------------- 5 1's followed by 3 0's is a legal 248 octet value for subnet masks, right? 11110000 240 ----- 11100000 <-------------- February 24th = 224 = 11100000 224 --- 11000000 192 10000000 128 11111111 255 venkman@jet:~$ Finally, the routing table for a bridge, we covered in class on Wednesday during the review section. 3. What does a bridge do with a packet whose destination address and whose source address both do not exist in the bridge's routing table? a. Describe everything that happens to the packet? Hard to do here without drawing a diagram. I will try. Computers A1 to A88 # # B R I D G E # R G =====port A====I D==== port C======Computers C1 to C125 D I G R E G D I R B # # port B # #============= computers B1 to B50 Suppose the packet is from computer A1 and it to computer B8. The packet comes in on port A to the bridge. The bridge looks in its routing table and does not see the address B8, so the bridge sends it out both port B and port C. It send it out all of the ports, except the incoming port. Obviously, the port it came in on does not need to have the packet on its ethernet cable again, as all those computers got to "see" the packet as it went by. But both the subnetwork areas B and C will have to deal with the traffic of this packet on their information highways (or side streets, it is just part of a LAN, after all, and not out on the Internet with its Information Superhighways). So the packet "crosses" the bridge and is now "traffic" on the B and the C wires. In summary, the packet came in on port A (which has its own network interface card (NIC) or network adapter card (NAC). Each port has its own Network Interface Card or MAC address. And the packet went out or was sent out both port B and port C. We can say one last thing that happened to the packet. Its source address was added to the routing table for the bridge, so now the bridge "knows" that anything destined for the computer with MAC address A1 is going to be sent out port A, if it was received at port B or port C, and is going to be discarded or stopped and NOT let across the bridge, if it comes in to the bridge from port A. The bridge is learning, right? Hopefully, you are too! :-) b. Describe how the bridge will be different afterwards. The bridge will have a new entry in its routing table. Mac address Port to get to it ----------- ----------------- A1 A Now, in the Wednesday class we carried this a couple more steps. Suppose next packet is from source A5 to destination A1. Two things happen at the bridge: It receives the packet, examines the destination and sees that the destination is out on the subnetwork of the port where the packet came in, so it will NOT let it cross the bridge and add to the traffic over on either the B or C subnets. It examines the source (return address of sender) and sees that A5's MAC address is not in the routing table. It adds A5 48 bit, 6 byte MAC address to the table. The routing table now looks like this: Mac address Port to get to it ----------- ----------------- A1 A A5 A Now, suppose a packet comes in from C44 to port C and it is destined for A1. What happens? 1. The bridge sees that A1 destination is on a different port that port C, so puts the packet across the bridge. Out you go, little packet, on your way, on the wires coming out of port A. The bridge does NOT put the packet out port B. Just sends it out port A. 2. The bridge sees the origin or source address was C44 and looks in its table and does not find the MAC address C44. So it adds the C44 NIC address and it's now known port to the routing table, which will make it look like this. Mac address Port to get to it ----------- ----------------- A1 A A5 A C44 C Before long, the routing table will be huge and the bridge will now where everything is. If the network breakdown has been well planned and the communications are typical (say A is the Marketing group area, B is Personnel/Management, and C is Sales/Accounting/Payroll/Customer Services, for example), then 80% or so of the packets that are sent out by computers on the A subnetwork area (Marketing) will have destinations on A, so the majority of that traffic will not tie up the LAN information side streets and two lane highways and gravel roads of subnetwork B or C. The network groups will be kept from being flooded by traffic that is now relevant or destined for computers or servers or printers in their group. Truly, a bridge over troubled H O molecules. 2 B R I D G E R G I D D I G R E G D I R B ~~~~~~~~~~~~~~~~~~~~~~~~~~~ <---- Troubled Waters (Sorry, could not resist! Simon and Garfunkle would strongly approve of this bridge, however). Mark