• Skip to main content
  • Skip to footer

NetworkJutsu

Network Security Consulting | San Francisco Bay Area

  • Blog
  • Services
  • Testimonials
  • About
    • About Us
    • Terms of Use
    • Privacy Policy
  • Contact Us

Blog

CCNA Data Center DCICN

03/02/2013 By Andrew Roderos 2 Comments

  • Share on Twitter Share on Twitter
  • Share on Facebook Share on Facebook
  • Share on LinkedIn Share on LinkedIn
  • Share on Reddit Share on Reddit
  • Share via Email Share via Email

Passed #CCNADC #DCICN! It would be embarrassing to not pass this exam on a first try! One down, one more to go!

— Andrew Roderos (@networkjutsu) March 1, 2013

I was really tempted to take this exam when it came out the latter part of the 2012. I figured I’ll be able to pass this exam without preparing for it – I was right. Then, I started looking at the DCICT exam topics and found out that I have limited or no experience with majority of the technologies and there isn’t any Cisco Press title available to help prepare for this exam – I am sure it is coming soon. That said, I was discouraged to pursue the certification and decided to just wait for the Cisco Press book(s) to come out and try to get more experience and knowledge with NX-OS and data center technologies.

Upon reviewing the DCICT exam topics further, I realized the majority of the topics are listed on DCUFI curriculum, which was the class that I just took earlier this week. When I saw that, I decided that I’ll pursue the CCNA Data Center certification sooner since I should be able to use the DCUFI book and supplement it with some access to NX-OS lab and real world experience, materials listed here, free Nexus 1000V download, and using UCS emulator available for free download with valid CCO account. Having said all that, I decided on Monday night to sign up to take the DCICN (Introducing Cisco Data Center Networking) exam after my DCUFI (Implementing Cisco Data Center Unified Fabric) class.

DCICN exam

Having a few Cisco certifications and about six years real world networking experience under my belt, it would’ve been embarrassing if I didn’t pass this exam on a first try. One can tell that this exam is really easy by just reading the exam topics. The exam topics doesn’t really cover anything new other than implementing them under NX-OS. I’d say anybody with CCNA, heck, even CCENT should be able to pass this exam without preparation. This exam is probably even easier than the CCENT, but then I would never know since I never took it. I would assume that it is similar to the INTRO exam. For someone without CCENT, CCNA, and/or work experience, it may be tougher for them to pass the exam since they’ll have to study these topics. Yes, CCENT/CCNA is not a prerequisite on becoming CCNA Data Center.

While NX-OS and IOS are very similar, there are still differences between them. In order to answer some of the questions on the exam correctly, one should know the differences in the syntax. There were few questions that pertained to NX-OS syntax and if one is not familiar with it, then he/she might not be able to answer it correctly. I have a little bit of experience with Nexus with former and current gig, so I am familiar with the commands. On top of that, I just got out of the CCNP Data Center DCUFI v4.0 (Implementing Cisco Data Center Unified Fabric) 5-day class so I should be more familiar now than before.

Without trying to break the NDA, the exam is a typical Cisco exam. Please feel free to click here to review the type of questions they ask. Multiple choice, single answer and multiple choice, multiple answer type of questions are for sure included here. If you visit the link above then you know that Cisco may include router simulation and simlet as the type of question that can be in it, so make sure you’re familiar with NX-OS. Though, I’d say anyone who is comfortable with IOS should be able to do just fine with these type of questions.

How to prepare for the DCICN exam?

The most common way to prepare for the DCICN exam is to read the CCNA Data Center DCICN Official Cert Guide book. This very helpful for people who didn’t take the CCNA R&S route since this will cover basic networking concepts and be able to pass the DCICN exam.

Thoughts

