3C科技 娛樂遊戲 美食旅遊 時尚美妝 親子育兒 生活休閒 金融理財 健康運動 寰宇綜合

Zi 字媒體

2017-07-25T20:27:27+00:00
加入好友
邊做邊學,順便留個筆記,若有錯誤請不吝指教。 Junos基本操作及root密碼設定可參考我之前的文章:Juniper Junos基本操作、root密碼設定 所有Juniper相關文章列表:Juniper JunOS 系列文章列表 arp表(ipv4)、ndp表(ipv6)是用來做IP-MAC資訊對應的,讓第二層的交換得以順暢,為了避免IP遭到假冒,我們可以在Gateway端設定固定arp,讓特定IP對應到特定的mac地址。 通常在作為Gateway的介面或點對點介面我們可以看到該網段的arp表,通過show arp指令可以做到這一點,這邊我們用之前做的點對點IP來做測試,我們可以看到對端的IP-MAC對應資訊。 root@10.0.0.2> show arp interface ge-0/0/23.0 MAC Address Address Name Interface Flags 64:c3:d6:66:8b:f3 10.0.0.1 10.0.0.1 ge-0/0/23.0 none 如果我要鎖定這個arp表,而不讓其他將IP設定成10.0.0.1的設備影響,那我們就可以在設定模式下使用下列指令來鎖定: set interfaces ge-0/0/23 unit 0 family inet address 10.0.0.2/30 arp 10.0.0.1 mac 64:c3:d6:66:8b:f3 設定完成記得要commit才會生效,更多關於commit指令的內容可以參考:Juniper Junos提交設定(commit) 使用show configuration interface ge-0/0/23來查看設定檔大概長這樣: root@10.0.0.2> show configuration interfaces ge-0/0/23 description 10.0.0.1/30; unit 0 { family inet { address 10.0.0.2/30 { arp 10.0.0.1 mac 64:c3:d6:66:8b:f3; } } } 而ndp表的設定方式也差不多,設定格式如下:查看設定檔大概長這樣: set interfaces [interface] unit 0 family inet6 address [ipv6] ndp [ipv6] mac [mac]

本文由KerKerwebsite提供 原文連結

寫了 5860316篇文章,獲得 23313次喜歡
精彩推薦