iT邦幫忙

0

Cisco L3 Switch切VLAN與DHCP Server在GNS3上實做失敗

  • 分享至 

  • xImage

各位先進好, 我有一個問題想請教, 我在Packet Tracer中設定了一個L3交換器切VLAN並搭配DHCP Server的環境, 設定好之後這個DHCP會負責發送IP給各VLAN. 但當我要把這組環境改用GNS3模擬環境來實做時, 各VLAN卻無法成功拿到IP, 想請問可能是什麼原因!?
https://ithelp.ithome.com.tw/upload/images/20240515/20012980q4wy6TDtR6.png
1841充當DHCP Server的設定節錄

ip dhcp excluded-address 192.168.1.1 192.168.1.51
ip dhcp excluded-address 192.168.1.240 192.168.1.254
ip dhcp excluded-address 192.168.4.1 192.168.4.49
ip dhcp excluded-address 192.168.4.200 192.168.4.254
ip dhcp excluded-address 192.168.10.1 192.168.10.159
ip dhcp excluded-address 192.168.10.230 192.168.10.254
ip dhcp excluded-address 192.168.11.1 192.168.11.49
ip dhcp excluded-address 192.168.11.200 192.168.11.254
ip dhcp excluded-address 192.168.12.1 192.168.12.49
ip dhcp excluded-address 192.168.12.200 192.168.12.254
!
ip dhcp pool pool_1
 network 192.168.1.0 255.255.255.0
 default-router 192.168.1.254
 dns-server 192.168.1.5
ip dhcp pool pool_104
 network 192.168.4.0 255.255.255.0
 default-router 192.168.4.3
 dns-server 192.168.1.5
ip dhcp pool pool_110
 network 192.168.10.0 255.255.255.0
 default-router 192.168.10.3
dns-server 192.168.1.5
ip dhcp pool pool_111
 network 192.168.11.0 255.255.255.0
 default-router 192.168.11.3
 dns-server 192.168.1.5
ip dhcp pool pool_112
 network 192.168.12.0 255.255.255.0
 default-router 192.168.12.3
 dns-server 192.168.1.5
!
interface FastEthernet0/0
 ip address 192.168.1.254 255.255.255.0
 duplex auto
 speed auto
!
ip route 192.168.4.0 255.255.255.0 192.168.1.3 
ip route 192.168.10.0 255.255.255.0 192.168.1.3 
ip route 192.168.11.0 255.255.255.0 192.168.1.3 
ip route 192.168.12.0 255.255.255.0 192.168.1.3

L3 Switch的設定節錄

ip routing
!
interface FastEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode access
interface FastEthernet0/2
 switchport mode access 
interface FastEthernet0/9
 switchport access vlan 104
 switchport mode access
interface FastEthernet0/13
 switchport access vlan 110
 switchport mode access
interface FastEthernet0/17
 switchport access vlan 111
 switchport mode access
interface FastEthernet0/21
 switchport access vlan 112
 switchport mode access
interface Vlan1
 ip address 192.168.1.3 255.255.255.0
interface Vlan104
 ip address 192.168.4.3 255.255.255.0
 ip helper-address 192.168.1.254
interface Vlan110
 ip address 192.168.10.3 255.255.255.0
 ip helper-address 192.168.1.254
interface Vlan111
 ip address 192.168.11.3 255.255.255.0
 ip helper-address 192.168.1.254
interface Vlan112
 ip address 192.168.12.3 255.255.255.0
 ip helper-address 192.168.1.254
!
interface Vlan1
 ip address 192.168.1.3 255.255.255.0
!
interface Vlan104
 ip address 192.168.4.3 255.255.255.0
 ip helper-address 192.168.1.254
!
interface Vlan110
 ip address 192.168.10.3 255.255.255.0
 ip helper-address 192.168.1.254
!
interface Vlan111
 ip address 192.168.11.3 255.255.255.0
 ip helper-address 192.168.1.254
!
interface Vlan112
 ip address 192.168.12.3 255.255.255.0
 ip helper-address 192.168.1.254
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

2 個回答

0
Titan Cheng
iT邦新手 4 級 ‧ 2024-05-16 11:12:30

1814跟3560之間的trunk有打通嗎?

0
UOKIOK
iT邦見習生 ‧ 2024-05-28 16:31:23

試著將你的指令放入 Packet Tracer 跑了一次,發現將指令貼在 L3 交換器時,interface Vlan1 不會自己 UP,要進介面 no shutdown 才會 UP,所以在猜 GNS3 會不會也是這個問題?

interface Vlan1 UP 之後後面的 PC 都有正常拿到 IP,所以指令基本上都是 OK 的。

小小提醒 L3 交換器這裡

interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode access <= 雖然是模擬環境,但這個 interface 是 trunk 的話,是不是就不需要下這個指令了?

我要發表回答

立即登入回答