Community discussions

MikroTik App
 
mhoppes
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Jul 29, 2010 9:33 pm

Sub VLAN interface?

Thu Jan 10, 2013 4:10 pm

I've tried several different ways but haven't been able to get this to work.

What do I need to do to assign an IP address to a VLAN interface?

I've assigned IPs to the VLAN but I can't access it.

Conversely, how do I assign multiple IPs with VLANs to an interface?
Eg. Eth0 has vlan1 with IP 10.10.10.1 and vlan2 with IP 10.10.20.1
 
CelticComms
Forum Guru
Forum Guru
Posts: 1766
Joined: Wed May 02, 2012 5:48 am

Re: Sub VLAN interface?

Thu Jan 10, 2013 6:49 pm

IP addresses are assigned to VLAN interfaces like any other interface.

Are you using Winbox?
Interlynx | Networking and Information Security Consultants & Trainers | Email: routerlynx@gmail.com
BGP | EIGRP | OSPF | MPLS | Firewall | VPN | IPsec | Multicast | QOS | IPv4/6 | STP | VLAN | PON | AE | M2M | and more!

 
mhoppes
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Jul 29, 2010 9:33 pm

Re: Sub VLAN interface?

Thu Jan 10, 2013 8:46 pm

Ok. Then I'm doing that part right. I'm using the CLI. I can post an example when I get back to the office.

How do I assign a gateway to an IP on a VLAN interface? Maybe that's the only thing that's missing.

Basically what I have done is assigned the IP to the VLAN interface and then put a route in the route table.

But I'm not able to access the device....even though I can access the devices behind it on the VLANs.
 
CelticComms
Forum Guru
Forum Guru
Posts: 1766
Joined: Wed May 02, 2012 5:48 am

Re: Sub VLAN interface?

Thu Jan 10, 2013 9:38 pm

The gateway is a routing entry. The IP allocation to an interface is just the IP number and netmask.
Interlynx | Networking and Information Security Consultants & Trainers | Email: routerlynx@gmail.com
BGP | EIGRP | OSPF | MPLS | Firewall | VPN | IPsec | Multicast | QOS | IPv4/6 | STP | VLAN | PON | AE | M2M | and more!

 
mhoppes
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Jul 29, 2010 9:33 pm

Re: Sub VLAN interface?

Fri Jan 11, 2013 5:36 am

For example:

Following these instructions:
add name=VLAN2 vlan-id=2 interface=ether1 disabled=no
add address=10.10.10.3/24 interface=VLAN2

The device will pass traffic through the VLAN and to the appropriate ports... however, it will not respond to pings to that IP address from another device on the same VLAN.
 
libove
newbie
Posts: 42
Joined: Tue Aug 14, 2012 5:18 pm

Re: Sub VLAN interface?

Fri Jan 11, 2013 5:07 pm

For example:

Following these instructions:
add name=VLAN2 vlan-id=2 interface=ether1 disabled=no
add address=10.10.10.3/24 interface=VLAN2

The device will pass traffic through the VLAN and to the appropriate ports... however, it will not respond to pings to that IP address from another device on the same VLAN.
Why not?
And, how to get the MikroTik to respond to PINGs on IP addresses which are assigned to VLAN interfaces?

Thanks!
 
mhoppes
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Jul 29, 2010 9:33 pm

Re: Sub VLAN interface?

Fri Jan 11, 2013 9:17 pm

That is exactly my problem. I can assign the IP to the VLAN but can never manage to ping or access that IP.
 
mhoppes
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Jul 29, 2010 9:33 pm

Re: Sub VLAN interface?

Mon Jan 14, 2013 10:25 pm

So I swear I've done that numerous times and it hasn't worked... tried it just now and it worked as expected.
 
libove
newbie
Posts: 42
Joined: Tue Aug 14, 2012 5:18 pm

Re: Sub VLAN interface?

Mon Jan 14, 2013 11:07 pm

I've posted more details in a similar thread here: http://forum.mikrotik.com/viewtopic.php ... 14#p351000
.. if anyone wants to look it over...

Thanks,
-Jay
 
mhoppes
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Thu Jul 29, 2010 9:33 pm

Re: Sub VLAN interface?

Mon Jan 14, 2013 11:13 pm

It seems... in my case... the issue is that if I assign an IP address to the Ethernet interface (e.g. eth1) it does not properly propagate out on the PVID of the network. Where-as if I assign the IP to the VLAN ID of the network then it works.
 
libove
newbie
Posts: 42
Joined: Tue Aug 14, 2012 5:18 pm

Re: Sub VLAN interface?

Mon Jan 14, 2013 11:20 pm

It seems... in my case... the issue is that if I assign an IP address to the Ethernet interface (e.g. eth1) it does not properly propagate out on the PVID of the network. Where-as if I assign the IP to the VLAN ID of the network then it works.
In my configuration, I have a VLAN set up:
/int vlan add vlan-id=254 name=VLAN254 interface=ether8 ...
and an IP on the VLAN:
/ip addr add address=192.168.16.2/24 interface=VLAN254 ...

This one MikroTik itself can ping its own IP address there, but another MikroTik across a trunked connection cannot ping it. Nor vice-versa (same VLAN config on the other MikroTik, /ip addr add address=192.168.16.3/24 interface=VLAN254 on that one).
 
CelticComms
Forum Guru
Forum Guru
Posts: 1766
Joined: Wed May 02, 2012 5:48 am

Re: Sub VLAN interface?

Tue Jan 15, 2013 3:09 pm

In my configuration, I have a VLAN set up:
/int vlan add vlan-id=254 name=VLAN254 interface=ether8 ...
and an IP on the VLAN:
/ip addr add address=192.168.16.2/24 interface=VLAN254 ...

This one MikroTik itself can ping its own IP address there, but another MikroTik across a trunked connection cannot ping it. Nor vice-versa (same VLAN config on the other MikroTik, /ip addr add address=192.168.16.3/24 interface=VLAN254 on that one).
Check what bridging you have in place at either end.
Interlynx | Networking and Information Security Consultants & Trainers | Email: routerlynx@gmail.com
BGP | EIGRP | OSPF | MPLS | Firewall | VPN | IPsec | Multicast | QOS | IPv4/6 | STP | VLAN | PON | AE | M2M | and more!

 
libove
newbie
Posts: 42
Joined: Tue Aug 14, 2012 5:18 pm

Re: Sub VLAN interface?

Tue Jan 15, 2013 4:09 pm

In my configuration, I have a VLAN set up:
/int vlan add vlan-id=254 name=VLAN254 interface=ether8 ...
and an IP on the VLAN:
/ip addr add address=192.168.16.2/24 interface=VLAN254 ...

This one MikroTik itself can ping its own IP address there, but another MikroTik across a trunked connection cannot ping it. Nor vice-versa (same VLAN config on the other MikroTik, /ip addr add address=192.168.16.3/24 interface=VLAN254 on that one).
Check what bridging you have in place at either end.
I thought that bridging is only required to make packets which arrive tagged on a VLAN be able to go out (untagged) a physical port?
This is entirely in the memory and CPU of the MikroTik.

To what would I bridge the VLAN, anyway, since there is no physical port associated with responding to a PING of an IP address on a VLAN interface if the MikroTik itself?
Thanks!
 
CelticComms
Forum Guru
Forum Guru
Posts: 1766
Joined: Wed May 02, 2012 5:48 am

Re: Sub VLAN interface?

Tue Jan 15, 2013 4:48 pm

The presence of bridges can confuse matters....

Probably best if you upload output from /export compact so we can get an overview.
Interlynx | Networking and Information Security Consultants & Trainers | Email: routerlynx@gmail.com
BGP | EIGRP | OSPF | MPLS | Firewall | VPN | IPsec | Multicast | QOS | IPv4/6 | STP | VLAN | PON | AE | M2M | and more!

Who is online

Users browsing this forum: vecernik87, wichets and 72 guests