From jacobson@math-cs.cns.uni.edu Wed Feb 7 04:56:11 2007 Date: Tue, 06 Feb 2007 22:56:09 -0600 (CST) From: Mark Jacobson To: 810-023-01-spring@uni.edu Subject: [810-023-01-SPRING] 6 bytes = 12 nybbles = 48 bits = NIC address... Hi 023 students, Please see the day #1 handout bin023.txt, which is at the web site, and is URL: http://math-cs.cns.uni.edu/~jacobson/bin023.txt ipconfig /all gives more output than ipconfig ------------- -------- Ethernet adapter SMCISA1: Description . . . . . . . . : SMC Adapter. Physical Address. . . . . . : 00-00-C0-EF-BD-42 -- -- -- -- -- -- 1 2 3 4 5 6 bytes for NIC > Hello, I am studying for your quiz tommorow and feel like I am startng to get > a decent grasp of IP numbers and masking. I follow your first email until > you get to what S bits can be. I thought the subnet address was > 191.202.128.0. 191 could NEVER be a subnet mask value, nor could 202. --- --- --- - > 191.202.128.0. <-------- 128 and 0 are legal values, if properly used. --- - Legal numbers in a subnet mask are: (besides zero = 0 = 00000000 and 255 = 11111111) 10000000 128 11000000 192 --------------------- 11100000 224 SEVEN SPECIAL NUMBERS besides 255 and 0 11110000 240 --------------------- 11111000 248 11111100 252 11111110 254 THERE ARE NO OTHER LEGAL VALUES, EVER!!!! 255 is ALWAYS the first octet value. It can NEVER, EVER be anything other than 255. 0 is OFTEN and probably usually the last octet value. There can be one and only one of these other 7 values in a subnet mask. So a subnet mask that contains only one 255, will contain either 3 0's or it will have one of the special 7 numbers as the 2nd octet, followed by 2 0's. And it HAS TO BE A CLASS A NETWORK! 255.0.0.0 or 255.248.0.0 A subnet mask that contains two 255's will either contain to 0's, or the 3rd octet can be one of the special 7, and the 4th octet is a 0. Example: 255.255.0.0 or 255.255.240.0 It could be either a class A or a class B network. It could not possibly be a class C network. --- 255.255.0.0 is the default network mask for ALL class B networks. That is the mask all routers out on the internet use when they process ANY class B address from elsewhere on the internet. If you own a class B network address, say like uni.edu does in its 134.161.0.0 then you can do whatever you want with the y octet, and instead of using 255.255.0.0 as your network mask HERE AT UNI, you can use: 255.255.128.0 or 255.255.240.0 or 255.255.255.128 or 255.255.252.0 or whatever. Its up to YOU and I! A subnet mask that contains 3 255's would have the 4th octet be either 0, or be one of the special 7 numbers. 255.255.255.0 or 255.255.255.192 for examples It could be a class A or class B or class C subnet mask. 255.255.255.0 is used for all class C network masks out on the internet. DEFAULT NETWORK MASK for C is 255.255.255.0 You own a class C network address, you can do whatever you want with that last octet, the z octet (w.x.y.z). > I guess I am unsure what the other numbers have to do with > anything (e.g 0*32, 1*32, etc.). Also, is 128 then the answer for the > question of the number of subnetworks possible given mask of 255.255.224.0 > (Quiz question # 2a)? Can you multiply 123 times 1000 in your head? Yes, it is easy! 10 cubed = 1000, you just add 3 0's to the 123 to get 123,000, right? -------------------- --- Can you multiply any binary number by any power of two the same way? What is 15 times 4? 15 times 8? 15 times 16? 15 times 2? -- -- 1111 times 100 is 111100 -- -- you just add to 0's to it, > or move the decimal point over... 1111 = 15 and 111100 is 63 minus 3 or 60 111111 = 63 - 11 = - 3 ------ ---- 111100 = 60 What is 15 times 32? 1111 times 100000 is 111100000 ----- ----- 12345 12345 just MOVE the decimal point over, is all you have to do. What is 7 times 32? 111 times 100000 is 11100000 which is 224 which is a subnet mask legal value. See also http://math-cs.cns.uni.edu/~jacobson/bin023.txt for NIC and for ipconfig /all example showing the SIX BYTE NIC address of a network interface card. What is 1 = 1 after you multiply it by 10000000 = 128 10000000 I added 7 0's 3 = 11 1000000 = 64 11000000 I added 6 0's 7 = 111 100000 = 32 11100000 5 0's 15 = 1111 10000 = 16 11110000 4 0's 31 = 11111 by 1000 = 8 11111000 3 0's 63 = 111111 by 100 = 4 11111100 127 = 1111111 by 10 = 2 11111110 10000000 128 11000000 192 --------------------- 11100000 224 SEVEN SPECIAL NUMBERS besides 255 and 0 11110000 240 --------------------- 11111000 248 11111100 252 11111110 254 THERE ARE NO OTHER LEGAL VALUES, EVER!!!! Now, go and look over that material again. It will make a TON of sense, after you have read and taken some notes and tried some things based on this email note. You will also see at my web site several links that have been there for weeks showing the above material and the SEVEN LEGAL SUBNET values besides the 255 and 0. 128, 192, 224, 240, 248, 252, 254 are the magnificent 7. They all are all 1's followed by all 0's. 255.0.0.0 is 8 1's followed by 24 0's. 255.255.0.0 is 16 1's followed by 16 0's. 255.255.255.0 is 24 1's followed by 8 0's. And just as all default network masks for class A and class B and class C have to be in this form, at your own internet site, if you decide to modify the default network mask so you can route to different SUBNETworks here at UNI or wherever you have an internet presence, you have to keep the all 1's, followed by all 0's format. --- --- http://math-cs.cns.uni.edu/~jacobson/023/email023Jan24th2007.txt http://math-cs.cns.uni.edu/~jacobson/subnet023.txt > Also, for some reason I must have misunderstood the last question. Each NIC > address is made up of 4 bytes or 32 bits right? Each octet is worth 8 bits > or 1 byte per decimal notation (e.g w.x.y.z). w = 8 bits or 1 byte. I > answered 4 bytes or 32 bits. C:\> ipconfig /all Description . . . . . . . : Realtek RTL8139/810x Family Fast Ethernet NIC Physical Address. . . . . : 00-0F-B0-71-27-33 COUNT EM - SIX BYTES -- -- -- -- -- -- Physical Address. . . . . : 00-0F-B0-71-27-33 -- -- -- -- -- -- TWELVE NYBBLES = 6 bytes 1 2 3 4 5 6 bytes = 48 bits An IP address is 4 bytes. It is specified and usually shown in dotted decimal format, so UNI's web server at www.uni.edu is: 134.161.1.13 The www.cns.uni.edu web server is: C:\>tracert www.uni.edu Tracing route to panther.uni.edu [134.161.1.13] over a maximum of 30 hops: 1 <1 ms <1 ms <1 ms starbase1.uninet.uni.edu [134.161.128.1] 2 <1 ms <1 ms <1 ms panther.uni.edu [134.161.1.13] Trace complete. C:\>tracert www.cns.uni.edu Tracing route to kalibas.cns.uni.edu [134.161.242.20] over a maximum of 30 hops: 1 1 ms <1 ms <1 ms kalibas.cns.uni.edu [134.161.242.20] Trace complete. ----------------------------------------------------------------------------- My laptop computer IP number at this moment is: 134.161.128.39 w.x.y.z = 4 bytes and 8 nybbles and 32 bits. C:\>ipconfig Windows IP Configuration Ethernet adapter Local Area Connection: IP Address. . . . . . . . . . . . : 134.161.128.39 Subnet Mask . . . . . . . . . . . : 255.255.128.0 Default Gateway . . . . . . . . . : 134.161.128.1 ----------------------------------------------------------------------------- > The above along with TCP/IP 4 layer model and 7 layer OSI model is what I > plan to be studying (and have been). Are there any other items that I need > to know for the quiz? Know your lecture notes and what we have been covering in class and in handouts and on the web page with all these examples I have posted... > Thanks for your time. By the way, your emails and help files that you send > out or post on the website have been very beneficial to my understanding in > this class and in the previous class last semester....thanks. That is what they are for, so that is great. This note will now be posted at the web site too. Since there has not been much quantity of reading for the class, I hope and expect that students are reading and rereading and taking notes and trying things on their own based on these handouts. Get out your scientific calculator, but also do stuff by hand too. Its gotta be 2nd nature if you practice it enough. Binary is actually easier than base ten decimal, but we just have to get familiar with and comfortable with it. Mark