2013年9月25日 星期三

網路IP設定的一些事情

一個IPv4的IP有32bit
其中此32bit要切成兩部份:網路位置, 主機位置
所以這時候就需要子網路遮罩來輔助知道哪些bit是指網路位置,哪些bit是指主機位置

以192.168.123.132/255.255.255.0 (或寫成192.168.123.132/24)當範例
11000000.10101000.01111011.10000100 -- IP 位址 (192.168.123.132)
11111111.11111111.11111111.00000000 -- 子網路遮罩 (255.255.255.0)
這樣就可以知道前24bit是代表網路位置,後8bit代表主機位置

而預設閘道就是主機指定的預設路由器位置

Reference: http://support.microsoft.com/kb/164015/zh-tw


Related Posts:

  • Linear Address SpaceReference: http://www.chudov.com/tmp/LinuxVM/html/understand/node30.html The linear address space is split into two parts, the userspace part which potentially changes with each full context switch and the kernel addre… Read More
  • 紀錄一下/proc/pid/maps的使用在跑起來的一支程式,可用cat /proc/pid/maps 來看他的memory layout (似乎只看的到user space的) 以下是這段code看到的資訊: address - The starting and ending address of the region in the process's address space permissions - rwx就不用講了,p代表的是private(not shared),… Read More
  • About kernel structureDOS was designed for running only one dsedicated process.    => Is the perfect for some real-time, dedicated applications.UNIX, however, was designed for multi-user, multi-tasking applications.Kernel runs in… Read More
  • 人生的極致想人生究竟是為了什麼 上大學後到現在快23歲了,似乎找到了解答 追求"夢想" 如果有一天,我夢想是登山,那就算死於登山的途中,也是很快樂的,因為我追求到極致了 常常覺得與家人的價值觀很不同,他們只想保守的人生,平平順順沒有目標沒有夢想沒有追求 只會說那很危險什麼的......就會覺得與他們說話真的講不下去 有時候真的覺得"情"是很大的牽絆,會絆住夢想 有時候與老爹聊天,會覺得老爹很可憐,我覺得他對於人生跟我的想法是很像的 他也懂追求夢想的比只… Read More
  • User process & user thread & kernel thread & kernel process(?)最近想讀Linux中,user/kernel、process/thread之間的memory關係 目前看起來user space有process、thread之分 而kernel space應該就只有稱kernel thread而沒kernel process 那kernel thread的功用又是什麼呢? 找了一些資料後自己歸納以下三點功用: 1. 處理只能在kernel space做的事情 -- device driver 2. 處理只… Read More

0 意見:

張貼留言