Jump to content
  • 0

VLAN Configuraion


1v0
 Share

Question

Здравейте, 

  От няколко дни се опитвам да конфигурирам два микротика с VLAN-и. Работя под виртуална среда GNS3. Прилагам схема:  Мина ли през trunk между двата рутера, клиентите не получават адреси от DHCP сървъра. Имате ли идеи къде греша?

Благодаря!

5ace10c815b63_Untitled(640x470).jpg.8febfa21f7b47a2eb6ff45cab9af74fe.jpg

R1 config: 

/interface bridge
add fast-forward=no name=VLAN
/interface ethernet
set [ find default-name=ether1 ] advertise=10M-half,10M-full,100M-half,100M-full mac-address=08:00:27:A4:C2:79 name=ether1-WAN speed=\
    100Mbps
set [ find default-name=ether5 ] advertise=10M-half,10M-full,100M-half,100M-full mac-address=08:00:27:2E:60:0A name=ether2 speed=\
    100Mbps
set [ find default-name=ether6 ] advertise=10M-half,10M-full,100M-half,100M-full mac-address=08:00:27:5C:79:88 name=ether3 speed=\
    100Mbps
set [ find default-name=ether7 ] advertise=10M-half,10M-full,100M-half,100M-full mac-address=08:00:27:5E:C6:7A name=ether4 speed=\
    100Mbps
set [ find default-name=ether2 ] mac-address=08:00:27:A0:C1:B9 name=ether5
set [ find default-name=ether3 ] mac-address=08:00:27:CE:50:7D name=ether6
set [ find default-name=ether4 ] name=ether7
/interface vlan
add interface=VLAN name=vlan100 vlan-id=100
add interface=VLAN name=vlan200 vlan-id=200
add interface=VLAN name=vlan300 vlan-id=300
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp_pool0 ranges=192.168.10.2-192.168.10.254
add name=dhcp_pool1 ranges=192.168.20.2-192.168.20.254
add name=dhcp_pool2 ranges=192.168.30.2-192.168.30.254
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=vlan100 name=dhcp1
add address-pool=dhcp_pool1 disabled=no interface=vlan200 name=dhcp2
add address-pool=dhcp_pool2 disabled=no interface=vlan300 name=dhcp3
/tool user-manager customer
set admin access=own-routers,own-users,own-profiles,own-limits,config-payment-gw
/interface bridge port
add bridge=VLAN interface=ether2
/interface list member
add interface=ether1-WAN list=WAN
add list=LAN
/ip address
add address=192.168.10.1/24 interface=vlan100 network=192.168.10.0
add address=192.168.20.1/24 interface=vlan200 network=192.168.20.0
add address=192.168.30.1/24 interface=vlan300 network=192.168.30.0
/ip arp
add address=192.168.0.50 interface=ether1-WAN mac-address=08:00:27:A4:C2:78
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1-WAN
/ip dhcp-server network
add address=192.168.10.0/24 dns-server=8.8.8.8 gateway=192.168.10.1
add address=192.168.20.0/24 dns-server=8.8.8.8 gateway=192.168.20.1
add address=192.168.30.0/24 dns-server=8.8.8.8 gateway=192.168.30.1
/ip firewall nat
add action=masquerade chain=srcnat
/ip route
add disabled=yes distance=1 gateway=192.168.137.1
/system identity
set name=Router1

SW1 Config:

/interface bridge
add fast-forward=no name=VLAN100
add fast-forward=no name=VLAN200
add fast-forward=no name=VLAN300
/interface ethernet
set [ find default-name=ether1 ] advertise=\
    10M-half,10M-full,100M-half,100M-full mac-address=08:00:27:A4:C2:79 speed=\
    100Mbps
set [ find default-name=ether2 ] advertise=\
    10M-half,10M-full,100M-half,100M-full mac-address=08:00:27:2E:60:0A speed=\
    100Mbps
set [ find default-name=ether3 ] advertise=\
    10M-half,10M-full,100M-half,100M-full mac-address=08:00:27:5C:79:88 speed=\
    100Mbps
set [ find default-name=ether5 ] advertise=\
    10M-half,10M-full,100M-half,100M-full mac-address=08:00:27:5E:C6:7A name=\
    ether4 speed=100Mbps
set [ find default-name=ether6 ] mac-address=08:00:27:A0:C1:B9 name=ether5
set [ find default-name=ether7 ] mac-address=08:00:27:CE:50:7D name=ether6
set [ find default-name=ether8 ] name=ether7
set [ find default-name=ether4 ] name=ether8
/interface vlan
add interface=ether1 name=vlan100 vlan-id=100
add interface=ether1 name=vlan200 vlan-id=200
add interface=ether1 name=vlan300 vlan-id=1
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.1.1-192.168.1.50
/ip dhcp-server
# DHCP server can not run on slave interface!
add address-pool=dhcp disabled=no interface=ether2 name=dhcp1
/tool user-manager customer
set admin access=\
    own-routers,own-users,own-profiles,own-limits,config-payment-gw
/interface bridge port
add bridge=VLAN100 interface=ether2
add bridge=VLAN100 interface=vlan100
add bridge=VLAN200 interface=vlan200
add bridge=VLAN200 interface=ether3
add bridge=VLAN300 interface=ether4
add bridge=VLAN300 interface=vlan300
/interface list member
add interface=ether1 list=WAN
add list=LAN
/ip arp
add address=192.168.0.50 interface=ether1 mac-address=08:00:27:A4:C2:78
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1
/ip dhcp-server network
add address=192.168.1.0/24 gateway=192.168.1.1 netmask=24
/ip firewall nat
add action=masquerade chain=srcnat
/ip route
add disabled=yes distance=1 gateway=192.168.137.1
/system identity
set name=SW1

 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
  • Administrator

Аз ли нещо пропускам или тези влан-и си седят само на етернет портовете?

Няма нито един свързващ интерфейс между дата рутера, който да свързва влан бриджовете.

 

Направи един VLAN 400 който да е на WAN на двата рутера

и през него да са ти 100 200 и 300 свързани помежду си към бриджовете

Харесай поста ^^^
acer.gif htc.gifsigpic4024_2.gif

Форумът е за взаимопомощ а не за свършване на чужда работа


ɹɐǝɥ uɐɔ noʎ ǝɹoɯ ǝɥʇ 'ǝɯoɔǝq noʎ ɹǝʇǝınb ǝɥʇ

Link to comment
Share on other sites

  • 0

Ясно къде ми е била грешката. 

Ако Ви разбрах правилно: Създавам нов VLAN-400, на интерфейс-2 на рутера и интерфейс-1 на "суича" (връзката между тях).

Второ ако може да поясните?

Link to comment
Share on other sites

  • 0
  • Administrator

ами отпуши изолирания трафик да изтича на наякъде ;)

https://wiki.mikrotik.com/wiki/Manual:Interface/VLAN

https://wiki.mikrotik.com/wiki/Manual:CRS_examples

Харесай поста ^^^
acer.gif htc.gifsigpic4024_2.gif

Форумът е за взаимопомощ а не за свършване на чужда работа


ɹɐǝɥ uɐɔ noʎ ǝɹoɯ ǝɥʇ 'ǝɯoɔǝq noʎ ɹǝʇǝınb ǝɥʇ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.