10-15-2011 06:29 AM - edited 03-07-2019 02:49 AM
So i been studying the router configuration register and i know its of 16 bits. Now whats confusing me is the configuration register table. The bits in the table correspond to a specific hexadecimal no and what i am not getting is that how do these bits got converted to their corresponding hexadecimal no. I am attaching the image of the configuration register table for refrence.
Looking forwrd to hear from you guys.
Thanks,
Ahmed
Solved! Go to Solution.
10-15-2011 08:49 AM
Ahmed,
A quick way to convert between hexa and binary formats is to convert each hexadecimal digit directly to binary. A hexadecimal digit is a grouping of 4 bits, a value between 0x0 and 0xF i.e. between 0 and 15. A value between 0 and 15 can be converted to binary very easily. For example:
0x2142: 0010 0001 0100 0010
0x2102: 0010 0001 0000 0010
0x3922: 0011 1001 0010 0010
I am not sure if this answers your question. Perhaps you could give us a particular example.
Best regards,
Peter
10-15-2011 09:24 AM
OK I will try to explain.
You have config register of 16 bits. Which look like 0000000000000000. The bits are counted right to left starting from the one from your right side at number 0 and are incremented in this case to number 15. In the manual you are told that if you change the value of the corresponding bit from 0 to 1 e.g. bit number 6 (which is actually the seventh bit from right to left) you will ignore nvram contents. If this is what you need you implement it and now your config register will be in binary 0000000001000000. As you know one hex number is presented in binary as four bits. We have four hex numbers and so four groups of 4 bits. So in this case if we have 0000 0000 0100 0000 which in hex will be 0x 0(0000) 0 (0000) 4(0100) 0(0000). If you want to add another option e.g. "Boot default ROM if network boot fails"then we have to change the value of bit number 13 from 0 to 1. So to our config register which is set with one option will be added new one. We have now 0x 0(0000) 0 (0000) 4(0100) 0(0000) but we will change it to 0x 1(0001) 0 (0000) 4(0100) 0(0000) (hex 0x1040). If you add option "OEM bit enabled" you have to change bit number 7 (which is actually number 8 from right to left as you remember). So we had 0x 1(0001) 0 (0000) 4(0100) 0(0000) (hex 0x1040), now we change it with the new option and change bit number 7 from 0 to 1 and we have 0x 1(0001) 0 (0000) C(1100) 0(0000) (hex 0x10c0).
Each function you add change the register accordingly. Bits 0-3 change the most right number in hex representation of the config register, bits 4-7 change second number of the hex representation of the config register, 8-11 change the third and bits 12-15 change the forth hex number in conf register.
Best regards,
Alex
10-15-2011 02:40 PM
Hi Ahmed,
A TFTP server is just a software running on a Windows or Linux workstation. Placing an IOS image into a TFTP server should simply mean copying the file into the directory where the TFTP keeps the files. Assuming that the TFTP server is reachable via IP from your router, you can also back up the IOS in the router's FLASH memory using the command:
copy flash:filename tftp:
A new version of IOS is downloaded from the TFTP server using a similar command:
copy tftp: flash:
The command will ask you for the IP address of the TFTP server and the file name of the new IOS image. The router will then download the file to its FLASH.
Best regards,
Peter
10-15-2011 07:33 AM
Hi,
just use this tool:
http://bosonsoftwaredownloads.com/utils/bos_calc.exe
Regards.
Alain.
10-15-2011 08:28 AM
thanks for this calculator alain. but is there an easy way to remember bit combinations for various functions because in the paper i dont think the calculator for this will be present.
10-15-2011 07:54 AM
Hi Ahmed,
Each four bits represent one hex eg. 1111=F. If you change only the corresponding bit and the others are zeroes (only to be clear in example in real life usually are not) from this 16 bits for the register eg. bit No. 6 you will receive this hex 0x0040. If you only enable bit 6&7 frmo these sixteen bits (for ignore nvram contents and OEM bit) you will have register 0x00c0.
Best regards,
Alex
10-15-2011 08:30 AM
Alexander can u be more specific, i didnt get what you tried to explain.
10-15-2011 08:35 AM
i want to know that how do these Bits represent their corresponding hexadecimal no.
Regards,
Ahmed
10-15-2011 08:49 AM
Ahmed,
A quick way to convert between hexa and binary formats is to convert each hexadecimal digit directly to binary. A hexadecimal digit is a grouping of 4 bits, a value between 0x0 and 0xF i.e. between 0 and 15. A value between 0 and 15 can be converted to binary very easily. For example:
0x2142: 0010 0001 0100 0010
0x2102: 0010 0001 0000 0010
0x3922: 0011 1001 0010 0010
I am not sure if this answers your question. Perhaps you could give us a particular example.
Best regards,
Peter
10-15-2011 10:08 AM
Thanks peter one more thing i want to ask is that how do we load an IOS onto a TFTP host and how a newer version of IOS is loaded onto a router?
Regards,
Ahmed
10-15-2011 02:40 PM
Hi Ahmed,
A TFTP server is just a software running on a Windows or Linux workstation. Placing an IOS image into a TFTP server should simply mean copying the file into the directory where the TFTP keeps the files. Assuming that the TFTP server is reachable via IP from your router, you can also back up the IOS in the router's FLASH memory using the command:
copy flash:filename tftp:
A new version of IOS is downloaded from the TFTP server using a similar command:
copy tftp: flash:
The command will ask you for the IP address of the TFTP server and the file name of the new IOS image. The router will then download the file to its FLASH.
Best regards,
Peter
10-15-2011 09:24 AM
OK I will try to explain.
You have config register of 16 bits. Which look like 0000000000000000. The bits are counted right to left starting from the one from your right side at number 0 and are incremented in this case to number 15. In the manual you are told that if you change the value of the corresponding bit from 0 to 1 e.g. bit number 6 (which is actually the seventh bit from right to left) you will ignore nvram contents. If this is what you need you implement it and now your config register will be in binary 0000000001000000. As you know one hex number is presented in binary as four bits. We have four hex numbers and so four groups of 4 bits. So in this case if we have 0000 0000 0100 0000 which in hex will be 0x 0(0000) 0 (0000) 4(0100) 0(0000). If you want to add another option e.g. "Boot default ROM if network boot fails"then we have to change the value of bit number 13 from 0 to 1. So to our config register which is set with one option will be added new one. We have now 0x 0(0000) 0 (0000) 4(0100) 0(0000) but we will change it to 0x 1(0001) 0 (0000) 4(0100) 0(0000) (hex 0x1040). If you add option "OEM bit enabled" you have to change bit number 7 (which is actually number 8 from right to left as you remember). So we had 0x 1(0001) 0 (0000) 4(0100) 0(0000) (hex 0x1040), now we change it with the new option and change bit number 7 from 0 to 1 and we have 0x 1(0001) 0 (0000) C(1100) 0(0000) (hex 0x10c0).
Each function you add change the register accordingly. Bits 0-3 change the most right number in hex representation of the config register, bits 4-7 change second number of the hex representation of the config register, 8-11 change the third and bits 12-15 change the forth hex number in conf register.
Best regards,
Alex
10-15-2011 10:01 AM
Thanks alot alex this is what i was asking. I wanted to know that how do these bit numbers are represented in hexadecimal and you told me in clear simple words.
Thanks,
Ahmed
10-15-2011 12:56 PM
You are welcome.
If you are satisfied please rate helpful answers and mark question as answered.
Best regards,
Alex
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide