Tag Archives: routing

InterVLAN Routing with Internet Access on Ubuntu

topology

Scenario:

  • Router: Ubuntu Server with 1 network card.
  • Clients:  WindowsXP in VLAN10,Windows7 in VLAN20.
  • Internet: Internet Router on VLAN30
  • Switch: Cisco 2960
Read more of this post

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 🙂

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

RIP routing between Cisco,Ubuntu and CentOS Router!

Scenario:

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

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

3640Router:

  • fe0/0: 192.168.10.1/24
  • fe1/0:172.16.10.1 /24
  • fe2/0: 10.10.10.1/24

UbuntuRouter:

  • eth0: 192.168.10.2/24
  • eth1: 10.10.20.1/24

CentOSRouter:

  • eth0: 172.16.10.2/24
  • eth1: 10.10.30.1/24

Clients:

  • WinXP-1: 10.10.20.10/24
  • WinXP-2: 10.10.10.10/24
  • WinXP-3: 10.10.30.10/24
3640Router Configuration:

UbuntuRouter Configuration:

Restart the Router!!!

CentOSRouter Configuration:

Restart the Router!!!

Verification from Routers :-)

Test from Clients :-)

Make a simple test from WinXP-1.

Make a simple test from WinXP-2.

Make a simple test from WinXP-3.

Hope this will help you!

Please Remember me in your prayers!

InterVLAN Routing using CentOS with 1 Interface

Scenario:
  • Router: CentOS Server with 1 network card.
  • Clients: 2 WindowsXP in VLAN10,1 Ubuntu and 1 CentOS in VLAN20.
  • Switch: Cisco 2960
Cisco 2960 Switch Configuration:
interface FastEthernet0/1
description CONNECTED TO CentOS ROUTER
switchport mode trunk
!
!
!
interface FastEthernet0/5
description WINXP-1
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/6
description WINXP-2
switchport access vlan 10
switchport mode access
!
!
!
interface FastEthernet0/15
description UBUNTU CLIENT
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/16
description CentOS CLIENT
switchport access vlan 20
switchport mode access
CentOS Router Configuration:

First, we need to disable the SELinux:

sudo nano /etc/selinux/config

Change SELINUX from enforcing to disabled:

To configure the base interface(in my case, eth0):

sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0

It should have at least the following elements:

DEVICE=eth0 
BOOTPROTO=none   #if it didn’t work then use static
ONBOOT=yes 
TYPE=Ethernet

To setup a VLAN10, on eth0, then we should create a file ifcfg-vlan10 inside /etc/sysconfig/network-scripts/:

ifcfg-vlan10 should have following elements:

Again to setup a VLAN20, on eth0, then we should create a file ifcfg-vlan20 inside /etc/sysconfig/network-scripts/:

ifcfg-vlan20 should have following elements:

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

sudo nano /etc/sysctl.conf

Change net.ipv4.ip_forward from 0 to 1:

Restart the Networking service:

sudo service network restart

Use the ifconfig command to check the newly created vlan interfaces:

ifconfig

To forward the traffic between the vlans, we should configure the iptables:

sudo nano /etc/sysconfig/iptables

Add these two lines (place them according to your iptables file configuration):

-A FORWARD -i vlan10 -o vlan20 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i vlan20 -o vlan10 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT

Test from WinXP-1:

Test from WinXP-2:

Test from Ubuntu Client:

Test from CentOS Client:

 

Hope this will help you!

 

Please Remember me in your prayers!


InterVLAN Routing using Ubuntu with 1 Interface

Scenario:
  • Router: Ubuntu Server with 1 network card.
  • Clients: 2 WindowsXP in VLAN10,1 Ubuntu and 1 CentOS in VLAN20.
  • Switch: Cisco 2960
Cisco 2960 Switch Configuration:
interface FastEthernet0/1
description CONNECTED TO UBUNTU ROUTER
switchport mode trunk
!
!
!
interface FastEthernet0/5
description WINXP-1
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/6
description WINXP-2
switchport access vlan 10
switchport mode access
!
!
!
interface FastEthernet0/15
description UBUNTU CLIENT
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/16
description CentOS CLIENT
switchport access vlan 20
switchport mode access
 Ubuntu Router Configuration:

To install the vlan support on ubuntu, use this command:

sudo apt-get install vlan

Now we shall configure the vlans on Ubuntu router by editing the /etc/network/interfaces:

sudo nano /etc/network/interfaces

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

sudo nano /etc/sysctl.conf

Change net.ipv4.ip_forward from 0 to 1:

Load “8021q” kernel module:

(Optional): If the Ubuntu router didn’t load the 8021q kernel module at boot time, then use this command to add  the module to the kernel on boot:

sudo su -c 'echo "8021q" >> /etc/modules'

Restart the Networking service:

sudo /etc/init.d/networking restart

Use the ifconfig command to check the newly created vlan interfaces:

ifconfig

Verify the vlan configuration:

sudo cat /proc/net/vlan/config

Test from WinXP-1:

Test from WinXP-2:

Test from Ubuntu Client:

Test from CentOS Client:

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: