Archive for September, 2009

Telnet-ting into a Dynagen Router / Switch

Thursday, September 24th, 2009

Hmm…strange…in my last post I said I couldn’t telnet. For some strange reason if I recreate the lab in VMWare Windows XP, I can telnet in perfectly in to the router?!?!?

Maybe Dynagen handles virtual NIC’s better then real ones?!?!

Telnet-ting into a Dynagen Router / Switch

Thursday, September 24th, 2009

I’ve created a switch on Dynagen using NM-16ESW in slot 1 on a 3660 router.

Added Vlan 128,

and then added an ip address to it which is 192.168.1.11 and subnet mask 255.255.255.0

I then added interface FA 1/1 to Vlan 128 so that my show run has the following in it.

interface FastEthernet1/1
switchport access vlan 128

interface Vlan128
ip address 192.168.1.11 255.255.255.0

In my Dynagen .NET file I have also connected to my NIC using the

FA1/1 = NIO_gen_eth:\Device\NPF_{EAB4090D-2619-4757-**********}

My computer’s ip address is 192.168.1.10 with subnet mask 255.255.255.0 and I can ping to the router at 192.168.1.11 but I cannot seem to telnet into it.

I have also set up the line TTY as follows

line vty 0 4
password cisco
logging synchronous
login

But still no access…Anyone out there with a solution?

Sending NULL values to MySQL through PHP

Sunday, September 20th, 2009

Had a need to send null values through PHP today. Finally figured it out. If I had the following query

$qry = INSERT INTO company_tb (cname,address,city) values (‘$name’,'$address’,$city)

and $city was my variable to pass the city value, then I would do the following

if ($city==”") //if $city is empty

$city = “NULL”; //set it as NULL

else $city = “‘” . $city . “‘”; //else set it as the city name plus single quotes around it. So if $city had Karachi, $city would become ‘Karachi’

So the query would become INSERT INTO company_tb (cname,address,city) values (‘Aqueeb’,'test address’,'Karachi’) if there was a city value otherwise it would become INSERT INTO company_tb (cname,address,city) values (‘Aqueeb’,'test address’,NULL)

Hope this helps someone! If you have any questions please feel free to ask them!