Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

1 router using secondary IP, 2 VLANs. WIll this work?

Status
Not open for further replies.

hummer3331973

Technical User
Feb 1, 2007
121
US
Hi-

I'm trying this config on my lab. I have a 2801 router that is connected to the internet (via FE0/0).

Now I have a L2 switch connected to this router's FE0/1 with IP add 192.168.1.1 for use by VLAN1. On the same interface, I added a secondary IP add 192.168.2.1 for VLAN2.

Will there be a problem if I deploy this kind of set-up in real world? My tests in the lab are ok. We do not need VLAN1 to communicate with VLAN2.
 
I would setup 802.1q trunking on the routers interface and a trunk port on the switch.

setup your vlans on the switch ports.

[americanflag] Go Army!
Tek-TIP Member 19,650
CCNA, CCNA Voice, CCNP, CCVP
Avaya IP Office 500, CS1000
 
Thanks Jeter. But what will be the advantage of setting up a 802.1q trunk between the router and switch if there's no need for interVLAN?

I'm just thinking that using a secondary IP will be the simplest, straightforward fix.

 
I never liked using secondary ip on an interface mostly because of routing issues. 802.1q clears up the routing problems created using secondary ips.

Now I understand that you do not intend to route between the two networks but just in case the programming is there and your still blocking broadcast.



[americanflag] Go Army!
Tek-TIP Member 19,650
CCNA, CCNA Voice, CCNP, CCVP
Avaya IP Office 500, CS1000
 
I don't see how you can have VLAN2 if you haven't used 802.1q on the switch uplink - all you've got are two subnets on VLAN1.
 
Vince- you're probably correct.

Is there like a recommended number of VLANs that you can create on an L2 switch? Or is there no limit, just depending on the capability of the switch and the router?

I'm subnetting an IP block I got from the carrier. I will create about 8 VLANs (or subnets) on one switch and a router. Is this a good design?
 
Switches tend to have a maximum number of VLANs - eg 128, 256, 512.

You tend to use VLANs for security reasons, or to keep broadcast network down to a manageable size of no more than a couple of hundred devices. You would use VLANs to separate voice and data to make it easy to apply QoS to voice traffic.

If you're just trying to learn how to do .1q trunking, you could create 8 VLANs.

On your router's "LAN" interface, configure no ip address. Then create 8 subinterfaces and give each one an IP address for the IP subnet you want associated with that VLAN and configure the VLAN ID.
Then you patch your router into the switch and configure that switch uplink port as a .1q trunk and allow all 8 VLAN IDs.
Then, on your switch you configure ports either
- for link ports to other switches, as .1q trunks
- for individual hosts, as access ports in a VLAN.
 
Excellent, will try that.

Yes, I'm a VLAN newbie. I'm reading some VLAN how-tos available on the Web. The best part I like is that we can add VLANs on the same router/switch anytime without disrupting the existing VLANs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top