iT邦幫忙

0

Vlan DHCP Relay問題

  • 分享至 

  • twitterImage

https://ithelp.ithome.com.tw/upload/images/20210726/20112450O0NxlyTzzY.png

目的希望pc1. pc2可以取得10.1.20的ip並可以上網

1.wan是192.168.118.5,到r1可以上網
2.pc1,pc2接it的eth 0/1 eth 0/2,vlan20成員eth range eth0/0-2
3.vlan20 ip 10.1.20.2

以下是r1 route
https://ithelp.ithome.com.tw/upload/images/20210726/20112450sLSGIjpCUv.png

以下是fortigate的靜態路由設定
https://ithelp.ithome.com.tw/upload/images/20210726/20112450To2zXpjwLz.png

請問我要怎設定dhcp relay才能讓pc1 pc2取得ip並上網
現在是新手邊上網查邊用gns3學網路

bluegrass iT邦高手 1 級 ‧ 2021-07-26 20:35:29 檢舉
留個名學習.
問題是 20.x 那個 DHCP 的 ethX 接到哪,假如是 R1 Router,你必須下指令讓 DHCP RELAY 廣播到 R1 哪一個 ethX 上面,而這各 ethX 必須接到 IT 那個交換器
還有另外各作法就是可以直接把 20.x 接到 IT 那個交換器的要發布DHCP 的 VLAN 群組內的 LAN 口,雖然這樣會跳過 R1,但可以確保 DHCP 可以讓 20.X 可以廣播DHCP 封包
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

2 個回答

0
補覺鳴詩
iT邦高手 1 級 ‧ 2021-07-26 23:11:19
最佳解答

首先 fortigate 限制
DHCP pool 與 interface 不同網段就只能用指令設定 DHCP pool
我的 port2 就是你的 eth0/1 (IP 10.1.1.1/30)

config system dhcp server
    edit 2
        set default-gateway 10.1.20.254
        set netmask 255.255.255.0
        set interface "port2"
        config ip-range
            edit 1
                set start-ip 10.1.20.100
                set end-ip 10.1.20.150
            next
        end
        set dns-server1 8.8.8.8
    next
end

cisco router 設定
在你的 eth 0/1 (你截圖是 fa1/0)下這行指令
或是加在你的 IT switch vlan20
習慣我會加在 gateway 那邊 (10.1.20.1)
ip helper-address 10.1.1.1

參考來源
https://kb.fortinet.com/kb/documentLink.do?externalID=FD33842

kungyc iT邦新手 5 級 ‧ 2021-07-27 17:24:40 檢舉

謝謝指導~~

0
mytiny
iT邦超人 1 級 ‧ 2021-07-27 10:30:52

樓上"補覺鳴詩"大大提供了一個方法
樓主可以參考試做看看
在下是沒有按那個方法做過LAB或實戰
倒是有另幾種解法方向,供樓主參考
(KB的OS版本太舊,且是在2台FG下的結構)

  1. 自建一台DHCP server,然後讓各Vlan Relay
  2. 將R1做成Layer2,然後trunk to Fortigate
  3. 替換R1成FortiSwitch,改為Security Fabric的架構

以上三種方式在下都實做過可行,敬供樓主參考

kungyc iT邦新手 5 級 ‧ 2021-07-27 17:26:36 檢舉

一台FG就可以囉,改天你的方法我在LAB試試看XD

我要發表回答

立即登入回答