3

I am new to networking and I have recently purchased a 1950 switch and 1841 router.

What I am trying to do, is to use VLANS to segregate my network.

From whaty I have read I think I need to configure 2 VLAN's on my switch, say VLAN-1 and VLAN-2, assign switch ports to the VLAN's and then configure one of the ports on the switch to "trunk" to the router.

I think I am ok with that config.

What I am not sure is, what needs to be configured on the Router. I would like to have 2 separate networks, both with DCHP.

Is that possible, can anyone help with some example configuration?

Thanks,

1
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Aug 11 '17 at 14:42
3

Vlan 10 - 10.0.10.0/24

Vlan 20 - 10.0.20.0/24

CONFIGURE DHCP

This assumes first available IP is gateway and gives a simple setup. You can configure further by setting lease time, dns server, excluded addresses etc. Other configurations include setting manual bindings.

Vlan 10:

ip dhcp pool VLAN10-POOL
network 10.0.10.0 255.255.255.0
default-router 10.0.10.1
dns-server 8.8.8.8

Vlan 20:

ip dhcp pool VLAN20-POOL
network 10.0.20.0 255.255.255.0
default-router 10.0.20.1
dns-server 8.8.8.8

CONFIGURE INTER-VLAN ON ROUTER: Many examples online, simply Google "router on a stick"

We'll assume fastethernet 0/0 is the connected interface to your switch.

interface fastethernet 0/0
no ip address
duplex auto
speed auto

interface fastethenet 0/0.10
description VLAN10
encapsulation dot1q 10
ip address 10.0.10.1 255.255.255.0

interface fastethernet 0/0.20
description VLAN20
encapsulation dot1q 20
ip address 10.0.20.1 255.255.255.0
1
  • 1
    You will also want to make sure the native vlan on the f0/0 subinterface matches the native vlan on the switch's trunk port that connects to it. Don't forget to turn f0/0 on, too. Mar 19 '15 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.