Thursday, July 9, 2009

My new MacBook Pro 15"

Hi,

I have purchased my new MacBook Pro 15" last week, I would like to share with all some pics of my new MAC ;)


Monday, April 20, 2009

Ethernet Layer 2 Addressing & Switching and Bridging Logic

Layer 2 address is basically the MAC address, and there are three major types of MAC addresses:

Unicast: individual device to receive the frame

Multicast: group of devices to receive the frame, like radio, one transmit and group receive

Broadcast: all devices in the current network segment, always = FFFFFFFFFFFF







I/G = Individual group, 0 means unicast, 1 means multicast.

U/G = Universal group, 0 means the address in vendor assigned, 1 means the address is administratively assigned, overriding the vendor-assigned address.



So, the first byte of the MAC address is either 00, 01, 02, 03:

00 = unicast, vendor assigned

01 = multicast, vendor assigned

02 = unicast, administratively assigned

03 = multicast, administratively assigned


By setting the MAC address administratively (by hand), the device driver would not enforce the U/G to be 1, so we are able to set the MAC address to some freaky address of our choice, yet when it is being dynamically set, the U/G will be set to 1 automatically.


Here is the Switch behavior whenever a frame hits an interface incoming:

Type of Address

Switch Action

Known Unicast

Forwards frame out the single interface associated with the destination address

UnKnown Unicast

Floods frame out all interfaces, except the interface on which the frame was received

Multicast

Floods frame identically to unknown unicasts

Broadcast

Floods frame identically to unknown unicasts, unless multicast optimizations are configured



Thanks

Monday, December 1, 2008

Configure cisco devices via console port with Linux using USBserial cable!

Hi,

If you were using Windows, then you might not notice any problem trying to configure cisco devices via a console port usign usbserial cable, just plug it in the USB of your laptop and install the appropriate driver, and you are done.

You will not notice a problem with MAC OS X either, some usbserial cables even do not need any driver.

But, when you are using Linux, then you are wondering, how to obtain the driver.

In Linux ,for ease of understand, comparing to Windows, drivers = kernel modules. So, you need to load the appropriate kernel module, to have the cable works.

Here is how to have this up and running, after reading this tutorial you will be able to configure your cisco devices or any other server via console port with your laptop using usbserial cable.

If you don't know how the usbserial cable looks like, here I have a picture for mine:













Steps:
1. Load the kernel module: 'sudo modprobe pl2303'


pl2303 is the kernel module that will enable using the usbserial, to verify that is has been loaded successfully use this command, 'echo $?', if the result is "0", then it is ok.


use: 'lsmod | grep pl2303' to see what are the modules that are loaded currently or depends upon by ours.
###
lsmod | grep pl2303

pl2303 22020 0
usbserial 35816 1 pl2303
usbcore 146412 7 pl2303,usbserial,usbhid,hci_usb,ehci_hcd,uhci_hcd
###
You can see that usbserial/usbcore modules are depended upon by pl2303.

2. plug the cable into any USB port in your laptop, and issue 'screen /dev/ttyUSB0 9600', supposing that your device's speed is 9600 and using the default for flow control and other parameters. If your devices uses speed other than 9600, then you have to specify it, if any of the parameters are different then you have to specify it either, read the manual page of the screen to see how.

3. your are now in your device console.

Cheers,