在同一張網路卡中 想要接通2個不同網段的方法
這陣子在有NLB(Network Load Balace)服務的機器上架設hyper-v,剛好有遇到此問題,所以寫出來和大家分享。(註:一般來說,如果只有一條網路線,接上switch,switch裡有接上外網router的線 + 內網電腦的線時,會需要使用到此技巧)
接下來以192.168.1.0 和192.168.2.0兩個網段進行範例,流程如下:
1、在IPv4的內容中點選「進階」
2、在IP位址中點選「新增」,接著輸入不同網段的IP與submask
3、在預設閘道點選新增,接著輸入另一個閘道位址(註:自動計量核取方魂的意思是路由順序的優先權,在此範例中勾選自動計量即可
剛開始我認為,如上述的設定完成後應該就大功告成了,可是作業系統沒有人這麼聰明,作業系統不會將192.168.1.x 的IP位址送給192.168.1.254 的閘道位址,另一個網段也一樣。所以,我們必須手動設定路由表(Route Table)。
4、打開cmd (命令提示字元),輸入如下指令
route add –p 192.168.1.0 mask 255.255.255.0 192.168.1.254
route add –p 192.168.2.0 mask 255.255.255.0 192.168.2.254
5、最後,輸入如下指令,檢查剛才新增路由表
route print
大致就是這樣囉。
留言與評論
Nice post. Thanks for sharing this interesting post with us. I enjoy at the time of reading this post. You have done a awesome job by sharing this post with us. Keep it up.
fishnet stockingsI like the valuable info you provide in your articles. I’ll bookmark your blog and check again here regularly. I'm quite sure I will learn lots of new stuff right here! Good luck for the next!
SEOwww.quickieseo.com
SEO DoncasterI've been browsing online greater than 3 hours as of late, yet I by no means found any interesting article like yours. It is lovely value sufficient for me. In my view, if all webmasters and bloggers made excellent content material as you did, the internet will probably be much more helpful than ever before.
SEO CompanyHi there! I just would like to give an enormous thumbs up for the nice info you've gotten right here on this post. I might be coming back to your weblog for extra soon.
Cool blogs of 2013Hmm is anyone else having problems with the pictures on this blog loading? I'm trying to determine if its a problem on my end or if it's the blog. Any suggestions would be greatly appreciated.
Hi BloggersIt’s really a great and helpful piece of information. I’m glad that you shared this useful info with us. Please keep us up to date like this. Thanks for sharing.
Hi Bloggers939473 666134you can have an perfect weblog proper here! would you prefer to make some invite posts on my weblog? 87370
g4nFOQ本篇文章的留言功能已關閉!