cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
16666
Views
5
Helpful
19
Replies

Routing to multiple subnets

MisterOatScl
Level 1
Level 1

Hi,

We have a network setup so that we have a feed coming in from the Internet to our router and the LAN behind our router consists of some webservers configured with a subnet of public IP addresses, our provider is routing packets to this network to our router and then our router routes them to the correct server on the LAN, this works fine.

The issue is that we now need some more IP addresses (for SSL hosted sites on the webservers) and the new block we will get most likely won't continue on from the block we already have. What I'm trying to do is work out how to setup our router so that the LAN has 2 (or more) networks configured so that the servers can listen on both blocks of addresses.

The router we have is a Cisco 861 and in the web inteface you can simply set a WAN IP and mask and a LAN (or rather VLan) IP and mask, this worried me that it wouldn't be possible but after connecting using SSH and checking out some of the CISCO commands I'm starting to think this may be possible with this router?

What I am currently thinking is I simply need to create a new VLAN for each block of IPs we need, is this correct? If so then I've been looking at this but it appears at that a VLAN is attached to a particular interface (or interfaces), there are 4 physical LAN ports on this router and it seems a bit wrong that I would have to connect a seperate cable to each port with a VLAN on it all going into the same router so they can get to the webserver.

So I guess my question is can I a) have multiple IP addresses/subnets on a single VLAN or b) can I set up multiple VLANs and attach them to a single phyical interface?


Thanks for taking the time to read this and I hope my questions is clear enough and makes sense.

Tom

19 Replies 19

Ganesh Hariharan
VIP Alumni
VIP Alumni

Hi,

Go with option 2 and configure multiple vlan in router interface connecting inwards towards teh LAN using sub interface.check out the below link for inter vlan routing using Router on a Stick concept.

Hope this will help on your query

http://www.cisco.com/en/US/docs/switches/lan/catalyst5000/hybrid/routing.html

Regards

Ganesh.H

Thank you very much for your reply, it was the answer I was hoping for an looking at that link I can see the model for exactly what I am trying to create. I've been hacking away at the router console and I seem to have got the hang of vlans however I can't for the life of me work out how to create subinterfaces, I've tried commands such as

interface fastethernet 1.1

and unless I use 1.0 I get the following message back

% Invalid input detected at '^' marker

(the ^ is pointing at the f in fastethernet)

If i type "interface fastethernet" and hit ? I get a message saying I can basically type 0-4, it's making me wander if this is possible in the router.


I don't supposed you know how you do this in the 861 router or better still know where I can find a reference for the commands for this particular router?

Thanks again for your reply, your help is really appreciated!

Tom

The fastethernet ports are layer 2 ports.

I'm not sure if you'll be able to create two vlans on the router. If this is true, you'll ve to work with a secondary IP

Please excuse me Davy, I'm feeling dense and confused about all of this. What do you mean I'd need 2 IP addresses, I'm already expecting the router to have an IP on each of the subnets I'd be configuring on the LAN, the issue is I'd like it so that the 1 physical interface on the router can send/receive packets on both networks rather than have 2 cable running from the router to the switch. Surely that should be possible?

davy.timmermans
Level 4
Level 4

How is your fastethernet port in use configured?

As a regular L2 port and a VLAN interface with one 1 ip address, serving as default-gateway for your servers?

Yes, that appears to be the way it is working right now.

There's a big chance that you can use only 1 vlan for all your fastethernet ports. Or that you're able to create only one L3 vlan interface.

interface vlan 1

ip add "Def gateway" SM

ip add "Def gateway2" SM secondary

if that's the case you'll be limited to one vlan and 2 subnets.

Unless you've a layer3 switch before the router? (3750/3560/3550/...

Hmm, I it lets me create multiple vlans but your saying that I can only attach 1 vlan to an fastethernet port?

If this is true I could potentail create a vlan for each fastether port and then plug them all into the same switch right? This isn't ideal and I'd probably return this router and go for a different option (any suggestions on models to look at which are capable of this behviour?) but I'm just trying to get a picture of what is going on in my mind.

Thanks for you all help so far!

Which type of model of switch is connected to your router?

What is used as default gateway for your servers?

interface vlan x on the router?

If yes, are you able to create a second VTI (interface vlan y)

I don't remember the make/model of the switch, it's nothing clever or complicated and has no managerment interface it's just a small gigabit ethernet switch.

The default gateway on the servers is indeed the IP address of vlan1 on the router, I can create a vlan y but I don't know what to do with it, presumably I attach it to an interface but because I don't seem to be able ot attach it to the same interface that vlan1 is attached to that would mean I'd have to connected up another port on a different interface?

The sub interface seems like the right thing (it looks similar to setting up ethernet aliases on linux?) but I just don't seem to be able to get this router to play the game.

What to do with the 'authentication required' server fed.cisco.com: etc???

Subinterfaces works only on physical layer 3 interfaces. The fastethernet ports are layer 2 ports.

For each vlan/subnet you require a default gateway at a Layer 3 device which has routing intelligence (eg. default route,...).

As you can't work with subinterfaces, you've to work with vlan interfaces.

vlan 1 has a corresponding layer 3 interface : interface vlan 1

vlan 2 has a corresponding layer 3 interface : interface vlan 2

etc.

which could be used as default gateway.

=the same as subinterfaces but in software. Via a trunk link the port has to be connected with the other switch.

BUT

In the first place I don't think you'll be able to create an extra vlan interface (interface vlan x). If you could try? (eg. interface vlan 2)

As your switch probably even won't recognize different vlans, I think you're limited to 1 VLAN and two subnets via secondary IP address. => won't understand dot1Q.

Or you've to put each port in a vlan with a dedicated cable connecting to the '1 vlan switch'. (if you can create multiple vlan interfaces)

Suppose if subinterfaces would work. You'll require a dot1Q link (vlan tagging) which is not compatible with your switch's capabilities

I can create an extra vlan, it has not problem doing that, the problem is getting both vlans attached to a single physical interface (I'm still not sure if I'm understanding this properly).

  If your switch is a unmanaged switch your only option will be to create a single vlan with a secondary address as umanaged switches have no trunking capability .

Indeed as I said,

interface vlan 1

ip address x.x.x.x y.y.y.y (=default gateway for first subnet)

ip address z.z.z.z a.a.a.a secondary ((=default gateway for second subnet)

=actually 1 vlan, serving to subnets.

Beside the non-trunking capability I think also you're not able to create a second vlan INTERFACE.

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:

Review Cisco Networking products for a $25 gift card