Thursday, May 3, 2012

Setting up a Test Enviroment Network



One month ago, a Cisco Switch Catalyst 3750 that was in production decided to stop working, it simply didn't boot.
Days Later i decided to try boot it again, and guess what? it booted :P (Probably Power Supply problems), An equipment with clear problems, but still adequate to be used on a testing environment.
I managed to get an inactive Router Cisco 2600 hence i have all that i need to create my own small test enviroment network.


The goal is to create private network using the router as gateway, like this


Your Company Network (Outside)----> Router (inside)----> Your Test Network


The out-interface will be configured with a internal network IP Address and then the root will do NAT to enable internet access in Test Network.
The Cisco Switch is already configured with production configurations, since i want it to keep them i will try to not change anything from the Switch (Not a big deal, just have to keep in mind that ports are in VLAN 20 and search for a trunking mode port to connect the router)


Equipment used:
Switch Cisco Catalyst 3750
Router Cisco 2600 Series


Reseting Cisco 2600 Series


First lets wipe out router configurations!
Check the configuration register if it is 0x2102.


router#configure terminal
router(config)#config-register 0x2102
router(config)#end


then erase startup-config


router#erase startup-config


Now reload the router


router#reload


It will prompt you by Configuration Dialog, its up to you can configure some stuff with the Dialog.
Now we have factory configurations up.


Configuring interfaces:


First lets configure the interfaces.


Outside interface:


router#configure terminal
router(config)# interface fastethernet0/1
router(config)#ip address 192.168.10.49 255.255.255.0
router(config)#ip nat outside
router(config)#no shutdown
router(config)#exit


router(config)# interface fastethernet0/0
router(config)# encapsulation dot1Q 20 (Vlan 20 encapsulation)
router(config)# no shutdown
router(config)# exit


router(config)# interface fastethernet0/0.1
router(config)# ip address 172.16.0.1 255.255.0
router(config)#ip nat inside
router(config)# no shutdown


Configuring DHCP:


I will user a 172.16.0.0/16 network, DHCP is not necessary, but since i dont want to configure Computers manually...


router(config)# ip dhcp pool 172.16.0.0/16
router(dhcp-config)# network 172.16.0.0 255.255.0.0
router(dhcp-config)# ip dhcp pool 172.16.0.1 255.255.0.0
router(dhcp-config)# default router 172.16.0.1
router(dhcp-config)# dns-server 192.168.0.42 (your dns server or a public one)
router(dhcp-config)# exit
router(config)# ip dhcp excluded-address 172.16.0.1 172.16.0.255


Routing the traffic to Outside (Internet):


Setting up the default settings and default route, so traffic to internet will be redirected to outside interface.


router(config)# ip default-network 172.16.0.0
router(config)# ip default-gateway 192.168.10.1
router(config)# ip route 0.0.0.0 0.0.0.0 FastEthernet0/1


NAT:


NAT is essential so we can map the internal IP's to the Outside IP (192.168.10.49)


router(config)#ip nat inside source list 1 interface fastethernet0/0.1 overload
router(config)#access-list 1 permit 172.16.0.0. 0.0.255.255


 it's done.
Now just mess around :D

No comments:

Post a Comment