Can't Ping gateway or out of network

danyzukodanyzuko Member Posts: 40 ■■□□□□□□□□
I'm sure I'm breaking a fundamental rule. Just can't understand what the problem is.
I made a router on a stick scenario with a switch and a router.
The router has f0/0.1 subinterface with dot1Q 1 native
with ip add 192.168.1.1 255.255.255.0

dhcp pool VLAN1
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1

The switch f0/2 to the router is in trunk mode
sw trunk allowed vlan 1-99,150 (for a voip phone)
sw trunk native vlan 80

And the the switches f0/5 is in access mode
The computer has an ip addr of 192.168.1.101
but I can't get the computer to pull a dhcp address.... WHY?

On the switch I go into f0/5 and enter sw access vlan 1
but it won't take that into the config
It has to do with me trying to use the VLAN 1 right?
it's not allowed or what?

Comments

  • darkerzdarkerz Member Posts: 431 ■■■■□□□□□□
    Besides the missing IP Helper on the SVI, you should make sure there is no native vlan mismatching going on here.

    Make sure your access ports are VLAN'd and up.
    Make sure your trunk ports are good, do show int x/x switchport, check
    Make sure your allowed and native vlan's are consistent from switch to router
    Make sure your host will work if you statically assign it the correct IP, subnet and DG.
    Make sure your DG is configured.

    Paste your configs and show logging if any of that is still making you scratch your head.
    :twisted:
  • Magic JohnsonMagic Johnson Member Posts: 414
    danyzuko wrote: »
    And the the switches f0/5 is in access mode
    The computer has an ip addr of 192.168.1.101
    but I can't get the computer to pull a dhcp address.... WHY?

    If you have already assigned the PC a static IP it won't attempt to get one using DHCP.
  • TheNewITGuyTheNewITGuy Member Posts: 169 ■■■■□□□□□□
    You're trunk has a native vlan of 80 and your router has a native vlan of 1 - you have a native vlan mismatch.

    The switch's native vlan is still 1 so doing switchport access vlan 1 is not going to help.

    .. and i second that you've already assigned an IP anyway :)
  • danyzukodanyzuko Member Posts: 40 ■■□□□□□□□□
    Thanks guys, I get it that the end devices won't pull addresses while with a static ip, it was just temporary.
    The ip helpers did the trick. I forgot a few things. Lol Here is the URL of what I was following so you can see the big picture. Its simple. Just to refresh on VLANS: youtube.com/watch?v=2VboOLyRxyg
    It's a Danscourses lecture. And below are the configs. Feel free to critique me on anything. I like that he left the top two computers on VLAN 1 to see how devices not on a VLAN can get accross to other networks as well... I left out passwords for ease. I cringe thinking of doing an past lab of mine. My teacher was such a drill sargent. Lol


    Router
    ip dhcp pool VOIP
    network 192.168.150.0 255.255.255.0
    default-router 192.168.150.1
    option 150 ip 192.168.50.1
    ip dhcp pool VLAN50
    network 192.168.50.0 255.255.255.0
    default-router 192.168.50.1
    ip dhcp pool VLAN1
    network 192.168.1.0 255.255.255.0
    default-router 192.168.1.1
    ip dhcp pool VLAN99
    network 192.168.99.0 255.255.255.0
    default-router 192.168.99.1
    !
    !
    !
    !
    !
    !
    !
    !
    !
    spanning-tree mode pvst
    !
    !
    !
    !
    interface FastEthernet0/0
    no ip address
    duplex auto
    speed auto
    !
    interface FastEthernet0/0.1
    encapsulation dot1Q 1 native
    ip address 192.168.1.1 255.255.255.0
    ip helper-address 192.168.1.1
    !
    interface FastEthernet0/0.2
    encapsulation dot1Q 2
    no ip address
    !
    interface FastEthernet0/0.50
    encapsulation dot1Q 50
    ip address 192.168.50.1 255.255.255.0
    !
    interface FastEthernet0/0.80
    encapsulation dot1Q 80
    ip address 192.168.80.1 255.255.255.0
    !
    interface FastEthernet0/0.99
    encapsulation dot1Q 99
    ip address 192.168.99.1 255.255.255.0
    ip helper-address 192.168.1.1
    !
    interface FastEthernet0/0.150
    encapsulation dot1Q 150
    ip address 192.168.150.1 255.255.255.0
    !
    interface FastEthernet0/1
    no ip address
    duplex auto
    speed auto
    shutdown
    !
    interface Vlan1
    no ip address
    shutdown
    !
    ip classless
    !
    !
    !
    !
    !
    !
    !
    telephony-service
    max-ephones 10
    max-dn 10
    ip source-address 192.168.150.1 port 2000
    auto assign 1 to 9
    !
    ephone-dn 1
    number 62001
    !
    ephone-dn 2
    number 62002
    !
    ephone 1
    device-security-mode none
    mac-address 000C.8574.3997
    type 7960
    button 1:1
    !
    ephone 2
    device-security-mode none
    mac-address 0001.4368.9948
    type 7960
    button 1:2






    SWITCH 1
    spanning-tree mode pvst
    !
    interface FastEthernet0/1
    switchport trunk native vlan 80
    switchport trunk allowed vlan 1-99
    switchport mode trunk
    !
    interface FastEthernet0/2
    switchport trunk allowed vlan 1-99,150
    switchport mode trunk
    !
    interface FastEthernet0/3
    !
    interface FastEthernet0/4
    !
    interface FastEthernet0/5
    switchport mode access
    !
    interface FastEthernet0/6
    !
    interface FastEthernet0/7
    !
    interface FastEthernet0/8
    !
    interface FastEthernet0/9
    !
    interface FastEthernet0/10
    switchport access vlan 50
    switchport mode access
    !
    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 mode access
    switchport voice vlan 150
    !
    interface FastEthernet0/21
    switchport mode access
    switchport voice vlan 150
    !
    interface FastEthernet0/22
    !
    interface FastEthernet0/23
    !
    interface FastEthernet0/24
    !
    interface GigabitEthernet1/1
    !
    interface GigabitEthernet1/2
    !
    interface Vlan1
    no ip address
    shutdown






    spanning-tree mode pvst
    !
    interface FastEthernet0/1
    switchport trunk native vlan 80
    switchport trunk allowed vlan 1-99
    switchport mode trunk
    !
    interface FastEthernet0/2
    !
    interface FastEthernet0/3
    !
    interface FastEthernet0/4
    !
    interface FastEthernet0/5
    switchport mode access
    !
    interface FastEthernet0/6
    !
    interface FastEthernet0/7
    !
    interface FastEthernet0/8
    !
    interface FastEthernet0/9
    !
    interface FastEthernet0/10
    switchport access vlan 50
    switchport mode access
    !
    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 access vlan 99
    switchport mode access
    !
    interface GigabitEthernet1/1
    !
    interface GigabitEthernet1/2
    !
    interface Vlan1
    no ip address
    shutdown
    !
    interface Vlan99
    ip address 192.168.99.2 255.255.255.0
  • danyzukodanyzuko Member Posts: 40 ■■□□□□□□□□
    oops wrong thread...
Sign In or Register to comment.