Friday, September 27, 2013

VLANs vs Subnetting

,
Subnet
is a range of IP addresses determined by part of an address (often called the network address) and a subnet mask (netmask). For example, if the netmask is 255.255.255.0 (or /24 for short), and the network address is 192.168.10.0, then that defines a range of IP addresses 192.168.10.0 through 192.168.10.255. Shorthand for writing that is 192.168.10.0/24, 255 is for the broadcast and 0 is for the network address.

VLAN
A good way to think of this is "switch partitioning." Let's say you have an 8 port switch that is VLAN-able. You can assign 4 ports to one VLAN (say VLAN 1) and 4 ports to another VLAN (say VLAN 2). VLAN 1 won't see any of VLAN 2's traffic and vice versa, logically, you now have two separate switches. Normally on a switch, if the switch hasn't seen a MAC address it will "flood" the traffic to all other ports. VLANs prevent this.




If two computers are going to talk using TCP/IP, then one of two conditions must be met:

They must belong to the same subnet. This means the network address must be the same and the netmask must be equal or smaller. So, a computer with an interface with an IP address of 192.168.10.4/24 can talk to a computer with an interface with an IP address of 192.168.10.8/24 with no issues, provided they are both connected to the same physical switch or VLAN. If the second computer's interface connected to that same physical switch or VLAN was 192.168.11.8/24, it would ignore the traffic (unless the interface was in promiscuous mode).

A router needs to exist between both computers that can forward traffic between subnets. Computer A and computer B need a route (or default gateway) to this router. Let's say a computer with an interface with an IP address of 192.168.10.4/24 wants to talk to a computer with an interface with an IP address of 192.168.20.4/24. Different subnets, so we must go through a router. Let's say there's a router with two interfaces (routers by definition have two interfaces), one on 192.168.10.254/24 and 192.168.20.254/24. If the route table or DHCP is setup correctly and both computer A and B can reach the router's interfaces on their respective subnets, then they can talk to each other indirectly via the router.

Forcing traffic to go through a router, even though it's not needed such as on our 8-port switch above, has security and performance benefits - it gives you an opportunity to filter traffic, an opportunity to optimally route traffic based on type, and routers do not forward broadcast traffic (unless unusually configured). VLANs are sometimes used as a "hack" to manage flows/visibility of IPv4 broadcast traffic.

VLANs are equivalent to switches. What comes in 1 port of a VLAN is replicated("flooded") to all other ports unless the VLAN has seen/learned the MAC address before, then it is directed to that port. There is no gateway to the VLAN proper. A "gateway" always means the IP address of a router.

For VLAN 1 to talk to VLAN 2, an interface in VLAN 1 must be connected to a router, an interface in VLAN 2 must be connected to a router, and that router must be configured to forward traffic between those subnets. In our 8 port example above, if we wanted to route traffic between those VLANs, we'd have to spend 1 port on each VLAN connecting to a router. Same with a switch.

When a computer gets its IP via DHCP, it also usually gets the "default gateway" from that same DHCP server. Someone has to configure the DHCP server correctly. Routing protocols such as RIP, IS-IS, OSPF, and BGP can also add routes. Of course you have the option of adding static routes.

I'm sure many high-end switches/hardware have a "VLAN router" "built-in" to them where spending an extra port within each VLAN connecting it to a physical router really isn't necessary if you want to route between VLANs in the same switch. This might be where the VLAN IP or "gateway" comes into play.
Read more →

Friday, August 2, 2013

mesa-libgl and nvidia-libgl are in conflict error

,



pacman -Syu

and..

mesa-libgl and nvidia-libgl are in conflict, Remove nvidia-libgl? [y/N]

The following commands will fix it quickly:
pacman -Syu --ignore mesa-libgl
pacman -Sc
pacman -Rs xf86-video-ati
pacman -Rs ati-dri
pacman -S nvidia
pacman -Syu
Basically you update ignoring the mesa-libgl, then purge the pkg cache, remove xf86-video-ati which is 32bit ( maybe vmware would need that at the first place ), also ati-dri, then synchronize the nvidia drivers and do a full update.
Read more →

Monday, July 29, 2013

Cisco router - Reset config

,
Start putty & connect to the communication's port with the default rates etc....
Restart the cisco router in order to break the boot sequence of the router by tapping the Break key.
breaking the boot sequence...
After you broke the boot sequence, issue the following command:
confreg 0x2142
"You must reset or power cycle for new config to take effect" is what you will face after the proper usage of the above command, reset by giving this:
reset
issuing the reset command...
Now, after some time it should start booting.. It will ask you if you`d like to start from scratch.. say yes/no depending what you actually want to config.

[...] ~config taking place

After the configuration, you have to exit the NVRAM ignorance mode by issuing the commands below:
config-reg 0x2102
Exit config# using Ctrl+C and then:
wr mem
reload
Hint: If you would like not to reset the router's configuration - altering the password only is done through the same way but answering no to the 'start from scratch' dialogue, then by saving the running configuration giving the copy start run command at that time. For more info reply below.
Read more →

Installing a LAMP server

,
LAMP is a combination of free, open source software. The acronym LAMP refers to the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software), and PHP, Perl or Python, principal components to build a viable general purpose web server.

Install Linux:
just kidding...
  1. Install Apache:
  2. sudo apt-get install apache2
    After everything is finished, fire up a browser and type:
    http://localhost/
    you should see already a folder, if nothing is found then you have to re-install it. If you still can`t find a solution, drop a line below.
  3. Install PHP:
  4. sudo apt-get install php5 libapache2-mod-php5
    After everything is finished, we have to restart apache to get notified about php:
    sudo /etc/init.d/apache2 restart
  5. Install MySQL:
  6. sudo apt-get install mysql-server
    Then get access to console by typing:
    mysql -u root
    And change your password:
    mysql SET PASSWORD FOR 'root'@'localhost' = PASSWORD('P@$sw0rd');
    After that, install PHPMyAdmin:
    sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
    Edit php.ini to work with phpmyadmin...
    gksudo gedit /etc/php5/apache2/php.ini
    And change this line:
    ;extension=mysql.so to extension=mysql.so
    Last thing is to restart apache to take care of MySQL too:
    sudo /etc/init.d/apache2 restart
    Go again at http://localhost and check what you've done!
Read more →

Friday, July 19, 2013

RDC authentication bypass

,
This is not a hack.
  1. Open up a command prompt and type mstsc.exe.
  2. Click on Options drop down menu to access advanced options about the connection.
  3. Save the connection settings by clicking Save As..., somewhere in your desktop.
  4. Right click this .rdp file now and open it using notepad
  5. Find authentication level:i:2 and turn it into authentication level:i:0.
  6. Add enablecredsspsupport:i:0 at the end of the text file.
  7. Then, open the rdp file which we've just edited and connect to the remote computer.
  8. If it asks you for a password, enter the password of your local user account.
done!

Read more →

Sunday, July 14, 2013

Reduce MTU size to accept 802.1Q or ISL

,
InterSwitchLink and 802.1Q are two different protocols for trunks between network devices, though they cause some problems when they are not configured properly...

In order not to cause frame errors so packets can be accepted in the RX line, you have to reduce the MTU size if you are working with cheap equipment or non-cisco devices.

I wont explain the 'how-to' because devices vary, just a reminder :)
Read more →

Wednesday, July 3, 2013

Icon not displayed correctly? Rebuild the icon cache.

,


This will work for Windows Vista, 7 or 8.




This is the default location of icon cache database
C:\Users\User-Name\AppData\Local\IconCache.db

Fire up cmd as an Administrator and give the following commands by turn:
ie4uinit.exe -ClearIconCache
taskkill /IM explorer.exe /F
DEL "%localappdata%\IconCache.db" /A
shutdown /r /f /t 00
This will force the IconCache.db to rebuild. 
Read more →