Disease Posted October 22, 2015 Posted October 22, 2015 (edited) Messing around with routers and Vlans in packet tracer at the moment, I have set up sub interfaces and dhcp for my vlans on the router and trunks on the switches with the switches having a management vlan ip address but........I can not seem to get a dhcp address on my clients from the router nor can I ping the gateway I created for each sub interface, I can get one for a management PC, do I need to set up an IP address for each vlan interface on each switch? Also my real world network uses a mask of 255.255.0.0 I assume this means that I am unable to use the following vlan structure of x.x.10..x x.x.20.x x.x.30.x etc. as when I try to set up sub interfaces initially it would give me an overlap error but when I changed the ip structure to 255.255.255.0 I could create them. Many Thanks Edited October 22, 2015 by Disease
FN-GM Posted October 22, 2015 Posted October 22, 2015 (edited) Is the router the DHCP server? Can you post the configs of the switch and the router please? You will only need to give the device that is doing the routing the IP address. In this case a router For the second question have a play with this - http://www.subnet-calculator.com/ Edited October 22, 2015 by FN-GM 1
Disease Posted October 22, 2015 Author Posted October 22, 2015 Router Current configuration : 1396 bytes ! version 15.1 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Router ! ! ! ! ! ip dhcp pool Student network 10.217.10.0 255.255.255.0 default-router 10.217.10.1 ip dhcp pool Staff network 10.217.2.0 255.255.255.0 default-router 10.217.2.1 ip dhcp pool MGMT network 10.217.99.0 255.255.255.0 default-router 10.217.99.1 ! ip cef no ipv6 cef ! ! license udi pid CISCO2911/K9 sn FTX1524P918 ! spanning-tree mode pvst ! ! interface GigabitEthernet0/0 no ip address duplex auto speed auto ! interface GigabitEthernet0/0.10 encapsulation dot1Q 10 ip address 10.217.0.1 255.255.255.0 ! interface GigabitEthernet0/0.20 encapsulation dot1Q 20 ip address 10.217.10.1 255.255.255.0 ! interface GigabitEthernet0/0.30 encapsulation dot1Q 30 ip address 10.217.2.1 255.255.255.0 ! interface GigabitEthernet0/0.40 encapsulation dot1Q 40 ip address 10.217.1.1 255.255.255.0 ! interface GigabitEthernet0/0.99 encapsulation dot1Q 99 ip address 10.217.99.1 255.255.255.0 ! interface GigabitEthernet0/1 no ip address duplex auto speed auto shutdown ! interface GigabitEthernet0/2 no ip address duplex auto speed auto shutdown ! interface Vlan1 no ip address shutdown ! ip classless ! ip flow-export version 9 ! ! line con 0 ! line aux 0 ! line vty 0 4 login ! ! ! end Switch ( There are multiple switches in the test this is the one connected to the router) Current configuration : 1365 bytes ! version 12.2 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Switch ! ! spanning-tree mode pvst ! interface FastEthernet0/1 switchport access vlan 10 switchport mode access ! interface FastEthernet0/2 ! interface FastEthernet0/3 ! interface FastEthernet0/4 ! interface FastEthernet0/5 ! interface FastEthernet0/6 ! interface FastEthernet0/7 ! interface FastEthernet0/8 ! interface FastEthernet0/9 ! interface FastEthernet0/10 ! 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 switchport trunk allowed vlan 1-150 switchport mode trunk ! interface GigabitEthernet0/1 switchport trunk allowed vlan 1-150 switchport mode trunk ! interface GigabitEthernet0/2 switchport trunk allowed vlan 1-150 switchport mode trunk ! interface Vlan1 no ip address shutdown ! interface Vlan20 no ip address ! interface Vlan99 ip address 10.217.99.2 255.255.255.0 ! ! line con 0 ! line vty 0 4 login line vty 5 15 login ! ! end
FN-GM Posted October 22, 2015 Posted October 22, 2015 On the router in Global Config mode (Conf T) run this: service dhcp Then can you test the DHCP again please? If you set the IP manually does it work?
Disease Posted October 22, 2015 Author Posted October 22, 2015 Tried the command, no difference. Tried pinging sub interface ip from client with a static address in same range, nothing. But I can ping the MGMT sub interface from a machine with a static IP. Both machines are attached to the same switch, config below: Current configuration : 1231 bytes ! version 12.1 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Switch ! ! ! spanning-tree mode pvst ! interface FastEthernet0/1 switchport access vlan 20 switchport mode access ! interface FastEthernet0/2 ! interface FastEthernet0/3 ! interface FastEthernet0/4 ! interface FastEthernet0/5 ! interface FastEthernet0/6 ! interface FastEthernet0/7 ! interface FastEthernet0/8 ! interface FastEthernet0/9 ! interface FastEthernet0/10 ! 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 switchport access vlan 99 switchport mode access ! interface FastEthernet0/21 ! interface FastEthernet0/22 ! interface FastEthernet0/23 ! interface FastEthernet0/24 switchport trunk allowed vlan 1-150 switchport mode trunk ! interface Vlan1 no ip address shutdown ! interface Vlan20 no ip address ! interface Vlan99 ip address 10.217.99.15 255.255.255.0 ! ! line con 0 ! line vty 0 4 login line vty 5 15 login ! ! end
FN-GM Posted October 22, 2015 Posted October 22, 2015 Is it possible to upload the packet tracer file please?
Disease Posted October 22, 2015 Author Posted October 22, 2015 No problem will do, here is the interface details on the router in case I have missed something there, (all new learning as I go along ) Router(config)#do show ip interface brief Interface IP-Address OK? Method Status Protocol GigabitEthernet0/0 unassigned YES unset up up GigabitEthernet0/0.10 10.217.0.1 YES manual up up GigabitEthernet0/0.20 10.217.10.1 YES manual up up GigabitEthernet0/0.30 10.217.2.1 YES manual up up GigabitEthernet0/0.40 10.217.1.1 YES manual up up GigabitEthernet0/0.99 10.217.99.1 YES manual up up GigabitEthernet0/1 unassigned YES unset administratively down down GigabitEthernet0/2 unassigned YES unset administratively down down Vlan1 unassigned YES unset administratively down down Packet_Tracer.zip
FN-GM Posted October 22, 2015 Posted October 22, 2015 Thanks, will open it up later at home. I can't actually see from this whats up with it. But I can get a better understanding will full access 1
Disease Posted October 22, 2015 Author Posted October 22, 2015 Nice one thanks, any pointers in the right direction are greatly received, I have enjoyed my journey so far just need to get over this wall to continue it.
Davit2005 Posted October 22, 2015 Posted October 22, 2015 To be honest your better doing intervlan routing on a layer 3 switch than a router (or Router on a Stick as it's sometimes known). Depends how many vLANS you are looking to implement and what they will be for I guess. I set up a SonicWall at my last place and used subinterfaces/DHCP on the SonicWall just for BOYD to keep it completely seperate. I do remember I just tagged the ports with the BOYD vLans on the switch side and used sub interfaces on the SonicWall. I was limited back then by the hardware available and time. 1
Disease Posted October 22, 2015 Author Posted October 22, 2015 To be honest in my real network I have a L3 switch as the core but we are not using any vlans at the moment so this is more of a learning excercise at them moment to be translated into my real network when up to speed with it. I only have packet tracer student I don't think it has 3 switches available in it.
Disease Posted October 22, 2015 Author Posted October 22, 2015 Although I have just noticed a multilayer switch 3560 in Packet Tracer so I will look into that, I would still like to get the router issues resolved though so I can learn as much as possible.
Disease Posted October 22, 2015 Author Posted October 22, 2015 I now have the inter Vlan routing for dhcp working using the Layer 3 switch, many thanks for the help. @FN-GM I would still appreciate your views on the router config though
FN-GM Posted October 22, 2015 Posted October 22, 2015 Just got home, motorway was jammed. Will have a look now
FN-GM Posted October 22, 2015 Posted October 22, 2015 (edited) Tips: Name you switches. So when you run show cdp neighbors you can see the switches on the ports. Add spanning-tree portfast on access ports, the PC's will connect to the network instantly. Fixed!! The switch labeled 10.217.99.2 did not have VLAN 20 created. Although it has no ports assigned in VLAN 20 it still needs creating as traffic on VLAN 20 is passing through it. (its not just 20 the others as well, just used 20 as an example) Edited October 22, 2015 by FN-GM
Disease Posted November 13, 2015 Author Posted November 13, 2015 Did the above work @Disease Sorry for the Delay in responding, yes thanks it worked!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now