<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Networking Blog &#187; Cisco</title>
	<atom:link href="http://blog.webdir.bg/tag/cisco-tutorials-howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.webdir.bg</link>
	<description>Networking - Cisco, Juniper, Linux</description>
	<lastBuildDate>Thu, 02 Feb 2012 21:09:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Cisco ME-3400G multicast routing</title>
		<link>http://blog.webdir.bg/cisco-me-3400g-multicast-routing/</link>
		<comments>http://blog.webdir.bg/cisco-me-3400g-multicast-routing/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 15:58:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[multicast]]></category>
		<category><![CDATA[multicast routing]]></category>

		<guid isPermaLink="false">http://blog.webdir.bg/?p=405</guid>
		<description><![CDATA[Cisco ME-3400G working multicast routing.]]></description>
			<content:encoded><![CDATA[<p>First we need to allow multicast routing:</p>
<pre>ip multicast-routing distributed</pre>
<p>In our example we have two vlans:<br />
VLAN 3000 &#8211; clients that will receive multicast traffic<br />
VLAN 4000 &#8211; in this VLAN are sources of multicast traffic<br />
enter the following commands:</p>
<pre>ip igmp snooping querier
ip igmp snooping vlan 3000 mrouter learn cgmp
ip igmp snooping vlan 4000 mrouter learn cgmp</pre>
<p><span id="more-405"></span><br />
According Cisco&#8217;s official documentation: &#8220;A querier is a network device that sends query messages to discover which network devices are members of a given multicast group.&#8221;<br />
The next two lines configure VLAN 3000 and VLAN 4000 as multicast router port (static connection to a multicast router) and to learn sooping from CGMP (Cisco Group Management Protocol) self-join packets.<br />
Configuration of VLAN interfaces 3000 and 4000</p>
<pre>interface Vlan3000
 description multicast_client
 ip address 172.20.20.1 255.255.255.0
 ip pim dense-mode
!
interface Vlan4000
 description source_multicast
 ip address 150.158.231.111 255.255.0.0
 ip pim dense-mode
!</pre>
<p>You can read this article about <a href="http://www.netcraftsmen.net/resources/archived-articles/376-pim-dense-mode.html" target="_blank">pim dense-mode</a>.<br />
To view IGMP grops:</p>
<pre>sh ip igmp groups
226.168.20.44    Vlan3000                 5d04h     00:02:38  172.20.20.6
226.168.20.45    Vlan3000                 2d03h     00:02:35  172.20.20.6
226.168.20.46    Vlan3000                 1d14h     00:02:34  172.20.20.6
226.168.20.47    Vlan3000                 2d11h     00:02:41  172.20.20.6
226.168.20.49    Vlan3000                 00:58:13  00:02:38  172.20.20.9
226.168.20.48    Vlan3000                 1d14h     00:02:40  172.20.20.6
226.168.20.51    Vlan3000                 00:58:13  00:02:39  172.20.20.9
226.168.20.50    Vlan3000                 00:58:13  00:02:40  172.20.20.9
226.168.20.53    Vlan3000                 00:58:13  00:02:33  172.20.20.9
226.168.20.52    Vlan3000                 00:58:13  00:02:39  172.20.20.9
226.168.20.55    Vlan3000                 1d14h     00:02:41  172.20.20.6
226.168.20.54    Vlan3000                 00:58:13  00:02:35  172.20.20.9
226.168.20.57    Vlan3000                 1d14h     00:02:36  172.20.20.6</pre>
<p>To view membership</p>
<pre>multicast#sh ip igmp membership all
Flags: A  - aggregate, T - tracked
       L  - Local, S - static, V - virtual, R - Reported through v3
       I - v3lite, U - Urd, M - SSM (S,G) channel
       1,2,3 - The version of IGMP, the group is in
Channel/Group-Flags:
       / - Filtering entry (Exclude mode (S,G), Include mode (G))
Reporter:
        - last reporter if group is not explicitly tracked
       /      -  reporter in include mode,  reporter in exclude
 *,226.168.20.27                172.20.20.6     1d14h    02:37 2A     Vl3000
 *,226.168.20.26                172.20.20.6     1d14h    02:30 2A     Vl3000
 *,226.168.20.37                172.20.20.6     1d14h    02:32 2A     Vl3000
 *,226.168.20.40                172.20.20.6     2d03h    02:28 2A     Vl3000
 *,226.168.20.41                172.20.20.6     2d03h    02:31 2A     Vl3000
 *,226.168.20.43                172.20.20.6     1d14h    02:30 2A     Vl3000
 *,226.168.20.44                172.20.20.6     5d04h    02:34 2A     Vl3000
 *,226.168.20.45                172.20.20.6     2d03h    02:28 2A     Vl3000
 *,226.168.20.46                172.20.20.6     1d14h    02:34 2A     Vl3000
 *,226.168.20.47                172.20.20.6     2d11h    02:32 2A     Vl3000
 *,226.168.20.49                172.20.20.9     01:00:18 02:28 2A     Vl3000
 *,226.168.20.48                172.20.20.6     1d14h    02:33 2A     Vl3000
 *,226.168.20.51                172.20.20.9     01:00:18 02:29 2A     Vl3000
 *,226.168.20.50                172.20.20.9     01:00:18 02:35 2A     Vl3000
 *,226.168.20.53                172.20.20.9     01:00:18 02:31 2A     Vl3000</pre>
<p>To view snooping groups</p>
<pre>multicast#sh ip igmp snooping groups
Vlan      Group                    Type        Version     Port List
-----------------------------------------------------------------------
3000      226.168.1.1              igmp                    Gi0/6
3000      226.168.1.2              igmp                    Gi0/4
3000      226.168.1.3              igmp                    Gi0/4
3000      226.168.1.4              igmp                    Gi0/4
3000      226.168.1.6              igmp                    Gi0/6
3000      226.168.1.7              igmp                    Gi0/6
3000      226.168.1.9              igmp                    Gi0/6
3000      226.168.1.10             igmp                    Gi0/4
3000      226.168.1.12             igmp                    Gi0/4
3000      226.168.1.13             igmp                    Gi0/4
3000      226.168.1.14             igmp                    Gi0/4
3000      226.168.1.15             igmp                    Gi0/4
3000      226.168.1.16             igmp                    Gi0/4
3000      226.168.1.17             igmp                    Gi0/4
3000      226.168.1.18             igmp                    Gi0/4
3000      226.168.1.19             igmp                    Gi0/4
3000      226.168.1.22             igmp                    Gi0/6
3000      226.168.1.23             igmp                    Gi0/4
3000      226.168.1.24             igmp                    Gi0/4
3000      226.168.1.26             igmp                    Gi0/6
3000      226.168.1.28             igmp                    Gi0/6
3000      226.168.1.30             igmp                    Gi0/4</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.webdir.bg/cisco-me-3400g-multicast-routing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Linux and Cisco switch link aggregation (load balancing, bonding)</title>
		<link>http://blog.webdir.bg/ubuntu-linux-and-cisco-switch-link-aggregation-load-balancing-bonding/</link>
		<comments>http://blog.webdir.bg/ubuntu-linux-and-cisco-switch-link-aggregation-load-balancing-bonding/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 15:19:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[802.3ad]]></category>
		<category><![CDATA[bonding]]></category>
		<category><![CDATA[link aggregation]]></category>

		<guid isPermaLink="false">http://blog.webdir.bg/?p=201</guid>
		<description><![CDATA[Tutorial how to balance traffic between Cisco switch 3750 and Ubuntu linux with two NICs, using bonding and port channel interface.]]></description>
			<content:encoded><![CDATA[<p>Link aggregation between Cisco 3750 switch and Ubintu 9.10<br />
Ubuntu configuration:<br />
Install ifenslave — Attach and detach slave network devices to a bonding device.</p>
<pre>apt-get install  ifenslave</pre>
<p>Edit or create file /etc/modprobe.d/aliases.conf</p>
<pre>alias bond0 bonding
options bonding mode=4 miimon=100</pre>
<p>where mode 4 &#8211; IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and<br />
duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.<br />
Edit /etc/network/interfaces.</p>
<pre>auto bond0
iface bond0 inet static
        address 192.168.200.5
        netmask 255.255.255.0
        network 192.168.200.0
        broadcast 192.168.200.255
        post-up ifenslave bond0 eth0 eth1
        gateway 192.168.200.1
        dns-nameservers 192.168.200.1
        dns-search example.com</pre>
<p><strong>UPDATE (02.01.2012): </strong>Ubuntu 11.10 (oneiric).</p>
<p><span id="more-201"></span></p>
<p>1.  Edit or create file /etc/modprobe.d/aliases.conf</p>
<pre>alias netdev-bond0 bonding
options bonding mode=4 miimon=100</pre>
<p>or</p>
<p>2. To run bonding first put module &#8220;bonding&#8221; in &#8220;/etc/modules&#8221; :</p>
<pre># /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
loop
lp
rtc
bonding</pre>
<p>In &#8220;/etc/network/interfaces&#8221;</p>
<pre>auto bond0
iface bond0 inet static
        slaves eth0 eth1
        bond_mode 4
        bond_miimon 100
        address 192.168.200.5
        netmask 255.255.255.0
        network 192.168.200.0
        broadcast 192.168.200.255
        post-up ifenslave bond0 eth0 eth1</pre>
<p>Cisco configuration ( Gi1/0/1 and Gi1/0/2 will be aggregated ):</p>
<pre>cisco-3750(config)#interface range GigabitEthernet 1/0/1, GigabitEthernet 1/0/2
cisco-3750(config-if-range)#switchport trunk encapsulation dot1q
cisco-3750(config-if-range)#switchport trunk allowed vlan 10,20
cisco-3750(config-if-range)#switchport mode trunk
cisco-3750(config-if-range)#<strong>channel-group 1 mode active</strong>
<strong>Creating a port-channel interface Port-channel 1</strong>
cisco-3750(config-if-range)#end
cisco-3750#</pre>
<p>Configuration of interface Port-Channel 1 must be exactly the same as Gi1/0/1 and Gi1/0/2.</p>
<pre>cisco-3750#sh ru int Po1
Building configuration...
Current configuration : 159 bytes
!
interface Port-channel1
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 10,20
end</pre>
<p>If you want to modify configuration of aggregated interfaces, modify <strong>only configuration of Port-Channel</strong> interface.<br />
And the last step is to set <strong>load-balance</strong> algorithm:</p>
<pre>cisco-3750(config)#port-channel load-balance src-dst-ip
cisco-3750#sh etherchannel load-balance
EtherChannel Load-Balancing Operational State (src-dst-ip):
Non-IP: Source XOR Destination MAC address
  IPv4: Source XOR Destination IP address
  IPv6: Source XOR Destination IP address

cisco-3750#show etherchannel summary
Flags:  D - down        P - in port-channel
        I - stand-alone s - suspended
        H - Hot-standby (LACP only)
        R - Layer3      S - Layer2
        U - in use      f - failed to allocate aggregator
        u - unsuitable for bundling
        w - waiting to be aggregated
        d - default port

Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SU)         LACP      Gi1/0/1(P)  Gi1/0/2(P)

cisco-3750#
cisco-3750#show etherchannel protocol
                Channel-group listing:
                ----------------------
Group: 1
----------
Protocol:  LACP</pre>
<p>Traffic on Gi1/0/1</p>
<p style="text-align: center;"><a class="thickbox" href="http://blog.webdir.bg/wp-content/uploads/2010/01/gi1.png"><img class="size-full wp-image-233 aligncenter" title="gi1" src="http://blog.webdir.bg/wp-content/uploads/2010/01/gi1.png" alt="" width="603" height="242" /></a></p>
<p>Traffic on Gi1/0/2</p>
<p><a class="thickbox" href="http://blog.webdir.bg/wp-content/uploads/2010/01/gi2.png"><img class="aligncenter size-full wp-image-236" title="gi2" src="http://blog.webdir.bg/wp-content/uploads/2010/01/gi2.png" alt="" width="603" height="242" /></a></p>
<p>Traffic on Port-Channel1</p>
<p><a class="thickbox" href="http://blog.webdir.bg/wp-content/uploads/2010/01/po.png"><img class="aligncenter size-full wp-image-237" title="po" src="http://blog.webdir.bg/wp-content/uploads/2010/01/po.png" alt="" width="603" height="242" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webdir.bg/ubuntu-linux-and-cisco-switch-link-aggregation-load-balancing-bonding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cisco &#8220;gbic-invalid error detect&#8221;</title>
		<link>http://blog.webdir.bg/cisco-gbic-invalid-error-detect/</link>
		<comments>http://blog.webdir.bg/cisco-gbic-invalid-error-detect/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 12:57:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco]]></category>

		<guid isPermaLink="false">http://blog.webdir.bg/?p=189</guid>
		<description><![CDATA[Using third party SFP on Cisco switches. Cisco undocumented command - "service unsupported-transceiver"]]></description>
			<content:encoded><![CDATA[<p>After  putting SFP in GBIC, Cisco 3750 reports:</p>
<pre>%PM-4-ERR_DISABLE: gbic-invalid error detected on Gi0/2, putting Gi0/2 in err-disable state</pre>
<p>This can happen if you are using  third party SFP (non-cisco). The solution is to use undocumented command.<br />
First enter command:</p>
<pre>no errdisable detect cause gbic-invalid</pre>
<p>and second command:</p>
<pre>service unsupported-transceiver</pre>
<p>There is no autocomplete for this command and no guarantee, but try it &#8230; It works for me on Cisco 3750.<br /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.webdir.bg/cisco-gbic-invalid-error-detect/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>cisco backup configuration</title>
		<link>http://blog.webdir.bg/cisco-backup-configuration/</link>
		<comments>http://blog.webdir.bg/cisco-backup-configuration/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 09:28:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[backup config]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[snmp]]></category>

		<guid isPermaLink="false">http://blog.webdir.bg/?p=97</guid>
		<description><![CDATA[Detail tutorial how to automate backup of Cisco switch configuration, using MySQL, SNMP and PERL.]]></description>
			<content:encoded><![CDATA[<p>One simple method to backup Cisco&#8217;s configuration using SNMP and PERL. Download manually  from search.cpan.org  PERL library Cisco::CopyConfig  . Another way of installing:</p>
<pre>perl -MCPAN -e 'install Cisco::CopyConfig'</pre>
<p>Cisco::CopyConfig provides methods for manipulating the running-config of devices running IOS via SNMP directed TFTP. This module is essentially a wrapper for Net::SNMP and the CISCO-CONFIG-COPY-MIB-V1SMI.my MIB schema.<br />
It&#8217;s a good idea to store switch&#8217;s ip address ( if you have more switches ) in database like MySQL. The following perl script uses MySQL database. In MySQL database we store switch&#8217;s ip and snmp community.<br />
MySQL table:<span id="more-97"></span></p>
<pre> CREATE TABLE `sw_backup`.`switches` (
`id` BIGINT( 128 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`description` VARCHAR( 128 ) NOT NULL ,
`ip_address` VARCHAR( 128 ) NOT NULL ,
`community` VARCHAR( 128 ) NOT NULL
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_bin

insert into switches values('','core-switch','192.168.200.251','SNMPconfigCommunity1');
insert into switches values('','access-switch','192.168.200.252','SNMPconfigCommunity2');

mysql&gt; select * from switches;
+----+---------------+-----------------+----------------------+
| id | description   | ip_address      | community            |
+----+---------------+-----------------+----------------------+
|  1 | core-switch   | 192.168.200.251 | SNMPconfigCommunity1 |
|  2 | access-switch | 192.168.200.252 | SNMPconfigCommunity2 |
+----+---------------+-----------------+----------------------+
2 rows in set (0.00 sec)</pre>
<p>We need to istall TFTP server:</p>
<pre>on Debian: apt-get install atftp</pre>
<p>TFTP config file (/etc/default/atftpd):</p>
<pre>USE_INETD=true
OPTIONS="--tftpd-timeout 300 --retry-timeout 5  --maxthread 100 --verbose=5 /backup_switch"</pre>
<p>TFTP working directory is /backup_switch<br />
Configuring Cisco switch ( tested on C2960G, C3750G, 3400G ):<br />
A read-write SNMP community needs to be defined on each device, which allows the setting of parameters to copy or merge a running-config. Below is an example configuration that attempts to restrict read-write access to only the 192.168.200.10 (tftp server) host :</p>
<pre>access-list 70 remark tft-server-list
access-list 70 permit 192.168.200.10
access-list 70 deny   any</pre>
<p>SNMP configuration:</p>
<pre>snmp-server tftp-server-list 70
snmp-server view backup ciscoMgmt.96.1.1.1.1 included
snmp-server community SNMPconfigCommunity1 view backup RW 70</pre>
<p>Variables used in cisco backup script:<br />
/backup_switch &#8211; tftp root directory<br />
/storage/backup/daily/switches/ &#8211; backup directory<br />
Backup script:</p>
<pre class="brush: perl; title: ; notranslate">
#!/usr/bin/perl
use DBI;
use Cisco::CopyConfig;

my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)=localtime(time);
$year+=1900;
$mon  = sprintf(&quot;%02d&quot;,$mon+1);
$mday = sprintf(&quot;%02d&quot;,$mday);
$hour = sprintf(&quot;%02d&quot;,$hour);
$min  = sprintf(&quot;%02d&quot;,$min);
$sec  = sprintf(&quot;%02d&quot;,$sec);
$date_format=&quot;$mday.$mon.$year&quot;;

$sql=&quot;select ip_address,community,description from switches order by inet_aton(ip_address) asc&quot;;
$dbh = DBI-&gt;connect(&quot;dbi:mysql:sw_backup:xxx.xxx.xxx.xxx&quot;,&quot;username&quot;,&quot;password&quot;) or die &quot;Can't connect to MySQL: $DBI::errstr\n&quot;;
$sth = $dbh-&gt;prepare($sql);
$sth-&gt;execute();

$tftp_address   = '192.168.200.10';

while (@row=$sth-&gt;fetchrow_array) {
 $config     = Cisco::CopyConfig-&gt;new(
 Host =&gt; $row[0],   # host
 Comm =&gt; $row[1], # community
 Tmout =&gt; '10',       # timeout
 Retry =&gt; '2'           # retry
 );

 $tftp_file = &quot;$row[2].$date_format.conf&quot;;

 if ($config-&gt;copy($tftp_address, $tftp_file) ) {
 print &quot;OK -&gt; switch ip: $row[0], file: $tftp_file\n&quot;; }
 else {
 print &quot;ERROR -&gt; switch ip: $row[0], no backup file\n&quot;;
 }

}

system(&quot;mkdir /storage/backup/daily/switches/$date_format&quot;);
system(&quot;cp /backup_switch/cisco-* /storage/backup/daily/switches/$date_format&quot;);
</pre>
<p>Result:</p>
<pre>sns ~ # perl cisco-backup.pl
OK -&gt; switch ip: 192.168.200.251, file: core-switch.19.01.2010.conf
OK -&gt; switch ip: 192.168.200.252, file: access-switch.19.01.2010.conf

sns ~ # tail -n 100 /var/log/syslog | grep tftp
Jan 19 15:56:53 sns atftpd[7848]: Fetching from 192.168.200.251 to core-switch.19.01.2010.conf
Jan 19 15:56:55 sns atftpd[7848]: Fetching from 192.168.200.252 to access-switch.19.01.2010.conf</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.webdir.bg/cisco-backup-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cisco 1800 configure tagged vlan on WAN interface</title>
		<link>http://blog.webdir.bg/cisco-1800-configure-tagged-vlan-on-wan-interface/</link>
		<comments>http://blog.webdir.bg/cisco-1800-configure-tagged-vlan-on-wan-interface/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 15:12:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[dot1.q]]></category>
		<category><![CDATA[tagged vlan]]></category>
		<category><![CDATA[vlan]]></category>

		<guid isPermaLink="false">http://blog.webdir.bg/?p=75</guid>
		<description><![CDATA[A brief tutorial how to configure dot.1q ( tagged vlan )  Layer3 interface on Cisco 1800 series. ( on WAN interface ).  ]]></description>
			<content:encoded><![CDATA[<p>A brief tutorial how to configure dot.1q ( tagged vlan )  Layer3 interface on Cisco 1800 series. ( on WAN interface ).  First will create vlan 777 in vlan database</p>
<pre>cisco1800#vlan database
cisco1800(vlan)vlan 777
VLAN 777 added:
    Name: VLAN0777
cisco1800(vlan)#
cisco1800(vlan)#vlan 777 name dot1q_vlan_on_WAN_interface
VLAN 777 modified:
    Name: dot1q_vlan_on_WAN_interface</pre>
<p>Now verify vlan:</p>
<pre>cisco1800#show vlan-switch

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa4
2    Servers                          active    Fa1, Fa2
3    SERVICE                          active    Fa3
5    VLAN0005                         active
99   VLAN0099                         active
777  dot1q_vlan_on_WAN_interface      active
1002 fddi-default                     active
1003 token-ring-default               active
1004 fddinet-default                  active
1005 trnet-default                    active</pre>
<p>The last step is to create the tagged subinterface  on FastEthernet0:<span id="more-75"></span></p>
<pre>cisco1800(config)#interface FastEthernet 0.777</pre>
<p>After the interface number just enter &#8220;.&#8221; (dot ) and vlan id.</p>
<pre>cisco1800(config-subif)#encapsulation dot1Q 777
cisco1800(config-subif)#ip address xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx</pre>
<p>View configuration:</p>
<pre>cisco1800#sh ru interface FastEthernet 0.777
interface FastEthernet0.777
 encapsulation dot1Q 100
 ip address xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx
 no snmp trap link-status</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.webdir.bg/cisco-1800-configure-tagged-vlan-on-wan-interface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco &#8211; rewrite DSCP (ToS) values</title>
		<link>http://blog.webdir.bg/cisco-rewrite-dscp-tos-values/</link>
		<comments>http://blog.webdir.bg/cisco-rewrite-dscp-tos-values/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 13:44:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[dscp]]></category>
		<category><![CDATA[rewrite dscp]]></category>
		<category><![CDATA[rewrite tos]]></category>
		<category><![CDATA[set dscp]]></category>
		<category><![CDATA[set dspc]]></category>
		<category><![CDATA[set tos]]></category>
		<category><![CDATA[tos]]></category>

		<guid isPermaLink="false">http://blog.webdir.bg/?p=5</guid>
		<description><![CDATA[Detailed tutorial how to rewrite DSCP (ToS) values on Cisco 3750 switch.]]></description>
			<content:encoded><![CDATA[<p>Rewriting DSCP (ToS) values    is tested on Cisco switch 3750:</p>
<pre>Ports  	   	Model  	   	    SW Version  	  SW Image
------ 	  	------ 	  	    ----------------- 	  ------------
52 	        WS-C3750G-48TS      12.2(25)SEE4 	  C3750-ADVIPSERVICESK</pre>
<p>By default QoS configuration is disabled:</p>
<pre>sw3750#sh mls qos
QoS is disabled
QoS ip packet dscp rewrite is enabled</pre>
<p>So we need to enable QoS:<br />
<span id="more-5"></span></p>
<pre>sw3750#conf t
sw3750(config)#mls qos
sw3750(config)#end

sw3750#sh mls qos
QoS is enabled
QoS ip packet dscp rewrite is enabled</pre>
<p>We need to create access list:</p>
<pre>sw3750#conf t
sw3750(config)#access-list 1 remark rewrite_dscp
sw3750(config)#access-list 1 permit any

sw3750#show access-lists 1
Standard IP access list 1
  10 permit any</pre>
<p>Now we&#8217;ll begin with real QoS, and use terms as &#8220;<strong>class map</strong>&#8221; and &#8220;<strong>policy map</strong>&#8220;. According Cisco&#8217;s official documentation:</p>
<p>A <strong>class map</strong> is a mechanism that you use to name a specific traffic flow (or class) and to isolate it from all other traffic. The class map defines the criteria used to match against a specific traffic flow to further classify it. The criteria can include matching the access group defined by the ACL or matching a specific list of DSCP or IP precedence values. If you have more than one type of traffic that you want to classify, you can create another class map and use a different name. After a packet is matched against the<br />
class-map criteria, you further classify it through the use of a policy map.</p>
<p>A <strong>policy map</strong> specifies which traffic class to act on. Actions can include trusting the CoS, DSCP, or IP precedence values in the traffic class; setting a specific DSCP or IP precedence value in the traffic class; or specifying the traffic bandwidth limitations and the action to take when the traffic is out of profile. Before a policy map can be effective, you must attach it to a port.</p>
<pre>sw3750(config)#class-map ?
   WORD class-map name
   match-all Logical-AND all matching statements under this classmap
   match-any Logical-OR all matching statements under this classmap
sw3750(config)#class-map match-all class-map-dscp
sw3750(config-cmap)#match access-group 1

sw3750#show class-map class-map-dscp
 Class Map match-all class-map-dscp (id 1)
   Match access-group 1</pre>
<p>After creting class-map, we need policy map. In this policy map we&#8217;ll rewrite dscp value of packet: &#8220;set dscp af32&#8243; , this is ToS 0&#215;70</p>
<pre>sw3750(config)#policy-map vlan101
sw3750(config-pmap)#class class-map-dscp
sw3750(config-pmap-c)#set dscp af32

sw3750#sh policy-map vlan101
 Policy Map vlan101
  Class class-map-dscp
   set dscp af32</pre>
<p>OK, we created calss map and policy map, and now we&#8217;ll aplly them to interface.</p>
<pre>sw3750(config)#int vlan101
sw3750(config-if)#service-policy input vlan101

sw3750#sh ru int vlan101
interface Vlan101
  no ip address
  service-policy input vlan101
end</pre>
<p>On a trunk port apply next commands:</p>
<pre>sw3750(config)#int gi1/0/4
sw3750(config-if)#mls qos vlan-based

sw3750#sh ru int gi1/0/4
  interface GigabitEthernet1/0/4
  switchport trunk encapsulation dot1q
  switchport trunk allowed 101
  switchport mode trunk
  mls qos vlan-based
end</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.webdir.bg/cisco-rewrite-dscp-tos-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

