May 18, 2009, 8:55 pm
In a previous post we talked about RIP. Today I’m going to show you how to configure OSPF. OSPF is a dynamic link-state routing protocol used in IP networks. OSPF is perhaps the most widely used interior gateway protocol (IGP) in large enterprise networks. OSPF exceeds RIP in many aspects:
- It has very low convergence times.
- When no topology changes occur, OSPF is very quiet.
- OSPF enables network subdivision into areas.
- Supports authentication.
- Uses multicast.
- Only routing changes are propagated, not the full routing table like in the RIP case.
- …
To configure OSPF in your cisco router you should follow these steps:
fry> enable
fry# configure terminal
fry(config)#router ospf 1
fry(config-router)#network 192.168.2.0 0.0.0.255 area 0
fry(config-router)#network 192.168.3.0 0.0.0.255 area 0
fry(config-router)#network 192.168.4.0 0.0.0.255 area 0
You have to specify all the interfaces in which you want to run OSPF with network commands. 0.0.0.255 is a wildcard and means that OSPF will run in any interface with an IP address belonging to the 192.168.2.0/24 network. You can also indicate a specific IP address. If the interface’s IP address changes (e.g. from 192.168.4.1 to 192.168.4.2), OSPF will stop running. The configuration is as follows:
fry(config-router)#network 192.168.4.1 0.0.0.0 area 0
To propagate a default route you can execute this command:
fry(config-router)#default-information originate always
One OSPF drawback could be the configuration complexity. However, if the network topology is point-to-point and we only have one area (like in this case) configuration is pretty straightforward.
May 18, 2009, 12:54 am
The free version of Hotmail doesn’t offer POP3 access. Fortunately there is a SW that emulates POP3 for hotmail. Freepops retrieves mail via web, but emulates a POP3 server your mail client can talk to. There also exists a mac version called Macfreepops. Freepops is very easy to configure and allow you to easily read your mail from a wide variety of webmail providers. Definitely a great piece of SW!
May 17, 2009, 6:14 pm
Routing Information Protocol (RIP) is an Interior gateway protocol that uses the distance-vector routing algorithm. The original specification of RIP, defined in RFC 1058, uses classful routing. The periodic routing updates do not carry subnet information, lacking support for variable length subnet masks (VLSM). RIPv2 introduces VLSM support, multicast and authentication capabilities. Although RIP has important limitations (slow convergence times, 15 hop limit, full routing updates periodically…) it’s very easy to configure and can come in handy for some networks. To configure RIP in your cisco router you should follow these steps:
router> enable
router# configure terminal
router(config)#router rip
router(config-router)#network 192.168.2.0
router(config-router)#network 192.168.3.0
router(config-router)#network 192.168.4.0
router(config-router)#version 2
You have to specify all the interfaces in which you want to run RIP with network commands. And that’s all. You have RIP running on your router. Note: In most current networking environments, RIP is not the preferred choice for routing as its capabilities are poor compared to EIGRP, OSPF, or IS-IS.
May 17, 2009, 8:01 am
I used to enjoy listening music from last.fm but it isn’t free anymore. Hence I decided to search from a free alternative and came across Spotify. Spotify allows you to listen to a wide variety of music, instantly and at no cost. Besides it has some advantages over last.fm. For instance you can choose which song to play and you can listen to the whole song, not just a fragment like in last.fm. I definitely recommend it.
P.D.: I have some spare Spotify invitations. If you need one leave a comment or send me an email to jorge.marsal@gmail.com
May 17, 2009, 4:35 am
A few days ago I had to modify the linux bridge kernel module. The problem was that frames with a MAC destination address of 01-80-C2-00-00-03 didn’t pass through the bridge. According to the IEEE 802.1D standard this is the correct behavior. However I need to process those frames at another bridge, so the modification was necessary.
You can always apply your patch and recompile the whole kernel. However this is quite inefficient, since you can recompile just the affected module. Here is how.
- Download your kernel’s source code.
-
Navigate to the bridge module directory (/usr/src/redhat/SOURCES/linux-2.6.18/net/bridge).
-
Edit the following Makefile:
#
# Makefile for the IEEE 802.1d ethernet bridging layer.
#
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
obj-m += bridge.o
bridge-y := br.o br_device.o br_fdb.o br_forward.o br_if.o br_input.o
br_ioctl.o br_notify.o br_stp.o br_stp_bpdu.o
br_stp_if.o br_stp_timer.o br_netlink.o
bridge-y+= br_sysfs_if.o br_sysfs_br.o
bridge-y += br_netfilter.o
obj-m += netfilter/
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
- Compile the module with make.
-
As a result you get the bridge.ko module.
To use the newly created module follow these steps:
# rmmod bridge
# cp /lib/modules/2.6.18-128.el5/kernel/net/bridge/bridge.ko /lib/modules/2.6.18-128.el5/kernel/net/bridge/bridge.ko.old
# cp bridge.ko /lib/modules/2.6.18-128.el5/kernel/net/bridge/
# modprobe bridge
And that’s it. Your patched module is up and running.
May 16, 2009, 10:51 am
As you may already know you can set up a linux box to work as a bridge. Suppose you want to bridge eth0 and eth1 interfaces. The steps are these:
# yum install bridge-utils
# brctl addbr br0
# brctl addif br0 eth0
# brctl addif br0 eth1
# brctl stp br0 on
These changes are not permanent. It you want to maintain them between reboots you have to edit some files:
- Create /etc/sysconfig/network-scripts/ifcfg-br0 with your favourite editor.
- Add the following lines to the file:
DEVICE=br0
TYPE=Bridge
STP=on
BOOTPROTO=none
ONBOOT=yes
IPADDR=10.0.0.2
NETMASK=255.255.255.0
- Save the file.
- Open the files /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifcfg-eth1
- Add the following line to both files:
That’s it. Pretty easy huh?
Note1: a bridge doesn’t need an IP address. However you can always assign one for management purposes.
Note2: I’m using Centos 5.3. The configuration files on other distributions may vary. For example on Ubuntu the network configuration is stored on /etc/network/interfaces.
February 10, 2009, 6:38 pm