Wednesday, March 12, 2014

MikroTik-Router-pppoe-server-setup-with-Cisco Switch vlan



Basic Ip Address Configuration :
/ip address
add address=103.7.248.206/29 network=103.7.248.200 broadcast=103.7.248.207 interface=WAN
         
Ip Pool configuration for PPPOE user :
/ip pool
add name=PPPOE ranges=172.16.10.1-172.16.10.254
/ppp profile
add name="PPPOE" local-address=172.16.10.1 remote-address=PPPOE dns-server=8.8.8.8,4.4.4.4
interface vlan
add name=100-ADMIN  interface=LOCAL  vlan-id=100
add name=200-NOC  interface=LOCAL  vlan-id=200

/interface pppoe-server server
Add service-name="PPPOE_ADMIN" interface=ADMIN max-mtu=1480 max-mru=1480
     mrru=disabled authentication=pap,chap keepalive-timeout=10
     one-session-per-host=yes max-sessions=0 default-profile=default

 add service-name="PPPOE_NOC" interface=NOC max-mtu=1480 max-mru=1480
     mrru=disabled authentication=pap,chap keepalive-timeout=10
     one-session-per-host=yes max-sessions=0 default-profile=default


Create a PPPOE  User:
/ppp secret
 add name=Test service=pppoe password=123 profile=PPPOE local-address=172.16.10.1 remote-address=172.16.10.3

Bandwidth Control Using PCQ Method:
/Queue type
add name=PPPOE_1M_DOWNLOAD kind=pcq pcq-rate=1M pcq-classifier=src-address
add name=PPPOE_1M_UPLOAD kind=pcq pcq-rate=1M pcq-classifier=dst-address
/queue simple

add name="Total" target-addresses=172.16.10.0/24 interface=all parent=none
      packet-marks="" direction=both priority=8
      queue=default-small/default-small limit-at=0/0 max-limit=0/0
      burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
      total-queue=default-small
                       
add  name="PPPOE-1M User" target-addresses=172.16.10.0/24 interface=LOCAL
      parent=Total packet-marks="" direction=both priority=2
      queue=PPPOE_1M_UPLAOAD/PPPOE_1M_DOWNLOAD limit-at=0/0 max-limit=0/0
      burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s
      total-queue=default-small

Lowest priority is better than other, If use this type of queue then we can easy to manage bandwidth  a group of client

/ip firewall nat
add chain=srcnat action=masquerade src-address=172.16.10.0/24 out-interface=WAN


IP Route Configuration:

/ip route
add dst-address=0.0.0.0/0 gateway=103.7.248.201


Cisco Switch Configuration:
CISCO>enable
CISCO#configuration terminal
CISCO(config)#interface fastethernet 0/1
CISCO(config-if)#switchport mode trunk
CISCO(config-if)#switchport trunk allowed vlan all
CISCO(config-if)#switchport nonegotiate
CISCO(config)#vlan 100
CISCO(config-vlan)#name ADMIN
CISCO(config)#vlan 200
CISCO(config-vlan)#name NOC
CISCO(config)#interface fastethernet 0/2
 CISCO(config-if)#switchport mode access
CISCO(config-if)#switchport access vlan 100

CISCO(config)#interface fastethernet 0/3
 CISCO(config-if)#switchport mode access
CISCO(config-if)#switchport access vlan 200

CISCO#wr


No comments:

Post a Comment