cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1413
Views
10
Helpful
12
Replies

VLAN 802.1Q Trunking

NathanLKoch
Level 1
Level 1

I am trying to configure vlans on a 2911 ISR and trunk them to a  4948-10GE-W Switch. I am following this tutorial.

https://www.cisco.com/c/en/us/support/docs/lan-switching/inter-vlan-routing/14976-50.html

and have posted about it here.

https://community.cisco.com/t5/networking-news/802-1q-trunking-2911-isr-to-catalyst-4948-10ge-w/ba-p/4010235

I have the trunk configured and I can ping between the two devices.

The router will be providing dhcp. From what I gather this is all I need to do to assign a vlan to a switchport?

http://www.omnisecu.com/cisco-certified-network-associate-ccna/how-to-configure-and-assign-a-switch-access-port-to-a-vlan.php

What I'm trying to do is a little backwards from the tutorial.

 

Say my native vlan is 192.168.1.1 and I can ping 1.1 from 1.2. and everything appears to be trunking between the two. Should I be able to ping 192.168.22.1 or it simply won't route because it's only switching over a trunk and I have no address within that address space? or do I have to apply a 22.2 address to my secondary vlan on this side?

 

Thanks,

Nate

 

 

---------------------
"Fortune favors the brave."
▊▊▊
2 Accepted Solutions

Accepted Solutions

Francesco Molino
VIP Alumni
VIP Alumni
Hi

Switching occurs on your 4948 which is trunked on your 2921. If everything is by default, all sub interfaces on your isr should be up/up because the physical port is connected to the switch and configured as trunk mode.
If the default gw of your hosts is the isr sub interface ip, then you should be able to ping every ips configured on the isr from your hosts.

Can you share the following outputs from your router and attach them into a text file please?
- sh run
- sh ip int brief

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

View solution in original post

To assign a vlan to a range of interfaces:
interface range g0/1 - 12
switchpo mode acc
switchpo access vlan 10

However if you look the config on the switch it will show it interface by interface and not in a range organized mode.

if you want to assign ip 192.168.1.10 to 192.168.1.60 for dhcp serve then you need to exclude the one that dhcp shouldn't distribute.
Here an example:
ip dhcp exclude 192.168.1.1 192.168.1.9
ip dhcp exclude 192.168.1.61 192.168.1.254
ip dhcp pool VLAN10
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8

This config is an example showing how to configure the dhcp server on ios to server ip between 192.168.1.10 and 192.168.1.60 with a default gateway of 192.168.1.1 and assign dns server 8.8.8.8

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

View solution in original post

12 Replies 12

Francesco Molino
VIP Alumni
VIP Alumni
Hi

Switching occurs on your 4948 which is trunked on your 2921. If everything is by default, all sub interfaces on your isr should be up/up because the physical port is connected to the switch and configured as trunk mode.
If the default gw of your hosts is the isr sub interface ip, then you should be able to ping every ips configured on the isr from your hosts.

Can you share the following outputs from your router and attach them into a text file please?
- sh run
- sh ip int brief

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

Tested. Checks Out.

 

I need to configure DHCP pools on vlans and route them to my WAN and configure DNS stuff now. This has been a learning experience.

 

Is there a way I can assign switch port ranges to make my config files on my switch cleaner?

Ports 1 to 12 / 13 to 24 / 25 to 36 / 37 to 48?

 

Thanks,

Nate

 

---------------------
"Fortune favors the brave."
▊▊▊

On your switch you can assign vlans as you want using the switchport access vlan command. Then between your switch and your router, you'll have a trunk with all needed vlans.
On your router, you'll have as many sub-interface as vlan trunked.
Finally when this part is fine, you can create a dhcp pool on your router for every vlans.

All these vlans will be and to communicate to each others if the default gw you're pushing through the dhcp pool is your router IP.

To configure a range of interfaces, you can use the command interface range and then configure your vlan but at the end, on the switch, you'll see a specific configuration for each interfaces when running the show run command. There's no way to see the running config with a config organized by range interfaces.

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

That's where I am at now.

I was just wanting to bulk assign vlans to interfaces rather than one by one so it looks nicer on my config file? I dunno how it works.

 

I am configuring my excluded-address ranges now but am not sure how it works.

Does "ip dhcp excluded-address 192.168.1.1 192.168.1.60" look correct as a range? or will it just exclude .1 and .60?

---------------------
"Fortune favors the brave."
▊▊▊

To assign a vlan to a range of interfaces:
interface range g0/1 - 12
switchpo mode acc
switchpo access vlan 10

However if you look the config on the switch it will show it interface by interface and not in a range organized mode.

if you want to assign ip 192.168.1.10 to 192.168.1.60 for dhcp serve then you need to exclude the one that dhcp shouldn't distribute.
Here an example:
ip dhcp exclude 192.168.1.1 192.168.1.9
ip dhcp exclude 192.168.1.61 192.168.1.254
ip dhcp pool VLAN10
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8

This config is an example showing how to configure the dhcp server on ios to server ip between 192.168.1.10 and 192.168.1.60 with a default gateway of 192.168.1.1 and assign dns server 8.8.8.8

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

Coming along here on my end. What's this "R1(config-subif)#ip helper-address"? From what I understand its a dhcp forwarder? So in my use case it isn't necessary correct?

---------------------
"Fortune favors the brave."
▊▊▊

It's used to forward dhcp requests to your dhcp server. In your case as dhcp server is hosted locally on your router, you don't need it.

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

I got it all configured for the most part. All ports and vlans pull a dhcp address from the trunk to the router. It took some time, wasn't instant but that's something I can fine tune?

 

Thank you for your help by the way.

-Nate

---------------------
"Fortune favors the brave."
▊▊▊

Ok it works. What do you mean it take some time?

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

It took time to configure. I'm trying to get it to route now.

https://community.cisco.com/t5/routing/cannot-route-to-internet-from-switch/td-p/4011632

---------------------
"Fortune favors the brave."
▊▊▊

Ok i do see some answers.
Have you tried them?
I'll recommend you keep answering the other post for routing to avoid duplicate posts.

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

I was able to get it to work. Thank you for your help.

---------------------
"Fortune favors the brave."
▊▊▊
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: