03-24-2014 02:44 PM - edited 03-07-2019 06:50 PM
Hi guys, currently learning CCNA. Stuck with a small probem. I have a 1760 Router that I have configured as a DHCP server to the VLAN's on my switch. I have followed all the instructions that I have found but unfortunately the switch is just not getting assigned the ip addresses. Can anyone help me please.
Here is my router config
Current configuration : 6971 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SunrayR
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
!
resource policy
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
ip cef
!
!
no ip dhcp use vrf connected
ip dhcp excluded-address 192.168.20.1
ip dhcp excluded-address 192.168.30.1
!
ip dhcp pool LAN10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
!
ip dhcp pool LAN20
network 192.168.20.0 255.255.255.0
default-router 192.168.20.1
!
ip dhcp pool LAN30
network 192.168.30.0 255.255.255.0
default-router 192.168.30.1
!
!
!
!
!
interface FastEthernet0/0
no ip address
speed 100
full-duplex
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
no snmp trap link-status
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
no snmp trap link-status
!
interface FastEthernet0/0.30
encapsulation dot1Q 30
ip address 192.168.30.1 255.255.255.0
no snmp trap link-status
!
interface Serial0/0
no ip address
shutdown
!
interface Ethernet1/0
no ip address
shutdown
half-duplex
!
!
!
no ip http server
no ip http secure-server
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
password ********
logging synchronous
login
line aux 0
line vty 0 4
exec-timeout 0 0
password ********
logging synchronous
login
transport input ssh
line vty 5 15
exec-timeout 0 0
password ********
logging synchronous
login
transport input ssh
!
end
Special thanks in advance.
Solved! Go to Solution.
03-25-2014 01:25 PM
Can you add this to your switch config -
int fa0/1
switchport mode trunk
Jon
03-24-2014 05:35 PM
Hi,
If I understand your issue poperly.
You are talking about the switch itself
not gaining an ip address.
If the switch is in default it will have NO
KNOWLEDGE of any vlans other than VLAN 1, therfore it will
be sending its DHCP discover through vlan 1
Try adding a dhcp pool for vlan 1 and add a dotq interface
for vlan 1
!
!
ip dhcp excluded-address 192.168.10.1
! YOU HAVE MISSED THIS LINE IN YOUR CONFIG FOR VLAN 10
!
!
!
ip dhcp excluded-address 192.168.1.1
ip dhcp pool LAN1
network 192.168.10.0 255.255.255.0
default-router 192.168.1.1
!
!
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
ip address 192.168.1.1 255.255.255.0
no snmp trap link-status
!
!
In the real world most network people allocate
fixed IP addresses to their lan switches as they
are an intgeral part of our data neworks and
we dont want to depend on a network service to allow
us to gain access to manage of fault on the swiches
Hope this helps
Regards
Alex
03-24-2014 05:47 PM
Thank you for your advice. I will give that a go and let you know if it worked.
03-24-2014 06:23 PM
hi,
could you post your switch config?
make sure you've enabled a trunk port and an ip default-gateway configured.
03-25-2014 10:15 AM
Here is my switch config -
Current configuration:
!
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname SW1
!
enable secret 5 $1$AK3s$K4.bPaZ8QKyxnLYGtAvke.
!
!
!
!
!
!
ip subnet-zero
!
!
!
interface FastEthernet0/1
duplex full
speed 100
switchport trunk encapsulation dot1q
!
interface FastEthernet0/2
duplex full
speed 100
switchport access vlan 10
!
interface FastEthernet0/3
duplex full
speed 100
switchport access vlan 10
!
interface FastEthernet0/4
duplex full
speed 100
switchport access vlan 10
!
interface FastEthernet0/5
duplex full
speed 100
switchport access vlan 20
!
interface FastEthernet0/6
duplex full
speed 100
switchport access vlan 20
!
interface FastEthernet0/7
duplex full
speed 100
switchport access vlan 20
!
interface FastEthernet0/8
duplex full
speed 100
switchport access vlan 30
!
interface FastEthernet0/9
duplex full
speed 100
switchport access vlan 30
!
interface FastEthernet0/10
duplex full
speed 100
switchport access vlan 30
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface FastEthernet0/25
!
interface FastEthernet0/26
!
interface FastEthernet0/27
!
interface FastEthernet0/28
!
interface FastEthernet0/29
!
interface FastEthernet0/30
!
interface FastEthernet0/31
!
interface FastEthernet0/32
!
interface FastEthernet0/33
!
interface FastEthernet0/34
!
interface FastEthernet0/35
!
interface FastEthernet0/36
!
interface FastEthernet0/37
!
interface FastEthernet0/38
!
interface FastEthernet0/39
!
interface FastEthernet0/40
!
interface FastEthernet0/41
!
interface FastEthernet0/42
!
interface FastEthernet0/43
!
interface FastEthernet0/44
!
interface FastEthernet0/45
!
interface FastEthernet0/46
!
interface FastEthernet0/47
!
interface FastEthernet0/48
!
interface GigabitEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface VLAN1
no ip directed-broadcast
no ip route-cache
!
interface VLAN10
no ip directed-broadcast
no ip route-cache
shutdown
!
interface VLAN20
no ip directed-broadcast
no ip route-cache
shutdown
!
interface VLAN30
no ip directed-broadcast
no ip route-cache
shutdown
!
ip default-gateway 192.168.1.1
!
line con 0
password ********
logging synchronous
login
transport input none
stopbits 1
line vty 0 4
exec-timeout 0 0
password ********
logging synchronous
login
transport input telnet
line vty 5 15
exec-timeout 0 0
password ********
logging synchronous
login
transport input telnet
!
end
03-25-2014 10:02 AM
Hi Alex, thank you for your time and your advice, I added your suggestions to the router but still no joy, the switch is still not picking up a valid ip address.
03-25-2014 11:13 AM
Hi,
You need to configure "ip helper-address" under the SVIs on the switch.
Switch#
conf t
int vlan 10
ip helper-address 192.168.10.1
int vl 20
ip helper-address 192.168.20.1
int vl 30
ip helper-address 192.168.30.1
03-25-2014 11:50 AM
Thank you, i have added that but still no change. This is really getting annoying!!
03-25-2014 12:23 PM
You don't need "ip helper-address ..." commands as you are using subinterfaces on the router.
Can you clarify exactly what the problem is ie. -
1) are clients connected to the switch not getting IPs
or
2) is it the switch itself not getting an IP
which port on your switch connects to the router ?
Jon
03-25-2014 12:56 PM
03-25-2014 12:59 PM
Okay, lets forget about the switch and concentrate on the clients.
Can you post from the switch -
1) "sh int trunk" from the switch
2) "sh vlan brief"
Jon
03-25-2014 01:23 PM
SW1#show int fa0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: Disabled
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: NONE
Pruning VLANs Enabled: NONE
Priority for untagged frames: 0
Override vlan tag priority: FALSE
Voice VLAN: none
Appliance trust: none
Self Loopback: No
SW1#show vlan br
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/4, Fa0/5, Fa0/6,
Fa0/7, Fa0/8, Fa0/9, Fa0/10,
Fa0/11, Fa0/12, Fa0/13, Fa0/14,
Fa0/15, Fa0/16, Fa0/17, Fa0/18,
Fa0/19, Fa0/20, Fa0/21, Fa0/22,
Fa0/23, Fa0/24, Fa0/25, Fa0/26,
Fa0/27, Fa0/28, Fa0/29, Fa0/30,
Fa0/31, Fa0/32, Fa0/33, Fa0/34,
Fa0/35, Fa0/36, Fa0/37, Fa0/38,
Fa0/39, Fa0/40, Fa0/41, Fa0/42,
Fa0/43, Fa0/44, Fa0/45, Fa0/46,
Fa0/47, Fa0/48
10 VLAN0010 active Fa0/2, Fa0/3
20 VLAN0020 active
30 VLAN0030 active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
03-25-2014 01:25 PM
Can you add this to your switch config -
int fa0/1
switchport mode trunk
Jon
03-25-2014 01:46 PM
Well not sure what happened Jon but as you can see in the above post, fa0/1 on the switch is configured as a trunk link. But as you requested, I retyped the command:
int fa0/1
switchport mode trunk
and Voilà. It's all come up. Thank you so much for all your help. Very very very much appreciated.
03-25-2014 01:58 PM
No problem.
Just to clarify though, if you look at the switch config you posted it wasn't configured as a trunk because you had just entered the encapsulation type and not the actual mode of the port.
If you also look at the output of the "sh int ...." command you posted you can see that it was acting as an access port.
So it was only after you entered the "switchport mode trunk" command that it changed to a trunk link.
Jon
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