Wednesday, 25 November 2015


3 IFRAME by Totardo

Iframe 1:

Iframe 2:

Iframe 3:

Link for Iframe 1: Link for Iframe 2: Link for Iframe 3:
Copyright Totardo

History:

<body style="background-color:blue">

<table border="1px" align="center" style="background-color:yellow">
<tr style="background-color:red">
<td colspan="3" style="text-align:center"><h1>3 IFRAME by Totardo</h1></td>
</tr>
<tr>
<td><h2>Iframe 1:</h2><iframe id="iframe1"></iframe></td>
<td><h2>Iframe 2:</h2><iframe id="iframe2"></iframe></td>
<td><h2>Iframe 3:</h2><iframe id="iframe3"></iframe></td>
</tr>
<tr>
<td>Link for Iframe 1: <input type="text" id="text1"><input type="button" Value="Load" onclick="loadbutton1()"></td>
<td>Link for Iframe 2: <input type="text" id="text2"><input type="button" value="Load" onclick="loadbutton2()"></td>
<td>Link for Iframe 3: <input type="text" id="text3"><input type="button" value="Load" onclick="loadbutton3()"></td>
</tr>
<tr>
<td colspan="3" style="text-align:center">Copyright Totardo</td>
</tr>
<tr><td colspan="3">
<p>History: <br/>
<span id="demo"></p></td></tr>
</table>

<script>
var myhistory = [];
var tempvar=0;
var mysentence="";

function loadbutton1()
{
x = document.getElementById("text1").value;
document.getElementById("iframe1").src = x;
loopz(x);
}

function loadbutton2()
{
y = document.getElementById("text2").value;
document.getElementById("iframe2").src = y;
loopz(y);
}

function loadbutton3()
{
z = document.getElementById("text3").value;
document.getElementById("iframe3").src = z;
loopz(z);
}

function loopz(i)
{
for (m==0;m==tempvar;m++)
{
if(myhistory[m]==myhistory[tempvar])
{
alert("will be breaked");
break;
}
myhistory[tempvar]=i;
}

if (tempvar==0)
{
mysentence = myhistory[tempvar];
}
mysentence = mysentence + ", "+ myhistory[tempvar];
tempvar = tempvar + 1;
document.getElementById("demo").innerHTML=mysentence;
}
</script>

Tuesday, 24 November 2015

HOW-TO Draw Canvas on HTML

Javascript commands are case sensitive. Like below:
You can't write docuement.
Better use notepad++.



1. Mouse object properties










2. Accessing html input properties
Suppose you created:
<input type="text" id="text1">
</input>
http://www.w3schools.com/jsref/prop_text_value.asp

3. Accessing mouse events-list

Monday, 23 November 2015

DHCP

I want to make a host that enter/connect to my LAN either via switch or via access-point take/receive automatically proper IP address without I must configure it. How can I do that?

Frame Relay

I want to connect my store branch to my headquarter via Frame Relay network. How can I configure my router?

HSRP

I want host to switch to another router as their gateway without I manually change their gateway address. How can I configure all of my internal/local routers to support this requirement?

On each router, go to their inside-interface's configuration mode, do and type these:
1. Add virtual IP address.
Usually virtual IP address is the first usable IP address from the IP address segment. So like this:
R1(config)#int f0/0
R1(config-if)# standby ip 192.168.1.1
2. Set which router be the preempt
3. Set the priority

Virtual mac-address

What is virtual mac-address?
Virtual mac-address is will be used as L2 address of L3 virtual interfaces.

Where did this virtual mac-address came from?
At first, I think both routers will do some kind of negotiation upon their will be used virtual mac-address. But it is not. The virtual mac-address is decided/derived by each router directly, via configuring group number, group number 1 in this case, into their standby command. They don't need to negotiate the mac-address using sending and receiving packet.

So if you configure R1's with: standby 1 ip address 192.168.1.1, then it will directly derives its virtual mac-address as:  and if you configure R2's with: standby 2 ip address 192.168.1.1, then it will directly derives its virtual mac-address as: .

Both router will start sending an ARP gratuitos packet (L2 packet that have source-address himself and destination-address himself also) and switch that connect to them will start record it inside its mac-address table. Like this:













 

NAT

Lets make user able to go to internet and our server able to be accessed via internet.

System of NAT consist of:
1. Access-list
2. Pool of public address
3.

Static NAT is always exist or always on. It doesn't need inside-user to go to internet first before it created inside border-router. So, outside-user can PING to inside-user anytime without requiring inside-user to PING that outside-user first.

Server is always uses static NAT not Dynamic NAT because Server is needed to be able to be accesses anytime without that server try PING to any outside-user first.

While, Dynamic NAT isn't always exist or always on. It requires inside-user to go to internet first before this type of NAT created inside border-router.

So, we need addtional knowledge to define which router's interface is inside and which interface is outside. This knowledge is important for both static NAT and dynamic NAT. Inside interface of NAT is usually

Outside interface of NAT usually interface that have public address.

Static NAT's command is begin with ip nat inside source static and so on. While Dynamic NAT's command is begin with ip nat inside source list and so on.

Static NAT

All information that we need to configure static NAT are IP address private that Server belong and IP address public that we want the private IP address change/transfered/mapped .
R2(config)#ip nat inside source static 192.168.20.254 209.165.202.131

Static NAT can also be used to do port forwarding. For instance: I want to change Web server port from 80 to 8080.
R2(config)#ip nat inside source static

Port forwarding static option (tcp and udp) available only in static NAT, like this:
R1(config)#ip nat inside source static ?
  A.B.C.D  Inside local IP address
  esp      IPSec-ESP (Tunnel mode) support
  network  Subnet translation
  tcp      Transmission Control Protocol
  udp      User Datagram Protocol

So, static NAT is without access-list. Dynamic NAT is with access-list.

Dynamic NAT

Dynamic NAT require a configuration of pool of public IP address, access-list and definition of outside-interface and inside-interface.

Access-list

Dynamic NAT requires an access-list to determine/define which IP addresses allowed/permitted to be translated by NAT. IP addresses that outside or not included inside that list will not be translated, forever, hence IP addresses that are not listed in the access-list will unable to go to internet until they included in the access-list.

Type of access-list that we used is just a standard named ACL. We use usually use named ACL not numbered ACL. Then we can reference this name from ....

Pool

To create pool we need to excludes public ip addresses that used for static NAT first but use mask that ISP give to customer/us a block of public ip address, like 255.255.255.252 if the ISP give us 4 public IP addresses to be used.

And also this pool need a name.