Cisco home lab setup
- Posted on 2015-08-04 04:59:51
- 1332 Views
- 3 Uptweets
- 0 Favorites
- 1 Likes
This will be my last post here in Uptweet and I am moving to a blogging site specifically for Fiber Nexus. So let's make this blog a good one! Let's start off with setting up your home lab. Imagine when you first heard Fedex or UPS knock on your door and you see your boxes arrive. Love that feeling. I had a lab before but it was old and very problematic. I have 3 Cisco 3750 switches and 4 2811 routers now. They work like a charm and the switches are Layer 3 switches, which means that you can use routing protocols to route traffic instead of STP. STP can still be used when you attach more access layer switches to it but for now STP will not be used. I would highly recommend everyone to buy 3550s and better L3 switches because beginner students usually buy the 2950 or 2960 switches and they are too old and don't have the better capabilities as the Layer 3 switches. Since I only have 3 switches, I will need to buy a few more to copy the same design that Cisco recommends in a network. There are 3 layers, Core, Distribution, and Access. For now I have Core routers and Distribution/Access switches. Here is a picture of that design:
The first thing I did after booting up the devices was to give them a host name and a username and password. Now remember, this is all basic configuration to get you started.
NexusEdge1.1(config)#username fibernexus privilege 15 secret [password]
NexusEdge1.1(config)#line vty 0 15
NexusEdge1.1(config)#line console 0
After I am done securing my router, I want to connect my router with my cable modem to any port with a crossover ethernet cable. Then I go to the CLI and instead of adding an ip address to the interface connected to the cable modem, I make it request for an ip address using the ip address dhcp command as noted:
NexusEdge1.1(config-if)#ip address dhcp
You will see a prompt that it received an ip address from the cable modem. If you login to the cable modem configuration portal, you can actually configure it to where it will a provide a static ip so it won't change every week and you dont have to constantly figure out what is the new ip address. If you do add that static ip , you need to disable then enable the router's interface to get the new ip address. If your cable modem is wireless, you can telnet to your router with the ip address that it has assigned on the cisco router's interface without the console cable.
Now that you can telnet and ping your router and cable modem with each other, you need to set up a default route and access list to your router to reach the internet. To do that you need to do the following:
NexusEdge1.1(config)#access-list 101 permit ip 18.104.22.168 0.0.255.255 any
NexusEdge1.1(config)#ip nat inside source list 101 interface FastEthernet0/0 overload
NexusEdge1.1(config)#ip route 0.0.0.0 0.0.0.0 10.0.0.1 (cable modem ip address)
NexusEdge1.1(config)#ip route 22.214.171.124 (switch network) 255.255.0.0 126.96.36.199 (switch next hop ip address)
The second ip route has the switch network range and it is pointing to the switch's ip address. I will explain later.
Now once you created your default route, you need to enable NAT on both interfaces connected to the cable modem and the switch and add an ip address to the interface connected to the switch.
NexusEdge1.1(config)#interface FastEthernet0/0 (connected to cable modem)
NexusEdge1.1(config-if)#ip nat out
NexusEdge1.1(config)#interface FastEthernet0/1 (connected to switch)
NexusEdge1.1(config-if)#ip address 188.8.131.52 255.255.255.0
NexusEdge1.1(config-if)#ip nat inside
To make sure this works, ping google.com from your Cisco router and see if it works. If not you need to add a dns server that the cable modem provides through their configuration page or add the public dns server of 184.108.40.206
NexusEdge1.1(config)#ip name-server 220.127.116.11
If you can ping google.com then you have to add a routing protocol to communicate with your Layer3 switch:
NexusEdge1.1(config)#router eigrp 65
NexusEdge1.1(config-router)#no passive-interface FastEthernet0/1
NexusEdge1.1(config-router)#network 10.0.0.0 0.0.0.255
NexusEdge1.1(config-router)#network 18.104.22.168 0.0.255.255
Now console into your switch and add the same username and password that we did in the beginning. Make the port connected to your Cisco router into a layer 3 routed port then add the ip address in the same subnet:
NexusSwitch1.2(config-if)#ip address 22.214.171.124 255.255.255.0
Now add the same routing protocol you used in your Cisco router to your switch and add a default route pointing to your router interface and also add the dns server.
NexusSwitch1.2(config)#router eigrp 65
NexusSwitch1.2(config-router)#network 126.96.36.199 0.0.255.255
NexusSwitch1.2(config-router)#no passive-interface f0/24
NexusSwitch1.2(config)#ip route 0.0.0.0 0.0.0.0 188.8.131.52 (Router's interface ip connected to switch)
NexusSwitch1.2(config)#ip name-server 184.108.40.206
Ping google.com and it should work. You now have a switch and router connected with each other and also to the public internet. You can also telnet into your router and switch wirelessly. If you are having trouble with connectivity you can use the following commands to verify your connected neighbors and if there is a valid route in your routing table.
show ip route
show ip int brief
Show cdp neighbors (find Device ID)
Show cdp entry ( then look for device IP address)*
*Telnet [ip address]
Show ip route eigrp
If you have any issues with this please let me know and I will be able to assist you in the process either by Instagram @fiber_nexus or by email at email@example.com. Thanks and I hope you have fun setting up your lab.