Tag Archives: router

OSPF routing between Cisco,Ubuntu,CentOS and Mikrotik Router!

Scenario:

  • Routers: 1 Ubuntu Linux with 3 nics, 1 Centos Linux with 3 nics, 1 Cisco 3640 Router with 3 FastEthernet interfaces and 1 Mikrotik Router with 2 interfaces.
  • Clients: 3 Windows Xp with 1 nic.
IP Details

All the Routers in this scenario have a default password of “zebra“.

Cisco Router:

  • fe0/0: 10.10.10.1/24
  • fe1/0:10.10.50.1 /24
  • fe2/0: Getting through DHCP

UbuntuRouter:

  • eth0: 10.10.10.2/24
  • eth1: 172.16.10.1/24
  • eth2: 10.10.100.1/24

CentOSRouter:

  • eth0: 172.16.10.2/24
  • eth1: 192.168.10.1/24
  • eth2: 10.10.150.1/24

Mikrotik Router:

  • ether1: 192.168.10.2/24
  • ether2: 10.10.200.1/24

Clients:

  • Ubuntu-Desktop: 10.10.50.50/24
  • WinXP-1: 10.10.100.50/24
  • WinXP-2: 10.10.150.50/24
  • WinXP-3: 10.10.200.50/24

Cisco Router Configuration:

UbuntuRouter Configuration:

Restart the Router!!!

CentOSRouter Configuration:

Restart the Router!!!

Mikrotik Router Configuration:

Neighbor verification from Routers:

Route verification from Routers:

Test from Clients:

Make a simple test from Ubuntu-Desktop.

Make a simple test from WinXP-1.

Make a simple test from WinXP-2.

Make a simple test from WinXP-3.

Configure NAT on Cisco Router:

This is just a bonus section, in which we will configure the NAT on Cisco router and also propagate the default route in OSPF. I connect my Cisco Router to DSL Modem and configure it so that it will take IP address through DHCP, as well as configure the inside and outside interface for NAT.

Lazy man access -list for NAT (This is not the perfect access list):

NAT Overload:

Originate the default route in OSPF:

Verify the last resort information on Cisco Router:

Check default route information on all routers 🙂

Hope this will help you!

Please Remember me in your prayers!

Enjoy 🙂

Advertisements

OSPF routing between Ubuntu and CentOS using Quagga

Topology:

Scenario:

  • Routers: 1 Ubuntu Linux with 2 nics, 1 Centos Linux with 2 nics.
  • Clients: 2 Windows 7 with 1 nic.

IP Details:

All the Routers in this scenario have a default password of “zebra“.

UbuntuRouter:

  • eth0: 192.168.10.1/24
  • eth1: 10.10.10.1/24

CentOSRouter:

  • eth0: 192.168.10.2/24
  • eth1: 172.16.10.1/24

Clients:

  • Dektop: 172.16.10.50/24
  • Laptop: 10.10.10.50/24

Read more of this post

Ubuntu as a firewall/gateway router

In this simple tutorial, I will show you how to configure the Ubuntu server as Internet gateway, which also serves as DHCP and DNS Server!

Scenario:
  1.  Ubuntu server with 2 Network Cards 1 is connected to Internet and named as WAN,which takes the ip address through dhcp and the other one is connected to the Local Network and named as LAN,which has static ip address 10.10.10.1/24.
  2. Windows Client(s), which takes ip address from Ubuntu Server, also use it as name resolution server (Internet) and gateway.
Prerequisite(s):
  1. Change the Network Cards name using this Tutorial.
  2. Install the Webmin, also using this Tutorial.

First, We will check the ip address setting for the above scenario:

sudo nano /etc/network/interfaces

It will show the ip address that associated with the each interface:

Now, we also examine the output of ifconfig command:

ifconfig

We need to install two packages to accomplish the goal of this tutorial:

sudo apt-get install isc-dhcp-server bind9

Because there is more than one network card(s) in Ubuntu server, so we need to select the network card on which our server will be listen for dhcp request. (By default, it listens on eth0/WAN in this case).
We can change this by editing the  /etc/default/isc-dhcp-server file:

sudo nano /etc/default/isc-dhcp-server 

Put LAN in the INTERFACES place:

Now we will change the default configuration by editing /etc/dhcp/dhcpd.conf, I normally delete everything inside the file and manually add the configuration that suits my needs :-)

sudo nano /etc/dhcp/dhcpd.conf

Here is my dhcpd.conf file, you need to change it according to your needs:

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
option subnet-mask 255.255.255.0;
option broadcast-address 10.10.10.255;
option routers 10.10.10.1;
option domain-name-servers 10.10.10.1;
option domain-name "ubuntu.firewall";
subnet 10.10.10.0 netmask 255.255.255.0 {
range 10.10.10.50 10.10.10.200;
}

Restart dhcp service using the following command:

sudo service isc-dhcp-server restart 

To enable ip forwarding, edit /etc/sysctl.conf file:

sudo nano /etc/sysctl.conf

Uncomment the  net.ipv4.ip_forward=1:

Login to the Webmin using https://server-ip:10000, In my case it is,https://tendo-Firewall:10000.

Follow these steps in order to enable the MASQUERADE(NAT):

To save the Firewall(Iptables) setting, do this:

After saving the setting, check the /etc/network/interfaces file once again:

sudo nano /etc/network/interfaces

Notice that it added one line under LAN interface:

The purpose of this line is to enable the Masquerading, as soon as the interface LAN will up and running!

Test from Windows 7 that connect to LAN:

Hurry, We are able to access the Internet, this mean we configure the Ubuntu server as gateway successfully 🙂

Note: In order to secure this server we need to do some extra work, which I will show you really soon!

Hope this will help you!

Please Remember me in your prayers!

RIP routing between Ubuntu and CentOS using Quagga

Topology:

Scenario:

  • Routers: 1 Ubuntu Linux with 2 nics, 1 Centos Linux with 2 nics.
  • Clients: 2 Windows 7 with 1 nic.
IP Details

All the Routers in this scenario have a default password of “zebra“.

UbuntuRouter:

  • eth0: 172.16.10.1/24
  • eth1: 10.10.10.1/24

CentOSRouter:

  • eth0: 172.16.10.2/24
  • eth1: 192.168.10.1/24

Clients:

  • Dektop: 192.168.10.50/24
  • Laptop: 10.10.10.50/24
UbuntuRouter Configuration:

Restart the Router!!!

CentOSRouter Configuration:

Restart the Router!!!

Troubleshooting Steps for CentOS:

Verification from Routers 🙂

Test from Clients 🙂

Make a simple test from Laptop.

Make a simple test from Desktop.

Hope this will help you!

Please Remember me in your prayers!

%d bloggers like this: