Wednesday, October 16, 2013

Configure IP address on router using the Setup command

0 komentar
[admin@MikroTik] > setup
  Setup uses Safe Mode. It means that all changes that are made during setup
are reverted in case of error, or if [Ctrl]+[C] is used to abort setup. To keep
changes exit setup using the [X] key.

[Safe Mode taken]
  Choose options by pressing one of the letters in the left column, before
dash. Pressing [X] will exit current menu, pressing Enter key will select the
entry that is marked by an '*'. You can abort setup at any time by pressing
[Ctrl]+[C].
Entries marked by '+' are already configured.
Entries marked by '-' cannot be used yet.
Entries marked by 'X' cannot be used without installing additional packages.
   r - reset all router configuration
 + l - load interface driver
 * a - configure ip address and gateway
   d - setup dhcp client
   s - setup dhcp server
   p - setup pppoe client
   t - setup pptp client
   x - exit menu
your choice [press Enter to configure ip address and gateway]: a

To configure IP address and gateway, press a or [Enter], if the a choice is marked with an asterisk symbol ('*').

 * a - add ip address
 - g - setup default gateway
   x - exit menu
your choice [press Enter to add ip address]: a

Choose a to add an IP address. At first, setup will ask you for an interface to which the address will be assigned. If the setup offers you an undesirable interface, erase this choice, and press the [Tab] key twice to see all available interfaces. After the interface is chosen, assign IP address and network mask on it:

your choice: a
enable interface:
ether1  ether2  wlan1
enable interface: ether1
ip address/netmask: 10.1.0.66/24
#Enabling interface
/interface enable ether1
#Adding IP address
/ip address add address=10.1.0.66/24 interface=ether1 comment="added by setup"
 + a - add ip address
 * g - setup default gateway
   x - exit menu
your choice: x

basic configuration the Mikrotik

0 komentar
Before configuring the IP addresses and routes please check the /interface menu to see the list of available interfaces. If you have Plug-and-Play cards installed in the router, it is most likely that the device drivers have been loaded for them automatically, and the relevant interfaces appear on the /interface print

[admin@MikroTik] interface> print
Flags: X - disabled, D - dynamic, R - running
 #    NAME                         TYPE             RX-RATE    TX-RATE    MTU
 0  R ether1                       ether            0          0          1500
 1  R ether2                       ether            0          0          1500
 2 X  wavelan1                     wavelan          0          0          1500
 3 X  prism1                       wlan             0          0          1500
[admin@MikroTik] interface>
The interfaces need to be enabled, if you want to use them for communications. Use the /interface enable name command to enable the interface with a given name or number, for example:

[admin@MikroTik] interface> print
Flags: X - disabled, D - dynamic, R - running
 #    NAME                         TYPE             RX-RATE    TX-RATE    MTU
 0 X  ether1                       ether            0          0          1500
 1 X  ether2                       ether            0          0          1500
[admin@MikroTik] interface> enable 0
[admin@MikroTik] interface> enable ether2
[admin@MikroTik] interface> print
Flags: X - disabled, D - dynamic, R - running
 #    NAME                         TYPE             RX-RATE    TX-RATE    MTU
 0  R ether1                       ether            0          0          1500
 1  R ether2                       ether            0          0          1500
[admin@MikroTik] interface>

Basics proxy setup for beginners

0 komentar
Normally you connect to the router by IP addresses with any telnet or SSH
client software (a simple text-mode telnet client is usually called telnet and
is distributed together with almost any OS). You can also use graphical
configuration tool for Windows (also can be run in Linux using Wine) called
Winbox. To get Winbox, connect to the router's IP address with a web
browser, and follow the link to download winbox.exe from the router.
MAC-telnet is used to connect to a router when there is no other way to
connect to it remotely if the router has no IP address or in case of
misconfigured firewall. MAC-telnet can only be used from the same
broadcast domain (so there should be no routers in between) as any of the
router's enabled interfaces (you can not connect to a disabled interface).
MAC-telnet program is a part of the Neighbor Viewer. Download it from
www.mikrotik.com, unpack both files contained in the archive to the same
directory, and run NeighborViewer.exe. A list of MikroTik routers working in
the same broadcast domain will be showed double-click the one you need to
connect to. Note that Winbox is also able to connect to routers by their MAC
addresses, and has the discovery tool built-in.
You can also connect to the router using a standard DB9 serial null-modem
cable from any PC. Default settings of the router's serial port are 9600 bits/s
(for RouterBOARD 500 series - 115200 bits/s), 8 data bits, 1 stop bit, no
parity, hardware (RTS/CTS) flow control. Use terminal emulation program
(like HyperTerminal or SecureCRT in Windows, or minicom in UNIX/Linux) to
connect to the router. The router will beep twice when booted up, and you
should see the login prompt shortly before that (check cabling and serial
port settings if you do not see anything in the terminal window).
log/ -- System logs
quit -- Quit console
radius/ -- Radius client settings
certificate/ -- Certificate management
special-login/ -- Special login users
redo -- Redo previously undone action
driver/ -- Driver management
ping -- Send ICMP Echo packets
setup -- Do basic setup of system
interface/ -- Interface configuration
password -- Change password
undo -- Undo previous action
port/ -- Serial ports
import -- Run exported configuration script
snmp/ -- SNMP settings
user/ -- User management
file/ -- Local router file storage.
system/ -- System information and utilities
queue/ -- Bandwidth management
ip/ -- IP options
tool/ -- Diagnostics tools
ppp/ -- Point to Point Protocol
routing/ -- Various routing protocol settings
export --
[admin@MikroTik] ip>
.. -- go up to root
service/ -- IP services
socks/ -- SOCKS version 4 proxy
arp/ -- ARP entries management
upnp/ -- Universal Plug and Play
dns/ -- DNS settings
address/ -- Address management
accounting/ -- Traffic accounting
the-proxy/ --
vrrp/ -- Virtual Router Redundancy Protocol
pool/ -- IP address pools
packing/ -- Packet packing settings
neighbor/ -- Neighbors
route/ -- Route management
firewall/ -- Firewall management
dhcp-client/ -- DHCP client settings
dhcp-relay/ -- DHCP relay settings
dhcp-server/ -- DHCP server settings
hotspot/ -- HotSpot management
ipsec/ -- IP security
web-proxy/ -- HTTP proxy
export --
[admin@MikroTik] ip>


MAC-telnet is used to connect to a router when there is no other way to
connect to it remotely if the router has no IP address or in case of
misconfigured firewall. MAC-telnet can only be used from the same
broadcast domain (so there should be no routers in between) as any of the
router's enabled interfaces (you can not connect to a disabled interface).
MAC-telnet program is a part of the Neighbor Viewer. Download it from
www.mikrotik.com, unpack both files contained in the archive to the same
directory, and run NeighborViewer.exe. A list of MikroTik routers working in
the same broadcast domain will be showed double-click the one you need to
connect to. Note that Winbox is also able to connect to routers by their MAC
addresses, and has the discovery tool built-in.
You can also connect to the router using a standard DB9 serial null-modem
cable from any PC. Default settings of the router's serial port are 9600 bits/s
(for RouterBOARD 500 series - 115200 bits/s), 8 data bits, 1 stop bit, no
parity, hardware (RTS/CTS) flow control. Use terminal emulation program
(like HyperTerminal or SecureCRT in Windows, or minicom in UNIX/Linux) to
connect to the router. The router will beep twice when booted up, and you
should see the login prompt shortly before that (check cabling and serial port settings if you do not see anything in the terminal window).

Wednesday, September 18, 2013

The purpose programming language design

0 komentar
  • A good language should be easy to compile.
  • Not complicate the compilation process.
  • Complexity can arise because of the symbol
  • have different meanings.
  • Example signs parenthesis (brackets open / close):
Grouping sub-expression Restricted arguments in the function / procedureIndex on the arrays (in VB) Expression of mathematics and logic Examples of simple but powerful scheme are passing parameters by value and by reference.

What Role Did She Play in Miley-Liam Split? : January Jones

0 komentar
At least one tabloid has said Hemsworth was caught cheating with Eiza Gonzalez over the weekend, a Mexican singer/actress with whom he hooked up in Las Vegas.
But other reports have claimed tension between Liam and Miley for weeks, dating back to the latter's lewd Video Music Awards performance and continuing when Cyrus went naked for her "Wrecking Ball" video.
Then there's January Jones.
Rumors first surfaced in February that Liam swapped spit with the Mad Men actress at a Vanity Fair party, while an insider alleges the two have kept in contact ever since... especially dirty contact, that is!
More than one source says Hemsworth texted Jones that he wants to "f-ck" her, while Us Weekly quotes a friend of the star's who backs up this allegation and adds that "January thinks Liam is so sexy."
Liam Hemsworth was reportedly pursuing Mad Men’s January Jones, while his relationship with his 20-year-old fiancee crumbled in recent months.
A source told Us magazine that Jones thinks that The Hunger Games actor is very sexy.
Earlier this summer, Hemsworth had also sent the 35-year-old single mum, a graphic sexual message, which read the he wants to “**** her”.
The Mad Men star was earlier linked to Miley Cyrus’ former fiancee in February, when the two of them were spotted leaving West Hollywood hotspot, ‘Chateau Marmont,’ together.
A source had then revealed that Jones and Hemsworth were “all over each other” at a house party that night, though the 23-year-old actor denied the rumours.
Though a rep had recently hit out at claims Liam had been pursing the actress, insisting to GossipCop the rumours were "tabloid fiction," sources recently told Us Weekly the actor had once again been after her.  "January thinks Liam is so sexy," a source told Us Weekly, claiming the couple were "all over each other," on the infamous night out at the Chateau Marmont.

Hamming code

0 komentar
Hamming code
Richard Hamming invented at Bell Labs in 1950
Error detection mechanisms by adding a data word (D) with a code, usually a parity check bit (C).
The data stored in length D + C.
Known errors by analyzing the data and parity bits

# Data Bits
# Bit Paritas SEC
# Bit Paritas DEC
8
4
5
16
5
6
32
6
7
64
7
8
128
8
9
512
9
10

Parity check bits are placed with 2N formulation where
Each check bit (C) operates in every bit position data position number 1 in the column contains numbers
Data enter: 00111001 then change the data bits to 3 from 0 to 1 as its error.

how to get the data bits to 3 bits as there are errors?

  N = 0,1,2, ……, while the remaining bits of the data is. Then the exclusive-OR sum::
  C1 = D1 Å D2 Å D4 Å D5 Å D7
  C2 = D1 Å D3 Å D4 Å D6 Å D7
  C4 = D2 Å D3 Å D4 Å D8
  C8 = D5 Å D6 Å D7 Å D8
answer:
Enter data into the formulation of the parity check bits :
C1 = 1 Å 0 Å 1 Å 1 Å 0   = 1
C2 = 1 Å 0 Å 1 Å 1 Å 0   = 1
C4 = 0 Å 0 Å 1 Å 0   = 1
C8 = 1 Å 1 Å 0 Å 0   = 0
Now bit 3 having a data error : 00111101
C1 = 1 Å 0 Å 1 Å 1 Å 0   = 1
C2 = 1 Å 1 Å 1 Å 1 Å 0   = 0
C4 = 0 Å 1 Å 1 Å 0   = 0
C8 = 1 Å 1 Å 0 Å 0   = 0

Query for checking

0 komentar
/*before running this script run the report from backoffice first to store the data to table itemsales*/
/*this query will find out variance between sales after tax/gross sales and collected*/


--1.run this script to group all item per salesno
SELECT salesno,splitno,
Sum(([ItemSales].[Quantity]*[ItemSales].[ItemAmount])*case when
([ItemSales].[TransMode]='REG') then 1 else -1 end *case when ((FunctionID)=26)
then 1 else 0 end ) AS ItemSales,
Sum(((Discount)+(PromotionSaving))*case when
((FunctionID)=26) then 1 else 0 end *case when ((DiscountType)<>'FOC Item') then
1 else 0 end *case when ((TransMode)='REG') then 1 else -1 end ) AS ItemDisc,
Sum((ItemAmount)*case when ((FunctionID)=25) then 1 else 0 end *case when
((TransMode)='REG') then 1 else -1 end ) AS BillDisc,
(
Sum(([ItemAmount]*[Quantity])*case when (([FOCType])='FOC Item') then 1 else 0
end *case when ((FunctionID)=26) then 1 else 0 end *case when
(([TransMode])='REG') then 1 else -1 end )) AS TFOC,
Sum(([ItemAmount])*case
when ((FunctionID)=7) then 1 else 0 end *case when (([TransMode])='REG') then 1
else -1 end ) AS BFOC, Sum((Tax0)*case when ((TransMode)='REG') then 1 else -1
end ) AS TTax0,
Sum((Tax1)*case when ((TransMode)='REG') then 1 else -1 end
*case when FunctionID=1  or FunctionID=2  or FunctionID=3  or FunctionID=4  or
FunctionID=5  or FunctionID=6  or FunctionID=8  or FunctionID=9  then 1 else 0
end ) AS TTax1,
Sum((Gratuity)*case when ((TransMode)='REG') then 1 else -1 end
) AS TGratuity,
Sum((RndingAdjustments)*case when ((TransMode)='REG') then 1
else -1 end ) AS TRndAdj,
Sum(([ItemAmount]+[Gratuity])*case when FunctionID=1
or FunctionID=2  or FunctionID=3  or FunctionID=4  or FunctionID=5  or
FunctionID=6  or FunctionID=8  or FunctionID=9  then 1 else 0 end *case when
(([TransMode])='REG') then 1 else -1 end ) AS Collected,
Sum(([ItemSales].[Covers])*case when ([ItemSales].[TransMode]='REG') then 1 else
-1 end *case when ([ItemSales].[TransStatus]='S') then 1 else 0 end ) AS
TCovers, Sum(([ItemSales].[Quantity])*case when ([ItemSales].[TransMode]='REG')
then 1 else -1 end *case when ([ItemSales].[TransStatus]='S') then 1 else 0 end
) AS TBills
, Sum(RndingAdjustments) as RndingAdjustments
into #tot
FROM ItemSales WHERE ((ItemSales.TransStatus)=' ') OR
((ItemSales.TransStatus)='S') or ((Itemsales.TransStatus)='E')
group by salesno,splitno


--2.run this script to get netsales and tax
select salesno,itemsales,itemsales-itemdisc-billdisc-tfoc-bfoc as netsales,collected-RndingAdjustments as collected,tgratuity,ttax0,ttax1
into #tot2
from #tot

--3.a run this script for exclusive tax
select salesno,itemsales,netsales+ttax0+ttax1+tgratuity as NetAndTax,collected
into #tot3
from #tot2

--3.b run this script for inclusive tax
select salesno,itemsales,netsales+tgratuity as NetAndTip,collected
into #tot3
from #tot2

--4.run this script to find out the variance
select * from #tot3
where netandtax<>collected


/*after you find out wrong salesno,go to salesitemstemp and anlyze the data to find out the wrong record*/

 
Trends K N A Copyright © 2009
Fresh Girly Blogger Template Designed by Herro | Powered By Blogger