As already mentioned, anyone can pass the DCICN exam without preparation if they’re CCENT/CCNA and/or with real world networking experience. Still hesitant to pursue CCNA Data Center since no access to Nexus switches? Well, if you know someone who is an Account Manager or Systems Engineer for Cisco then you’re in luck – any Cisco employee may be able to give out access to the site though. Cisco is providing a free virtual lab that employees, customers, and partners can use for training and demo which is called CloudLab. The lab is using Titanium (NX-OS emulator), which is similar to Cisco’s IOU (IOS On Unix), and it has fixed topologies with lab guides to play with select technologies. I haven’t really sat down and play with it properly but this should help someone who is preparing for the CCNA Data Center exams and possibly CCNP Data Center DCUFI exam. I am sure that it’ll become very helpful for my DCICT studies since I would need access to some sort of lab. Not a lot of organizations out there has a Nexus lab that employees can play with, so having access to CloudLab is better than not having it at all.

Good luck to all CCNA Data Center hopefuls out there! Please feel free to contact me if you have any questions!

Disclosure

NetworkJutsu.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.

  • Share on Twitter Share on Twitter
  • Share on Facebook Share on Facebook
  • Share on LinkedIn Share on LinkedIn
  • Share on Reddit Share on Reddit
  • Share via Email Share via Email

Filed Under: Certifications Tagged With: CCNA, Cisco

Building Your Own Proxy Server

02/18/2013 By Andrew Roderos Leave a Comment

  • Share on Twitter Share on Twitter
  • Share on Facebook Share on Facebook
  • Share on LinkedIn Share on LinkedIn
  • Share on Reddit Share on Reddit
  • Share via Email Share via Email

What is a proxy server? According to Wiki page, it is a server that acts as an intermediary for requests from clients seeking resources from other servers. There are many types of proxy servers out there and in this tutorial it will only show one type of it which allows someone to bypass most, if not all, of the poorly designed and/or implemented web content filtering services.

There are many ways to filter websites to avoid employees going to adult, gambling, social networking sites, and etc. The ones that I know of are the following: OpenDNS, Blue Coat, and Websense. While I haven’t been on a network were OpenDNS has been implemented, I’ve been on networks with Blue Coat and Websense appliances. With this tutorial, someone will most likely be successful in bypassing these web content filtering appliances if they are not properly configured or if a firewall is allowing outbound SSH traffic. In organizations where they allow any websites to be accessed, this tutorial can also hide HTTP/HTTPS traffic by encapsulating all of user’s traffic inside SSH, which is encrypted.

What you need

  • Extra computer or a new Virtual Machine (VM)
  • Know how to install and update Linux with OpenSSH installed. This tutorial will use Ubuntu Server edition.
  • Know how to use text editor on Linux. This tutorial will use VI editor.
  • Know how to configure port forwarding on your router
  • Account from DynDNS or other free Dynamic DNS
  • PuTTY (Windows) or Terminal
  • Firefox installed

Steps

Step one is to download, install and update Ubuntu Linux Server. In this tutorial, I used Ubuntu Server 12.04 LTS. My original installation still works with 16.04.

Step two is to install Squid package. To install the package, please follow the command below. If you want to learn more about Squid, then you might want to check out this book. I have no experience with the book so please read through the reviews.

networkjutsu@ubuntu:~$ sudo apt-get install squid
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.2.0-23-generic linux-headers-3.2.0-23 linux-headers-3.2.0-34
  linux-headers-3.2.0-36 linux-headers-3.2.0-34-generic
  linux-headers-3.2.0-36-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libltdl7 squid-langpack squid3 squid3-common
Suggested packages:
  squidclient squid-cgi smbclient
