DHCP Snooping
سلام دوستان
شبکه ای طبق تصویر زیر داریم.
native vlan را در تمامی اینترفیس های ترانک vlan 100 قرار دادیم. ارتباطات vlan ها در کل شبکه برقرار است. اما زمانیکه dhcp snooping را در سوییچ f3-ItServerRoom فعال می کنم . سرویس dhcp به کامپیوترهایی که متصل به سوییچی هستند که dhcp snooping روی ان فعال نیست کار می کند و ip می دهد. اما به کامپیوترهایی که به سوییچی متصل هستند که قابلیت dhcp snooping در ان فعال شده است dhcp به انها ip نمی دهد.
لازم به ذکر است که بر روی پورت trunk تمامی سوییچها دستور trust خورده است و همچنین پورتی که به سرور dhcp متصل است نیز trust شده است. دستور مربوط به dhcp snooping نیز به صورت زیر اعمال شده است.
ip dhcp snooping
ip dhcp snooping valn 1-1001
تشکر
9 پاسخ
من الان تست می کنم ببینم چرا اینطوری میشه
آقا من همین الان سناریو شما رو راه اندازی کردم بدون مشکل کار می کنه اینم تنظیماتش: (من احتمال میدم DHCP Server شما روتی واسه subnet دیگه نداره واسه همین نمیتونه به unicast ها جواب بده
این تصویر سناریو:
تنظیمات DHCP Server:
DHCP-Server(config)#do show run Building configuration... Current configuration : 1906 bytes ! ! Last configuration change at 14:27:43 UTC Wed Jun 15 2016 ! version 15.2 service timestamps debug datetime msec service timestamps log datetime msec ! hostname DHCP-Server ! boot-start-marker boot-end-marker ! ! ! no aaa new-model ip cef ! ! ! ip dhcp excluded-address 10.10.20.253 10.10.20.254 ip dhcp excluded-address 10.10.30.253 10.10.30.254 ! ip dhcp pool vlan2pool network 10.10.20.0 255.255.255.0 default-router 10.10.20.254 ! ip dhcp pool vlan3pool network 10.10.30.0 255.255.255.0 default-router 10.10.30.254 ! ! ! no ipv6 cef ! ! multilink bundle-name authenticated ! ! ! ! ! interface Ethernet0/0 no ip address shutdown duplex auto ! interface GigabitEthernet0/0 ip address 10.10.20.253 255.255.255.0 media-type gbic speed 1000 duplex full no negotiation auto ! interface GigabitEthernet1/0 no ip address shutdown negotiation auto ! interface GigabitEthernet2/0 no ip address shutdown negotiation auto ! interface GigabitEthernet3/0 no ip address shutdown negotiation auto ! interface Serial4/0 no ip address shutdown serial restart-delay 0 ! interface Serial4/1 no ip address shutdown serial restart-delay 0 ! interface Serial4/2 no ip address shutdown serial restart-delay 0 ! interface Serial4/3 no ip address shutdown serial restart-delay 0 ! interface Serial4/4 no ip address shutdown serial restart-delay 0 ! interface Serial4/5 no ip address shutdown serial restart-delay 0 ! interface Serial4/6 no ip address shutdown serial restart-delay 0 ! interface Serial4/7 no ip address shutdown serial restart-delay 0 ! interface POS5/0 no ip address shutdown ! ip forward-protocol nd ! ! no ip http server no ip http secure-server ip route 0.0.0.0 0.0.0.0 10.10.20.254 ! ! ! ! control-plane ! ! line con 0 exec-timeout 0 0 logging synchronous stopbits 1 line aux 0 stopbits 1 line vty 0 4 login ! ! end
تنظیمات Core-Switch:
Core-Switch(config-if)#do show run Building configuration... Current configuration : 3457 bytes ! ! Last configuration change at 09:17:52 UTC Wed Jun 15 2016 ! version 15.2 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption service compress-config ! hostname Core-Switch ! boot-start-marker boot-end-marker ! ! ! no aaa new-model ! ! ! ! ! ! ! ! ip cef no ipv6 cef ! ! ! spanning-tree mode rapid-pvst spanning-tree extend system-id ! vlan internal allocation policy ascending ! ! ! ! ! ! ! interface GigabitEthernet0/0 switchport access vlan 2 switchport mode access media-type rj45 negotiation auto ! interface GigabitEthernet0/1 shutdown media-type rj45 negotiation auto ! interface GigabitEthernet0/2 shutdown media-type rj45 negotiation auto ! interface GigabitEthernet0/3 shutdown media-type rj45 negotiation auto ! interface GigabitEthernet1/0 shutdown media-type rj45 negotiation auto ! interface GigabitEthernet1/1 shutdown media-type rj45 negotiation auto ! interface GigabitEthernet1/2 switchport access vlan 2 media-type rj45 speed 1000 duplex full no negotiation auto ! interface GigabitEthernet1/3 switchport trunk allowed vlan 1-3 switchport trunk encapsulation dot1q switchport mode trunk media-type rj45 negotiation auto ! interface Vlan2 ip address 10.10.20.254 255.255.255.0 ! interface Vlan3 ip address 10.10.30.254 255.255.255.0 ip helper-address 10.10.20.253 ! ip forward-protocol nd ! no ip http server no ip http secure-server ! ! ! ! ! ! control-plane ! end
تنظیمات Access-Switch که روش DHCP Snooping واسه 2 تا vlan فعاله
Access-Switch(config)#do show run Building configuration... Current configuration : 3440 bytes ! ! Last configuration change at 09:34:19 UTC Wed Jun 15 2016 ! version 15.2 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption service compress-config ! hostname Access-Switch ! boot-start-marker boot-end-marker ! ! ! no aaa new-model ! ! ! ! ! ! ! ! ip dhcp snooping vlan 2-3 no ip dhcp snooping information option ip dhcp snooping ip cef no ipv6 cef ! ! ! spanning-tree mode rapid-pvst spanning-tree extend system-id ! vlan internal allocation policy ascending ! ! ! ! ! interface GigabitEthernet0/0 switchport access vlan 2 switchport mode access media-type rj45 negotiation auto ! interface GigabitEthernet0/1 switchport access vlan 3 switchport mode access media-type rj45 negotiation auto ! interface GigabitEthernet0/2 shutdown media-type rj45 negotiation auto ! interface GigabitEthernet0/3 shutdown media-type rj45 negotiation auto ! interface GigabitEthernet1/0 shutdown media-type rj45 negotiation auto ! interface GigabitEthernet1/1 shutdown media-type rj45 negotiation auto ! interface GigabitEthernet1/2 shutdown media-type rj45 negotiation auto ! interface GigabitEthernet1/3 switchport trunk allowed vlan 1-3 switchport trunk encapsulation dot1q switchport mode trunk media-type rj45 negotiation auto ip dhcp snooping trust ! ip forward-protocol nd ! no ip http server no ip http secure-server ! ! ! ! ! ! control-plane ! end
اینم خروجی debug در dhcp server:
DHCP-Server(config)# *Jun 15 14:47:49.279: DHCPD: Reload workspace interface GigabitEthernet0/0 tableid 0. *Jun 15 14:47:49.283: DHCPD: tableid for 10.10.20.253 on GigabitEthernet0/0 is 0 *Jun 15 14:47:49.283: DHCPD: client's VPN is . *Jun 15 14:47:49.287: DHCPD: DHCPDISCOVER received from client 0100.5079.6668.01 through relay 10.10.30.254. *Jun 15 14:47:49.287: DHCPD: Sending DHCPOFFER to client 0100.5079.6668.01 (10.10.30.2). *Jun 15 14:47:49.291: DHCPD: unicasting BOOTREPLY for client 0050.7966.6801 to relay 10.10.30.254. DHCP-Server(config)# *Jun 15 14:47:50.303: DHCPD: Reload workspace interface GigabitEthernet0/0 tableid 0. *Jun 15 14:47:50.303: DHCPD: tableid for 10.10.20.253 on GigabitEthernet0/0 is 0 *Jun 15 14:47:50.307: DHCPD: client's VPN is . *Jun 15 14:47:50.307: DHCPD: DHCPREQUEST received from client 0100.5079.6668.01. *Jun 15 14:47:50.307: DHCPD: DHCPREQUEST received on interface GigabitEthernet0/0. *Jun 15 14:47:50.311: DHCPD: Sending DHCPACK to client 0100.5079.6668.01 (10.10.30.2). *Jun 15 14:47:50.311: DHCPD: unicasting BOOTREPLY for client 0050.7966.6801 to relay 10.10.30.254.
آی پی آدرس DHCP Server 10.10.20.253 هست
DHCP Relay هم رو Core تعریف شده رو اینترفیس vlan 3 با آی پی اینترفیس 10.10.30.254 و آدرس سرور 10.10.20.253
اینم از خروجی Snooping Binding در DHCP Snooper:
Access-Switch(config)#do show ip dhcp snoop bind MacAddress IpAddress Lease(sec) Type VLAN Interface ------------------ --------------- ---------- ------------- ---- -------------------- 00:50:79:66:68:01 10.10.30.2 86358 dhcp-snooping 3 GigabitEthernet0/1 00:50:79:66:68:00 10.10.20.1 86392 dhcp-snooping 2 GigabitEthernet0/0 Total number of bindings: 2
DHCP Snooping از دروس CCNP Switch هست و packet tracer واسه ccna
نباید هم کار کنه
سلام
ببخشید دیر پاسخ دادم
ظاهرا مشکل از packet tracer هست. چون این دستور نه تو سوییچهای 3560 عمل می کنه و نه در سوییچهای 2590 و 2950T و 2960 .
این دستور رو در سوییچی که روش DHCP Snooping تنظیم شده وارد کنید ببینید مشکل حل میشه:
no ip dhcp snooping information option
سلام این دستور رو قبلا تست کردم اما با این حال زدم و افاغه ای نکرد.
جالب اینجاست حتی به دو کلاینتی هم که در همان سوییچی هستند که dhcp server قرار داره اما در vlan مجزا از هم و dhcp هستند نیز ip نمیده. اما به کلاینتی که به سوییچی دیگر متصل هستش، اما دستور dhcp snooping در اون زده نشده بدون مشکل ip میده.
1- بله
2-اونم در سوییچ core برای تمامی vlan ها زده شده اگه نبود که کار نمی کرد.همه چی خوبه تا زمانی که dhcp snooping فعال نشده. تازه زمانی که فعال میشه روی سوییچی که dhcp server در اون قرار داره. اگه کلاینتها در سوییچی باشند که دستور dhcp snooping در اون زده نشده باشه که ip میده و اگه دستور dhcp snooping زده شده باشه ip نمیده.
و از اون جالب تر اینه کههمه این اتفاقات در حالی می افته که پورتی که dhcp server به اون متصل شده trust نشده و علی القاعده باید block بشه، اما در عمل این اتفاق نمی افته
DHCP سرور در یه subnet دیگه هست؟
Helper-address رو وارد کردید دیگه؟
اگه صلاح دونستی فایل ذخیره شده اونو بذارم