Date: Monday, 5 February 2007 13:20:35 -0600 (CST) From: Mark Jacobson To: 810-023-01-spring@uni.edu Subject: 224 network mask (11100000). Hello 023 students, Reminder: Quiz Two on Wednesday... Sabin 227 Lab on Friday... The following is a review of QUIZ ONE, question two and today's lecture where we went over the subnet masks and question's 1 and 2. It will be posted at the class web page, along with the many other materials already there for helping you understand IP numbers and subnetworking at the NETWORK layer --- (Please Do Not Throw Sausage Pizza Away) of the OSI model. --- http://math-cs.cns.uni.edu/~jacobson/c023.html --------------------------------------------------------------------------- For the subnet mask 255.255.224.0, we have 11111111.11111111.11100000.00000000 N = network Network nnnnnnnn nnnnnnnn ssshhhhh.hhhhhhhh S = subnet Subnet NNNNNNNN.NNNNNNNN.SSShhhhh.hhhhhhhh H = host Host --------------------------------------------------------------------------- 2. Suppose your computer has the IP number 191.202.131.44. Suppose the subnet mask is 255.255.224.0 for your company and computer. Answer the following questions: a. How many different subnetworks is it possible to have at your company, with the given the subnet mask of 255.255.224.0 that is being used? 191 is of the form 10xxxxxx in binary, so it has to be a class B network, i.e. 01111111 < 10xxxxxx < 11000000 --- --- --- 127 < 191 < 192 --- --- --- Class B networks have the following default subnet mask, which all routers will have to use EXCEPT FOR routers at THAT NETWORK. 255.255.0.0 is used for routing every class B network address, by all routers everywhere, UNTIL IT GETS TO THAT CLASS B network. Since IP number 191.202.131.44 computer is a class B network, the class B address is 191.202.0.0 for that network. obase=2 <-------------- Let the output be in base 2 (binary) 191 <-------------- Input is still in default base ten (decimal) 10111111 <-------------- obase (output base) is base 2 or binary 202 11001010 131 10000011 44 101100 So here is 191.202.131.44 as a 32 bit number --- --- --- -- 191 . 202 . 131 . 44 10111111.11001010.10000011.00101100 10111111.11001010.10000011.00101100 IP number 11111111.11111111.11100000.00000000 Subnet mask vvvvvvvv.vvvvvvvv.vvvmmmmm.mmmmmmmm v for view, - for mask --------.--------.---mmmmm.mmmmmmmm 10111111.11001010.10000000.00000000 191 . 202 . 128 . 0 is the SUBNETwork address of host with IP number 191.202.131.44 Let us refer to a network address bit with n, a subnetwork address bit with s, and a host bit with h. nnnnnnnn.nnnnnnnn.ssshhhhh.hhhhhhhh or --- NNNNNNNN.NNNNNNNN.SSSHHHHH.HHHHHHHH --- What can the S (or s) bits be? 000 = 0 So you see that 001 = 1 there are only 010 = 2 3 011 = 3 2 possible 100 = 4 arrangements for 101 = 5 3 bits, and two cubed 110 = 6 = 8, and in binary they 111 = 7 would be valued 0 thru 7. If you multiply any binary number by 32, all you have to do is add 5 0's to the number you are multiplying (if it is in binary). So 101 times 100000 is 10100000 5 times 32 is 160 2 2 ----- 10100000 is 128 + 32 = 160 - - It is just like if you multiply the number 27 times 10,0000 in base ten, its easy for us to see that 27 times 10 is 270 and 27 times 100 is 2700 and -- --- 27 times 100,000 is 2,700,000 -- --- ----- ------------- ------------------------------ --- 0*32 0 191.202.0.0 000 = 0 00000000 = 0 0 - 1*32 32 191.202.32.0 001 = 1 00100000 = 32 32 -- 2*32 64 191.202.64.0 010 = 2 01000000 = 64 64 -- 3*32 96 191.202.96.0 011 = 3 01100000 = 64 + 32 96 -- 4*32 128 191.202.128.0 100 = 4 10000000 = 128 128 --- 5*32 160 191.202.160.0 101 = 5 10100000 = 128 + 32 160 --- 6*32 192 191.202.192.0 110 = 6 11000000 = 128 + 64 192 --- 7*32 224 191.202.224.0 111 = 7 11100000 = 128 + 64 + 32 224 --- ----- -------------- --------------------------------- --- Please put some time in on this, as you review today's (Monday, February 5th) class notes and the quiz one questions. It took more than an hour to compose this note. If you still do not understand IP numbers and subnet masks, you will understand them or you will be closer to understanding them after you study this new resource/explanation/example. If you already understand IP numbers and subnet masks, you will understand them better after studying this over, as there are many levels of understanding. I don't think anyone is at the black belt level yet! :-) http://math-cs.cns.uni.edu/~jacobson/c023.html Mark