The following NEW packages will be installed:
  libltdl7 squid squid-langpack squid3 squid3-common
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,012 kB of archives.
After this operation, 7,122 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main libltdl7 amd64 2.4.2-1ubuntu1 [37.6 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/main squid-langpack all 20111114-1 [307 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main squid3-common all 3.1.19-1ubuntu3.12.04.2 [123 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main squid3 amd64 3.1.19-1ubuntu3.12.04.2 [1,539 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ precise-updates/universe squid amd64 3.1.19-1ubuntu3.12.04.2 [6,254 B]
Fetched 2,012 kB in 2s (753 kB/s)
Selecting previously unselected package libltdl7.
(Reading database ... 128431 files and directories currently installed.)
Unpacking libltdl7 (from .../libltdl7_2.4.2-1ubuntu1_amd64.deb) ...
Selecting previously unselected package squid-langpack.
Unpacking squid-langpack (from .../squid-langpack_20111114-1_all.deb) ...
Selecting previously unselected package squid3-common.
Unpacking squid3-common (from .../squid3-common_3.1.19-1ubuntu3.12.04.2_all.deb) ...
Selecting previously unselected package squid3.
Unpacking squid3 (from .../squid3_3.1.19-1ubuntu3.12.04.2_amd64.deb) ...
Selecting previously unselected package squid.
Unpacking squid (from .../squid_3.1.19-1ubuntu3.12.04.2_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for ufw ...
Setting up libltdl7 (2.4.2-1ubuntu1) ...
Setting up squid-langpack (20111114-1) ...
Setting up squid3-common (3.1.19-1ubuntu3.12.04.2) ...
Setting up squid3 (3.1.19-1ubuntu3.12.04.2) ...
Creating Squid HTTP proxy 3.x spool directory structure
2013/02/18 11:32:01| Creating Swap Directories
squid3 start/running, process 1894
Setting up squid (3.1.19-1ubuntu3.12.04.2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

Step three is to configure the Ubuntu box to use static IP address or do address reservation on the home router. Since there are a lot of home routers available on the market, this tutorial will only cover assigning a static IP on Ubuntu box, which is shown below.

networkjutsu@ubuntu:~$ sudo vi /etc/network/interfaces

A new screen will show and will look like the one shown below.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp

Change the configuration to something like this:

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.1.10
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
        dns-nameservers 192.168.1.1

Make sure to save and exit out of the text editor. Once saved and back to Linux prompt, make sure to restart the networking services to take effect of the new IP information.

networkjutsu@ubuntu:~$ sudo /etc/init.d/networking restart
 * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
 * Reconfiguring network interfaces...

Since this was done remotely, the SSH session was terminated once the changes took effect.

Step four is to configure port forwarding on the home router. Again, since there are many home routers available on the market, it is difficult to compile each and every model out there to include in this tutorial.

Step five is to sign up to a Dynamic DNS service like DynDNS. This is useful for folks that are using dynamic IP address for home Internet connection. How to configure the router with DynDNS service is out of the scope of this tutorial.

Step six is to verify that the Ubuntu box is reachable via another computer on a different ISP. This is the perfect time to use the office network to connect to the Ubuntu box. If the SSH session was successful, then that means the firewall is not blocking TCP port 22 (SSH) connection outbound. If the SSH wasn’t successful, this can mean two things: port forwarding wasn’t configured correctly or the firewall is blocking SSH. Try another computer on a different ISP with no firewall blocking SSH sessions.

Step seven is to change or add SSH port to port 80 (HTTP) or 443 (HTTPS). This step can be skipped if step six was successful using the default port of SSH. To change or add port what SSH service is listening on please follow the commands below.

networkjutsu@ubuntu:~$ sudo vi /etc/ssh/sshd_config

A new screen will show up and will look like this:

# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22

Change the configuration like the one shown below. Delete Port 22 line if desired. I’ve added port 80 and 443 in this configuration but either one is fine. Save and exit the text editor and reboot the server. I tried doing sudo service ssh restart or sudo /etc/init.d/ssh restart but didn’t work. Please feel free to let me know another way to do this other than rebooting the server.

# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
Port 80
Port 443

Step eight is to reconfigure the port forwarding reflecting the new port that was configured earlier.

Step nine is to try connecting to the Ubuntu box from the office network using port 80 or 443, depends on how it was configured on Ubuntu box. This should be successful unless the deep packet inspection on Blue Coat or Websense has been turned on. Another one that will prevent this connection to be successful is when the organization has Palo Alto Networks firewall installed or any appliance that is capable of doing application layer filtering. That being said, this tutorial is useless for this type of network.

Assuming that step nine is successful, then step ten is to create a new SSH session but this time with different parameters. If Windows and PuTTY is being used, please follow the guide below. Please go to page four if Apple OS X is being used.

Windows and PuTTY

Enter the host name or IP address of the Ubuntu box and the port number as normal.

On the left side of the PuTTY (category section), expand SSH menu which is under Connection menu and click Tunnels option. A screenshot has been included below for your reference.

Tunnels

Once there, we need to add forwarded ports both local and remote. Screenshots has been included below for your reference.

Local ports

Local

Remote ports

Remote

Since this SSH session will be used a lot, it is a good idea to save it so all the parameters will be populated when we use it again. Please see below for a screenshot.

Saved Session

Apple OS X and Terminal

With Apple OS X and Terminal, it is really simple compared to Windows and PuTTY combination. Please see below on how to connect using Terminal on OS X.

ssh networkjutsu@networkjutsu.com -L 3128:localhost:3128

Since this is a long command, we should create an alias to shorten the command we need to issue when connecting to the Ubuntu box. To create an alias, we need to edit the .bash_profile which is on our home directory.

NetworkJutsu-MacBook-Pro:~ NetworkJutsu$ ls -ah
.                       .bash_profile           Documents
..                      .cups                   Downloads
.CFUserTextEncoding     .filezilla              Library
.DS_Store               .putty                  Movies
.Trash                  .ssh                    Music
.anyconnect             .viminfo                Pictures
.bash_history           Desktop                 Public
NetworkJutsu-MacBook-Pro:~ NetworkJutsu$ sudo vi .bash_profile

A new window will show up that will look like the one below.

~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
".bash_profile" 2L, 120C

Enter the line shown below then save and exit out of the editor.

alias networkjutsu='ssh networkjutsu@networkjutsu.com -L 3128:localhost:3128'

By creating an alias, we save keystrokes every time we connect to our Ubuntu box as shown below. The command above is assuming that we’re using the standard SSH port which is 22. If we’re using port 80 or 443, we need to add -p 80 (or 443) in the command.

NetworkJutsu-MacBook-Pro:~ NetworkJutsu$ networkjutsu
networkjutsu@networkjutsu.com's password:
Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-37-generic x86_64)
 * Documentation:  https://help.ubuntu.com/
  System information as of Mon Feb 18 13:44:53 PST 2013
  System load:  0.0               Processes:           74
  Usage of /:   47.1% of 6.62GB   Users logged in:     0
  Memory usage: 25%               IP address for eth0: 192.168.1.10
  Swap usage:   32%
  => /boot is using 91.2% of 227MB
  Graph this data and manage this system at https://landscape.canonical.com/
0 packages can be updated.
0 updates are security updates.
Last login: Mon Feb 18 11:58:59 2013 from networkjutsu.com

Browser settings

Most organizations lock down their Windows machines so most likely the Internet Explorer’s Internet Options will be grayed out or parts of it will be. Having said that, we need another browser that will support changing out settings that is not tied with Windows GPO. Google Chrome does not do the job since it is tied to Internet Explorer’s Internet Options. Another popular browser is Firefox which does the job that we need it to do. While I know there are other browsers out there, this tutorial was only done on Firefox. Please feel free to test other browser of your choice. See the picture below for the configuration details to use our Ubuntu proxy server.

Firefox

With all steps are successfully performed, we can now start browsing to virtually all websites that we want to access from anywhere. While the tutorial mentioned only bypassing web content filtering appliances, this can also serve as our protection when we are in an open-authentication wireless network like the ones that you connect to local coffee shop, restaurants, and etc. With open-authentication, the wireless traffic are not encrypted so someone who knows what they’re doing can definitely decrypt your SSL sessions when connecting to your bank and/or email. To prevent that from happening, we can use this same method to tunnel all our HTTP and/or HTTPS traffic to our Ubuntu box. It won’t be as fast but at least our traffic is secure.

Thoughts

Tutorial such as this can easily be found on the web so I encourage network engineers who are also responsible for the network security or network security engineers out there to really find ways to mitigate ways to bypass the security in place. As more and more savvy users entering the workforce, it is becoming harder to really prevent users accessing what they shouldn’t be able to access while on organization’s network. As newer products or technologies gets introduced, always be open minded what these can do for the organization. Fortinet, Check Point, Palo Alto Networks, Cisco (with their ASA-CX), and etc they can definitely help with this type of situation. Yes, I understand that money can be tight since our economy hasn’t recovered fully yet but there are other ways to at least mitigate this type of bypass as briefly mentioned in the tutorial – deep packet inspection of the HTTP/HTTPS traffic on Blue Coat or Websense appliance and outbound firewall rules.

Disclosure

NetworkJutsu.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.

  • Share on Twitter Share on Twitter
  • Share on Facebook Share on Facebook
  • Share on LinkedIn Share on LinkedIn
  • Share on Reddit Share on Reddit
  • Share via Email Share via Email

Filed Under: General Tagged With: Ubuntu

IP Netmask Format

02/13/2013 By Andrew Roderos 2 Comments

  • Share on Twitter Share on Twitter
  • Share on Facebook Share on Facebook
  • Share on LinkedIn Share on LinkedIn
  • Share on Reddit Share on Reddit
  • Share via Email Share via Email

If you’re following me on Twitter then you might have seen my tweet last week about rebooting my CCIE studies. While I am moving really slow in reading, as usual, I am also taking notes as I go along. I am changing my strategy this time since I don’t retain information like I used to – the joys of getting older.

Chapter 1 of Routing TCP/IP Vol. 1 is really meant to be just a review. If you’re studying for the CCIE, then you’re at the level that you can skip this chapter. However, I’ve decided not to skip this chapter even though I’ve read this book already. Kind of glad that I didn’t skip it because I seem to have forgotten about the ability of Cisco IOS to change the display of the subnet mask. While not really important in CCIE studies, I just thought it is kind of cool to share it with you guys and girls.

Default Format

By default, the netmask is in a bit count format – meaning slash and bit count. The example of bit count format is shown below. Please look at the highlighted part of the show outputs.

R1#sh int s0/0
Serial0/0 is up, line protocol is up
  Hardware is GT96K Serial
  Internet address is 192.168.1.1/24
  MTU 1500 bytes, BW 1544 Kbit/sec, DLY 20000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation HDLC, loopback not set
  Keepalive set (10 sec)
  Last input 00:00:01, output 00:00:07, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: weighted fair
  Output queue: 0/1000/64/0 (size/max total/threshold/drops)
     Conversations  0/1/256 (active/max active/max total)
     Reserved Conversations 0/0 (allocated/max allocated)
     Available Bandwidth 1158 kilobits/sec
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     368 packets input, 24236 bytes, 0 no buffer
     Received 185 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     415 packets output, 23696 bytes, 0 underruns
     0 output errors, 0 collisions, 8 interface resets
     0 unknown protocol drops
     0 output buffer failures, 0 output buffers swapped out
     0 carrier transitions
     DCD=up  DSR=up  DTR=up  RTS=up  CTS=up
R1#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
C    192.168.1.0/24 is directly connected, Serial0/0

Configuration

Configuring is really easy. There are two more formats that you can choose from, as shown below.

R2(config)#line con 0
R2(config-line)#ip netmask-format ?
  bit-count    Display netmask as number of significant bits
  decimal      Display netmask in dotted decimal
  hexadecimal  Display netmask in hexadecimal

Verification

As the command names imply, they can be used as bit-count or slash, decimal or dotted, or hexadecimal format. I am sure that you already know how it will look like, but for completeness’ sake I am including the show outputs on both decimal and hexadecimal format.

R2#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
C    192.168.1.0 255.255.255.0 is directly connected, Serial0/0
R2#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
C    192.168.1.0 0xFFFFFF00 is directly connected, Serial0/0

Thoughts

This is not a CCIE content in my opinion, but this may be good for someone who is struggling with bit-count format. Another purpose I can think of is when you want to have fun with your colleague(s), then change the format to hexadecimal to throw him/her off. Though, I suggest that you only do this on a lab environment. Changing it to hexadecimal on a production environment while someone is troubleshooting a routing problem may upset your colleague! Worst case scenario, you may get fired for pulling a stunt like this.

Disclosure

NetworkJutsu.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.

  • Share on Twitter Share on Twitter
  • Share on Facebook Share on Facebook
  • Share on LinkedIn Share on LinkedIn
  • Share on Reddit Share on Reddit
  • Share via Email Share via Email

Filed Under: General Tagged With: Cisco, IOS

Link Layer Discovery Protocol (LLDP)

02/12/2013 By Andrew Roderos Leave a Comment

  • Share on Twitter Share on Twitter
  • Share on Facebook Share on Facebook
  • Share on LinkedIn Share on LinkedIn
  • Share on Reddit Share on Reddit
  • Share via Email Share via Email

Cisco Network Academy students, Cisco certified folks, and network professionals know what Cisco Discovery Protocol (CDP) is. Ask them what LLDP is then there’s a good chance that majority of them will say “what’s that?”. For simplicity’s sake, Link Layer Discovery Protocol (LLDP) is an IEEE standard discovery protocol that is similar to Cisco Discovery Protocol (CDP). Need to learn more about it? Please head over to Cisco’s documentation and here’s one that I found.

Usage

For the most part, I think you’re going to see more of CDP than LLDP. However, if you work in an organization that has multivendor network devices then you may be solely going to use LLDP. Some of organizations that do have multivendor network devices run both of CDP and LLDP concurrently. I’d tell you this much though, out of the three organizations I work(ed) for, my current employer is the only one that is running LLDP for majority of the network devices.

Configuration

Configuring LLDP is pretty much exactly the same as CDP. You just need to change the cdp part to lldp of the commands. While CDP is enabled by default, LLDP is not – at least that’s what it says on Cisco’s documentation. When I tried it on a Catalyst 3750, the LLDP was globally enabled by default. It doesn’t really matter if it is globally enabled or not. Entering the command twice doesn’t affect anything. If you are really curious what’s going to happen when it is not globally enabled then it should look like the one shown below.

         --- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]: no
Would you like to terminate autoinstall? [yes]: yes
Switch>sho lldp neigh
% LLDP is not enabled

As you can see, it is pretty much exactly the same as the CDP equivalent command in the verification standpoint. As mentioned, the configuration part is pretty much the same as well, as shown below.

Switch2(config)#lldp ?
  holdtime    Specify the holdtime (in sec) to be sent in packets
  reinit      Delay (in sec) for LLDP initialization on any interface
  run         Enable LLDP
  timer       Specify the rate at which LLDP packets are sent (in sec)
  tlv-select  Selection of LLDP TLVs to send
Switch2(config)#lldp run
Switch2(config)#end

Verification

Once LLDP is running, you can now do some show commands. Again, the commands are pretty much the same as the CDP, so whatever you can think of the commands that you use with CDP just replace the “cdp” to “lldp”. While the commands are pretty much the same, the output is slightly different. One interesting field is the capability column. With LLDP, it doesn’t say what type of a device and/or platform that is connected to the local switch, unlike CDP. If you are really curious about what type the device is connected to the local switch then you can always use the show lldp neighbor with the detail keyword as shown below. With the detail keyword, the system capability is now listed.

Switch2#sh lldp neigh
Capability codes:
    (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
    (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID           Local Intf     Hold-time  Capability      Port ID
Switch1             Fa1/0/48       120                        Gi4/0/48
Switch2#sh cdp neigh
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
Switch1          Gig 4/0/48        123           S I      WS-C3750- Fas 1/0/48
Switch5>sh lldp neigh g1/0/7 d
Chassis id: 0000.1111.2222
Port id: Gi0/1
Port Description: GigabitEthernet0/1
System Name: Switch3
System Description: 
Cisco IOS Software, C3560 Software (C3560-IPBASEK9-M), Version 12.2(37)SE1, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Thu 05-Jul-07 22:22 by antonino
Time remaining: 115 seconds
System Capabilities: B,R
Enabled Capabilities - not advertised
Management Addresses:
    IP: 192.168.0.55
Auto Negotiation - supported, enabled
Physical media capabilities:
    Other/unknown
Media Attachment Unit type: 22
---------------------------------------------
Total entries displayed: 1

Here’s another show lldp neighbor output on a different switch that is in production (changed hostname and other information to protect the innocent) with Juniper switch connected to it.

Cisco>sh lldp neigh
Capability codes:
    (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
    (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
Device ID           Local Intf     Hold-time  Capability      Port ID
Cisco-switch-1      Gi1/0/7        120                        Gi0/1
Juniper-switch1     Gi2/0/1        120        B,R             666
Juniper-switch1     Gi1/0/1        120        B,R             531
Total entries displayed: 3
Cisco>sh lldp neigh g2/0/1 d
Chassis id: 1234.1234.1234
Port id: 666
Port Description:
System Name: Juniper-switch1
System Description: 
Juniper Networks, Inc. ex4200-24f , version 10.4R5.5 Build date: 2011-06-14 04:09:33 UTC 
Time remaining: 111 seconds
System Capabilities: B,R
Enabled Capabilities: B,R
Management Addresses:
    IP: 192.168.1.100
    OID:
        01 03 06 01 02 01 1F 01 01 01 01 24
Auto Negotiation - supported, enabled
Physical media capabilities:
    1000baseX(FD)
    1000baseT(FD)
Media Attachment Unit type - not advertised
MED Information:
    MED Codes:
          (NP) Network Policy, (LI) Location Identification
          (PS) Power Source Entity, (PD) Power Device
          (IN) Inventory
    Inventory information - not advertised
    Capabilities: NP, LI, PS
    Device type: Network connectivity
    Network Policies - not advertised
    Power requirements - not advertised
---------------------------------------------
Total entries displayed: 1

This time, the capability column did include B (Bridge) and R (Router) for a non-Cisco device on show lldp neighbor output. If you need to know the model of the device connected to the local switch, then you need to issue the detail command also shown above.

LLDP is also useful when you’re running non-Cisco IP phones in a Cisco switched environment. This would’ve been perfect in my old employer since the switches were Cisco and the IP phones were Avaya. Even though we run mostly Cisco switches and IP phones in my current employer, the devices are generally not using CDP but LLDP.

Thoughts

Some network professionals would be tempted to run both CDP and LLDP concurrently, I do not recommend it. I’d say just stick with one protocol so you’re not starting another service that may be vulnerable with exploits. Most Information Security folks are not so fond of people just turning services just for the heck of it. That being said, pick one that is suitable with your environment and stick with it. If you need to add devices in the future that is not Cisco then I’d suggest to explore turning LLDP globally and disabling CDP globally.

Disclosure

NetworkJutsu.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.

  • Share on Twitter Share on Twitter
  • Share on Facebook Share on Facebook
  • Share on LinkedIn Share on LinkedIn
  • Share on Reddit Share on Reddit
  • Share via Email Share via Email

Filed Under: General Tagged With: Cisco, IOS

TACACS+ (tac_plus daemon) ACL

10/29/2012 By Andrew Roderos 15 Comments

  • Share on Twitter Share on Twitter
  • Share on Facebook Share on Facebook
  • Share on LinkedIn Share on LinkedIn
  • Share on Reddit Share on Reddit
  • Share via Email Share via Email

I covered how to install and configure TACACS+ (tac_plus) on Ubuntu here. In this blog post, I am going to cover how to deny a group in accessing a network device or group of network devices. Yes, you can certainly restrict IPs using ACL on routers, switches, or ASA firewalls. However, if your security policy is to use a jump server to connect to network devices, then that jump server’s IP will not be blocked and users are still allowed. With this guide, you’ll be able to restrict access to network devices by user or group using your tac_plus server.

Configuration

This guide assumes you know how to configure TACACS+ (tac_plus) daemon. If you haven’t had a chance to work on this then please feel free to visit it here. Without further ado, here’s the configuration on how to restrict a group of users on a particular network device.

group = Test {
        default service = deny
        acl = test_acl
        service = exec {
        priv-lvl = 2
        }
}
acl = test_acl {
        deny = 192.168.12.100
        permit = .*
}

The above configuration restricts the group called Test in accessing a network device with an IP address of 192.168.12.100. The IP address that is needed in the tac_plus.conf needs to be the IP address of the source interface (ip tacacs source-interface interface_type_here) that you configured on your network device. If the TACACS+ source interface IP address doesn’t match the one in the tac_plus.conf, then any other IP address of that network device can be used to connect and the group will be allowed to access it.

Below is an example of a user that is member of the Test group trying to access the network device and was denied.

networkjutsu@tacacs:~$ ssh -l test 192.168.12.100
test@192.168.12.100's password:
Permission denied, please try again.
test@192.168.12.100's password:
Permission denied, please try again.
test@192.168.12.100's password:
Permission denied (password).

The example config below is how to restrict group(s) using regex (regular expressions). If you’re not a scripter/programmer like me then please feel free to use cheat sheet found here. For more detailed info, regex is covered in CCIE Routing and Switching Certification Guide book by Wendell Odom.

group = Test {
        default service = deny
        acl = test_acl
        service = exec {
        priv-lvl = 2
        }
}
acl = test_acl {
        deny = 172.17.99.[0-9]
        deny = 172.24.64\.50$
        permit = .*
}

Here’s an attempt of a member of Test group being denied.

networkjutsu@tacacs1:~$ ssh -l test 172.17.99.50
Password:
Password:
Password:
test@172.17.99.50's password:
Permission denied, please try again.
test@172.17.99.50's password:
Permission denied, please try again.
test@172.17.99.50's password:
Permission denied (keyboard-interactive,password).
networkjutsu@tacacs1:~$ ssh -l test 172.17.99.17
test@172.17.99.17's password:
Permission denied, please try again.
test@172.17.99.17's password:
Permission denied, please try again.
test@172.17.99.17's password:
Permission denied (password).
networkjutsu@tacacs1:~$ ssh -l test 172.17.99.3
test@172.17.99.3's password:
Permission denied, please try again.
test@172.17.99.3's password:
Permission denied, please try again.
test@172.17.99.3's password:
Permission denied (password).
networkjutsu@tacacs1:~$ ssh -l test 172.24.64.50
Password:
Password:
Password:
test@172.24.64.50's password:
Connection closed by 172.24.64.50

If you noticed, the first attempt (172.17.99.50) had more prompts than others. This might be a bug on an IOS, due to the device type, or just how this particular IOS/device behaves with the tac_plus. Unfortunately, I didn’t dig deeper enough. In any case, tac_plus denied access to the device.

With this config, it allows an organization to give out privilege access to certain users or groups but still be able to deny access to certain devices. For example, an organization may allow the NOC employees to make changes on access layer routers/switches but are not allowed to connect to distribution and core routers/switches and ASA firewalls.

Hope this has been helpful and thank you for reading!

You might also like to read

How to build and configure tac_plus
Adding two-factor authentication to TACACS+

Reference

TACACS+ daemon

Disclosure

NetworkJutsu.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.

  • Share on Twitter Share on Twitter
  • Share on Facebook Share on Facebook
  • Share on LinkedIn Share on LinkedIn
  • Share on Reddit Share on Reddit
  • Share via Email Share via Email

Filed Under: Security Tagged With: AAA, Network Security, tac_plus, TACACS+, Ubuntu

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 8
  • Page 9
  • Page 10
  • Page 11
  • Page 12
  • Interim pages omitted …
  • Page 18
  • Go to Next Page »

Footer

WORK WITH US

Schedule a free consultation now!

LET’S TALK

Copyright © 2011–2026 · NetworkJutsu · All Rights Reserved · Privacy Policy · Terms of Use