08-16-2021 10:03 AM
I have been practicing on packet tracer. I have A PC connected to FE 0/3 on a switch. I thought I had it configured for DHCP, but I think I’m missing something.
Current configuration : 1827 bytes
!
version 15.0
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
ip dhcp excluded-address 10.10.0.0 10.10.1.10
!
ip dhcp pool mainNet
network 10.10.0.0 255.255.248.0
default-router 10.10.1.2
dns-server 10.10.1.2
ip dhcp pool secondNet
!
!
!
spanning-tree mode pvst
spanning-tree portfast default
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport access vlan 10
!
interface FastEthernet0/2
switchport access vlan 10
!
interface FastEthernet0/3
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 10
!
interface FastEthernet0/5
switchport access vlan 10
!
interface FastEthernet0/6
switchport access vlan 10
!
interface FastEthernet0/7
switchport access vlan 10
!
interface FastEthernet0/8
switchport access vlan 10
interface FastEthernet0/9
switchport access vlan 20
!
<interfaces excluded for brevity>
interface FastEthernet0/15
switchport access vlan 20
!
interface FastEthernet0/16
switchport access vlan 20
!
interface FastEthernet0/17
!
<excluded interfaces for brevity>
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
ip address 10.10.1.1 255.255.248.0
!
interface Vlan20
ip address 10.10.8.1 255.255.248.0
!
!
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
!
!
end
Solved! Go to Solution.
08-16-2021 10:14 AM
Hello,
the IP addresses in the two highlighted lines need to match. So make both either 10.10.1.1 or 10.10.1.2.
interface Vlan10
--> ip address 10.10.1.1 255.255.248.0
!
ip dhcp pool mainNet
network 10.10.0.0 255.255.248.0
--> default-router 10.10.1.2
dns-server 10.10.1.2
08-16-2021 10:14 AM
Hello,
the IP addresses in the two highlighted lines need to match. So make both either 10.10.1.1 or 10.10.1.2.
interface Vlan10
--> ip address 10.10.1.1 255.255.248.0
!
ip dhcp pool mainNet
network 10.10.0.0 255.255.248.0
--> default-router 10.10.1.2
dns-server 10.10.1.2
08-16-2021 10:15 AM
Not familiar with PT but usually the default-router address should be the IP address of the vlan
default-router 10.10.1.1
HTH
08-16-2021 05:03 PM
ip dhcp excluded-address 10.10.1.1 10.10.1.10
!
ip dhcp pool mainNet
network 10.10.0.0 255.255.248.0
default-router 10.10.1.1
dns-server 10.10.1.1 < Do you have DNS Server running 10.10.1.2 ? if not i will use router IP or google dns 8.8.8.8
ip dhcp pool secondNet
!
!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide