ROUTER COMMANDS
TERMINAL CONTROLS:
· Config# terminal editing - allows for enhanced editing commands
· Config# terminal monitor - shows output on telnet session
· Config# terminal ip netmask-format hexadecimal|bit-count|decimal - changes the format of subnet masks
HOST NAME:
· Config# hostname ROUTER_NAME
BANNER:
· Config# banner motd # TYPE MESSAGE HERE # - # can be substituted for any character, must start and finish the message
Showing posts with label router. Show all posts
Showing posts with label router. Show all posts
Sunday, February 1, 2009
Tuesday, November 27, 2007
TransparentTrafficShaper
This example shows how to configure a transparent traffic shaper. The transparent traffic shaper is essentially a bridge that is able to differentiate and prioritize traffic that passes through it.
Consider the following network layout:
We will configure one queue limiting the total throughput to the client and three sub-queues that limit HTTP, P2P and all other traffic separately.
Configuration snippet from the MikroTik router:
Each piece of code is followed by the explanation of what it actually does.
सोर्स=ह्त्त्प://विकी.मिक्रोतिकी.com
Consider the following network layout:
We will configure one queue limiting the total throughput to the client and three sub-queues that limit HTTP, P2P and all other traffic separately.
Configuration snippet from the MikroTik router:
/ interface bridge add name="bridge1" / interface bridge port add interface=ether2 bridge=bridge1 add interface=ether3 bridge=bridge1 / ip firewall mangle add chain=prerouting protocol=tcp dst-port=80 action=mark-connection \ new-connection-mark=http_conn passthrough=yes add chain=prerouting connection-mark=http_conn action=mark-packet \ new-packet-mark=http passthrough=no add chain=prerouting p2p=all-p2p action=mark-connection \ new-connection-mark=p2p_conn passthrough=yes add chain=prerouting connection-mark=p2p_conn action=mark-packet \ new-packet-mark=p2p passthrough=no add chain=prerouting action=mark-connection new-connection-mark=other_conn \ passthrough=yes add chain=prerouting connection-mark=other_conn action=mark-packet \ new-packet-mark=other passthrough=no / queue simple add name="main" target-addresses=10.0.0.12/32 max-limit=256000/512000 add name="http" parent=main packet-marks=http max-limit=240000/500000 add name="p2p" parent=main packet-marks=p2p max-limit=64000/64000 add name="other" parent=main packet-marks=other max-limit=128000/128000
Each piece of code is followed by the explanation of what it actually does.
/ interface bridge add name="bridge1" / interface bridge port add interface=ether2 bridge=bridge1 add interface=ether3 bridge=bridge1We create a new bridge interface and assign two ethernet interfaces to it. Thus the prospective traffic shaper will be completely transparent to the client.
/ ip firewall mangle add chain=prerouting protocol=tcp dst-port=80 action=mark-connection \ new-connection-mark=http_conn passthrough=yes add chain=prerouting connection-mark=http_conn action=mark-packet \ new-packet-mark=http passthrough=noAll traffic destined to TCP port 80 is likely to be HTTP traffic and therefore is being marked with the packet mark http. Note, that the first rule has passthrough=yes while the second one has passthrough=no. (You can obtain additional information about mangle at http://www.mikrotik.com/docs/ros/2.9/ip/mangle)
/ ip firewall mangle add chain=prerouting p2p=all-p2p action=mark-connection \ new-connection-mark=p2p_conn passthrough=yes add chain=prerouting connection-mark=p2p_conn action=mark-packet \ new-packet-mark=p2p passthrough=no add chain=prerouting action=mark-connection new-connection-mark=other_conn \ passthrough=yes add chain=prerouting connection-mark=other_conn action=mark-packet \ new-packet-mark=other passthrough=noSame as above, P2P traffic is marked with the packet mark p2p and all other traffic is marked with the packet mark other.
/ queue simple add name="main" target-addresses=10.0.0.12/32 max-limit=256000/512000We create a queue that limits all the traffic going to/from the client (specified by the target-address) to 256k/512k.
/ queue simple add name="http" parent=main packet-marks=http max-limit=240000/500000 add name="p2p" parent=main packet-marks=p2p max-limit=64000/64000 add name="other" parent=main packet-marks=other max-limit=128000/128000All sub-queues have the main queue as the parent, thus the aggregate data rate could not exceed limits specified in the main queue. Note, that http queue has higher priority than other queues, meaning that HTTP downloads are prioritized।
सोर्स=ह्त्त्प://विकी.मिक्रोतिकी.com
14 Step Configuration of mikrotik using ADSL speedy internet
This articel i explain how to configuration mikrotik using pc for router।
1. Configuration position of ADSL connection
modem —Mikrotik—-Switch —– Client
Client
a. Modem IP –>> 192.168.1.1
b. Mikrotik Using 2 Interface - Ether1 —->> 192.168.1.2
- Ether1 —->> 192.168.0.254
c. Switch — Client ip 192.168.0.1-253
2. Configuration step router pc mikrotik
a. add ip address to interface 1
/ip address add interface=ether1 address = 192.168.1.1 netmask= 255.255.255.0
b. add ip address to interface2
/ip address add interface=ether2 address = 192.168.0.1 netmask= 255.255.255.0
c. to see input of interface
/interface print
d. Set Value name off interface
/inteface set 0 name=”Public” –>> For Modem
/inteface set 1 name=”Lan” –>> For Lan
e. set routing for net ( modem )
/ip route add gateway=192.168.0.1
f. set dns server ISP
/ip dns set primary-dns=203.130.193.74 secondary-dns=202.134.0.155
/ip dns set allow-remote-requests=yes
g. set of nat the router pc to sharing bw to lan
/ip firewall nat add chain=srcnat out-inteface=Public action=masquerade
1. Configuration position of ADSL connection
modem —Mikrotik—-Switch —– Client
Client
a. Modem IP –>> 192.168.1.1
b. Mikrotik Using 2 Interface - Ether1 —->> 192.168.1.2
- Ether1 —->> 192.168.0.254
c. Switch — Client ip 192.168.0.1-253
2. Configuration step router pc mikrotik
a. add ip address to interface 1
/ip address add interface=ether1 address = 192.168.1.1 netmask= 255.255.255.0
b. add ip address to interface2
/ip address add interface=ether2 address = 192.168.0.1 netmask= 255.255.255.0
c. to see input of interface
/interface print
d. Set Value name off interface
/inteface set 0 name=”Public” –>> For Modem
/inteface set 1 name=”Lan” –>> For Lan
e. set routing for net ( modem )
/ip route add gateway=192.168.0.1
f. set dns server ISP
/ip dns set primary-dns=203.130.193.74 secondary-dns=202.134.0.155
/ip dns set allow-remote-requests=yes
g. set of nat the router pc to sharing bw to lan
/ip firewall nat add chain=srcnat out-inteface=Public action=masquerade
Subscribe to:
Posts (Atom)