CISCO commands

Just lately while cleaning up things at work, and on the web I have come across some CISCO commands that are usefully but often over looked, or forgotten. So I thought I would write them up here and attach them to the Tips and Tricks page so I would always have them to hand. IT might start of a small list but I hope to increase it gradually as I remember/find more. Think of it as a work in progress which you can find here.

I also though as well as the useful ones I would create a common list as well. These are things like the #show IP interface brief, and show Interface status. Again a work in progress and found under the tips and tricks page. If you have any ides suggestions for things that should be included let me know.

I don’t want to have a list of every command on CISCO, but the common ones we all use daily and take for granted. Or ones that are not quite so well known but very useful nevertheless

As I say the lists are no way completed, but I have put up the pages so I can start adding thing on, as and when I think of them.

DevilWAH

CCNP SWITCH (retake)

Well one more update. I have just checked my email and it seems that CISCO have responded to my comments about the SWITCH exam, and provided me with a re-sit voucher!

I think this says something about the quality of this exam as this is the second voucher I have received. The first was after the exam crashed on me. So hats of to CISCO for that. But this time no excuses, I still don’t think the course material if fit for its purpose, and does not really prepare you for the exam. But having sat it twice, I can’t claim I don’t know the focus, or where my weaknesses lay.

So my intention is to start my new job, get hold of some lab equipment and do some hard studying on the topics I need to. Then I think I should be able to pass this no problem. I did notice the First chapter of the ROUTE foundation seems to cover some of the planning topics nicely so I might flick through it a little more to see if there are any other relevant bits.

DevilWAH

Applying a configuration to a CISCO device using xmodem.

Last week at work now, so been rushing to get things sorted out. I have still been doing a bit of study and planing some more ROUTE posts, but with a broken down car and house sale looking like its falling through haven’t had time to do any actually real posting.

However I came across something today, that I have known about for a while but never really used much. One of the things every one seems to love about CISCO is the fact you can simple copy and past configurations in to the terminal emulator window.  And this is indeed great. set up one interface, copy the config to notepad, update it as you wish and past it back in… A real time saver and why we all love CISCO more than Microsoft ;).

In the past this is also how I have always copied backed up configurations on to a new switch/router. Simply open the saved config in notepad. Ctrl-A to select it all, copy and paste to the device. However I was doing this today and hit an issues. With really large configuration files (500+ lines of configuration), I was watching the console windows and could see it was skipping some of the configuration when doing this connected through the serial port. I could see that while things like VLAN’s where being created and the device was pausing, the following lines would some times get lost or corrupted. Now while if you only have a small size configuration file this is not an issue as it is quite easy to check, hundreds of lines become very hard to validate.

I found the best way around this problem was to set up the device with an IP address, put it on a limited access network that has a TFTP sever and copy over the configuration file, either to the startup-config or running-config. This works fine but it is a bit of a hassle going to all that trouble and it means you have to connect the switch to the network, so you have to be very careful with things like VTP and spanning tree. What I really wanted was a way to send the configuration file through the console port.

This made me think of how to recover a corrupted IOS image (which you can fine in the tips and tricks link above). Where boot the device in to ROMmon mode, and then copy the IOS over using the xmodem protocol. Almost all the mainstream terminual emulators have this built in, and while for recovering the IOS you need to increase  the baud speed of the console port to speed up the copying process, as the configuration file is only 20-30kb max for most people, the standard speed will move that across in a few seconds.

So then it is just a case of knowing the command to achieve the goal, and I was happy to see it is as simple as it should be. On the device simple type the following from the enable prompt.

router#copy xmodem: startup-config

That’s it, no file names or anything, the device will now wait to receive the file(if you do not start the transfer within a few minutes the device will time out waiting). Then in your terminal emulation program start the transfer. In teraterm it is under the file menu, while secure CRT has a whole menu structure dedicated to various methods to transfer files. Simple chose the xmodem protocol (I found selecting the 1K option was more reliable), and browse to the configuration file, and away it goes. A few moments later the configuration will be on the device (#show Flash: to confirm), and a reboot will have it all up and running.

To me this is a far more reliable way of copying large configurations across, and allows you to easily set up the device from any client, this can be very useful if you are out on site and don’t have access to a limited access network, or the TFTP server to use to copy the files via TFTP or FTP using the network.

DevilWAH.

PS. Some older routers don’t seem to like you copying from xmodem to nvram, or require you to give a source file name. But you can still achieve the same by copying the file to Flash: .

PPS. Although I prefer the xmodem method, you can improve the reliability of the copy/paste method by increasing the line/character delay in you terminal emulation program. A 5msec delay per character seems to help, although with a 1000+ lines of configuration you may get from a complex configuration, you may find the paste takes a little time, and you may still get errors.

New Job,

Well the reason I haven’t been posting as much, and have moved the blog to an on-line host. Is that in a few weeks I will be starting a new role working for Dimension Data.

Seems like the hard work over the last few years is paying off now, and really excited to be moving to such a well respected company in the networking field. Hopefully with a bit of hard work I will be achieving many things over the coming years. I think this will be a great opportunity, and goes to show that working hard, and taking your time to look for the right openings does pay back in the end.

So my plans for the next moth or two go some thing like this..

Move house, buy new car, carry on raising the devil child (I mean my gorgeous daughter), start the new job, and carry on studying for my CCNP. I have decided that until I am settled in the new house and new job I am not going to think about taking the exams. But hopefully by Christmas or early next year, I will be ready to take both the switch and route exam close together, with trouble shoot following shortly after.

So if posts seems slow for the next month or two that’s the reasons. I have a list of posts I want to cover, including about 3 or 4 more on EIGRP before moving on.

Hopefully I will get a few more completed over the weekend.

DevilWAH

Tagging the Oceans

As a young boy I was fascinated by wildlife and had piles of videos that I would watch over and over. I always believed I would end up as a wildlife researcher tracking cheaters across the plains with a faithful rescued tiger as my companion. Well it did not turn out quite that way, but I am still in love with wildlife. You may believe in a creator or you may believe in science. But what we must all see is the wonder and complexity of nature and our existence.

One of humans worst qualities is that the further removed we are from something the less we seem to care. Weather this is removed in the sense of distance or time. And with technology of the 20st century putting more and more distance between us and nature, it is unsurprising that we take it for granted and don’t always treat it with the respect it deserves.

But what is great to see is how technology in the 21st century is starting to bring us back in touch with nature, to allow us to see the complex interactions and how us as humans fit in to the picture. People talk about the need to go back to simpler times to “save” the planet.. But it is not back we need to go but forward, to use technology and develop it so we understand and have the tools to make the changes we need, so we can both live as 21st century humans, while looking after the planet that sustained us, including the other living organisms that share it with us.

today I came across a video that shows how we are developing these technologies and how they can be used to reach out and make people interested. Because once people are interested the “distance” decreases, and as that goes down the more we will care.

Barbara Block: Tagging tuna in the deep ocean

DevilWAH

CCNP ROUTE (Part 8 EIGRP Simple Lab)

I decided that rather than just use other people labs I would come up with a few of my own, the following lab is very simple, requiring the enabling of EIGRP on two routers so they form a neighbour relation ship, and setting up which routes will be advertised. Followed by some simple summarization to reduce the size of the routing tables.

You can find the GNS 3 topology files HERE, these also contain the finalised configs if you want to see the method and commands used. (note you will need a 2691 image installed)

Fig 1

To start with we have two routers connected via a point to point link on interface Fastethernet 0/0. Each also has 10 loop back interfaces configured with various /24 networks configured.

The aim is simple, enable EIGRP with an AS number of 10, form a neighbour relationship between the two routers and update the routing tables so both routers can see / reach all configured networks. Ideal use as few network statements as possible, while remaining as specific as possible as to what networks get advertised. Autosmmorization should also be disabled.

After completing this, a #show ip route, should display something like this.

router1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

192.168.10.0/31 is subnetted, 1 subnets
C       192.168.10.0 is directly connected, FastEthernet0/0
172.16.0.0/24 is subnetted, 20 subnets
D       172.16.32.0 [90/409600] via 192.168.10.1, 00:01:01, FastEthernet0/0
D       172.16.33.0 [90/409600] via 192.168.10.1, 00:01:01, FastEthernet0/0
D       172.16.28.0 [90/409600] via 192.168.10.1, 00:01:01, FastEthernet0/0
D       172.16.29.0 [90/409600] via 192.168.10.1, 00:01:01, FastEthernet0/0
D       172.16.30.0 [90/409600] via 192.168.10.1, 00:01:01, FastEthernet0/0
D       172.16.31.0 [90/409600] via 192.168.10.1, 00:01:01, FastEthernet0/0
D       172.16.24.0 [90/409600] via 192.168.10.1, 00:01:01, FastEthernet0/0
D       172.16.25.0 [90/409600] via 192.168.10.1, 00:01:01, FastEthernet0/0
D       172.16.26.0 [90/409600] via 192.168.10.1, 00:01:01, FastEthernet0/0
D       172.16.27.0 [90/409600] via 192.168.10.1, 00:01:01, FastEthernet0/0
C       172.16.8.0 is directly connected, Loopback9
C       172.16.9.0 is directly connected, Loopback10
C       172.16.4.0 is directly connected, Loopback5
C       172.16.5.0 is directly connected, Loopback6
C       172.16.6.0 is directly connected, Loopback7
C       172.16.7.0 is directly connected, Loopback8
C       172.16.0.0 is directly connected, Loopback1
C       172.16.1.0 is directly connected, Loopback2
C       172.16.2.0 is directly connected, Loopback3
C       172.16.3.0 is directly connected, Loopback4

Now to reduce the size of the routing table we can manually summarise the routes. This is carried out under the interface that is sending out the update (in this case it will be fast ethernet 0/0 on each router). Again we want to be as specific as possible. The completed LAB uses multiply summarization statements , this increase the specificity of the summarization at the expense of adding an extra route in to the table. The routing table should now look something like.

router2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

 192.168.10.0/31 is subnetted, 1 subnets
C       192.168.10.0 is directly connected, FastEthernet0/0
172.16.0.0/16 is variably subnetted, 15 subnets, 2 masks
C       172.16.32.0/24 is directly connected, Loopback9
D       172.16.32.0/21 is a summary, 00:02:27, Null0
C       172.16.33.0/24 is directly connected, Loopback10
C       172.16.28.0/24 is directly connected, Loopback5
C       172.16.29.0/24 is directly connected, Loopback6
C       172.16.30.0/24 is directly connected, Loopback7
C       172.16.31.0/24 is directly connected, Loopback8
C       172.16.24.0/24 is directly connected, Loopback1
D       172.16.24.0/21 is a summary, 00:02:28, Null0
C       172.16.25.0/24 is directly connected, Loopback2
C       172.16.26.0/24 is directly connected, Loopback3
C       172.16.27.0/24 is directly connected, Loopback4
D       172.16.8.0/24 [90/409600] via 192.168.10.0, 00:02:26, FastEthernet0/0
D       172.16.9.0/24 [90/409600] via 192.168.10.0, 00:02:26, FastEthernet0/0
D       172.16.0.0/21 [90/409600] via 192.168.10.0, 00:02:26, FastEthernet0/0

So the routes from Router 1 are now summarized in to 3 blocks. 172.16.0.0/21 which would include the first 8 networks, plus the 172.16.8.0 and 172.16.9.0 /24 which fall out side the summarization.

Note also the routes to null that have been entered. When you set up a summarization, the router will automatically set up a route to null for that network. The reason for this is that you many not actually have routes to all the subnets for the network you have advertised as a summary. Imagen in the above case there was no loop back 5 and 6 on router 2, so no networks 172.16.28.0 and 172.16.29.0 /24. But the router is still advertising a summary address that includes them. When packet arrive at the router they are routed based on the most specific match. so a packet coming in with a destination address of 172.16.27.59 will match both the following routes.

D 172.16.24.0/21 is a summary, 00:02:28, Null0
C 172.16.26.0/24 is directly connected, Loopback

but because /24 is more specific than /21 the route to the loop back interface will be used. However if there is no more specific route, then the null route will be matched and the packets discarded.

OK I said it was simple and it is. The topology files have both the starting position and my completed example. This is of course not the only solution. You can argue there are neater ways to do it, but I chose to use multiply statements to show how specific networks can be picked and what happens when summary address do not exactly match the networks that are configured.

There will be one more EIGRP Lab coming up that will be more involved and included redistribution of static routes and manual formation on neighbours.

DevilWAH

Back on line…

OK that was a bit simpler than I imaged it would be!

If any one wants to move the hosting of there wordpress let me know, but to sum up you copy the files over, dump the sql database and reimport it to the new hosting solution.

What I expected to take hours actually took about 30minutes.

And now that it is back up and running, I can get back to studying and posting some study stuff.

DevilWAH

Time to move!

Well you might ask why so quiet for the last few days.. Truth is I have just accepted a new job offer and this means that I will lose my current hosting for this site. As I am now moving house and work, I have decided I will move this site to a on-line hosting solution for now. Hopefully this should be up and running in the next few days and I can get back to posting again, with more info on what I will be doing in my new job, and more CCNP stuff.

Please bare with me during the move.

DevilWAH

CCNP ROUTE (Part 7 EIGRP General commands)

OK so been reading the intro to EIGRP, now its time to get configuring,  I think the best way to remember these is to take each one in turn and describe its function. Starting with the global commands, then the EIGRP specific commands, followed by some of the interface commands, and ending with a few basic verification commands. (For this post the configured name of the router will be “R1”)

GLOBAL COMMANDS.

R1(config)#ip routing.

This command is enabled by default on routers and disabled on layer 3 switches (some newer IOS do seem to have it enabled). Running this command enables routing on the device, with out it no routing of any kind will be preformed by the switch.

R1(config)#ip route <ip address> <subnet mask> <next hop address>

This command set a static route entry, not strictly EIGRP but important enough to know to be here. The next hop address can by an ip address to forward the traffic to, or jsut the interface to send the traffic out. It is considered best practice to if possible specify an ip address if possible. One common route entered this way is the “default route”

R1(config)#ip route 0.0.0.0 0.0.0.0 &lt;next hop address / interface&gt;

This sets the destination to pass all unknown traffic to, traffic that there is no specific entry in the routing table for.

R1(config)#router eigrp <AS number>

Enters into the eigrp configuration mode for the stated AS number, all routers running eigrp that are so share routing table/information, must be running the same AS number. If this is different then routers will not form neighbour relationships.

R1(config)#router eigrp 10

EIGRP CONFIGURATION MODE

R1(config-router)#auto-summary

By default this command is set to be enabled (although I believe in IOS version 15 is is now defaulted to “no auto-summery”). Having it enabled will cause EIGRP to automatically summarise all routes to their class full boundaries. Most people will want to diable this to give more control and manage summarization manually.

R1(config-router)#network <ip address> <wildcard mask>

This command has two separate effects. First it will enable the sending of routing update out of any interface that matches the address and wild card mask. Secondly it will advertise the networks that those interfaces have assigned to them. if for example you have the interface with the following ip address and subnet mask assigned. 192.168.5.254 255.255.255.0. and you add the eigrp network command.

R1(config-router)#192.168.5.254 255.255.255.255 (only the single ip address)

eigrp will send out updates on that interface, but these will included the advertised route 192.168.5.0 / 24, as this is the network subnet assigned to the interface.

R1(config-router)#Passive interface <int ID / Default>

Image you run the last command (network x.x.x.x y.y.y.y) on  the IP range for an interface that is connected to an end users network, with no other routers to form neighbours with? In this case you most likley do not want to send out routing updates but you still wish to advertise the network. In this case you can run the passive interface command to prevent multicast hello and update messages getting sent out.

R1(config-router)#neighbour <IP address> <interface ID>

Now Imagen you have run the passive interface command, but you wish to still send and receive updates from and two specific routers out of that interface? Using the neighbour command allows you to do this. In fact setting a neighbour in this method effectively turns the interface in to a passive interface by changing the hello messages from using the multicast address, to using unicast addresses.

INTERFACE CONFIGURATION MODE.

R1(config-if)#ip summary-address eigrp <AS num> <ip> <subnet mask>

If you have disabled auto-summary in the eigrp config mode, you may still want to do manual summarization. Configured under an interface, this command will summarize all routes that are advertised out that interface and that fall in to the summary network specified in to a single routing advertisment. Multiply summary address can be configured per interface, to cover multiply summary routes.

OK so that’s some of the eigrp commands to get started with. There are of course many more but using these it is possible to enable eigrp, configure the networks to be advertised (and what interfaces to advertise them on), and form neighbour relationships that will populate the routers routing table. So then the questions becomes how do we tell if it is all working

VERIFY COMMANDS

R1#show ip route

This will display the current routing table that has been populated by all routing protocols running, plus static routes and connected networks, that is used by the router to make decisions on the actually forwarding of data packets.

R1#show ip eigrp neighbours

Displays details about the neighbours EIGRP knows about. (neighbour table)

R1#Show ip eigrp topology

Show details of all networks that EIGRP has learnt about, details of how to reach them and what neighbours have advertised them. things like which one is the successor and feasible successors are shown here. This is a display of the topology table.

Now this table is not complete, so look out for part 2 to this table for when we get on to redistribution and more complex EIGRP setups.

DevilWAH