cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
907
Views
4
Helpful
7
Replies

modern router on the stick help pls

Istvan kelemen
Level 1
Level 1

Hey!

I would like to know how to do the following scenario:

SW1,2,3: vlan 10,20,30 and 100(native)

SW1,2 have 3 vlan interfaces for vlan routing

SW1 vlan interfaces

192.168.0.1

192.168.1.1

192.168.2.1

SW2 vlan interfaces

192.168.0.2

192.168.1.2

192.168.2.2

vlan100 192.168.100.1, 2 and 3 (sw1,2,3)

i can ping trough vlans and switches but how do i connect the whole switch network to the router?

sws.png

7 Replies 7

Bilal Nawaz
VIP Alumni
VIP Alumni

On SW_1 you create a trunk:

int fa0/15

switchport trunk encapsulation dot1q

switchport mode trunk

on R1

Create sub interfaces if you want to configure router on a stick.

e.g.

fa0/0.100

encapsulation dot1q (for native vlan specify the 'native' keyword)

ip address x.x.x.x x.x.x.x

What is the purpose of the router in your scenario? This will determine your configuration. Are your switches doing any routing?

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Hey,

I want the switches to do vlan routing. They could use routing protocoll, however i'm not sure how to conenct them to the router. Should i use ip default-gateway on each switches? Or should i activate eirgp or ospf?

By the way i have full connectivity between vlans, but i don't know how to connect them to the internet via router!

Several options...

You could potentially use OSPF, you would then:

Inject a default route from R1 or SW1 to the rest of the switches

Same could be accomplished with EIGRP.

You could have static routing and add a default route, which ever appeals to you most?

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

i'll use a dynamic routing protocoll. just realizes that i have to advertise the vlans to the router and vica versa.

but how about the ip addressing? i'm a bit confused.

where should i have turn routing on? sw1's fa 0/15?

how about sw1-2? should i use a default gateway?

i also want to reach vlan 100 interfaces via telnet.

huh :s

Okay, lets use OSPF as it is standardised protocol. We'll use vlan 100 as the routing domain if you like.

'router-id must be unique (an ip address on the router/switch), most preferably configured rather than left alone'  Is normally chosen on loopback interfaces with the highest ip address, and if there isnt one, then it will choose the physical interface with highest ip.

On R1 we will do the following - put an ip address on the interface, enable OSPF and advertise the default route towards R1:

conf t

int fa0/0

ip address 10.0.0.1 255.255.255.252

ip ospf network point-to-point

!

router ospf 1

router-id ##

network 10.0.0.1 0.0.0.0 area 0

default-information originate

on SW_1 we will have fa0/15 as a routed port, not a switchport (assuming you are using gns3 with the nm16-esw module) and configure ospf on that interface. Also enabled on vlan 100 which all other switches will have, plus we will advertise the connected networks i.e. vlans through redistribution to R1

SW_1:

conf t

int fa0/15

no switchport

ip address 10.0.0.2 255.255.255.252

ip ospf network point-to-point

!

router ospf 1

router-id ##

network 10.0.0.2 0.0.0.0 area 0

network 192.168.100.1 0.0.0.0 area 0

redistribute connected subnets

on SW_2 we will enable OSPF on vlan 100

SW_2:

conf t

router ospf 1

router-id ##

network 192.168.100.2 0.0.0.0 area 0

on SW_3 we will also enable OSPF on vlan 100

SW_3:

conf t

router ospf 1

router-id ##

network 192.168.100.3 0.0.0.0 area 0

Please let me know if you encounter errors or problems.

Message was edited by: Bilal Nawaz

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

hey!

finally it's done

it was much easier than i tought

sw1: f0/15 routed port, redistribute connected, dhcp server for each vlan, vlan interface each vlan, ip routing

that was all :O

Hey that's great!

Could you kindly mark the post as the answer and rate posts so other people can benefit. Thank you.

:-)

Sent from Cisco Technical Support iPhone App

Please rate useful posts & remember to mark any solved questions as answered. Thank you.