Search This Blog

Monday, January 12, 2015

GNS3 - VitualBox Part 4: Building Data Center Areas Connected to the OSPF Backbone Area

Adding a Cisco 3745 and Debian Linux Layer 3 Switch to a non-Backbone OSPF Area to create a data center.  This article starts using the topology configured in Part 2 of the series.




Introduction

The illustration above depicts what will be configured: a Cisco 3745 (equipped with Fast Ethernet adapters) and a Deiban Linux Layer 3 Switch installed in the Philadelphia Data Center in OSPF Area 10.64.0.0.  OSPF Area 10.64.0.0 begins with a range of 10.64.0.0 / 255.255.0.0 (10.64.0.0 - 10.64.255.255) and will be expanded to 10.64.0.0 / 255.248.0.0 (10.64.0.0 - 10.71.255.255).

The Cisco 3745 will have one Fast Ethernet adapter connected to the existing Cisco 7206 router and the remaining will service networks with 255.255.255.0 (24-bit) subnet masks in the 10.64.x.0 range.  The Debian Linux Layer 3 Switch will have one Gigabit Ethernet interface connected to the existing Cisco 7206 router and the remaining will service networks with 255.255.255.0 (24-bit) subnet masks in the 10.65.x.0 range; additionally, it is preconfigured with seven subinterfaces for each physical Gigabit Ethernet adapter, creating a total of 24 networks in the 10.65.x.0 range.
Expanding the 10.64.0.0 OSPF Area
On the existing Philadelphia Cisco 7206 router, enter configuration mode for the OSPF process:
config t
router ospf 1
The existing area definition must be replaced:
no area 10.64.0.0 range 10.64.0.0 255.255.0.0
with:
area 10.64.0.0 range 10.64.0.0 255.248.0.0
Once reconfigured, save the running configuration.

Adding the Cisco 3745 Router

Use the GNS3 interface to add the Cisco 3745 router and four (although three are illustrated above) virtual Layer 2 switches.  It begins with a GT-96100-FE card in slot 0; add NM-1FE-TX cards to slots 1 through 4.  Connect Fast Ethernet adapter f0/0 to the existing GNS3 virtual Layer 2 switch connected to the existing PHL_7206 router.  Add four additional
GNS3 virtual Layer 2 switches and connect them to the Fast Ethernet adapters in slots 1 through 4.

The 3745 is ready to configure. Relevant configuration statements are below:
interface FastEthernet0/0
 ip address 10.64.0.2 255.255.255.0
 full-duplex
 

interface FastEthernet1/0
 ip address 10.64.1.1 255.255.255.0
 full-duplex
 

interface FastEthernet2/0
 ip address 10.64.2.1 255.255.255.0
 full-duplex


interface FastEthernet3/0
 ip address 10.64.3.1 255.255.255.0
 full-duplex
 

interface FastEthernet4/0
 ip address 10.64.4.1 255.255.255.0
 full-duplex
 

router ospf 1
 router-id 10.64.0.2
 area 10.64.0.0 range 10.64.0.0 255.248.0.0
 network 10.64.0.0 0.0.0.255 area 10.64.0.0
 network 10.64.1.0 0.0.0.255 area 10.64.0.0
 network 10.64.2.0 0.0.0.255 area 10.64.0.0
 network 10.64.3.0 0.0.0.255 area 10.64.0.0
 network 10.64.4.0 0.0.0.255 area 10.64.0.0

Adding the Debian Linux Layer 3 Switch

Use the GNS3 interface to add the preconfigured Debian Linux Layer 3 Switch and three GNS3 virtual Layer 2 switches. Connect interface eth0 to the existing GNS3 virtual Layer 2 switch connected to the existing PHL_7206 router.  Connect interfaces eth1 through eth3 to the three new GNS3 virtual Layer 2 switches.

This device is preconfigured with Quagga routing software and IP Forwarding enabled.  As mentioned above, it has subinterfaces configured for the data center side of the device (eth1, eth2 and eth3) for a total of 24 different networks.  A portion of the /etc/network/interfaces file is below:
iface eth1 inet static
address 10.65.1.1
netmask 255.255.255.0

iface eth2 inet static
    address 10.65.9.1
    netmask 255.255.255.0
    broadcast 10.65.2.255
    network 10.65.9.0

iface eth3 inet static
    address 10.65.17.1
    netmask 255.255.255.0
    broadcast 10.65.3.255
    network 10.65.17.0

iface eth1:2 inet static
    address 10.65.2.1
    netmask 255.255.255.0
    broadcast 10.65.2.255
    network 10.65.2.0

iface eth1:3 inet static
    address 10.65.3.1
    netmask 255.255.255.0
    broadcast 10.65.3.255
    network 10.65.3.0

The nomenclature of the subinterfaces reflects the subnet serviced.  For example, subinterface eth1:2 services network 10.65.2.0 / 255.255.255.0 and interface eth1:3 services network 10.65.3.0 / 255.255.255.0, etc.

The relevant part of the /etc/quagga/ospfd.conf file (configuring OSPF routing) is below:
router ospf
 ospf router-id 10.64.0.4
 network 10.64.0.0/24 area 10.64.0.0
 network 10.65.0.0/16 area 10.64.0.0
 area 10.64.0.0 range 10.64.0.0/13

Note the statement "network 10.65.0.0/16 area 10.64.0.0."  This statement adds every subnetwork (as defined in the /etc/network/interfaces file) included in the range 10.65.0.0 - 10.65.255.255 to area 10.64.0.0.  It is essentially a "short hand" reference to those networks, which appear individually in the routing tables.

Checking the Configuration

Upon starting and configuring the Cisco 3745 router and Debian Linux Layer 3 switch, check that they see each other and the PHL_7206 Cisco router as OSPF neighbors and their routing tables list all routes and a default gateway of 10.64.0.1 (the PHL_7206 router).

 


You may also check the Linux kernel routing tables to assure the operating system routes are correctly updated by the Quagga daemons.

The video below illustrates the entire process.




No comments :

Post a Comment