<?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>Sabin Shrestha&#039;s Personal Site &#187; Cisco</title>
	<atom:link href="http://www.sabinshrestha.com.np/cisco/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sabinshrestha.com.np</link>
	<description>IT Professional and Consultant</description>
	<lastBuildDate>Mon, 28 Jun 2010 20:27:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Configure Cisco Router</title>
		<link>http://www.sabinshrestha.com.np/cisco/configure-cisco-router/</link>
		<comments>http://www.sabinshrestha.com.np/cisco/configure-cisco-router/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 18:41:38 +0000</pubDate>
		<dc:creator>sabin</dc:creator>
				<category><![CDATA[Cisco]]></category>

		<guid isPermaLink="false">http://www.sabinshrestha.com.np/?p=114</guid>
		<description><![CDATA[Configure Password &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; 1. Change to global mode: config t 2. To Set enable password: enable password &#8220;chicagotech&#8217; 3. To set secret password: enable secret &#8220;ms-mvp&#8221; Note: 1: Enable secret password is encrypted by default. Enable password is not. 2: If both enable secret and enable password are specified, the enable secret overrides the enable [...]]]></description>
			<content:encoded><![CDATA[<p>Configure Password<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
1. Change to global mode: config t<br />
2. To Set enable password: enable password &#8220;chicagotech&#8217;<br />
3. To set secret password: enable secret &#8220;ms-mvp&#8221;</p>
<p>Note:<br />
1: Enable secret password is encrypted by default. Enable password is not.<br />
2: If both enable secret and enable password are specified, the enable secret overrides the enable password.</p>
<p>1. Set a console password to chicagotech<br />
1) Router(config)#line con 0<br />
Router(config-line)#login<br />
Router(config-line)#password chicagotech</p>
<p>2. Set a telnet password to chicagotech<br />
1) Router(config)#line vty 0 4<br />
2) Router(config-line)#login<br />
3) Router(config-line)#password chicagotech<br />
=================================================</p>
<p>Enable SNMP on PIX<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
I just installed Netflow to monitor our Internet traffic rate. I have enabled snmp on our Cisco PIX515. The netflow displays ?No devices have sent NetFlow exports to the software yet?. I am not sure the problem is PIX configuration or Netflow settings. How do I test the snmp settings in PIX?</p>
<p>access-list outside_in permit icmp any any unreachable<br />
access-list outside_in permit tcp any host 192.168.11.253 eq 3389<br />
access-list outside_in permit icmp any any echo-reply<br />
access-list outside_in permit icmp any any time-exceeded<br />
access-list outside_in permit tcp any host 192.168.10.10 eq 3389<br />
access-list 192_splitTunnelAcl permit ip LAN 255.255.255.0 any<br />
access-list inside_outbound_nat0_acl permit ip LAN 255.255.255.0 VPN 255.255.255<br />
.240<br />
access-list inside_outbound_nat0_acl permit ip LAN 255.255.255.0 any<br />
access-list outside_cryptomap_dyn_20 permit ip any VPN 255.255.255.240<br />
access-list outside_cryptomap_20 permit ip LAN 255.255.255.0 any<br />
pager lines 24<br />
logging on<br />
logging trap errors<br />
logging history informational<br />
logging device-id hostname<br />
mtu outside 1500<br />
mtu inside 1500<br />
ip address outside 192.168.10.254 255.255.255.0<br />
ip address inside 192.168.11.254 255.255.255.0<br />
ip audit info action alarm<br />
ip audit attack action alarm<br />
ip local pool VPN 192.168.21.1-192.168.21.9<br />
pdm location 192.168.11.253 255.255.255.255 inside<br />
pdm location VPN 255.255.255.0 inside<br />
pdm location LAN 255.255.255.0 outside<br />
pdm location VPN 255.255.255.0 outside<br />
pdm location LAN 255.255.255.255 inside<br />
pdm location RDC 255.255.255.255 inside<br />
pdm location 192.168.11.2 255.255.255.255 inside<br />
pdm location 192.168.10.104 255.255.255.255 outside<br />
pdm location 192.168.11.254 255.255.255.255 outside<br />
pdm history enable<br />
arp timeout 14400<br />
global (outside) 2 192.168.10.250-192.168.10.253<br />
global (outside) 1 interface<br />
nat (inside) 0 access-list inside_outbound_nat0_acl<br />
nat (inside) 1 0.0.0.0 0.0.0.0 0 0<br />
static (inside,outside) 192.168.11.253 192.168.11.253 netmask 255.255.255.255 0<br />
0<br />
static (inside,outside) 192.168.10.10 RDC netmask 255.255.255.255 0 0<br />
access-group outside_in in interface outside<br />
route outside 0.0.0.0 0.0.0.0 192.168.10.1 1<br />
timeout xlate 3:00:00<br />
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00<br />
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00<br />
timeout uauth 0:05:00 absolute<br />
aaa-server TACACS+ protocol tacacs+<br />
aaa-server RADIUS protocol radius<br />
aaa-server LOCAL protocol local<br />
http server enable<br />
http 0.0.0.0 0.0.0.0 outside<br />
http LAN 255.255.255.255 inside<br />
http LAN 255.255.255.0 inside<br />
snmp-server host outside 192.168.11.254<br />
snmp-server host inside 192.168.11.254<br />
no snmp-server location<br />
no snmp-server contact<br />
snmp-server community public<br />
snmp-server enable traps<br />
tftp-server outside 192.168.10.115 c:\<br />
floodguard enable<br />
sysopt connection permit-ipsec<br />
crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac<br />
crypto ipsec transform-set ESP-DES-MD5 esp-des esp-md5-hmac<br />
crypto dynamic-map outside_dyn_map 20 set transform-set ESP-3DES-MD5<br />
crypto map outside_map 20 ipsec-isakmp<br />
crypto map outside_map 20 match address outside_cryptomap_20<br />
crypto map outside_map 20 set peer 206.81.53.106<br />
crypto map outside_map 20 set transform-set ESP-3DES-MD5<br />
crypto map outside_map 65535 ipsec-isakmp dynamic outside_dyn_map<br />
crypto map outside_map interface outside<br />
isakmp enable outside<br />
isakmp key ******** address 206.81.53.106 netmask 255.255.255.255 no-xauth no-co<br />
nfig-mode<br />
isakmp nat-traversal 20<br />
isakmp policy 20 authentication pre-share<br />
isakmp policy 20 encryption 3des<br />
isakmp policy 20 hash md5<br />
isakmp policy 20 group 2<br />
isakmp policy 20 lifetime 86400<br />
vpngroup 192 address-pool VPN<br />
vpngroup 192 dns-server 4.2.2.1<br />
vpngroup 192 split-tunnel 192_splitTunnelAcl<br />
vpngroup 192 idle-time 1800<br />
vpngroup 192 password ********<br />
=====================================================</p>
<p>How to configure ASA to open port 3389 for TS<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
You need these two lines:</p>
<p>access-list outside_access_out extended permit tcp any host x.x.x.198 eq 3389</p>
<p>static (inside,outside) tcp interface 3389 10.0.3.2 3389 netmask 255.255.255.255</p>
<p>If you use ASDM, id for the Rule and if for the NAT<br />
======================================================</p>
<p>How to view and save PIX/ASA configuration<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1. &#8220;copy run start&#8221; and &#8220;write terminal&#8221; to save running-config to startup-config.<br />
2. &#8220;show startup-config to view the configuration in flash memory.<br />
3. &#8220;show running-config&#8221; and &#8220;write terminal&#8221; to view the current running configuration .<br />
========================================================</p>
<p>configure Cisco 831 router for two public IP addresse<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
The following is the sample of NAT on 831.</p>
<p>ip dhcp excluded-address 172.16.5.1 172.16.5.9<br />
ip dhcp excluded-address 172.16.5.51 172.16.5.254<br />
!<br />
ip dhcp pool sdm-pool1<br />
network 172.16.5.0 255.255.255.0<br />
default-router 172.16.5.1<br />
dns-server 4.2.2.1<br />
!<br />
!<br />
no ip bootp server<br />
ip inspect name sdm_ins_in_100 cuseeme<br />
ip inspect name sdm_ins_in_100 ftp<br />
ip inspect name sdm_ins_in_100 h323<br />
ip inspect name sdm_ins_in_100 netshow<br />
ip inspect name sdm_ins_in_100 rcmd<br />
ip inspect name sdm_ins_in_100 realaudio<br />
ip inspect name sdm_ins_in_100 rtsp<br />
ip inspect name sdm_ins_in_100 smtp<br />
ip inspect name sdm_ins_in_100 sqlnet<br />
ip inspect name sdm_ins_in_100 streamworks<br />
ip inspect name sdm_ins_in_100 tftp<br />
ip inspect name sdm_ins_in_100 tcp<br />
ip inspect name sdm_ins_in_100 udp<br />
ip inspect name sdm_ins_in_100 vdolive<br />
ip inspect name sdm_ins_in_100 icmp<br />
ip audit notify log<br />
ip audit po max-events 100<br />
no ftp-server write-enable<br />
!<br />
!<br />
!<br />
!<br />
!<br />
!<br />
!<br />
interface Ethernet0<br />
description $FW_INSIDE$$ETH-LAN$<br />
ip address 172.16.5.1 255.255.255.0<br />
no ip redirects<br />
no ip unreachables<br />
no ip proxy-arp<br />
ip nat inside<br />
no cdp enable<br />
!<br />
interface Ethernet1<br />
description $FW_OUTSIDE$$ETH-WAN$<br />
ip address 192.168.10.70 255.255.255.0<br />
no ip redirects<br />
no ip unreachables<br />
no ip proxy-arp<br />
ip nat outside<br />
ip inspect sdm_ins_in_100 in<br />
duplex auto<br />
no cdp enable<br />
!<br />
interface FastEthernet1<br />
no ip address<br />
duplex auto<br />
speed auto<br />
!<br />
interface FastEthernet2<br />
no ip address<br />
duplex auto<br />
speed auto<br />
!<br />
interface FastEthernet3<br />
no ip address<br />
duplex auto<br />
speed auto<br />
!<br />
interface FastEthernet4<br />
no ip address<br />
duplex auto<br />
speed auto<br />
!<br />
ip nat inside source list 1 interface Ethernet1 overload<br />
ip nat inside source static tcp 172.16.5.13 3389 192.168.10.70 3389 extendable<br />
ip nat inside source static tcp 172.16.5.13 3389 192.168.10.71 3389 extendable<br />
ip classless<br />
ip route 0.0.0.0 0.0.0.0 192.168.10.1 permanent<br />
ip http server<br />
ip http authentication local<br />
ip http secure-server<br />
!<br />
access-list 1 permit 172.0.0.0 0.255.255.255<br />
no cdp run<br />
banner login ^CCAuthorized access only!<br />
Disconnect IMMEDIATELY if you are not an authorized user!^C<br />
!<br />
line con 0<br />
login local<br />
no modem enable<br />
line aux 0<br />
line vty 0 4<br />
privilege level 15<br />
login local<br />
transport input telnet ssh<br />
!<br />
scheduler max-task-time 5000<br />
!<br />
end</p>
<p>831#<br />
===============================================</p>
<p>Reset a Cisco Router Back to Factory Defaults<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
chicagotech831#conf t<br />
Enter configuration commands, one per line. End with CNTL/Z.<br />
chicagotech831(config)#config-register 0&#215;2102<br />
chicagotech831(config)#end<br />
chicagotech831#wr erase<br />
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]<br />
[OK]<br />
Erase of nvram: complete<br />
chicagotech831#reload</p>
<p>System configuration has been modified. Save? [yes/no]: n<br />
Proceed with reload? [confirm]<br />
======================================</p>
<p>Router modes<br />
&#8212;&#8212;&#8212;&#8212;-<br />
User mode = Router&gt;<br />
Privileged mode = Router#<br />
Global configuration mode = Router(config)#<br />
Interface mode = Router(config-if)#<br />
Subinterface mode = Router(config-subif)#<br />
Line mode = Router(config-line)<br />
Router configuration mode = Router(config-router)#<br />
===============================================</p>
<p>Cisco Router Modes<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Router&gt; User mode</p>
<p>Router# Privileged mode (to chnage to Privileged mode, do Router&gt; enable)</p>
<p>Router(config)# Global configuration mode (Router# conf t)</p>
<p>Router(config-if)# interafce mode (Router(config)# interafce ethernet0)</p>
<p>Router(config-subif)# Subinterface mode<br />
Router(config-line)# Line mode<br />
Router(config-router)# Router configuration mode<br />
================================================</p>
<p>command lines<br />
&#8212;&#8212;&#8212;&#8212;&#8211;<br />
1. To verify the operation of a routing protocol<br />
show ip protocols</p>
<p>2. Display the IP routing table.<br />
show ip route<br />
=================================================</p>
<p>configure SSH for Secure Access<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
ChicagoTech&gt;En</p>
<p>Password:</p>
<p>ChicagoTech#conf terminal</p>
<p>Enter configuration commands, one per line.  End with CNTL/Z.</p>
<p>ChicagoTech(config)#hostname ChicagoTech</p>
<p>ChicagoTech(config)#ip domain-name howtocisco.com</p>
<p>ChicagoTech(config)#crypto key generate rsa</p>
<p>ChicagoTech(config)#ip ssh time-out 60</p>
<p>ChicagoTech(config)#ip ssh authentication-retries 4</p>
<p>ChicagoTech(config)#end</p>
<p>ChicagoTech#wr mem<br />
===================================================</p>
<p>Create a VTP domain<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
chicagotech&gt;en<br />
password:<br />
chicagotech#conf t<br />
chicagotech(config)#vtp mode server<br />
chicagotech(config)#vtp domain ms-mvps<br />
chicagotech(config)#vtp password chicagotech<br />
chicagotech(config)#end<br />
chicagotech&gt;copy running-config startup-config<br />
==================================================</p>
<p>find the Switch and Port You are connecting to<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1. Find my laptop Mac address by using ipconfig /all. It is 00-16-D4-BA-D7-77<br />
2. Telnet one of the switch and enable it.<br />
3. Type “show mac-address-table address 00-16-D4-BA-D7-77”, it display<br />
====================================================</p>
<p>Limit access #<br />
&#8212;&#8212;&#8212;&#8212;&#8212;<br />
With Cisco Port Security, you can configure the port to accept certain Mac addresses and an additionl access will be denied. In this case, our maximum access # is 15.</p>
<p>Chicagotech&gt;En<br />
Chicagotech&gt;password:<br />
Chicagotech#conf t<br />
Chicagotech(config)#interface fastethernet 0/9<br />
Chicagotech(config-if)#switchport mode access<br />
Chicagotech(config-if)#switchport port-security<br />
Chicagotech(config-if)#switchport port-security max 15<br />
Chicagotech(config-if)#switchport port-security violation protect<br />
Chicagotech(config-if)#end<br />
====================================================</p>
<p>setup interface<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Router#config<br />
Router(config)#interface serial 1/1<br />
Router(config-if)#ip address 10.0.0.10 255.255.255.0<br />
Router(config-if)#no shutdown<br />
Router(config-if)#ctrl-Z<br />
Router#<br />
=====================================================</p>
<p>shutdown multiple ports<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
CHICAGOTECH&gt;EN<br />
CHICAGOTECH&gt;PASSWORD:<br />
CHICAGOTECH&gt;CONF T<br />
CHICAGOTECH(config)#inter range fastethernet 0/11 – 12<br />
CHICAGOTECH(config-if-range)#no shutdown<br />
CHICAGOTECH(config-if-range)#<br />
CHICAGOTECH(config-if-range)#end<br />
=====================================================</p>
<p>Interface command lines<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
1. to verify the status of the switch connections<br />
show ip interface brief</p>
<p>2. Configure range interface<br />
Switch(config)#interface range fastethernet 0/# &#8211; #, #, # &#8211; #<br />
=======================================================</p>
<p>Configure trunking and VLAN routing<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Switch&gt;en<br />
password:<br />
Switch#configure terminal<br />
Switch(config)#interface fastethernet 0/1<br />
Switch(config-if)#switchport mode trunk<br />
Switch(config-if)#end<br />
====================================================</p>
<p>confiugre Virtual Interface on a VLAN<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Router&gt;en<br />
passwrod:<br />
Router#configure terminal<br />
Router(config)#interface fastethernet 0/0.2<br />
Router(config-subif)#encapsulation dot1q 2<br />
Router(config-subif)#ip address 192.168.11.2 255.255.255.0<br />
Router(config-subif)#exit<br />
Router(config)#router rip<br />
Router(config-router)#network 10.0.0.0<br />
Router(config-router)#end<br />
======================================================</p>
<p>Configure VLAN Subnets<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Router&gt;en<br />
password:<br />
Router#configure terminal<br />
Router(config)#interface fastethernet 0/1<br />
Router(config-if)#ip address 192.168.11.1 255.255.255.0<br />
Router(config-if)#end<br />
======================================================</p>
<p>How to delete switchport access vlan 200 line<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
CHICAGOTECH_1#show run inter<br />
CHICAGOTECH_1#sh run interface gi1/0/7<br />
Building configuration&#8230;</p>
<p>Current configuration : 151 bytes<br />
!<br />
interface GigabitEthernet1/0/7<br />
switchport access vlan 200<br />
switchport trunk encapsulation dot1q<br />
switchport mode trunk<br />
spanning-tree portfast<br />
end</p>
<p>CHICAGOTECH_1#conf t<br />
Enter configuration commands, one per line. End with CNTL/Z.<br />
CHICAGOTECH_1(config)#int<br />
CHICAGOTECH_1(config)#interface gi1/0/7<br />
CHICAGOTECH_1(config-if)#default switchport access vlan<br />
CHICAGOTECH_1(config-if)#no spanning-tree portfast<br />
CHICAGOTECH_1(config-if)#do sh run int<br />
CHICAGOTECH_1(config-if)#do sh run inter<br />
CHICAGOTECH_1(config-if)#do sh run int gi1/0/7<br />
Building configuration&#8230;</p>
<p>Current configuration : 99 bytes<br />
!<br />
interface GigabitEthernet1/0/7<br />
switchport trunk encapsulation dot1q<br />
switchport mode trunk<br />
end<br />
====================================================</p>
<p>Re-configure VLAN for AP<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Add or modify VLAN name<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
chicagotech&gt;en<br />
password:<br />
chicagotech#conf t<br />
chicagotech(config)#vlan 1<br />
chicagotech(config)#name lab1<br />
===================================================</p>
<p>Situation: the client have 4 VLAN and they want to the Access Point to access all 4 VLAN. This is the show mac-address-table address 0019.3033.6a2a command result:</p>
<p>Mac Address Table<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Vlan Mac Address Type Ports<br />
&#8212;- &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8211;<br />
1 0019.3033.6a2a DYNAMIC Gi1/0/22<br />
Total Mac Addresses for this criterion: 1</p>
<p>Resolution: The port configuration looks l ike this (default is VLAN 1)</p>
<p>interface GigabitEthernet1/0/22<br />
switchport mode access<br />
no ip address<br />
no mdix auto<br />
spanning-tree portfast<br />
spanning-tree bpdufilter enable<br />
spanning-tree bpduguard enable</p>
<p>Change to:<br />
interface GigabitEthernet1/0/22<br />
switchport trunk encapsulation dot1q<br />
switchport mode trunk<br />
no ip address<br />
no mdix auto</p>
<p>This is the result after changing:</p>
<p>show mac-address-table address 0019.3033.6a2a<br />
Mac Address Table<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Vlan Mac Address Type Ports<br />
&#8212;- &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8211;<br />
1 0019.3033.6a2a DYNAMIC Gi1/0/22<br />
100 0019.3033.6a2a DYNAMIC Gi1/0/22<br />
200 0019.3033.6a2a DYNAMIC Gi1/0/22<br />
300 0019.3033.6a2a DYNAMIC Gi1/0/22<br />
Total Mac Addresses for this criterion: 4<br />
=====================================================</p>
<p>VLAN command lines<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
1. How to check last modified VTP configuration<br />
show vtp status</p>
<p>2. Verify a Trunk<br />
show interface interface switchport | trunk</p>
<p>3. Verify A VLAN<br />
show vlan brief | id vln_id | name vlan_name</p>
<p>4. Assign switch ports to a vlan<br />
switchport access vlan vlan# | dynamic</p>
<p>5. configure dot1q trunk<br />
switchport mode trunk | access | dynamic desirable | dynamic auto</p>
<p>6. verify STP for a VLAN<br />
show spanning-tree active | detail | vlan_id | summery<br />
==========================================================</p>
<p>How to enable Cisco ASA Web VPN<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
To enable the HTTP Service on the ASA, please follow these steps:<br />
1. Enable the HTTP server.<br />
2. Enable WebVPN on the outside interface.<br />
3. Configure WebVPN group attributes.<br />
4. Configure user authentication.</p>
<p>1. enable.<br />
2. Chicagotech#conf t<br />
3. Chicagotech(config)# http server enable<br />
4. Chicagotech(config)# http redirect outside 80<br />
5. Chicagotech(config)# webvpn<br />
6. Chicagotech(config-webvpn)# enable outside<br />
7. Chicagotech(config-webvpn)#exit<br />
8. Chicagotech(config)# group-policy VPNGroup internal<br />
9. Chicagotech(config)# group-policy VPNGroup attributes<br />
10. Chicagotech(config-group-policy)# vpn-tunnel-protocol webvpn<br />
11. Chicagotech(config-group-policy)# webvpn<br />
12. Chicagotech(config-group-webvpn)# functions file-access file-entry file-browsing<br />
13. Chicagotech(config-group-webvpn)# exit<br />
14. Chicagotech(config)# username chicagotech password ms-mvps<br />
15. Chicagotech(config)# webvpn<br />
16. Chicagotech(config-webvpn)# authentication-server-group LOCAL<br />
========================================================</p>
<p>Configure routing<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Configure RIP Routing<br />
Router#configure terminal<br />
Router(config)# router rip<br />
Router(config-router)# network 192.168.11.0<br />
Router(config-router)# network 192.168.22.0<br />
Router(config-router)#end</p>
<p>Configure EIGRP Routing<br />
Router#configure terminal<br />
Router(config)#router eigrp 10<br />
Router(config-router)#network 192.168.11.0<br />
Router(config-router)#network 192.168.22.0<br />
Router(config-router)#end</p>
<p>Configure OSPF Routing<br />
Router#configure terminal<br />
Router(config)#router ospf 100<br />
Router(config-router)#network 192.168.11.0 0.0.0.255 area 0<br />
Router(config-router)#network 192.168.22.0 0.0.0.255 area 0<br />
Router(config-router)#end</p>
<p>Verify the running configuration by displaying the router status at the first line<br />
show running-config | begin router</p>
<p>To dump the routing table type<br />
clear ip route *<br />
====================================================</p>
<p>Sample of configuring Cisco 2955S switch<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
The Cisco Switch 2955 basic configuration will setup IP address, Subnet, Enable secret password, Enable password, and Telnet password. This is the sample.<br />
Would you like to enter the initial configuration dialog? [yes/no]: Y (press Enter)</p>
<p>Basic management setup configures only enough connectivity<br />
for management of the system, extended setup will ask you<br />
to configure each interface on the system.</p>
<p>Would you like to enter basic management setup? [yes/no]: Y (press Enter)</p>
<p>Enter host name [Switch]: chicagotech</p>
<p>Enter enable secret: switch</p>
<p>Enter enable password: cisco</p>
<p>Enter virtual terminal password: ms-mvps</p>
<p>Configure SNMP Network Management? [no]: n</p>
<p>Enter interface name used to connect to the<br />
management network from the above interface summary: vlan1</p>
<p>Configuring interface vlan1:<br />
Configure IP on this interface? [yes]: y<br />
IP address for this interface: 10.0.20.51<br />
Subnet mask for this interface [255.0.0.0]: 255.255.0.0</p>
<p>Would you like to enable as a cluster command switch? [yes/no]: n</p>
<p>The following configuration command script was created:<br />
hostname host_name<br />
enable secret 5 #3$Max7$Qgr2rXBhtcYJw4KK7ac650<br />
enable password cisco<br />
line vty 0 15 password ms-mvps<br />
snmp-server community public<br />
……</p>
<p>[0] Go to the IOS command prompt without saving this config.</p>
<p>[1] Return back to the setup without saving this config.</p>
<p>[2] Save this configuration to nvram and exit.</p>
<p>If you want to save the configuration and use it the next time the switch reboots,<br />
save it in nonvolatile RAM (NVRAM) by selecting option 2.</p>
<p>Enter your selection [2]:2<br />
=====================================================</p>
<p>Introduction of Cisco Network Assistant<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Cisco Network Assistant (CNA)  is a free, simple, smart, and  secure graphic tool to manage your Cisco network. With CNA, you can manage all your Cisco devices such as switches, routers, PIX 515 firewalls, IP phones, and wireless access-points in one software.. To me this is the greatest benefit to using Cisco Network Assistant. the following lists some of the features the tool offers.<br />
1. Toolbar Icons<br />
2. Checking Total Power Usage of the IP Phones and Wireless Access Points<br />
3. Topology View<br />
4. Checking Link Properties from the Topology View<br />
5. Configuring VLANs or Applying Port Configurations to Multiple Ports Across Switches<br />
6. Cisco IOS® Software Upgrade<br />
7. Need Help?<br />
8. Saving and Restoring Configuration Files<br />
9. Smartports Advisor<br />
10. Creating a Community<br />
=============================================================</p>
<p>change time in Cisco<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>1. show time information:<br />
chicagotech1#sh clock<br />
chicagotech1#*20:10:59.033 UTC Fri Mar 1 2002</p>
<p>2. Change to Central time:<br />
chicagotech1#1(config)#clock timezone CST -6</p>
<p>3. Reset to current time:<br />
clock set 10:50:00 Oct 26 2006<br />
===========================================================</p>
<p>clear configuration<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1. &#8220;clear configuration all&#8221; clears the current running configuration and is reset to the default running configuration.<br />
2. To restore the startup configuration, go &#8220;copy st run&#8221;.<br />
3. &#8220;write erase&#8221; clears startup configuration and is reset to the factory default configuration with &#8220;reload&#8221; command.<br />
============================================================</p>
<p>load a new code for ASA<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1. Downlaod the code first.<br />
2. Run ASDM and then choose tools/upgrade software.<br />
3. Select the code from Local File Path by using Browse Local Files.<br />
4. In the Flash File System Path, type or Browse Flash: disk0:/asa722-22-8k.bin<br />
5. Click Upload Image.<br />
===========================================================</p>
<p>show and modify Cisco Wireless Bridge date and time<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1. &#8220;show clock&#8221; to display the time and date.<br />
2. For following are examples how to modify the time and date.</p>
<p>config terminal<br />
clock set 14:20:00 31 december 2007<br />
clock timezone central -6.<br />
=========================================================</p>
<p>SHOW COMMANDS<br />
&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Show access-lists &#8211; all access lists on the router<br />
Show cdp &#8211; cdp timer and holdtime frequency<br />
Show cdp entry * &#8211; same as next<br />
Show cdp neighbors detail &#8211; details of neighbor with ip add and ios version<br />
Show cdp neighbors &#8211; id, local interface, holdtime, capability, platform portid<br />
Show cdp interface &#8211; int’s running cdp and their encapsulation<br />
Show cdp traffic &#8211; cdp packets sent and received<br />
Show clock &#8211; displays time set on the router<br />
Show controllers serial 0 &#8211; DTE or DCE status<br />
Show dialer &#8211; number of times dialer string has been reached, other stats<br />
Show flash &#8211; files in flash<br />
Show frame-relay lmi &#8211; lmi stats<br />
Show frame-relay map &#8211; static and dynamic maps for PVC’s<br />
Show frame-relay pvc &#8211; pvc’s and dlci’s<br />
Show history &#8211; commands entered<br />
Show hosts &#8211; contents of host table<br />
Show interface &#8211; displays statistics of all interfaces<br />
Show int f0/26 &#8211; stats of f0/26<br />
Show interface Ethernet 0 &#8211; show stats of Ethernet 0<br />
Show interface brief &#8211; displays a summary of all interface, includng status and IP address assigned<br />
Show ip &#8211; ip config of switch<br />
Show ip access-lists &#8211; ip access-lists on switch<br />
Show ip interface &#8211; ip config of interface<br />
Show ip protocols &#8211; routing protocols and timers<br />
Show ip route &#8211; Displays IP routing table<br />
Show ipx access-lists &#8211; same, only ipx<br />
Show ipx interfaces &#8211; RIP and SAP info being sent and received, IPX addresses<br />
Show ipx route &#8211; ipx routes in the table<br />
Show ipx servers &#8211; SAP table<br />
Show ipx traffic &#8211; RIP and SAP info<br />
Show isdn active &#8211; number with active status<br />
Show isdn status &#8211; shows if SPIDs are valid, if connected<br />
Show mac-address-table &#8211; contents of the dynamic table<br />
Show protocols &#8211; routed protocols and net_addresses of interfaces<br />
Show running-config &#8211; dram config file<br />
Show sessions &#8211; connections via telnet to remote device<br />
Show startup-config &#8211; nvram config file<br />
Show terminal &#8211; shows history size<br />
Show trunk a/b &#8211; trunk stat of port 26/27<br />
Show users &#8211; displays all users connected to the router<br />
Show version &#8211; ios info, uptime, address of switch<br />
Show vlan &#8211; all configured vlan’s<br />
Show vlan-membership &#8211; vlan assignments<br />
Show vtp &#8211; vtp configs<br />
=================================================</p>
<p>What&#8217;s it Overloading?</p>
<p>Overloadingis a form of dynamic NAT that maps multiple unregistered IP addresses to a single registered IP address by using different ports. Known also as PAT (Port Address Translation), single address NAT or port-level multiplexed NAT.</p>
<p>=================================================</p>
<p>ASA 5510 backup and restore using TFTP<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Backup:</p>
<p>1. Run TFTP server.<br />
2. Run telnet to access ASA.<br />
3. Type enable, then the password..<br />
5. Then follow the this procedure:<br />
chicagotechpix# copy startup-config tftp:<br />
Address or name of remote host []? 192.168.0.2</p>
<p>Destination filename [startup-config]? 072406<br />
!!!<br />
8507 bytes copied in 0.40 secs</p>
<p>Restore:<br />
1. Run TFTP server.<br />
2. Run telnet to access ASA.<br />
3. Enable.<br />
5. Then follow the this procedure:</p>
<p>chiacgotechpix# copy tftp start</p>
<p>Address or name of remote host []? 192.168.0.2</p>
<p>Source filename []? 072306tftp</p>
<p>Accessing tftp://192.168.0.2/072306tftp&#8230;!!!<br />
Writing system file&#8230;<br />
!!!<br />
8507 bytes copied in 0.260 secs<br />
ciscoasa# wr mem</p>
<p>Note: 1. to copy TFTP file to running-config, do copy tftp run, give tftp Ip, source file name and press enter to confirm Running-config.<br />
2. show run to display running-config.<br />
3. show start to display start config.<br />
===================================================</p>
<p>backup/restore switch configuration using TFTP<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1. Telnet the switch.<br />
2. Issue enable command.<br />
3. Issue copy running-config tftp: command.</p>
<p>This is the example.</p>
<p>chicagotech01#copy running-config tftp:<br />
Address or name of remote host []? 10.0.0.11<br />
Destination filename [chicagotech1-confg]? chicagotech1<br />
!!<br />
1825 bytes copied in 1.780 secs (1025 bytes/sec)</p>
<p>To Rstore, run copy tftp: running-configand then follow the instruction.<br />
=============================================================</p>
<p>backup/restore Cisco PIX<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Cisco pix backup</p>
<p>It depends on the PIX version. You may try the following commands.</p>
<p>To copy configuration to tftp<br />
chicagotechpix (config)#configure net 10.0.0.254:/filename</p>
<p>Note: You may be able to do that in enable mode<br />
or</p>
<p>chicagotechpix #write net 10.0.0.254:/filename<br />
Note: You may be able to do that in config mode</p>
<p>or</p>
<p>To copy the PIX image from Flash to the TFTP server:<br />
chicagotechpix #copy flash tftp</p>
<p>To copy the image from TFTP to Flash without intervention.<br />
chicagotechpix(config)#copy tftp: flash<br />
===========================================================</p>
<p>copy config.txt to Cisco switch<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
1. Copy and save the configuration as config.txtx<br />
2. Download and install TFTP32.<br />
3. Run TFTP32 and Browse the config.txt.<br />
4. Telnet the switch.<br />
5. Use copy tftp: command to downalod the configuration<br />
===========================================================</p>
<p>Copy configuration from TFTP<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
To erase the running configuration and re-load the configuration file from FTFP, follow theses steps:</p>
<p>Chicagotech&gt;en<br />
Chicagotech&gt;password:<br />
Chicagotech#erase startup-config<br />
Erasing the nvram filesystem will remove all configuration files!<br />
Continue? [confirm]<br />
[OK]<br />
Erase of nvram: complete<br />
Chicagotech#show startup-config<br />
startup-config is not present<br />
Chicagotech#copy tftp://192.168.2.254/Chicagotech startup-config<br />
===============================================================</p>
<p>restore config.txt from tftp<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
1. Run the tftpd32.<br />
2. Browse the file and click OK.<br />
3. Check Show Dir to make sure the config.txt is there.<br />
4. Login the wireless router/switch and enable mode.<br />
5. Type this command: copy tftp://ipaddress/config.txt flash: config.txt.</p>
<p>Note: To check the flash files, use this command: sh flash.<br />
=================================================================</p>
<p>restore Cisco config from TFTP<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1. Run a TFTP program.<br />
2. Telnet to the Cisco router and enable it. Then follow these steps:</p>
<p>chicagotech831#copy tftp: running-config<br />
Address or name of remote host []? 192.168.10.100<br />
Source filename []? chicagotech831-config<br />
Destination filename [running-config]?<br />
Accessing tftp://192.168.10.100/chicagotech831-config&#8230;<br />
Loading 121306-internetok from 192.168.10.100 (via Ethernet1): !<br />
[OK - 2115 bytes]</p>
<p>2115 bytes copied in 10.284 secs (206 bytes/sec)<br />
================================================================</p>
<p>Save cisco router configuration to TFTP<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1. Run a TFTP program.<br />
2. Telnet to the Cisco router and enable it. Then follow these steps:</p>
<p>chicagotech831#copy running-config tftp:<br />
Address or name of remote host []? 192.168.10.100<br />
Destination filename [chicagotech831-confg]?<br />
!!<br />
2115 bytes copied in 1.512 secs (1399 bytes/sec)<br />
chicagotech831#<br />
==============================================================</p>
<p>Use an FTP server to restore Cisco config<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
1. Make sure the FTP is running and let you uploag.<br />
2. Telnet to the Cisco router and enable it.<br />
3. Configure the FTP username and password.<br />
CHICAGOTECH831#conf t<br />
CHICAGOTECH831(config)#ip ftp username chicagotech<br />
CHICAGOTECH831(config)#ip ftp password chicagotech<br />
CHICAGOTECH831(config)#end<br />
CHICAGOTECH831#</p>
<p>4. Router#copy ftp: running-config<br />
5. Address or name of remote host [192.168.10.100]?<br />
6. Source filename [CHICAGOTECH831_confg]?<br />
7. Destination filename [running-config]?<br />
8. Accessing ftp:// 192.168.10.100/ CHICAGOTECH831_confg&#8230;<br />
9. Loading CHICAGOTECH831_confg!<br />
10. [OK - 1423/4764 bytes] 1425 bytes copied in 13.423 secs (76 bytes/sec)<br />
================================================================</p>
<p>Restore config issue</p>
<p>Situation: the client had a Cisco consultant to setup Outdoor wireless 1310 bridge. After finishing the configuration, the consultant save the config file as word format. When the client tries to restore the config using the word file, he losses the configuration in the ridge. After rebooting it, the bridge shows hostname\par&gt;. He can&#8217;t logon using the enable password.</p>
<p>Solution: Turn off the bridge and turn it on while hold esc key. That will restore to the manufacturer default settings. Then restore the config using text format instead of word format.</p>
<p>==============================================================</p>
<p>How to upgrade Cisco IOS for 2900 and 3500 Switch<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1. Check the Flash memory.</p>
<p>chicagotech#dir flash:</p>
<p>Directory of flash:/</p>
<p>2  drwx         704   Feb 28 1993 18:03:50  html</p>
<p>4  -rwx         109   Feb 28 1993 18:01:57  info</p>
<p>5  -rwx     1751867   Feb 28 1993 18:03:00  c3500XL-c3h2s-mz.120-5.WC3b.bin</p>
<p>16  -rwx         109   Feb 28 1993 18:03:50  info.ver</p>
<p>17  -rwx       94680   Feb 28 1993 18:04:08  c3500XL-hdiag-mz-120.5.2-XU</p>
<p>18  -rwx         355   Dec 31 1969 18:00:08  env_vars</p>
<p>19  -rwx         616   Jan 22 2008 15:21:16  vlan.dat</p>
<p>21  -rwx        2462   Jun 19 1993 18:02:13  config.text</p>
<p>3612672 bytes total (358912 bytes free)</p>
<p>2. Delete the existing image since the file to be loaded is larger than the available capacity.</p>
<p>chicagotech#delete flash:c3500XL-c3h2s-mz.120-5.WC3b.bin</p>
<p>Delete filename [c3500XL-c3h2s-mz.120-5.WC3b.bin]?</p>
<p>Delete flash:c3500XL-c3h2s-mz.120-5.WC3b.bin? [confirm]</p>
<p>3. Delete access to the switch HTML pages.</p>
<p>chicagotech#conf t</p>
<p>Enter configuration commands, one per line.  End with CNTL/Z.</p>
<p>chicagotech(config)#no ip http server</p>
<p>chicagotech(config)#end</p>
<p>chicagotech#delete flash:html/*</p>
<p>Delete filename [html/*]?</p>
<p>Delete flash:html/Snmp? [confirm]</p>
<p>%Error deleting flash:html/Snmp (Is a directory)</p>
<p>Delete flash:html/homepage.htm? [confirm]</p>
<p>Delete flash:html/not_supported.html? [confirm]</p>
<p>Delete flash:html/common.js? [confirm]</p>
<p>Delete flash:html/cms_splash.gif? [confirm]</p>
<p>Delete flash:html/cms_12.html? [confirm]</p>
<p>Delete flash:html/cms_13.html? [confirm]</p>
<p>Delete flash:html/cluster.html? [confirm]</p>
<p>Delete flash:html/CMS.jar? [confirm]</p>
<p>Delete flash:html/CiscoChartPanel.jar? [confirm]</p>
<p>Delete flash:html/Redirect.jar? [confirm]</p>
<p>4. Us etar command to copy the combined .tar file to the switch.</p>
<p>chicagotech#tar /x tftp://10.0.0.11/c3500xl-c3h2s-tar.120-5.WC17.tar flash:</p>
<p>Loading c3500xl-c3h2s-tar.120-5.WC17.tar from 10.0.0.11 (via VLAN1): !</p>
<p>extracting c3500xl-c3h2s-mz.120-5.WC17.bin (1811552 bytes)!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!</p>
<p>html/ (directory)</p>
<p>extracting html/homepage.htm (3988 bytes)!</p>
<p>extracting html/not_supported.html (1392 bytes)</p>
<p>extracting html/common.js (9449 bytes)!!</p>
<p>extracting html/cms_splash.gif (22152 bytes)!!!!</p>
<p>extracting html/cms_13.html (1211 bytes)!</p>
<p>extracting html/cluster.html (2823 bytes)!</p>
<p>extracting html/Redirect.jar (4229 bytes)!</p>
<p>extracting html/c4v4_disc.sgz (9806 bytes)!!</p>
<p>extracting html/CMS.sgz (955595 bytes)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>extracting html/CiscoChartPanel.sgz (58784 bytes)!!!!!!!!!!!!</p>
<p>extracting html/cms_boot.jar (44484 bytes)!!!!!!!!!</p>
<p>extracting info (109 bytes)</p>
<p>extracting info.ver (109 bytes)</p>
<p>[OK - 2938368 bytes]</p>
<p>chicagotech#</p>
<p>5. Use dir flash command to make sure the new image in the Flash.</p>
<p>chicagotech#dir flash:</p>
<p>Directory of flash:/</p>
<p>2  drwx         768   Jan 22 2008 16:12:20  html</p>
<p>4  -rwx         109   Jan 22 2008 16:12:22  info</p>
<p>5  -rwx     1811552   Jan 22 2008 16:11:36  c3500xl-c3h2s-mz.120-5.WC17.bin</p>
<p>16  -rwx         109   Jan 22 2008 16:12:22  info.ver</p>
<p>17  -rwx       94680   Feb 28 1993 18:04:08  c3500XL-hdiag-mz-120.5.2-XU</p>
<p>18  -rwx         355   Dec 31 1969 18:00:08  env_vars</p>
<p>19  -rwx         616   Jan 22 2008 16:12:16  vlan.dat</p>
<p>21  -rwx        2462   Jun 19 1993 18:02:13  config.text</p>
<p>3612672 bytes total (582144 bytes free)</p>
<p>6. Set the boot parameter so that the switch will boots with the new image after reloading.</p>
<p>chicagotech#conf t</p>
<p>Enter configuration commands, one per line.  End with CNTL/Z.</p>
<p>chicagotech(config)#boot system flash:c3500xl-c3h2s-mz.120-5.WC17.bin</p>
<p>7. Re-enable access to the switch HTTP pages.</p>
<p>chicagotech(config)#ip http server</p>
<p>chicagotech(config)#end</p>
<p>8. Reload the new image.</p>
<p>chicagotech#reload</p>
<p>System configuration has been modified. Save? [yes/no]: y</p>
<p>Building configuration&#8230;</p>
<p>[OK]</p>
<p>Proceed with reload? [confirm]<br />
===================================================================</p>
<p>test certificate is working using Cisco command<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
The command line is</p>
<p>test aaa gr r username password l.</p>
<p>When using test aaa to test windows IAS, you may receive Event ID 2: Reason-Code = 66. That means the Cisco router is talking to the IAS server, but don&#8217;t recognize the non-domain user.</p>
<p>=============================================================</p>
<p>TROUBLESHOOT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Problem: We have a used Cisco 1720 router. No one knows the password. I am trying to recover the password, but I can’t. I press Break on the terminal (windows XP, 2000) keyboard within 60 seconds while turn on the router, but the router still loads the image and asks for the password. I have tried Ctrl+Break, Shift+Break, Shift+F5. I also tried 3 computers. Any suggestions.</p>
<p>A: Try TeraTerm.</p>
<p>Q: Downloaded TeraTerm that helps me to recover the password. These are the steps:</p>
<p>1. Turn on the power while hold Alt+B.<br />
2. Type confreg 0&#215;2142 at the rommon 1&gt;<br />
3. Type reset at the rommon 2&gt;<br />
4. You will have<br />
&#8212; System Configuration Dialog &#8212;</p>
<p>Would you like to enter the initial configuration dialog? [yes/no]:</p>
<p>5. Type yes to continue and you will see</p>
<p>&#8220;Basic management setup configures only enough connectivity<br />
for management of the system, extended setup will ask you<br />
to configure each interface on the system&#8221;.</p>
<p>Would you like to enter basic management setup? [yes/no]:</p>
<p>6. Type yes to continue and follow the instruction to configure the router.</p>
<p>Related Topic</p>
<p>Password Recovery Procedures [Cisco IOS Software Releases 12.1 Mainline] &#8211; This &#8230; o Password Recovery Procedure for the Cisco 806, 827, and 837 Routers &#8230;<br />
=======================================================</p>
<p>http://www.howtocisco.com/</p>
<p>http://www.chicagotech.net/netforums/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sabinshrestha.com.np/cisco/configure-cisco-router/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco IOS Cheat Sheet</title>
		<link>http://www.sabinshrestha.com.np/cisco/cisco-ios-cheat-sheet/</link>
		<comments>http://www.sabinshrestha.com.np/cisco/cisco-ios-cheat-sheet/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 16:11:34 +0000</pubDate>
		<dc:creator>sabin</dc:creator>
				<category><![CDATA[Cisco]]></category>

		<guid isPermaLink="false">http://www.sabinshrestha.com.np/?p=87</guid>
		<description><![CDATA[Cisco IOS Cheat Sheet TERMINAL CONTROLS: · Config# terminal editing - allows for enhanced editing commands · Config# terminal monitor - shows output on telnet session · Config# terminal ip netmask-format hexadecimal&#124;bit-count&#124;decimal - changes the format of subnet masks HOST NAME: · Config# hostname ROUTER_NAME BANNER: · Config# banner motd # TYPE MESSAGE HERE # [...]]]></description>
			<content:encoded><![CDATA[<pre>Cisco IOS Cheat Sheet

TERMINAL CONTROLS:

· Config# terminal editing - allows for enhanced editing commands

· Config# terminal monitor - shows output on telnet session

· Config# terminal ip netmask-format hexadecimal|bit-count|decimal -
changes the format of subnet masks

HOST NAME:

· Config# hostname ROUTER_NAME

BANNER:

· Config# banner motd # TYPE MESSAGE HERE # - # can be substituted for
any character, must start and finish the message

DESCRIPTIONS:

· Config# description THIS IS THE SOUTH ROUTER - can be entered at the
Config-if level

CLOCK:

· Config# clock timezone Central -6
# clock set hh:mm:ss dd month yyyy - Example: clock set 14:35:00 25
August 2003

CHANGING THE REGISTER:

· Config# config-register 0x2100 - ROM Monitor Mode

· Config# config-register 0x2101 - ROM boot

· Config# config-register 0x2102 - Boot from NVRAM

BOOT SYSTEM:

· Config# boot system tf*p FILENAME SERVER_IP - Example: boot system tf*p
2600_ios.bin 192.168.14.2

· Config# boot system ROM

· Config# boot system flash - Then - Config# reload

CDP:

· Config# cdp run - Turns CDP on

· Config# cdp holdtime 180 - Sets the time that a device remains. Default
is 180

· Config# cdp timer 30 - Sets the update timer.The default is 60

· Config# int Ethernet 0

· Config-if# cdp enable - Enables cdp on the interface

· Config-if# no cdp enable - Disables CDP on the interface

· Config# no cdp run - Turns CDP off

HOST TABLE:

· Config# ip host ROUTER_NAME INT_Address - Example: ip host lab-a
192.168.5.1
-or-

· Config# ip host RTR_NAME INT_ADD1 INT_ADD2 INT_ADD3 - Example: ip host
lab-a 192.168.5.1 205.23.4.2 199.2.3.2 - (for e0, s0, s1)

DOMAIN NAME SERVICES:

· Config# ip domain-lookup - Tell router to lookup domain names

· Config# ip name-server 122.22.2.2 - Location of DNS server

· Config# ip domain-name cisco.com - Domain to append to end of names

CLEARING COUNTERS:

· # clear interface Ethernet 0 - Clears counters on the specified
interface

· # clear counters - Clears all interface counters

· # clear cdp counters - Clears CDP counters

STATIC ROUTES:

· Config# ip route Net_Add SN_Mask Next_Hop_Add - Example: ip route
192.168.15.0 255.255.255.0 205.5.5.2

· Config# ip route 0.0.0.0 0.0.0.0 Next_Hop_Add - Default route
-or-

· Config# ip default-network Net_Add - Gateway LAN network

IP ROUTING:

· Config# ip routing - Enabled by default

· Config# router rip
-or-

· Config# router igrp 100

· Config# interface Ethernet 0

· Config-if# ip address 122.2.3.2 255.255.255.0

· Config-if# no shutdown

IPX ROUTING:

· Config# ipx routing

· Config# interface Ethernet 0

· Config# ipx maximum-paths 2 - Maximum equal metric paths used

· Config-if# ipx network 222 encapsulation sap - Also Novell-Ether, SNAP,
ARPA on Ethernet. Encapsulation HDLC on serial

· Config-if# no shutdown

ACCESS LISTS:

IP Standard

1-99

IP Extended

100-199

IPX Standard

800-899

IPX Extended

900-999

IPX SAP Filters

1000-1099

IP STANDARD:

· Config# access-list 10 permit 133.2.2.0 0.0.0.255 - allow all src ip’s
on network 133.2.2.0
-or-

· Config# access-list 10 permit host 133.2.2.2 - specifies a specific host
-or-

· Config# access-list 10 permit any - allows any address

· Config# int Ethernet 0

· Config-if# ip access-group 10 in - also available: out

IP EXTENDED:

· Config# access-list 101 permit tcp 133.12.0.0 0.0.255.255 122.3.2.0
0.0.0.255 eq telnet
-protocols: tcp, udp, icmp, ip (no sockets then), among others
-source then destination address
-eq, gt, lt for comparison
-sockets can be numeric or name (23 or telnet, 21 or f*p, etc)
-or-

· Config# access-list 101 deny tcp any host 133.2.23.3 eq www
-or-

· Config# access-list 101 permit ip any any

· Config# interface Ethernet 0

· Config-if# ip access-group 101 out

IPX STANDARD:

· Config# access-list 801 permit 233 AA3 - source network/host then
destination network/host
-or-

· Config# access-list 801 permit -1 -1 - "-1" is the same as "any"
with network/host addresses

· Config# interface Ethernet 0

· Config-if# ipx access-group 801 out

IPX EXTENDED:

· Config# access-list 901 permit sap 4AA all 4BB all
- Permit protocol src_add socket dest_add socket
-"all" includes all sockets, or can use socket numbers
-or-

· Config# access-list 901 permit any any all any all
-Permits any protocol with any address on any socket to go anywhere

· Config# interface Ethernet 0

· Config-if# ipx access-group 901 in

IPX SAP FILTER:

· Config# access-list 1000 permit 4aa 3 - "3" is the service type
-or-

· Config# access-list 1000 permit 4aa 0 - service type of "0" matches
all services

· Config# interface Ethernet 0

· Config-if# ipx input-sap-filter 1000 - filter applied to incoming
packets
-or-

· Config-if# ipx output-sap-filter 1000 - filter applied to outgoing
packets

NAMED ACCESS LISTS:

· Config# ip access-list standard LISTNAME
-can be ip or ipx, standard or extended
-followed by the permit or deny list

· Config# permit any

· Config-if# ip access-group LISTNAME in
-use the list name instead of a list number
-allows for a larger amount of access-lists

PPP SETUP:

· Config-if# encapsulation ppp

· Config-if# ppp authentication chap pap
-order in which they will be used
-only attempted with the authentification listed
-if one fails, then connection is terminated

· Config-if# exit

· Config# username Lab-b password 123456
-username is the router that will be connecting to this one
-only specified routers can connect
-or-

· Config-if# ppp chap hostname ROUTER

· Config-if# ppp chap password 123456
-if this is set on all routers, then any of them can connect to any other
-set same on all for easy configuration

ISDN SETUP:

· Config# isdn switch-type basic-5ess - determined by telecom

· Config# interface serial 0

· Config-if# isdn spid1 2705554564 - isdn "phonenumber" of line 1

· Config-if# isdn spid2 2705554565 - isdn "phonenumber" of line 2

· Config-if# encapsulation PPP - or HDLC, LAPD

DDR - 4 Steps to setting up ISDN with DDR

Configure switch type
Config# isdn switch-type basic-5ess - can be done at interface config

Configure static routes
Config# ip route 123.4.35.0 255.255.255.0 192.3.5.5 - sends traffic
destined for 123.4.35.0 to 192.3.5.5
Config# ip route 192.3.5.5 255.255.255.255 bri0 - specifies how to get to
network 192.3.5.5 (through bri0)

Configure Interface
Config-if# ip address 192.3.5.5 255.255.255.0
Config-if# no shutdown
Config-if# encapsulation ppp
Config-if# dialer-group 1 - applies dialer-list to this interface
Config-if# dialer map ip 192.3.5.6 name Lab-b 5551212
connect to lab-b at 5551212 with ip 192.3.5.6 if there is interesting
traffic
can also use "dialer string 5551212" instead if there is only one
router to connect to

Specify interesting traffic
Config# dialer-list 1 ip permit any
-or-
Config# dialer-list 1 ip list 101 - use the access-list 101 as the dialer
list

Other Options
Config-if# hold-queue 75 - queue 75 packets before dialing
Config-if# dialer load-threshold 125 either
-load needed before second line is brought up
-"125" is any number 1-255, where % load is x/255 (ie 125/255 is about
50%)
-can check by in, out, or either
Config-if# dialer idle-timeout 180
-determines how long to stay idle before terminating the session
-default is 120

FRAME RELAY SETUP:

· Config# interface serial 0

· Config-if# encapsulation frame-relay - cisco by default, can change to
ietf

· Config-if# frame-relay lmi-type cisco - cisco by default, also ansi,
q933a

· Config-if# bandwidth 56

· Config-if# interface serial 0.100 point-to-point - subinterface

· Config-if# ip address 122.1.1.1 255.255.255.0

· Config-if# frame-relay interface-dlci 100
-maps the dlci to the interface
-can add BROADCAST and/or IETF at the end

· Config-if# interface serial 1.100 multipoint

· Config-if# no inverse-arp - turns IARP off; good to do

· Config-if# frame-relay map ip 122.1.1.2 48 ietf broadcast
-maps an IP to a dlci (48 in this case)
-required if IARP is turned off
-ietf and broadcast are optional

· Config-if# frame-relay map ip 122.1.1.3 54 broadcast

SHOW COMMANDS

· Show access-lists - all access lists on the router

· Show cdp - cdp timer and holdtime frequency

· Show cdp entry * - same as next

· Show cdp neighbors detail - details of neighbor with ip add and ios
version

· Show cdp neighbors - id, local interface, holdtime, capability,
platform portid

· Show cdp interface - int’s running cdp and their encapsulation

· Show cdp traffic - cdp packets sent and received

· Show controllers serial 0 - DTE or DCE status

· Show dialer - number of times dialer string has been reached, other
stats

· Show flash - files in flash

· Show frame-relay lmi - lmi stats

· Show frame-relay map - static and dynamic maps for PVC’s

· Show frame-relay pvc - pvc’s and dlci’s

· Show history - commands entered

· Show hosts - contents of host table

· Show int f0/26 - stats of f0/26

· Show interface Ethernet 0 - show stats of Ethernet 0

· Show ip - ip config of switch

· Show ip access-lists - ip access-lists on switch

· Show ip interface - ip config of interface

· Show ip protocols - routing protocols and timers

· Show ip route - Displays IP routing table

· Show ipx access-lists - same, only ipx

· Show ipx interfaces - RIP and SAP info being sent and received, IPX
addresses

· Show ipx route - ipx routes in the table

· Show ipx servers - SAP table

· Show ipx traffic - RIP and SAP info

· Show isdn active - number with active status

· Show isdn status - shows if SPIDs are valid, if connected

· Show mac-address-table - contents of the dynamic table

· Show protocols - routed protocols and net_addresses of interfaces

· Show running-config - dram config file

· Show sessions - connections via telnet to remote device

· Show startup-config - nvram config file

· Show terminal - shows history size

· Show trunk a/b - trunk stat of port 26/27

· Show version - ios info, uptime, address of switch

· Show vlan - all configured vlan’s

· Show vlan-membership - vlan assignments

· Show vtp - vtp configs

CATALYST COMMANDS
For Native IOS - Not CatOS

SWITCH ADDRESS:

· Config# ip address 192.168.10.2 255.255.255.0

· Config# ip default-gateway 192.168.10.1

DUPLEX MODE:

· Config# interface Ethernet 0/5 - "fastethernet" for 100 Mbps ports

· Config-if# duplex full - also, half | auto | full-flow-control

SWITCHING MODE:

· Config# switching-mode store-and-forward - also, fragment-free

MAC ADDRESS CONFIGS:

· Config# mac-address-table permanent aaab.000f.ffef e0/2 - only this mac
will work on this port

· Config# mac-address-table restricted static aaab.000f.ffef e0/2 e0/3
-port 3 can only send data out port 2 with that mac
-very restrictive security

· Config-if# port secure max-mac-count 5 - allows only 5 mac addresses
mapped to this port

VLANS:

· Config# vlan 10 name FINANCE

· Config# interface Ethernet 0/3

· Config-if# vlan-membership static 10

TRUNK LINKS:

· Config-if# trunk on - also, off | auto | desirable | nonegotiate

· Config-if# no trunk-vlan 2
-removes vlan 2 from the trunk port
-by default, all vlans are set on a trunk port

CONFIGURING VTP:

· Config# delete vtp - should be done prior to adding to a network

· Config# vtp server - the default is server, also client and transparent

· Config# vtp domain Camp - name doesn’t matter, just so all switches use
the same

· Config# vtp password 1234 - limited security

· Config# vtp pruning enable - limits vtp broadcasts to only switches
affected

· Config# vtp pruning disable

FLASH UPGRADE:

· Config# copy tf*p://192.5.5.5/configname.ios opcode - "opcode" for
ios upgrade, "nvram" for startup config

DELETE STARTUP CONFIG:

· Config# delete nvram</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sabinshrestha.com.np/cisco/cisco-ios-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CISCO CCNA Certification knowledge to pass the exam</title>
		<link>http://www.sabinshrestha.com.np/cisco/cisco-ccna-certification-knowledge-to-pass-the-exam/</link>
		<comments>http://www.sabinshrestha.com.np/cisco/cisco-ccna-certification-knowledge-to-pass-the-exam/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 16:10:00 +0000</pubDate>
		<dc:creator>sabin</dc:creator>
				<category><![CDATA[Cisco]]></category>

		<guid isPermaLink="false">http://www.sabinshrestha.com.np/?p=86</guid>
		<description><![CDATA[CISCO CCNA Certification knowledge to pass the exam Knowledge of OSI Reference Model (1) Identify and describe the functions of each of the seven layers of the OSI reference model. Open Systems Interconnection (OSI) OSI consists of two environments; the OSI environment, which is made up of seven layers of OSI protocols and the local [...]]]></description>
			<content:encoded><![CDATA[<p>CISCO CCNA Certification knowledge to pass the exam<br />
Knowledge of OSI Reference Model<br />
(1)<br />
Identify and describe the functions of each of the seven layers of the<br />
OSI reference model.</p>
<p>Open Systems Interconnection (OSI)<br />
OSI consists of two environments; the OSI environment, which is made up<br />
of seven<br />
layers of OSI protocols and the local system environment, which is the<br />
end computer<br />
system. The reason for dividing the environment in this way was to avoid<br />
interfering with<br />
the innovation of the design and implementation of computer systems. OSI<br />
facilitates a<br />
vehicle to communicate between dissimilar or similar computer based<br />
systems. The local<br />
computer system environment has a closed operating system and performs<br />
its designed<br />
functions within these bounds. All application processes that do not<br />
require<br />
communicating with other systems to complete its tasks, will provide, the<br />
end result with<br />
out any problems. However when an application process needs to<br />
communicate with<br />
another application process located in a remote system, both systems must<br />
become open<br />
to the OSI environment Many operations and concepts are involved in this<br />
process. There<br />
is interaction between peer entities within a layer and interaction<br />
between layers.<br />
Important concepts to understand OSI Layering are:<br />
·<br />
Each layer performs unique and specific task</p>
<p>·<br />
A layer only has knowledge of its immediately adjacent layers</p>
<p>·<br />
A layer uses services of the layer below</p>
<p>·<br />
A layer performs functions and provides services to the layer above</p>
<p>·<br />
A layer service is independent of the implementation</p>
<p>The Application layer is unique among the seven layers in that, it has no<br />
layer above. The<br />
application consists of `Service Elements&#8217; that are incorporated within<br />
the application<br />
process when it needs to become a part of the OSI environment.</p>
<p>CONCEPT OF A LAYER<br />
Each layer contains a logical groupings of functions that provide<br />
specific services for<br />
facilitating a communication. A function, or a group of functions, making<br />
up a functional<br />
unit is a logical entity that accepts one or more inputs (arguments) and<br />
produces a single<br />
output (value) determined by the nature of the function. Functions can be<br />
grouped in a collective unit, which is then defined as (N) layer having<br />
(N+1) layer an upper layer<br />
boundary and (N-1) layer as a lower boundary. The N layer receives<br />
services from N-1<br />
layer and provides services to N+1 layer.<br />
SEVEN LAYERS OF THE OSI MODEL AND THEIR FUNCTIONS<br />
·<br />
Layer 7 is the APPLICATION layer: provides services directly to<br />
applications. Responsible for<br />
identifying and establishing the availability of the intended partner,<br />
and required resources. It is also<br />
responsible for determining if there exist sufficient communication<br />
resources to reach the remote<br />
partner.<br />
·<br />
Layer 6 is the PRESENTATION layer: Data encryption, decryption,<br />
compression and decompression<br />
are functions of this layer. It does this by using Abstract Syntax<br />
Notation 1 (ASN.1) ASN.1<br />
standardization allows differing computer architectures to exchange data<br />
that are from differing<br />
computer architectures.<br />
·<br />
Layer 5 is the SESSION layer: facilitates a dialog between communicating<br />
systems and controls the<br />
dialog. Offers three different dialogs, simplex, half-duplex and full<br />
duplex. Session is set up by<br />
connection establishment, data transfer and connection release.<br />
·<br />
Layer 4 is the TRANSPORT layer: Segments data and also reassembles data<br />
from upper layers.<br />
Delivers data in a connection and connection less modes. Includes simplex<br />
(one way) half duplex (both<br />
ways one at a time) full duplex (both ways simultaneously). Also flow<br />
control and error recovery.<br />
·<br />
Layer 3 is the NETWORK layer: Establishes a connection between two nodes<br />
by physical and logical<br />
addressing. Includes routing and relaying data through internetworks.<br />
This layer&#8217;s primary function is<br />
to deliver packets from the source network to the destination network.<br />
·<br />
Layer 2 is the DATA LINK layer: Ensures hardware addressing of the<br />
device, and delivery to the<br />
correct device. Translates data messages from upper layers to frames,<br />
enabling hardware to transmit<br />
upper layer messages as a bit stream. Provides flow control to the layer<br />
2. Also carries a Frame Check<br />
Sequence to make sure the frame received is identical to the one<br />
transmitted.</p>
<p>·<br />
Logical Link Control (LLC) Sublayer of the Data Link Control layer<br />
provides flexibility to Network<br />
Layer and the Media Access Control (MAC) layer. It runs between Network<br />
Layer and the MAC<br />
sublayer of the data Link Layer.</p>
<p>·<br />
Media Access Control (MAC) Sub Layer of the Data Link Layer is<br />
responsible for framing. It builds<br />
frames from the 1s and 0s that the Physical Layer picks up from the wire.<br />
·<br />
Layer 1 is the PHYSICAL layer: Which transmits the raw bit stream and<br />
includes electrical signaling<br />
and hardware interface.</p>
<p>(2)<br />
Describe connection orientated network service and connection less<br />
network service.<br />
Identify the key difference between them.<br />
Department of Defense (DOD) model is analogous to the OSI model and is<br />
the model<br />
used in the TCP/IP protocol suite. Following are the layers of the DOD<br />
model:<br />
DOD Model<br />
Analogous to<br />
OSI Model<br />
·<br />
Process/Application<br />
Application<br />
Presentation<br />
Session<br />
·<br />
Host to Host<br />
Transport<br />
·<br />
Internet<br />
Network</p>
<p>·<br />
Network Access<br />
Data Link<br />
Physical</p>
<p>At the transport layer of OSI and the Host to Host layer of DOD, there is<br />
a connection<br />
establishment process with the end system. This is a very impotent<br />
process where the<br />
sending system decides whether to use a reliable link, which is<br />
connection orientated,<br />
resource intensive or to use an unreliable link, connection less access<br />
to the end system<br />
with very much less resource utilization.<br />
The two protocols involved in the connection establishment of the end<br />
system is<br />
Transmission Control Protocol (TCP) for reliable connection and User<br />
Datagram<br />
Protocol UDP for unreliable connection.<br />
TCP is defined in the RFC 793 and defines a reliable, connection<br />
orientated full duplex<br />
byte stream for a user process. TCP creates a CONNECTION orientated<br />
service by<br />
contacting the end system and establishing a set of guidelines both can<br />
support. Such<br />
agreements as how much data segments can be transferred before an<br />
acknowledgement is<br />
received. TCP takes large blocks of data coming from upper layers and<br />
segments them.<br />
Then it adds numbers to the segments so the end system can sequence them<br />
at arrival and<br />
assemble the original block before sending it to the upper layer. When<br />
TCP creates a<br />
connection between two end systems, it is called a VIRTUAL CIRCUIT. This<br />
virtual<br />
circuit is created at the time the one system needs to send a data stream<br />
to the end system<br />
and takes it down when the data transfer is completed.</p>
<p>The three phases of the TCP are CONNECTION ESTABLISHMENT, CONNECTION<br />
MAINTENANCE and CONNECTION TIREDOWN.</p>
<p>UDP is defined in RFC 768. It is the protocol that does not consume<br />
system resources as<br />
much as TCP but it unreliable and transfers data to the destination<br />
system with out<br />
establishing a connection and hence, connectionless protocol. UDP sends<br />
data to the<br />
destination system in numbered segments same as TCP but it can not<br />
retransmit erred<br />
segments if they get lost or damaged.</p>
<p>·<br />
Key differences between connection orientated network service and<br />
connection less network service.</p>
<p>Packet header:<br />
Connection orientated service<br />
Connection less service</p>
<p>Source Port, Destination Port<br />
Source Port, Destination Port</p>
<p>Sequence number<br />
No Sequence Number</p>
<p>Acknowledgement Number<br />
No Acknowledgement number</p>
<p>Data offset<br />
No data offset</p>
<p>Length of data<br />
Variable length of data</p>
<p>Flags<br />
No flags</p>
<p>Window<br />
No window</p>
<p>Check sum<br />
Check sum</p>
<p>Urgent pointer<br />
No Urgent pointer</p>
<p>Options and Padding<br />
No Options and Padding</p>
<p>Both TCP and UDP use the concept of ports and sockets to identify a<br />
connection between<br />
two communicating computers. A connection-orientated service is mainly<br />
used for secure<br />
and reliable data transfer, where the requirement is also transfer of<br />
data in timely manner.<br />
If the underlying network, drops data packets because the network is<br />
congested or the end<br />
system buffers overflow, a connection orientated service can recover, but<br />
the connection<br />
less service cannot recover from such faults because, once the data frame<br />
leaves the<br />
sending systems buffer, it is cleared by the sending system and there are<br />
no<br />
acknowledgement sent to the sending system. To get the high reliability<br />
with the<br />
connection orientated system, large amount of system resources has to be<br />
allocated for<br />
buffers and CPU time. As for the connection less service it is analogous<br />
to mailing a<br />
letter and is not resource intensive. The buffers can be much smaller<br />
because the frame<br />
that is transmitted does not have to wait for an acknowledgment before<br />
been discarded.</p>
<p>CPU utilization is much less for connectionless service because of the<br />
absence<br />
windowing mechanism.</p>
<p>(3)<br />
Describe Data Link addresses and Network Address, and identify the key<br />
differences.<br />
Data Link addresses are the source address and the destination address of<br />
the 48 bit BIA<br />
of the hardware NIC card. At each interface these addresses change<br />
because, on route to<br />
the destination a frame has to pass may INC cards. Address Resolution<br />
Protocol (ARP)<br />
finds the MAC address when it moves to a different segment. Network layer<br />
address has<br />
a source and a destination address, which are end points of the<br />
transmitting and receiving<br />
systems. It provides routing and relaying functions to achieve it goal.<br />
It provides a<br />
transparent path to the transport layer for a best end to end packet<br />
delivery service.</p>
<p>(4) Identify at least three reasons why industry uses a layered model<br />
Layered model avoids interfering with the innovation of design and<br />
implementation of<br />
computer systems<br />
Facilitates communication between dissimilar systems<br />
Allow changes to one layer with out changing other layers<br />
Facilitate systematic network trouble shooting<br />
Reduce the complexity of networking into more manageable layers and sub<br />
layers</p>
<p>(5)<br />
Define and explain the five conversion steps of data encapculation<br />
·<br />
User information is converted to data<br />
·<br />
Data is converted to segments<br />
·<br />
Segments are converted to packets or datagrams<br />
·<br />
Packets or datagrams are converted to frames<br />
·<br />
·<br />
Frames are converted to bits (1s and 0s)</p>
<p>(6)<br />
Define Flow Control and describe the three basic methods used in networkig<br />
Flow control stops a sending station from flooding the receiver station<br />
buffers, if it has no<br />
resources to match the speed of data arriving from the receiving station.<br />
Once the buffers<br />
are emptied at the receiver, it sends a message to the transmitter to<br />
start sending again. It<br />
is called windowing and controls how much data is transmitted from one<br />
end to the other.<br />
Has a fixed window say 7, the transmitting station sends seven packets<br />
before waiting for<br />
an acknowledgement packet. Once the acknowledgement is received at the<br />
receiver, it<br />
sends another seven packets.<br />
Window size of one. Every packet sent to the receiver has to be<br />
acknowledged before the<br />
transmitter can send the next packet.</p>
<p>Variable window, if the receiving station for some reason finds difficult<br />
to catch up with<br />
buffer emptying, it then tells receiver to reduce the window size and the<br />
sender does so.</p>
<p>(6)<br />
List the key internetworking functions of the OSI network layer and how<br />
they are<br />
performed in a router.<br />
Network layer of the OSI seven layer model conations many protocols that<br />
a router use<br />
to evaluate the best route it should take and it is updated regularly so<br />
the best route is<br />
available for the packet to be transported. Network layers primary<br />
function is to send<br />
packets from the originating network to destination network. After the<br />
router has decided<br />
the best path from source to the destination network, the router switches<br />
the packet to it.<br />
This is known as packet switching. Essentially, this is forwarding the<br />
packet received by<br />
the router on one network interface (NIC card), or port to the port that<br />
connects to the<br />
best path through the network cloud. An internetwork must continually<br />
designate all<br />
paths of its media connections. All routers in the internetwork cloud are<br />
connected by<br />
media (cables), each line connecting a router to another is numbered.<br />
Routers use these<br />
numbers as network addresses. These addresses posses and convey important<br />
information<br />
about the path of the media connections. They are used by routing<br />
protocols to pass<br />
packets from a source onward towards to its destination. The network<br />
layer creates a<br />
composite &#8220;network map&#8221; and a communication strategy model by combining<br />
information about the sets of links into an internetwork with path<br />
discrimination, path<br />
switching and route processing functions. It can also use these addresses<br />
to provide relay<br />
capability and to interconnect independent networks. Routers using<br />
network layer<br />
protocols streamline network performance by not letting unnecessary<br />
broadcasts get into<br />
the internetwok cloud.</p>
<p>Knowledge of WAN protocols<br />
(8)<br />
Differentiate between the following WAN services: FRAME RELAY, ISDN/LAPD,<br />
HDLC and PPP</p>
<p>Frame relay is used to connect large number of sites in the network<br />
because it is<br />
relatively inexpensive to do so. The service provider gives you a frame<br />
relay circuit and<br />
is charged for the amount of data and the bandwidth you use as oppose to<br />
T1 circuit that<br />
charges with a flat monthly rate whether you use partial bandwidth or the<br />
full bandwidth<br />
regardless. Frame relay is a high performance WAN protocol that operates<br />
at the Data<br />
Link layer and the Physical layer of the OSI model.<br />
Integrated Services Digital Network (ISDN) is designed to run over<br />
existing telephone<br />
networks. It can deliver end to end digital service carrying voice and<br />
data. ISDN operates<br />
at OSI model, physical layer, data link layer and network layer. It can<br />
carry multimedia<br />
and graphics with all other voice, data services. ISDN supports all upper<br />
layer protocols<br />
and you can choose PPP, HDLC or LAPD as your encapsulation protocol. It<br />
has two<br />
offerings, Primary rate which is 23B+D channels. 23, 64 kbps and one<br />
64kbps mainly<br />
used for signaling. The other is the Basic Rate which has 2B+D channels<br />
two 64kbps and<br />
one 16kbps.<br />
At data link layer ISDN supports two protocols; LAPB and LAPD. LAPB is<br />
used to<br />
mainly transfer data from upper layers and has three types of frames.<br />
I-Frames carry<br />
upper layer information and carries out sequencing, flow control, error<br />
detection and<br />
recovery. S- Frames carry control information for the I-frame. LAPD<br />
provides an additional multiplexing function to the upper layers<br />
enabling number of network entities<br />
to operate over a single physical access. Each individual link procedure<br />
acts<br />
independently of others. The multiplex procedure combines and distributes<br />
the data link<br />
channels according to the address information of the frame. Each link is<br />
associated with a<br />
specific Service Access Point (SAP), which is identified in the part of<br />
the address field.<br />
High Level Data Link Control (HDLC) is a bit oriented data link layer<br />
frame protocol<br />
that has many versions similar to LAP, LAPB, and LAPD. CISCO routers<br />
default<br />
encapsulation is HDLC, but it is proprietary to CISCO.<br />
Point to Point Protocol (PPP) is a Data Link Layer protocol that can be<br />
used over ether<br />
asynchronous (dial up) or synchronous (ISDN) lines. It uses Link Control<br />
Protocol (LCP)<br />
to build and maintain data link connections. Included in PPP is the<br />
authentication<br />
protocols, PAP and CHAP, and data compression. It supports IP, IPX,<br />
AppleTalk,<br />
DECnet and OSI/CLNS.<br />
(9)<br />
Recognize key Frame Relay terms and features</p>
<p>Frame Relay is a high performance WAN protocol that operates at the<br />
physical and data<br />
link layer of the OSI reference model. It was originally designed to<br />
operate on ISDN<br />
circuits, but today it is used on variety of network interfaces. To<br />
configure Frame Relay<br />
on a CISCO router, we have to specify it as an encapsulation on a serial<br />
interface. There<br />
are only two encapsulation methods are available, CISCO, the default and<br />
the type IETF.<br />
A frame Relay connection between CISCO devices the type: CISCO is used<br />
and between<br />
a CISCO device and a non CISCO device type IETF is used.<br />
#encapsulation frame relay cisco or #encapsulation frame relay ietf<br />
Frame Relay virtual circuits are identified by Data Link Connection<br />
Identifiers (DLCI).<br />
DLCIs are issued by the Frame Relay service provider. It is used to map<br />
IP addresses at<br />
each end of the virtual circuit. Local Management Interface (LMI) was<br />
developed by<br />
CISCO and others to enhance the CCITT-ITU standard with protocol features<br />
that<br />
allowed internetworking devices communicate easily with a Frame Relay<br />
network. LMI<br />
messages provide current DLCI values, global or local significance of the<br />
DLCI values<br />
and the status of virtual circuits. CISCO supports three types of LMIs:<br />
CISCO which is<br />
the default, ANSI and Q933A.</p>
<p>(10)<br />
List commands to configure, maps and subinterfaces</p>
<p>To configure DLCI (config-if) #frame-relay interface-dlci 16<br />
Any number from 0 to 4292967295 can be as the DLCI number.<br />
To configure LMI<br />
(config-if)#frame-relay lim-type q933a<br />
Subinterfaces can have multiple virtual circuits on a single serial<br />
interface and treat each<br />
virtual circuit as a separate interface. The advantage of using<br />
subinterfaces is that you can<br />
assign different network layer characteristics each subinterface and<br />
virtual circuit, such as<br />
IP routing on one virtual circuit and IPX routing on another.<br />
(config)# int s0.16 The serial interface s0 configured with a<br />
subinterface 16<br />
There are two types of subinterfaces, point to point and multipoint.<br />
Point to point is used<br />
when a single virtual circuit connect one router to another. Multipoint<br />
is used when the<br />
router is in the middle of star virtual circuits.</p>
<p>Map command is used to map IP devices address at the end of the virtual<br />
circuits to<br />
DLCIs so that they can communicate. There are two types of mapping: Use<br />
Frame Relay<br />
map command and use inverse-arp function. Example of Frame Relay map<br />
command:<br />
#int s).16<br />
#encap frame relay ietf<br />
#no inverse-arp<br />
#ip address 172.16.30.1 255.255.255.0<br />
#frame relay map ip 172.16.30.17 30 cisco broadcast</p>
<p>Example of Frame Relay inverse-arp command:<br />
#int s0.16<br />
#encap frame-relay ietf<br />
#ip address 172.16.30.1 255.255.255.0<br />
(11)<br />
List commands to monitor Frame Relay operation on the router</p>
<p>In the user mode key in the following:<br />
Router&gt;sho frame ?<br />
ip<br />
show frame relay IP statics<br />
lmi<br />
show frame relay lmi statics<br />
map<br />
show frame relay map table<br />
pvc<br />
show frame relay pvc statics<br />
route show frame relay route<br />
traffic show frame relay protocol statics</p>
<p>(12)<br />
Identify PPP operations to encapsulate WAN data on CISCO routers</p>
<p>Point to Point Protocol (PPP) is a data link protocol that can be used on<br />
asynchronous<br />
(dial up) or synchronous ISDN circuits. It uses Link Control Protocol<br />
(LCP) to build and<br />
maintain data link connections. Some features included in PPP are:<br />
Password<br />
Authentication Protocol (PAP) and Challenge Handshake Password<br />
Authentication<br />
Protocol (CHAP). Data compression and multiprotocols such as IP, IPX ,<br />
AppleTalk<br />
DECnet and OSI/CLNS are supported. Encapsulate PPP on the router<br />
#int s0<br />
#encapsulate ppp<br />
(13)<br />
State a relevant use and context for ISDN networking</p>
<p>Integrated Services Digital Network (ISDN) can run on existing telephones<br />
lines to<br />
provide an end to end digital service for both domestic and business<br />
uses. ISDN can<br />
carry, in addition to voice and data, multimedia as well. ISDN can used<br />
as a backup<br />
circuit for high speed network links. CISCO routers can be configured to<br />
automatically<br />
dial up on an ISDN link when the main network link goes down.<br />
(14)<br />
Identify ISDN protocols, function groups, reference points and channels</p>
<p>ISDN protocols were defined by CCITT (now ITU-T), and there are three<br />
protocols that<br />
define the complex transmission issues:<br />
·<br />
Protocol specifications beginning with latter E, specify ISDN on the<br />
existing telephone network, ie;<br />
Analog lines.</p>
<p>·<br />
Protocol specifications beginning with letter I, specify concepts,<br />
terminology and services.<br />
·<br />
Protocol specifications beginning with letter Q, specify trunk switching<br />
and signaling.</p>
<p>(15)<br />
Describe CISCO&#8217;s Implementation of ISDN BRI</p>
<p>ISDN Basic Rate Interface (BRI), service provides two B channels and D<br />
channel, which<br />
is also known as 2B+D. B channels operate at 64 kbps and carries user<br />
information where<br />
D channel operates at 16 kbps and usually carry control and signaling<br />
information. D<br />
channel signaling protocol spans the OSI reference model&#8217;s, Physical<br />
layer, Data link<br />
layer and the Network layer. The two 64 kbps lines can be used as a<br />
single 128 kbps<br />
channel. To place a call on ISDN is similar to placing a call on Plain<br />
Old Telephones<br />
(POTS). For ISDN network to identify a call placed on its network, you<br />
must use<br />
directory numbers and Service Profile Identifiers (SPID)s. These two<br />
items are given to<br />
you by the service provider. Directory number is a telephone number you<br />
will use when<br />
you call. The SPID is a number the telephone uses to identify equipment<br />
on your ISDN<br />
connection. Majority of switches in US are either AT&amp;T 5ESS, 4ESS or<br />
Northern<br />
Telcom DMS 100. Attaching a CISCO router to ISDN needs either a Network<br />
Termination 1 or an ISDN modem. If router has a BRI interface, (called<br />
Terminal End<br />
Point 1) then it is ready to be connected to the ISDN network.<br />
Router#config t<br />
Router(config)#isdn switch-type basic-dms100<br />
Router(config)#int bri0<br />
Router(config-if)#encap ppp<br />
Router(config-if)#isdn spid 775456721<br />
Router(config-if)#ppp authentication chap</p>
<p>IOS<br />
(16)<br />
Log in to a router in user and privilege mode</p>
<p>CISCO IOS software has a command interpreter called Exec. Exec has two<br />
levels of<br />
access: User mode and privilege mode. These two levels serve as for<br />
access into the<br />
different levels of commands. In user mode one can only do: Check router<br />
status,<br />
connecting to remote devices, making temporary changes to terminal<br />
settings and<br />
viewing basic system information. In the privilege mode you can change the<br />
configuration of the router and get detail reports of router status. Test<br />
and run debug<br />
operations. Access global configuration modes.<br />
When you first log into a router, press ENTER and you will be in the Exec<br />
mode. At the<br />
prompt it will ask if you need a password. Router&gt; This is the User mode<br />
as stated above<br />
very little can be done at this level. When you type in Enable:<br />
Router&gt;Enable and press<br />
return it will ask for the password. Once you key in the correct<br />
password, your in the<br />
privilege mode. Now the prompt will show you Router#.<br />
(17)<br />
Use the context-sensitive help facility</p>
<p>One can receive help on any command by typing ? after the command. In the<br />
following<br />
example: Router# clock ? you typed in clock a space and the question<br />
mark, and pressed<br />
enter. Reply was as follows: set<br />
Set the time and date. Now you want to know what<br />
format to enter. So you put another question after the set as follows:<br />
Router# clock set ?.<br />
Now you will get the format in the reply as follows: hh:mm:ss: Current<br />
Time (hh:mm:ss)<br />
(18)<br />
Use the command history and editing features</p>
<p>The user interface comes in with an editing feature to help you type in<br />
repetitive<br />
commands. One can turn off editing by typing terminal no editing and<br />
again turn it on<br />
by typing terminal editing.<br />
The router keeps the last ten commands you entered during your console or<br />
terminal<br />
session, in a special memory buffer called command history. One can<br />
recall commands<br />
from the command history buffer and reuse them or modify slightly to save<br />
on typing. To<br />
see all the commands type the following at the command prompt Router#show<br />
history<br />
and press enter. All commands you typed in will be shown. To increase the<br />
size of the<br />
command history buffer you type the following: Router#terminal history<br />
size 100. This<br />
will increase the size to 100 lines from the default value. VT 100<br />
terminal emulation<br />
gives use of up down and side arrows in addition to the other keys as<br />
shown below:<br />
·<br />
CTRL+A<br />
Move to the beginning of the command line<br />
·<br />
CTRL+E<br />
Move to the end of the command line<br />
·<br />
CTRL+F (or right arrow)<br />
Move one character forward<br />
·<br />
CTRL+B (or left arrow)<br />
Move one character backward<br />
·<br />
CTRL+P (or up arrow)<br />
Repeat previous command entry<br />
·<br />
CTRL+N (or down arrow)<br />
Most recent command recall<br />
·<br />
ESC+B<br />
Move backward one word<br />
·<br />
ESC+F<br />
Move forward one word</p>
<p>(19)<br />
Examine router elements (RAM,ROM,CDP,show)</p>
<p>CISCO routers use the following type of memory:<br />
·<br />
Random Access Memory (RAM) stores the running configuration when the<br />
router is running and it is<br />
cleared when switched off. Also provides cashing, routing tables and<br />
packet buffering. The IOS<br />
operates from RAM<br />
·<br />
Flash Memory is an electrically erasable, re-programmable ROM that holds<br />
the operating system<br />
image and microcode. This facilitates the upgrades to the operating<br />
system with out replacing the chips<br />
on the motherboard.<br />
·<br />
Read Only Memory (ROM) is used by the router to store bootstrap program,<br />
operation system software<br />
and Power On Self Test (POST). The ROM chips are installed in sockets on<br />
the router&#8217;s motherboard,<br />
so that they can be replaced or upgraded. ROM holds the smaller version<br />
of IOS and is loaded during<br />
power up so the router can boot up.<br />
·<br />
Nonvolatile RAM (NVRAM) This memory does not loose its information when<br />
the router is powered<br />
down. Stores the systems start up configuration file and the virtual<br />
configuration register.</p>
<p>Cisco Discovery Protocol (CDP) is CISCO&#8217;s proprietary protocol that<br />
allows you to<br />
access configuration on other routers with a single command. By running<br />
Sub Network<br />
Access Protocol (SNAP) at the data link layer, two devices running<br />
different Network<br />
Layer protocols can communicate and learn about each other. These devices<br />
include all<br />
LAN and some WANs. CDP starts by default on any router version 1.3<br />
earlier and<br />
discovers neighboring CISCO routers running CDP by doing a Data Link<br />
broadcasts. It<br />
does not matter what protocol is running at the network layer. Once CDP<br />
has disproved a<br />
router, it can then display information about the upper layer protocols,<br />
such as IP and<br />
IPX. The router caches the information it receives from its CDP<br />
neighbors. Any time a<br />
router receives up dated information that a CDP neighbor has changed, it<br />
discards the old<br />
information in favor of the broadcast.<br />
There are many show commands available for the administrator to manage<br />
the router.<br />
They can be found by typing at the command prompt Router#sh ?.<br />
(20)<br />
Manage configuration files from the privilege exec mode.</p>
<p>When the router is powered up, it does a self-test, then a loads the IOS<br />
image, and finds<br />
the configuration file and loads it. Startup configuration is in NVRAM<br />
and the operating<br />
system places it on to the RAM. To manage configuration files you must be<br />
in privilege<br />
mode. At start up you will be in user mode. To get to the privilege mode<br />
do the<br />
following: Router&gt;enable, if passwords are enabled then enter them when<br />
asked. Now<br />
your in privilege mode. Router#. By typing config t you can modify<br />
configuration files.<br />
Following are commands for starting and saving configurations:</p>
<p>·<br />
Show startup-config<br />
Shows the configuration that will loaded when the router boots.<br />
·<br />
Show running-config<br />
Show the configuration that is currently loaded to RAM and is running<br />
·<br />
Erase startup-config This command will erase the configuration in<br />
NVRAM and put you in to the initial configuration dialog<br />
·<br />
Reload<br />
This command will reload the startup-config to<br />
Memory<br />
·<br />
Setup<br />
This command starts the initial configuration dialog</p>
<p>Software version 10.3 and earlier should run the following router<br />
commands:<br />
·<br />
Show config<br />
Same as show startup-config<br />
·<br />
Write term<br />
Same as show running-config<br />
·<br />
Write erase<br />
Same as erase startup-config<br />
·<br />
Write mem<br />
Same as copy running-config startup config</p>
<p>(21)<br />
Control router password, identification and banner</p>
<p>There are five different passwords that is used to secure CISCO routers<br />
and they are as<br />
follows:<br />
Enable secret<br />
is a cryptographic password used in version 10.3 and up. It has precedence<br />
over the enable password when it exists. One can configure this password,<br />
ether during<br />
the setup mode or by typing the following:<br />
Router#config t<br />
Router(config)#enable secret kit (kit is the password you entered)<br />
Enable password<br />
is used when there is no enable secret and when you are using older<br />
software, and some older images. The administrator manually encrypts it.<br />
One can set<br />
this password during the setup process or by typing the following:<br />
Router#config t<br />
Router(config)#enable password athul (athul is the password)<br />
If both passwords are present, both passwords can not be the same</p>
<p>Virtual Terminal Password<br />
is used for Telnet sessions with the router. You can change<br />
the password at any time , but it must be specified or you will not be<br />
able to telnet in to<br />
the router. The password can be set up as follows:<br />
Router#config t<br />
Router(config)#line vty 0 4<br />
Router(config-line)#login<br />
Router(config-line)#password kit (kit is the password)<br />
Line vty 0 4 specifies the number of telnet sessions allowed in router.<br />
One can also setup<br />
a different password each line by typing line vty [port number]<br />
Auxiliary Password<br />
is used to setup a password for the auxiliary port. This port is used<br />
to connect a modem to the router for remote console connection. It is set<br />
as follows:<br />
Router#config t<br />
Router(congfig)#line aux 0<br />
Router(config-line)#login<br />
Router(config-line) #password kit (kit is the password)</p>
<p>Console Password<br />
is used to setup a password for the console port. It can be set up as<br />
follows:<br />
Router#config t<br />
Router(config)$line con 0<br />
Router(config-line)#login<br />
Router(config-line)#password kit (kit is the password)</p>
<p>Entering a Banner<br />
The banner added will be displayed when ever any one logs in to the CISCO<br />
router. The<br />
command to enter is banner #.motd. Message of the day (motd) has to start<br />
with a<br />
delimiting character. Type as follows: Router(config)#banner motd k (k is<br />
the delimiter)<br />
Now enter the text message and end with the character `k&#8217;. So we enter<br />
the following: If<br />
you are not authorized log out immediately<br />
K(and press enter)<br />
Router(config)#end<br />
(22) Identify the main CISCO IOS commands for router startup.</p>
<p>Router&#8217;s configuration files contain the configuration of the router.<br />
There are two basic<br />
configuration files for each router: startup and running. Startup<br />
configuration is held in<br />
NVRAM and is accessed when router is started. The startup configuration<br />
is placed in<br />
RAM for the router to run. Following command will display the startup<br />
configuration.<br />
Router#sh star</p>
<p>(23)<br />
Enter the initial configuration using the setup command</p>
<p>Setup command facility is an interactive facility that allows you to<br />
perform first time<br />
configuration and other basic configuration procedure on the router. The<br />
command parser<br />
allows you to make detail changes to your configuration. However, some<br />
major<br />
configuration changes do not require granularity provided by the command<br />
parser. In this<br />
case you can use the setup command facility to make major enhancements to<br />
the<br />
configuration. Set up can make add a protocol suite, to make major<br />
addressing schemes<br />
changes, or configure a newly installed interface. Setup command facility<br />
provides you<br />
with a high level view of the configuration and guides you through the<br />
configuration<br />
change process. If you are not familiar with CISCO products and the<br />
command parser,<br />
the setup command facility is a particularly valuable tool, because it<br />
asks you questions<br />
required to make configuration changes. To start setup, key in the<br />
following:<br />
Router#setup and press enter.</p>
<p>(24)<br />
Copy and manipulate configuration files</p>
<p>Binary executable IOS image is held in flash memory. IOS image is the<br />
binary program<br />
that parses and executes the configuration, while IOS configuration tells<br />
the device its<br />
current configuration. You can copy the content of the flash to a TFTP<br />
server by entering<br />
the following command Router#copy flash tftp<br />
One can copy TFTP server to flash memory by typing Router#copy tftp<br />
flash. An<br />
interactive dialog begins and asks whether to erase the entire content of<br />
the flash before<br />
copying the file. Content of the flash memory can be displayed by the<br />
command<br />
Router&gt;sh flash<br />
One can copy the current configuration from a router to a TFTP server by<br />
typing<br />
Router#copy run tftp.<br />
Or telnet to the router, copy a TFTP configuration file to running<br />
conflagration by typing<br />
the following command: Router#copy run<br />
(25)<br />
List the commands to load CISCO IOS software from: flash memory,<br />
TFTP server, or ROM.<br />
One can specify where the router should look for the CISCO IOS software<br />
to create a fall<br />
back in case one configuration does not load or one needs to load from a<br />
TFTP server. To<br />
load the CISCO IOS from a TFTP server, use the following command string:<br />
Boot system TFTP ios_filename TFTP_ipaddress. There are three places that<br />
the CISCO<br />
router can look for the a valid IOS: flash, TFTP server or ROM. Following<br />
commands<br />
will load the IOS from flash and ROM<br />
Router(config)#boot flash<br />
Router(config)#boot rom<br />
(26) Prepare to backup, upgrade and load a backup CISCO IOS image<br />
Use the TFTP server to backup the IOS image. Type the following command<br />
at the<br />
command prompt: Router(config) copy flash tftp. Flash memory can be used<br />
to upgrade<br />
the IOS without physically changing the EEPROM. To load a backup image<br />
can be<br />
carried out from TFTP server, flash and ROM. Typing the following command<br />
will cause<br />
the router to try the other alternatives if the flash configuration does<br />
not come up.<br />
boot system flash ios_filename<br />
boot system TFTP ios_filename<br />
boot system rom<br />
(27)<br />
Prepare the initial configuration of your router and enable IP<br />
When you power up the router, it does a POST and finds and loads the IOS<br />
image, the<br />
operation system for the router. Before the router can function, as you<br />
want it to, it needs<br />
to finds its configuration and apply it. If the router does not find a<br />
configuration file and it<br />
is not configured to find one on the network, it will begin the setup<br />
dialog. The setup is<br />
menu driven and all you have to do is to answer the questions. Setup<br />
dialog will let you<br />
get the router up and running with a very basic configuration. It will<br />
allow you to give a<br />
host name, set both password and secret password, enable any network<br />
layer protocols<br />
assign appropriate addresses to router interfaces and enable dynamic<br />
routing protocols.<br />
Every CISCO router has a 16 bit configuration register, which is stored<br />
in a secial<br />
memory location in NVRAM. This register controls number of functions and<br />
some of<br />
which are listed below:<br />
·<br />
Force the system in to the bootstrap program<br />
·<br />
Select a boot source and default boot file name<br />
·<br />
Enable or disable the console Break function<br />
·<br />
Set the console terminal baud rate<br />
·<br />
Load operating software from ROM<br />
·<br />
Enable booting from a TFTP server</p>
<p>The configuration register boot field is the portion of the configuration<br />
register that<br />
determines whether the router loads an IOS image, and if so where to get<br />
it from. The<br />
least significant four bits, 0 through 3, make up the boot field. If the<br />
boot field is 0&#215;0 (all<br />
four bits set to zeros) then the router will enter ROM monitor mode. If<br />
the boot field<br />
value is set to 0&#215;1 (binary 0001) the router will boot from the image in<br />
ROM. If the boot<br />
field value is 0&#215;2 through 0xF (binary 0000 through 1111) then the router<br />
will follow the<br />
normal boot sequence and will look for the boot system commands in the<br />
configuration<br />
file on the NVRAM.. Type Router# sh ver, will display the configuration<br />
register value<br />
currently in effect and the value that will be used at the next reload.<br />
Display line in the<br />
discussion is displayed on the screen is as follows:<br />
Configuration register is 0&#215;142 (will be 0&#215;102 at next reload)<br />
You can place special commands in the router&#8217;s configuration file that<br />
will instruct it<br />
where to find the IOS image. If you do not specify a file name, the<br />
router will load the<br />
first valid file it finds in the flash memory. Following are the boot<br />
commands:<br />
Router(config)#boot system flash<br />
Boots from flash<br />
Router(config)#boot system tftp 172.16.1.150 Boots from a TFTP server<br />
with ip address<br />
172.16.1.150<br />
Router(config)#boot system ROM<br />
Boots from ROM (this is last resort if nothing<br />
works and should be changed after the flash is corrected)<br />
Network Protocols<br />
(28)<br />
Monitor Novell IPX operation on the router</p>
<p>Once you have IPX configured and running, following show commands can be<br />
used to<br />
verify and track router is communicating correctly:<br />
Router#sh ipx servers. This command will show the content of the SAP<br />
table. Server<br />
name, IPX address, port, route, hops and interface.<br />
Router#sh ipx route This command will display the IPX routing table<br />
entries that the<br />
router knows about. The router reports networks to which is connected to<br />
directly and<br />
also the networks that it has learned since coming on line.</p>
<p>If you were to up parallel IPX paths between routers, by default, the<br />
CISCO routers will<br />
not learn about these paths. The router will learn a single path to the<br />
destination and<br />
discard alternative parallel, equal cost paths. If you need more than one<br />
parallel path to a<br />
destination then the router has to be configured Router(config)#ipx<br />
maximum paths 2 (up<br />
to 512).<br />
Router#sh ipx traffic. This command will display a summary of the number<br />
of IPX<br />
packets received and transmitted by the router. Summary will show IPX,<br />
RIP and SAP<br />
update packets.<br />
Router#sh ipx int e0<br />
The debug IPX command will display IPX packets as its running through your<br />
internetwork<br />
Router#debug ipx routing can have two commands, debug routing activity or<br />
debug<br />
routing events. Since debug IPX command is CPU intensive, it should be<br />
switched off as<br />
soon as monitoring process is over as shown: Router#undebug ipx routing<br />
act<br />
(29)<br />
Describe two parts of network addressing, then identify the parts in<br />
specific protocol<br />
address examples.</p>
<p>The 32 bit structure of the IP address is comprised of a network address<br />
and host address.<br />
Number of bits assigned to each of these components varies with the<br />
address class.<br />
IP addressing is analogues to the address of a letter. Street address is<br />
analogues to the<br />
network address and the house number is analogues to the host address.<br />
The concept of<br />
subnetting allows the network portion of the address to be subdivided in<br />
to number of<br />
logical sections; subnets. With subnetting the two part IP address<br />
becomes a three part<br />
address, a network address, subnetwork address and a host address.<br />
In Class A address, the most significant bit of the first octet is set to<br />
0 and first octet is set<br />
for the network address, leaving 24 bits for the host address. This<br />
corresponds to possible<br />
network addresses of 0 to 127. The reserved values are 0 and 127, leaving<br />
1 to 126 for<br />
network addressing in class A.<br />
In Class B address, the most significant bit and one after it is set to<br />
10 leaving 16 bits for<br />
the network address and 16 bits for the host address. This corresponds to<br />
possible<br />
network address of 128 to 191.<br />
In Classes C address, the most significant bit and two bits after are set<br />
to 110 leaving 24<br />
bits for network address and 8 bits for host address. This corresponds to<br />
possible network<br />
address of 192 to 223.<br />
Class D and Class E is not required for the CCNA examination.<br />
(30)<br />
Create different classes of IP addresses (and subnetting)</p>
<p>For the subnet address scheme to work, every host on the network must<br />
know which part<br />
of the host address will be used as the subnet address. This is<br />
accomplished by assigning<br />
a subnet mask to each host. Following are the subnet masks for each Class<br />
·<br />
Class A<br />
net.node.node.node<br />
default subnet mask<br />
255.0.0.0<br />
·<br />
Class B<br />
net.net.node.node default subnet mask<br />
255.255.0.0<br />
·<br />
Class C<br />
net.net,net,node default sunet mask<br />
255.255.255.0</p>
<p>(31)<br />
Configure IP addresses<br />
Following commands will configure the IP address for the Ethernet<br />
interface 0<br />
Router#config t<br />
Router(config)#int e0<br />
Router(config-if)#ip address 172.16.50.10 255.255.255.0<br />
Router(config-if)#no shut</p>
<p>(32)<br />
Verify IP addresses</p>
<p>Router#sh ip int e0 will display the following:<br />
Ethernet0 is up, line protocol is up<br />
Internet address is 172.16.50.10 255.255.255.0<br />
Broadcast address is 255.255.255.255<br />
Also many other interface details<br />
(33)<br />
List required IPX addresses and encapsulation type</p>
<p>IPX performs functions at layer 3 and 4 of the OSI model. It controls the<br />
assignment of<br />
IPX addresses (software addressing) on individual nodes, governs packet<br />
delivery across<br />
networks, and make routing decisions based on information provided by<br />
routing<br />
protocols, RIP or NLS. IPX is a connectionless protocol and it does not<br />
require an<br />
acknowledgement from the destination node. To communicate with upper layer<br />
protocols, IPX uses sockets. These are similar to TCP/IP ports, in that<br />
they are used to<br />
address, multiple independent applications running on the same machine.<br />
Sequence Packet eXchange (SPX) is a connection-orientated protocol as<br />
oppose to IPX.<br />
Through it upper layers can be assured that the data was delivered from<br />
the source to the<br />
destination. SPX works by creating virtual circuits or connections<br />
between machines,<br />
with each connection having a specific connection ID, included in the SPX<br />
header.<br />
Routing Information Protocol (RIP) is a distance vector routing protocol<br />
used to discover<br />
IPX routes through internetworks. It employs ticks (1/8 th of a second)<br />
and the hop count<br />
(number of routers between nodes) as metric for determine preferred<br />
routes.<br />
Service Advertising Protocol (SAP) allows servers to advertise the<br />
services they provide<br />
on the network. There are three types of SAP packets defined: Periodic<br />
updates, service<br />
quires and service response.<br />
Netware Link Services Protocol (NLSP) is an advanced link state routing<br />
protocol,<br />
intended to replace Novell RIP and SAP.<br />
Netware Core Protocol (NCP) provides clients with server resources such<br />
as file access,<br />
security and printing.</p>
<p>IPX addressing is somewhat different from IP addressing. The<br />
administrator assigns the<br />
network part of the address and the node part is automatically assigned.<br />
IPX address has<br />
80 bits or 10 bytes. It is divided in to network address, which is 4<br />
bytes and the node<br />
address which is the remaining 6 bytes. An example of an IPX address is<br />
as follows:<br />
0000.7C80.0000.8609.33E9. The first 8 hex digits (0000.7C80) represents<br />
the network<br />
part of the address, next 8 hex digits (0000.8609) represents the node<br />
part of the address<br />
and the last 4 hex digits (33E9) represents the socket.<br />
Encapsulation or framing is the process of taking packets from upper<br />
layer protocols and<br />
building frames to transmit across the network. Encapsulation takes IPX<br />
datagarms from<br />
Layer 3 and builds frames at layer 2 to transmit on one of the supported<br />
media.<br />
Encapsulation on following media is as follows:<br />
·<br />
Ethernet<br />
Cisco Keyword</p>
<p>Netware Frame:<br />
Ethernet_802.3<br />
novell-ether (default<br />
Netware 3.11)</p>
<p>Ethernet_802.2<br />
sap</p>
<p>Ethernet_II<br />
arpa</p>
<p>Ethernet_snap<br />
snap<br />
·<br />
Token Ring</p>
<p>Netware Frame:<br />
Token-Ring<br />
sap (default)</p>
<p>Token-Ring_snap<br />
snap</p>
<p>·<br />
FDDI</p>
<p>Netware Frame:<br />
fddi_snap<br />
snap (default)</p>
<p>Fddi_802.2<br />
sap</p>
<p>Fddi_raw<br />
novell-fddi</p>
<p>(34)<br />
Enable the Novell IPX protocol and configure interfaces</p>
<p>First you enable IPX routing and after you enable IPX protocol on each<br />
interface as<br />
follows:<br />
Router(config)#ipx routing<br />
Router(config)#int e0<br />
Router(config-in)#ipx network 2100<br />
You can add multiple frame types to the same interfaces follows: using<br />
the old way<br />
Router(config)#int so<br />
Router(config-in)#ipx netwok 3200 encap hdlc sec</p>
<p>Next is to use the current method:<br />
Router(config)#int e0.100<br />
Router(config-subif)#ipx network 2300 sap<br />
(35)<br />
Identify functions of the TCP/IP Transport layer</p>
<p>The Transport layer protocol equivalent to the layer in the DOD model is<br />
the Host to<br />
Host protocol. Its main purpose is to shield the upper layer applications<br />
from the<br />
complexities of the network. Transmission Control Protocol (TCP) and the<br />
User<br />
Datagram Protocol (UDP) operate at this layer. TCP is a<br />
connection-orientated protocol,<br />
which means that it first establishes a connection on a virtual circuit<br />
between source and<br />
destination, before sending user data. UDP is a connection less protocol,<br />
which means the<br />
source is not concerned whether the datagram it sent to the destination,<br />
did arrive there or<br />
not. TCP and UDP both receive large chunks of data form the upper layers<br />
and they<br />
break them down to manageable segments so that they can be transmitted to<br />
their<br />
destinations. Each segment is numbered so that at the destination they<br />
can be<br />
reassembled. Only TCP keeps tract of this reassembly process, by<br />
requesting the missing<br />
segment from the source. If a segment is missing from a UDP transmission,<br />
the<br />
destination does not have a mechanism request it from the source.<br />
Therefore UDP is a<br />
unreliable protocol. TCP carries out error checking, and requests a<br />
retransmission, also<br />
through a windowing mechanism it controls the data flow so that receiver<br />
buffers are not<br />
flooded by the source. TCP is a full duplex, connection orientated,<br />
reliable and accurate<br />
protocol.<br />
(36)<br />
Identify the functions of the TCP/IP network layer protocol.</p>
<p>At network layer, the TCP/IP protocol suit has the Internet Protocol (IP)<br />
in operation. The<br />
function of IP includes, packet routing and providing a single network<br />
interface to the<br />
upper layers. The lower layers do not carry out any routing and routing<br />
occurs at the IP<br />
internet layer. To route, IP looks at each packet&#8217;s IP address, then<br />
using a routing table it<br />
decides where a packet is to be sent next, choosing the best path. All<br />
hosts on a network<br />
has an IP address and it contains the required routing information to<br />
enabling the packet<br />
to travel to the destination. IP receive data segments from the next<br />
upper layer, which is<br />
the Host to Host layer and fragments them to datagrams or packets. Each<br />
datagram is<br />
assigned an IP address of the sender and the IP address of the recipient.<br />
Each machine<br />
that receives the datagram makes a routing decision based upon the<br />
packet&#8217;s destination<br />
IP address. The IP packet has a header and in it there is a field which<br />
carries an IP type<br />
number. This number indicate the socket number that the IP datagram<br />
should use to pass<br />
the data to upper layer which is the Host to Host layer. Data travelling<br />
on the internet<br />
layer is, either a TCP datagrma or a UDP datagram.</p>
<p>(37)<br />
Identify Functions performed by ICMP</p>
<p>Internet Control Message Protocol (ICMP)is a management protocol and a<br />
messaging<br />
service provider for IP. Its messages are carried as IP datagrams. RFC<br />
1256 ICMP Router<br />
Discovery Messages is an annex to ICMP, which affords hosts extend<br />
capability in<br />
discovering routes to gateways. Periodically, router advertisements are<br />
announced over<br />
the network, reporting IP addresses for its network interfaces. Hosts<br />
listens for these<br />
network infomercials to acquire route information. A router solicitation<br />
is a request for<br />
immediate advertisement and may be sent by a host when it starts up.<br />
Following are some<br />
common events and messages that ICMP relates to:<br />
·<br />
Destination Unreachable: If a router cannot send an IP address any<br />
further, it uses ICMP to send a<br />
message back to the sender advertising it of the situation. For example<br />
if the router receives a packet<br />
destined to a network that the router does not know about, it will send<br />
an ICMP Destination<br />
Unreachable message back to the sending station.<br />
·<br />
Buffer full: If a router&#8217;s memory buffer for receiving in coming<br />
datagrams is full, it will use ICMP to<br />
send out this message.<br />
·<br />
Hops: Each IP datagram is allotted a certain number of routers that it<br />
may go through, called Hops. If it<br />
reaches its limit of hops before arriving at its destination, the last<br />
router to receive that datagram<br />
deletes it. The executioner router then uses ICMP to send an message to<br />
the originator that the<br />
datagram is dead.<br />
·<br />
Ping: Packet Internet Groper uses ICMP echo message to check the physical<br />
connectivity of machines<br />
on an internetwork.</p>
<p>(38)<br />
Configure IPX access lists and SAP filters to control basic Novell traffic</p>
<p>Similar to IP access lists IPX has two types of access lists: Standard<br />
IPX Access Lists and<br />
Extended IPX Access lists.<br />
Standard IPX access lists allow or deny packets based on source and<br />
destination IPX<br />
addresses. Template to enter standard IPX access lists is as follows:<br />
Access-list (number from 800 to 899) (permit or deny) (source network IPX<br />
number)<br />
(destination network IPX number)<br />
Following example will show how the access list will permit or deny<br />
access to IPX<br />
packets.<br />
Router#config t<br />
Router(config)#access-list 810 permit 30 10<br />
Router(config)#int e0<br />
Router(config-if)#ipx access-group 810 out</p>
<p>810 correspond to the 800 to 899 range. This access-list mean that any<br />
network other than<br />
30 will be denied access network 10. If we wanted to allow access all<br />
networks to 10<br />
other than 50 the access-list entry will be as follows:<br />
Router(config)#access-list 810 deny 50 10<br />
Once we configure the access-list we must apply it to the interface, and<br />
it applied as<br />
follows:<br />
Router(config)#int e0<br />
Router(config-if)#ipx access-group 810 out<br />
Which means that the above restriction is applied to the interface<br />
Ethernet 0, IPX<br />
outgoing packets from the router to the network.<br />
Extended IPX access lists can filter based on the following: Source<br />
network, source node,<br />
destination network, destination node, IPX protocol (SAP, SPX etc) and<br />
IPX sockets.<br />
Template to enter the extended IPX access list is as follows:<br />
access-list (number, 900 to 999) permit or deny (protocol) (source IPX<br />
network number)<br />
(source socket) (destination IPX network number) (destination socket)<br />
Following example will show how the extended access list will permit or<br />
deny IPX<br />
network access using extended access lists<br />
Router(config)#access-list 910 deny ­1 50 0 10 0<br />
This means that the access is denied to any IPX protocol type from IPX<br />
network 50 on all<br />
sockets to enter IPX network 10 on all sockets.<br />
If you want to let any network access any network, any protocol and on<br />
any socket the<br />
entry will be as follows:<br />
Router(config)#access-list 910 permit ­1 ­1 0 ­1 0<br />
Again once the access list is configured it has to be applied the<br />
interface as follows:<br />
Router(config)int e0<br />
Router(config-if)#access-group 910 out</p>
<p>IPX SAP filters are used to control access IPX devices. The template for<br />
implementing<br />
IPX SAP filters are as follows: access-list (number 1000 to 1099) (permit<br />
or deny)<br />
(source network.node address of the server) (service type)<br />
Source address here is the IXP internal address for example<br />
0000.7c80.0000.8609.33e9<br />
Router(config)#access-list 1010 permit 0000.7c80.0000.33e9 0<br />
Access list 1010 is in the range, 1000 to 1099 reserved for IPX SAP<br />
filters. This IPX<br />
SAP filter will allow packets from 0000.7c80.0000.8609.33e9 to enter the<br />
Ethernet<br />
interface and be included in SAP updates across the network. The last<br />
entry is the service<br />
type and we entered 0, which means all services should be allowed.<br />
Now that we created the SAP filter, lets apply it to the interface for it<br />
to be operational.<br />
We apply it to the interface as follows:<br />
Router(config)#int e0<br />
Router(config-if)#ipx input­sap-filter 1010</p>
<p>Routing<br />
(39) Add the RIP routing protocol to your configuration</p>
<p>Route Information Protocol (RIP) is a distance vector routing protocol<br />
that practices<br />
classfull routing, which is used to discover the cost of a given route in<br />
terms of hops and<br />
stores that information on a routing table.<br />
The router can then consult the table to select the least costly most<br />
efficient route to a<br />
destination. It gathers information by watching for routing table<br />
broadcasts by other<br />
routers and updating its own table in the event that a change occurs. RIP<br />
routing tables<br />
has following minimum entries: IP destination address, A metric (1 to 15)<br />
indicative of<br />
the total cost in hops, of a particular route to a destination, IP<br />
address of a the next router<br />
that a datagram would reach , on the path to its destination, A maker<br />
signaling recent<br />
changes to a route, Timers, which are used to regulate performance,<br />
Flags, which indicate<br />
whether the information about the routers has recently changed,<br />
Hold-downs used to<br />
prevent regular update messages from reinstating a route that is no<br />
longer functional,<br />
Split horizon used to prevent routing loops. A poison reverse updates<br />
used to prevent<br />
routing loops. RIP sends out routing updates at regular intervals and<br />
whenever a network<br />
topology changes occurs. And uses the following timers to regulate its<br />
performance.<br />
Routing table update timer typically 30 seconds<br />
Route invalid timer 90 seconds<br />
Route flush timer 240 seconds<br />
To add RIP routing to a router type in the following:<br />
Router#config t<br />
Router(config)#router rip<br />
Router(config-router)#network 172.16.0.0<br />
Router(config-router)#^Z<br />
Router#wr mem (write to the running configration)<br />
(40) Add the IGRP routing protocol to your configuration</p>
<p>Interior Gateway Routing Protocol (IGRP) is a CISCO proprietary, distance<br />
vector<br />
interior routing protocol that was designed by CISCO to overcome the<br />
limitations<br />
presented by RIP. IGRP hop count is 255 as oppose to RIP&#8217;s limited 15<br />
hop count.<br />
IGRP advertises three types of routes:<br />
Interior: These are routes between subnets. If a network is not subnetted<br />
then IGRP will<br />
not advertise the interior routes.<br />
System: These are routes to networks within an Autonomous System. They<br />
are derived<br />
from directly connected interfaces, other IGRP routes, or access servers.<br />
They do not<br />
include subnet information.<br />
Exterior: These are routes to networks out side of the Autonomous System.<br />
They are<br />
considered when identifying a gateway of last resort. The gateway of last<br />
resort is chosen<br />
from the list of exterior routes that IGRP provides.<br />
Type in the following to add IGRP routing<br />
Router(config)#router igrp 10 (10 is the Autonomous System number it can<br />
be any<br />
number from 1 to 65535)<br />
Router(config-router)#network 172.16.0.0<br />
Router(config-router)#^Z<br />
Router#wt mem<br />
(41) Explain the services of separate and integrated multiprotocol routing</p>
<p>A separate protocol routing is when the routing device, eg: a switch uses<br />
a routing table<br />
based on MAC address, and can accommodate only one encapsulation type.<br />
This type of<br />
routing is carried out at the data link, MAC sublayer.<br />
Multiprotocol routing is carried out mostly by routers and similar<br />
devices because, the<br />
routing decisions are made at network layer and the routing tables are at<br />
network layer.<br />
At network layer there can exist, many different protocols and with them<br />
comes their<br />
own associated routing tables. So a router can have a IP routing table,<br />
IPX routing table<br />
and a Apple Talk routing table.<br />
A bridge or a switch connects two or more physical networks into a single<br />
logical<br />
network, where as routers connects two or more logical networks and<br />
routes between<br />
them using information that is built by routing protocols and kept in<br />
routing tables. The<br />
advantage of a router as compared to a bridge or a switch is that it<br />
physically and<br />
logically breaks a network in to multiple manageable pieces, allows for<br />
control of routed<br />
packets, and routes network layer protocols at the same time.<br />
(42)<br />
List problems that each routing type encounters when dealing with<br />
topology changes and<br />
describe techniques to reduce the number of these problems.</p>
<p>(43)<br />
Describe the benefits of network segmentation with routers<br />
Routers filter by both the hardware and network addresses. Routers only<br />
forward packets<br />
to the network segment that the packet is destined for. The benefits of<br />
network<br />
segmentation could be summarized as follows:<br />
Manageability: Multiple routing protocols give the flexibility of<br />
designing for optimum<br />
requirements of the network.<br />
Increased functionality: CISCO routers addresses the issues of flow<br />
control, error control<br />
congestion control and fragmentation, Also efficient control over packet<br />
lifetime.<br />
Multiple active paths: Using the protocols DSAPs, SSAPs and path metrics,<br />
routers can<br />
make informed routing decisions as well as interpret the next layer<br />
protocol. CISCO<br />
routers can have more than on active link between routers.</p>
<p>Network Security<br />
(44) Configure standard and extended access lists to filter IP</p>
<p>Access lists are used to control access via a router to the network or<br />
from the network to<br />
another network or to a device attached to the router. Packet filtering<br />
is performed by the<br />
access lists, to either, entering packets to the router, or exiting<br />
packets from the router.<br />
Apart from providing security to the network, access lists provide<br />
valuable static on<br />
packet flow.<br />
Access lists are a list of conditions that the network designer can<br />
enforce to get total<br />
control of access to the network and exit from the network. When you<br />
apply the access<br />
list to the router interface, it has the total control of packets<br />
entering and leaving the<br />
interface. Configuring the Standard IP access list and applying to the<br />
interface is as<br />
follows: First you configure the access list then you apply it to the<br />
interface.<br />
Configure access list as follows using the template:<br />
Access-list (number) (permit or deny) (source address)<br />
Router(configt)#access-list 10 permit 172.16.30.2<br />
Access list number for standard IP access list is any number from 1 to 99<br />
Now we apply it to the interface as follows:<br />
Router(config)#int e0<br />
Router(config-if)#access-group 10 out<br />
out at the end of the command means that the restriction is for the<br />
packets going out of<br />
the e0 interface.<br />
(45) Monitor and verify selected access lists</p>
<p>Router#sh access ­1 Will show all the access lists running on the router.<br />
Following<br />
example will show the output;<br />
Extended access list 110<br />
Permit tcp 172.16.50.2 host 172.16.10.2 eq 8080 (34 matches)<br />
What the above two lines show is as follows: first line gives the access<br />
number, which is<br />
110 an extended IP access list (any number from 100 to 199). The second<br />
line shows the<br />
number of packets that matched.<br />
Router#sh ip access-list Will show only the IP access lists as shown below<br />
Extended IP access list 110<br />
Permit tcp host 172.16.50.2 host 172.16.10.2 eq 8080 (15 matches)<br />
If the log command was used on the access list the console will then<br />
display the<br />
following:<br />
Access list number, Source address, Source port, Destination address<br />
Destination address,<br />
Number of packets.<br />
When monitoring access lists it is important to find out which interface<br />
an access list<br />
applied to. The two commands to display this information is<br />
Router#sh int e0 and Router#sh run<br />
LAN Switching<br />
(46) Describe the advantage of LAN segmentation</p>
<p>A single Ethernet LAN will work well for a limited number of users<br />
attached to the<br />
Ethernet. As time goes by and the number of users attached to the<br />
Ethernet increases and<br />
the number of people want to get on the network at the same time also<br />
increases.<br />
Congestion begins to creep in and the user access to the network begins<br />
to slow down.<br />
The remedy for this situation is to segment the LAN in to manageable<br />
parts so that each<br />
part or segment has a amount of users attached to it so that it will get<br />
congested even if<br />
all the users access simultaneously. There are many ways to do this<br />
segmentation.<br />
(47) Describe LAN segmentation using Bridges</p>
<p>Physical segmentation: You can segment by bridges and routers. Bridges<br />
segment at the<br />
MAC address of the Data Link layer. A bridge will first look at a routing<br />
table and match<br />
the packet to a segment and forwards it.<br />
(48) Describe LAN segmentation using Routers</p>
<p>Routers use the network layer to segment the network with network layer<br />
address and the<br />
MAC address of the interface. The routing table will give the MAC address<br />
and the<br />
network layer addressing protocol address. eg IP address, IPX address or<br />
apple Talk<br />
address.<br />
(49)<br />
Describe LAN segmentation using Switches</p>
<p>LAN switches uses at line speed by using the destination MAC address. In<br />
order to<br />
ensure that the packet is forwarded to the correct port, cut through<br />
switching is used. Cut<br />
through looks at the in coming frame FCS has passed it as error free, it<br />
looks at the<br />
destination MAC address and starts to forward before the full packet is<br />
received. Cut<br />
through switching greatly improves the throughput.<br />
(50)<br />
Name and describe two switching methods</p>
<p>The two switching methods or modes are Store and Forward, and Cut Through.<br />
With Store and Forward switching method, the LAN router copies the entire<br />
frame in to<br />
its buffer and checks the following and discards the frame if they are<br />
not correct:<br />
A CRC error, if the frame is runt (less than 64 bytes including the CRC)<br />
or a giant (more<br />
than 1518 bytes including CRC). The frame has no errors then the router<br />
looks up the<br />
routing table and sends to the correct interface for transmission down<br />
the line. Latency<br />
due to this error checking varies with the length of the frame.<br />
Cut Through switching, the LAN switch copies only the destination address<br />
to its buffers<br />
(six bytes after the preamble). It then looks at the destination address<br />
on the switching<br />
table, determines the outgoing interface and submits it to the correct<br />
interface for<br />
transmission down the line. Cut through switching reduce latency because,<br />
first it does<br />
not copy the complete frame to the buffer and secondly it starts to<br />
transmitting the frame<br />
as soon as it locate the destination address from the routing table.<br />
(51)<br />
Describe full and half duplex Ethernet operation</p>
<p>Full duplex can transmit and receive simultaneously, but to do so one<br />
needs a CISCO<br />
switch that has a full duplex interface. The end user needs a full duplex<br />
NIC card so that<br />
it can be connected to the switch full duplex switch interface. Full<br />
duplex Ethernet uses<br />
point to point connections and it is collusion free transmission. This is<br />
because it does not<br />
share bandwidth with any other device. The frames sent by two nodes can<br />
not collide<br />
because they are on physically separate transmit and receive circuits. If<br />
you have a full<br />
duplex 10 Mbps Ethernet operating on the same switch port it can<br />
theoretically have a<br />
throughput of 20 Mbps.<br />
Half duplex will send and receive, one at a time. When the transmitter is<br />
transmitting his<br />
receiving circuit is in active. Same with the receiver, when his<br />
receiving circuit is active<br />
his transmitting circuit is inactive.</p>
<p>(52)<br />
Describe the congestion problem in Ethernetworks</p>
<p>Ethernet device gets access to the network by listening to the signals on<br />
the cable. If no<br />
one is transmitting then the device starts to transmit. If two devices<br />
start to transmit at the<br />
same time a collusion will occur and each station will back off and<br />
retransmit the frame<br />
later. This is good for a small number of devices attached to the network<br />
but when there<br />
are too many devices gets attached, the collisions become more frequent<br />
and delays<br />
occur.</p>
<p>(53)<br />
Describe the benefits of network segmentation with bridges</p>
<p>Bridges segment the network by the MAC address of the data link layer. By<br />
segmenting a<br />
logical network in to multiple physical segments, it ensures network<br />
reliability,<br />
availability, scalability and manageability.</p>
<p>(54)<br />
Describe the benefits of network segmentation with switches.</p>
<p>Just like bridges LAN switches use destination MAC address in order to<br />
ensure that the<br />
packet gets to the right out going port. Switches are similar to bridges<br />
with more ports<br />
attached to it.</p>
<p>(55)<br />
Describe the features and benefits of fast Ethernet</p>
<p>Fast Ethernet is the IEEE 802.3u standard also known as 100 Base T. It is<br />
10 times faster<br />
because the bit rate is 100 Mbps instead of 10 Mbps for 10 Base T. This<br />
standard defines<br />
the physical layer and the data link layer, and uses the same CSMA/CD<br />
transmission<br />
technology as 10 Base T. The other standards associated with Fast<br />
Ethernet are as<br />
follows: 100 Base FX which is 100 Mbps two strand multi mode 50/125 or<br />
62.5/125-<br />
micron fiber optic cable. 100 Base T4 can use CAT 3,4,or 5 cabling with<br />
RJ 45<br />
connector. 100 Base TX can use CAT 5 or 100 ohm two pair shielded twisted<br />
pair or type<br />
1 cable.<br />
Benefits of fast Ethernet can listed as follows:<br />
·<br />
100 Base T is 10 times faster as 10 Base T<br />
·<br />
Existing cabling and network equipment can be used<br />
·<br />
10 Mbps and 100 Mbps can exist on the same cable media<br />
·<br />
It uses tried and tested CSMA/CD<br />
·<br />
Migration to 100 Mbps from 10 Mbps does not create any problems</p>
<p>(56)<br />
Describe the guide lines and distance limitations of Fast Ethernet</p>
<p>To exist on the same cable media, 10 Base T and 100 Base T, the time<br />
slots should be the<br />
same. Standard defined round trip is shorter for 100 Base T. Therefore<br />
maximum<br />
distance between transmitter and receiver is shorter for 100 Base T.<br />
Maximum distance<br />
between end nodes for 100 Base TX is 100 meters and for 100 Base FX is<br />
412 meters</p>
<p>(57)<br />
Distinguish between Cut Through and Store and Forward LAN switching</p>
<p>Cut through switching, the LAN switching device copies destination<br />
address to its in put<br />
buffer and looks at the destination switching table for the destination<br />
address. As soon as<br />
it finds the destination address, it starts to transmit the frame to the<br />
destination. This<br />
reducers the latency associated with store and forward<br />
Store and forward switching, the LAN switching device copies the entire<br />
frame to its in<br />
put buffer and does a CRC check, runt check and a giant check on the<br />
frame. If any of<br />
them checks gives errors then the frame is dropped, if not it looks at<br />
the routing table and<br />
locates the destination address and sends the frame to the appropriate<br />
interface to transmit<br />
it down the line. All these checks take time and latency time increases<br />
for store and<br />
forward switching.<br />
(58)<br />
Describe the operation of Spanning Tree Protocol and its benefits</p>
<p>IEEE 802.1d standard defines the Spanning Tree Protocol and was developed<br />
to prevent<br />
routing loops in a network. If a router, a switch or a hub has more than<br />
one path to the<br />
same destination, then a routing loop problem could occur. To prevent<br />
this, the spanning<br />
tree protocol is executed between devices to detect and logically block<br />
redundant paths<br />
on the network. For fault networks there should be redundant links<br />
between devices, and<br />
to be loop free it should also execute the spanning tree protocol.<br />
(59)<br />
Describe the benefits of virtual LANs</p>
<p>Virtual LAN (VLAN) is a logical group of end users and resources<br />
connected to defined<br />
ports on a switch. This logical group communicates at layer 2 and layer 3<br />
to establish the<br />
Virtual LAN. Most beneficial asset in implementing is the functional<br />
group. It is secure<br />
because on out side of the VLAN group can get access to the group and the<br />
members of<br />
the group can not go out side of the group. Next item is that if a member<br />
of the VLAN<br />
group is moved from one floor to another, no set ups are required because<br />
the member<br />
can go to the next floor be connected to a different switch with a port<br />
that is in the same<br />
VLAN group. Because VLAN operates at layer 2 and 3, broadcasts can be<br />
controlled.<br />
Following are the primary benefits of VLAN: Broadcast control, Functional<br />
groups and<br />
Security.</p>
<p>(60)<br />
Define and describe the function of the MAC address</p>
<p>Media Access Control (MAC) address is the hardware address of the<br />
interface and it is<br />
burned in to the NIC card. This is a unique number issued by IEEE to the<br />
manufacturer.<br />
It is 6 bytes long and the first 24 bits represents the vendor and next<br />
24 bits represents the<br />
serial number of the NIC card. This hardware address is used by the MAC<br />
layer of the<br />
Data Link layer to identify uniquely, the LAN device, to the network<br />
layer.</p>
<p>http://chicothelaanhluan.googlepages.com/cisco</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sabinshrestha.com.np/cisco/cisco-ccna-certification-knowledge-to-pass-the-exam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running A Transparent Linux Squid Bridge / Turn your Linux box into a Cisco like Catalyst switch</title>
		<link>http://www.sabinshrestha.com.np/linux-downloads/running-a-transparent-linux-squid-bridge-turn-your-linux-box-into-a-cisco-like-catalyst-switch/</link>
		<comments>http://www.sabinshrestha.com.np/linux-downloads/running-a-transparent-linux-squid-bridge-turn-your-linux-box-into-a-cisco-like-catalyst-switch/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 16:27:20 +0000</pubDate>
		<dc:creator>sabin</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sabinshrestha.com.np/?p=74</guid>
		<description><![CDATA[Let us face some facts. Not everybody, especially a small office network or a small home network can afford a Cisco catalyst switch. To replicate the features of a sophisticated switch like a Cisco catalyst switch, we can setup a Linux box with more than 2 network interfaces to run in bridging mode. Or more [...]]]></description>
			<content:encoded><![CDATA[<p>Let us face some facts. Not everybody, especially a small office network or a small home network can afford a Cisco catalyst switch. To replicate the features of a sophisticated switch like a Cisco catalyst switch, we can setup a Linux box with more than 2 network interfaces to run in bridging mode. Or more simply, a Linux bridged box having switching capabilities.</p>
<p>A bridge is a way to connect two <span class="extiw">Ethernet</span> segments together in a protocol independent way. Packets are forwarded based on Ethernet address, rather than IP address (like a router). Since forwarding is done at Layer 2, all protocols can go transparently through a bridge.<span id="more-9"></span></p>
<p>You can think of a bridge like a network switch. We will be using this Linux Transparent Squid Bridge like a switch according to the network diagram below:</p>
<blockquote><p>Internet  (5)</p></blockquote>
<blockquote>
<blockquote><p>↑↓</p></blockquote>
</blockquote>
<blockquote><p>Router  (4)</p></blockquote>
<blockquote>
<blockquote><p>↑↓</p></blockquote>
</blockquote>
<blockquote><p>Linux Bridge  (3)</p></blockquote>
<blockquote>
<blockquote><p>↑↓</p></blockquote>
</blockquote>
<blockquote><p>Physical Switch  (2)</p></blockquote>
<blockquote>
<blockquote><p>↑↓</p></blockquote>
</blockquote>
<blockquote><p>LAN Network  (1)</p></blockquote>
<p><em><strong>Reasons for running a Linux bridge are:</strong></em></p>
<p>(A.) The job of the bridge is to examine the destination of the data packets one at a time and decide whether or not to pass the packets to the other side of the Ethernet segment. The result is a faster, quieter network with less collisions.</p>
<p>(B.) You can overcome hardware incompatibilities with a bridge, without leaving the address-range of your IP-net or subnet. E.g. it’s possible to bridge between different physical media like 10 Base T and 100 Base TX.</p>
<p>(C.) You don’t need to change your existing network layout. You just plug in the bridge and you start working. If for some reasons, your Linux bridge box should go down, reconnect the cables from your switch (2) to your router (4), and nobody will even notice that something was not working!</p>
<dl>
<dt><em> </em>
</dt>
<dt><em><strong>Features of a Linux Bridge box:</strong></em></dt>
<dt>
</dt>
<dt>STP</dt>
<dd>The Spanning Tree Protocol is a nifty method of keeping Ethernet devices connected in multiple paths working. The participating switches negotiate the shortest available path by STP. </dd>
<dt>Multiple Bridge Instances</dt>
<dd>Multiple bridge instances allow you to have more than one bridge on your box up and running, and to control each instance separately. </dd>
<dt>Fire-walling</dt>
</dl>
<p> Because we are running a Linux box with a kernel 2.4.x or 2.6.x, we can also apply some IPTABLES firewall rules.</p>
<p><em><strong>What do I need to run such a Linux Bridge?</strong></em></p>
<p>You just need a Linux OS with a kernel greater than 2.4. I prefer the 2.6 kernel. The minimum number of network interfaces in your Linux box should at least be 2. This guide assumes that the Linux box has 2 network interfaces, i.e., eth0 and eth1.</p>
<p>However, you may use any number of network interfaces supported on by the hardware of your Linux box.</p>
<p>You then need the “<strong>bridge-utils</strong>” package. The 2nd tool needed is <strong>“ebtables”.</strong></p>
<p>You can use either the binaries installed by your OS distribution or simply download them from the internet.</p>
<p>On a Debian box , it’s as simple as:   apt-get   install  bridge-utils  ebtables</p>
<p>The Bridge-Utils package contains the main tools required to setup and configure a Linux bridge. Among the tools provided by bridge-utils, <strong>brctl </strong>will primarily be used to construct the bridge.</p>
<p>The ebtables program is a filtering tool for a bridging firewall. The filtering is focussed on the Link Layer Ethernet frame fields. It also gives us the ability to alter the Ethernet MAC addresses.</p>
<p>Now that you have a 2.4/2.6 Linux kernel box and you have somehow managed to install the bridge-utils and ebtables packages, we can move on to the next topic of configuring the bridge and running a transparent squid on it.</p>
<p><strong>Installing and configuring Squid </strong></p>
<p><strong>(1.)   Create the user squid and group squid</strong></p>
<p>groupadd squid</p>
<p>useradd   -g   squid   squid</p>
<p><strong>(2.) Download the latest version of squid in /usr/local/src</strong></p>
<p>cd /usr/local/src<br />
wget http://www.squid-cache.org/Versions/v2/2.6/squid-2.6.STABLE18.tar.gz</p>
<p><strong>(3.) Unzip it’s contents</strong></p>
<p>tar zxvf squid-2.6.STABLE18.tar.gz</p>
<p><strong>(4.) Configure squid with the following parameters</strong></p>
<p>cd   squid-2.6.STABLE18</p>
<p>./configure     –bindir=/usr/local/sbin \</p>
<p>–sysconfdir=/usr/local/etc/squid \<br />
–datadir=/usr/local/etc/squid \<br />
–libexecdir=/usr/local/libexec/squid \<br />
–localstatedir=/usr/local/squid \<br />
–enable-removal-policies=heap,lru \<br />
–enable-storeio=diskd,aufs,coss,ufs,null \<br />
–enable-time-hack \<br />
–enable-snmp \<br />
–with-large-files \<br />
–enable-large-cache-files \<br />
–prefix=/usr/local \<br />
–disable-ident-lookups  \<br />
–enable-cache-digests \<br />
–enable-underscores \<br />
–enable-kill-parent-hack \<br />
–enable-follow-x-forwarded-for</p>
<p><strong>(5.) If all goes well, run</strong></p>
<p>make all<br />
make install</p>
<p>That’s it. Squid should now be installed. It’s time to do some Squid configurations.</p>
<p>Note: If you encounter problems in configuring or compilation, 99% of them can be solved. The errors are either related to missing compilers, packages or dependencies.</p>
<p><strong> (6.)  Create a new Cache directory for Squid</strong></p>
<p>mkdir   -p   /usr/local/squid/cache</p>
<p><strong>(7.)  Create a new /usr/local/etc/squid/squid.conf</strong></p>
<p>cd   /usr/local/etc/squid</p>
<p>mv   /usr/local/etc/squid/squid.conf    /usr/local/etc/squid/squid.conf.default.config</p>
<p>vi    /usr/local/etc/squid/squid.conf</p>
<p>##Copy and paste following working configuration<br />
########### Start of squid.conf ##############<br />
cache_effective_user squid<br />
cache_effective_user squid</p>
<p>http_port 3128 transparent</p>
<p>cache_dir ufs /usr/local/squid/cache 2000 16 256</p>
<p>cache_access_log /usr/local/squid/logs/access.log<br />
cache_log /usr/local/squid/logs/cache.log<br />
cache_store_log none</p>
<p>emulate_httpd_log on</p>
<p>cache_mem 16 MB</p>
<p>hierarchy_stoplist cgi-bin ?<br />
acl QUERY urlpath_regex cgi-bin \?<br />
no_cache deny QUERY</p>
<p>hosts_file /etc/hosts</p>
<p>refresh_pattern ^ftp: 1440 20% 10080<br />
refresh_pattern ^gopher: 1440 0% 1440<br />
refresh_pattern . 0 40% 4320</p>
<p>acl all src 0.0.0.0/0.0.0.0</p>
<p>##Define your network below</p>
<p>acl mynetwork src 192.168.0.0/24<br />
acl manager proto cache_object<br />
acl localhost src 127.0.0.1/255.255.255.255<br />
acl to_localhost dst 127.0.0.0/8<br />
acl purge method PURGE<br />
acl CONNECT method CONNECT</p>
<p>acl Safe_ports port 80          # http<br />
acl Safe_ports port 21          # ftp<br />
acl Safe_ports port 443         # https</p>
<p>acl Safe_ports port 1025-65535   #unregistered ports</p>
<p>acl SSL_ports port 443 563</p>
<p>http_access allow manager localhost<br />
http_access deny manager<br />
http_access allow purge localhost<br />
http_access deny purge<br />
http_access deny !Safe_ports<br />
http_access deny CONNECT !SSL_ports</p>
<p>http_access allow localhost<br />
http_access allow mynetwork<br />
http_access deny all<br />
http_reply_access allow all<br />
icp_access allow mynetwork</p>
<p>icp_access deny all</p>
<p>visible_hostname  proxybridge.hostname.com</p>
<p>coredump_dir /usr/local/squid</p>
<p>######## End of squid.conf ##########</p>
<p><strong>(8.)   Change the permissions of squid logs and cache_dir</strong></p>
<p>chown    -R    squid:squid    /usr/local/squid/</p>
<p>chown    -R    squid:squid    /usr/local/etc/squid/</p>
<p>(9.)   Initialize Squid’s cache and run Squid in daemon mode</p>
<p>/usr/local/sbin/squid   -z</p>
<p>/usr/local/sbin/squid    -D</p>
<p>Check for any errors. If there are none, put the proxy server manually in your web browser and try browsing websites!</p>
<p><em><strong>Next, we will setup a bridge using the tools provided by the package “bridge_utils”</strong></em></p>
<p>As stated above, 1 of the most important tools installed by the bridge-utils package is brctl command.</p>
<p>We will be using the brctl command for creating a logical bridge instance with the name br0. You will need at least 1 bridge instance for bridging to work.</p>
<p><strong>(1.) Creating the logical bridge instance called br0.</strong></p>
<p>#Add bridge instance called br0</p>
<p>brctl    addbr   br0</p>
<p>#Show your bridge status<br />
brctl    show</p>
<p>#Show MAC addresses on your bridge</p>
<p>brctl     showmacs     br0<br />
<strong> (2.)   Add your network interfaces to the bridge.</strong></p>
<p>brctl       addif       br0      eth0</p>
<p>brctl       addif         br0        eth1</p>
<p><strong>(3.)   Zero in your IP network interfaces to 0.0.0.0 and bring it up.</strong><br />
ifconfig    eth0    0.0.0.0        promisc        up</p>
<p>ifconfig    eth1    0.0.0.0        promisc         up</p>
<p>(<strong>4.)  Bring up the bridge.  Since we also want to administer this bridge box, we point an IP address to the br0 interface.</strong></p>
<p>ifconfig     br0        192.168.100.9        netmask      255.255.255.0        up</p>
<p><strong>(5.)  Give your  bridge interface br0 a default gateway so that you can access it via SSH, etc.</strong></p>
<p>route     add    default    gw      192.168.100.1        dev    br0</p>
<p>That’s it. You have a simple yet a very effective Linux bridge  box!</p>
<h3><strong><em>The final remaining part is to redirect the web requests from your network to your bridged box running Squid transparently.</em></strong></h3>
<p><strong>(1.)  To redirect web traffic from your LAN to your Bridge box transparently, run the following script called rc.bridge.</strong></p>
<p>#####Start of rc.bridge script ######</p>
<p>#!/bin/sh</p>
<p>###Date: 12-Oct-2007</p>
<p>###tekbdrlimbu@hotmail.com####</p>
<p>/sbin/ebtables -t broute -A BROUTING -p IPv4 –ip-protocol 6  \<br />
–ip-destination-port 80 -j redirect –redirect-target ACCEPT<br />
/sbin/iptables -t nat -A PREROUTING -i br0 -p tcp –dport 80  \<br />
-j REDIRECT –to-port 3128<br />
/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 80 -j REDIRECT –to-ports 3128<br />
/sbin/iptables -t nat -A PREROUTING -i eth1 -p tcp –dport 80 -j REDIRECT –to-ports 3128<br />
/sbin/iptables -t nat -A PREROUTING -i br0 -p tcp –dport 80 -j REDIRECT –to-ports 3128</p>
<p>######### End of rc.bridge script #####</p>
<p>Run this script and restart Squid. You will have a working Squid transproxy running in a Linux bridged box!!!</p>
<p>We will cover more advanced topics like Spanning Tree Protocol (STP) , MAC and ARP filtering , etc, in the coming days ahead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sabinshrestha.com.np/linux-downloads/running-a-transparent-linux-squid-bridge-turn-your-linux-box-into-a-cisco-like-catalyst-switch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Squid + FreeBSD + Cisco WCCP !!!</title>
		<link>http://www.sabinshrestha.com.np/linux-downloads/squid-freebsd-cisco-wccp/</link>
		<comments>http://www.sabinshrestha.com.np/linux-downloads/squid-freebsd-cisco-wccp/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 14:09:28 +0000</pubDate>
		<dc:creator>sabin</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sabinshrestha.com.np/?p=63</guid>
		<description><![CDATA[This How-To details the steps required to configure WCCP version 2 with a Cisco 3620 or 7206 router together with Squid-2.6.STABLE18 running on FreeBSD-6.2. Cisco’s WCCP (Web Cache Control Protocol) version 2 is used for sending web requests from clients to 1 or more Squid proxy servers. WCCP feature allows us to redirect Web traffic [...]]]></description>
			<content:encoded><![CDATA[<p>This How-To details the steps required to configure WCCP version 2 with a Cisco 3620 or 7206 router together with Squid-2.6.STABLE18 running on FreeBSD-6.2.</p>
<p><span>Cisco’s WCCP (Web Cache Control Protocol) version 2 is used for sending web requests from clients to 1 or more Squid proxy servers. WCCP </span>feature allows us to redirect Web traffic to our proxy servers which in turn provides Web caching, filtering, or other services, thus reducing transmission costs and downloading time.</p>
<p style="margin-bottom: 0pt" align="left">With WCCP, we can build a “cache cluster” for load balancing, scaling, and fault tolerance.</p>
<p style="margin-bottom: 0pt" align="left">For example, in the case of 2 proxy severs, if 1 proxy server goes down, WCCP redirects clients requests to the 2nd working proxy server.</p>
<p style="widows: 0; orphans: 0">In the rare circumstance where both or all of your proxy servers should go down, WCCP will determine the dead proxy servers and will route clients web requests directly from your cisco router.</p>
<p style="margin-bottom: 0pt; widows: 0; orphans: 0" align="left"> <font size="3">Note:  Only </font><span class="content"> Cisco IOS Release 12.1 and later releases allow the use of either Version 1 (WCCPv1) or Version 2 (WCCPv2) of the WCCP.</span></p>
<p style="margin-bottom: 0pt; widows: 0; orphans: 0" align="left"><span id="more-8"></span></p>
<p style="margin-bottom: 0pt; widows: 0; orphans: 0" align="left">&nbsp;</p>
<ul>
<p style="widows: 0; orphans: 0" align="center"><font size="3"><strong>How 	WCCP and transparent intercepting Squid caches work?</strong></font></p>
<li>
<p style="widows: 0; orphans: 0">A<font size="3"><span> 	Client’s Web browser makes a request, which goes to the cisco router. </span></font></p>
</li>
<li>
<p style="widows: 0; orphans: 0"><font size="3">The router intercepts the request. </font></p>
</li>
<li>
<p style="widows: 0; orphans: 0"><font size="3">The router redirects the request to a new location inside a generic routing encapsulation (GRE) frame to prevent any modifications to the original packet. </font></p>
</li>
<li>
<p style="widows: 0; orphans: 0"><font face="Helvetica, sans-serif">A 	(GRE) tunnel is established between our FreeBSD squid boxes and the cisco 3620/7206 router.</font></p>
</li>
<li>
<p style="widows: 0; orphans: 0"><font size="3">All 	redirected requests from the router are encapsulated down the GRE 	tunnel to our FreeBSD Squid caches. </font></p>
</li>
<li>
<p style="widows: 0; orphans: 0"><font face="Helvetica, sans-serif">The 	FreeBSD Squid boxes decapsulates the GRE traffic and redirects the 	WCCP packets onto Squid.</font></p>
</li>
<li>
<p style="widows: 0; orphans: 0"><font face="Helvetica, sans-serif">This 	redirection is achieved transparently using</font> FreeBSD IP 	forwarding and IPFW firewall.</p>
</li>
<li>
<p style="widows: 0; orphans: 0"><font face="Helvetica, sans-serif">Squid pulls apart the request, then attempts to deliver the content either from the local cache or via direct request from target.</font></p>
</li>
<li>
<p style="widows: 0; orphans: 0"><font face="Helvetica, sans-serif">The 	content is then delivered back to the router for delivery to the 	originator (ie. client’s browser).</font></p>
</li>
</ul>
<p>Now to connect all the pieces of information regarding WCCP, the following steps are required:</p>
<p><strong>(1.)    Configure and compile your kernel</strong></p>
<p>cd   /usr/src/sys/i386/conf/</p>
<p>cp     GENERIC       SQUID_WCCP</p>
<p>vi       SQUID_WCCP</p>
<p><strong>(2.)  Copy and paste the following kernel parameters</strong></p>
<p>machine         i386<br />
cpu             I686_CPU<br />
ident           SQUID_WCCP</p>
<p>options         SCHED_4BSD              # 4BSD scheduler<br />
options         PREEMPTION              # Enable kernel thread preemption<br />
options         INET                    # InterNETworking<br />
options         FFS                     # Berkeley Fast Filesystem<br />
options         SOFTUPDATES             # Enable FFS soft updates support<br />
options         UFS_ACL                 # Support for access control lists<br />
options         UFS_DIRHASH             # Improve performance on big directories<br />
options         MD_ROOT                 # MD is a potential root device<br />
options         NFSCLIENT               # Network Filesystem Client<br />
options         NFSSERVER               # Network Filesystem Server<br />
options         NFS_ROOT                # NFS usable as /, requires NFSCLIENT<br />
options         MSDOSFS                 # MSDOS Filesystem<br />
options         CD9660                  # ISO 9660 Filesystem<br />
options         PROCFS                  # Process filesystem (requires PSEUDOFS)<br />
options         PSEUDOFS                # Pseudo-filesystem framework<br />
options         GEOM_GPT                # GUID Partition Tables.<br />
options         COMPAT_43               # Compatible with BSD 4.3 [KEEP THIS!]<br />
options         COMPAT_FREEBSD4         # Compatible with FreeBSD4<br />
options         COMPAT_FREEBSD5         # Compatible with FreeBSD5<br />
options         SCSI_DELAY=5000         # Delay (in ms) before probing SCSI<br />
options         KTRACE                  # ktrace(1) support<br />
options         SYSVSHM                 # SYSV-style shared memory<br />
options         SYSVMSG                 # SYSV-style message queues<br />
options         SYSVSEM                 # SYSV-style semaphores<br />
options         _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time #extensions<br />
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev<br />
options         ADAPTIVE_GIANT          # Giant mutex is adaptive.</p>
<p>device          apic                    # I/O APIC<br />
device          eisa<br />
device          pci<br />
device          fdc<br />
device          ata<br />
device          atadisk         # ATA disk drives<br />
device          ataraid         # ATA RAID drives<br />
device          atapicd         # ATAPI CDROM drives<br />
device          atapifd         # ATAPI floppy drives<br />
device          atapist         # ATAPI tape drives<br />
options         ATA_STATIC_ID   # Static device numbering<br />
device          ahb             # EISA AHA1742 family<br />
device          ahc             # AHA2940 and onboard AIC7xxx devices<br />
options         AHC_REG_PRETTY_PRINT    # Print register bitfields in debug<br />
# output.  Adds ~128k to driver.<br />
device          ahd             # AHA39320/29320 and onboard AIC79xx devices<br />
options         AHD_REG_PRETTY_PRINT    # Print register bitfields in debug<br />
# output.  Adds ~215k to driver.<br />
device          amd             # AMD 53C974 (Tekram DC-390(T))<br />
device          isp             # Qlogic family<br />
device          mpt             # LSI-Logic MPT-Fusion<br />
device          sym             # NCR/Symbios Logic (newer chipsets + those of `ncr’)<br />
device          trm             # Tekram DC395U/UW/F DC315U adapters<br />
device          adv             # Advansys SCSI adapters<br />
device          adw             # Advansys wide SCSI adapters<br />
device          aha             # Adaptec 154x SCSI adapters<br />
device          aic             # Adaptec 15[012]x SCSI adapters, AIC-6[23]60.<br />
device          bt              # Buslogic/Mylex MultiMaster SCSI adapters<br />
device          ncv             # NCR 53C500<br />
device          nsp             # Workbit Ninja SCSI-3<br />
device          stg             # TMC 18C30/18C50<br />
device          scbus           # SCSI bus (required for SCSI)<br />
device          ch              # SCSI media changers<br />
device          da              # Direct Access (disks)<br />
device          sa              # Sequential Access (tape etc)<br />
device          cd              # CD<br />
device          pass            # Passthrough device (direct SCSI access)<br />
device          ses             # SCSI Environmental Services (and SAF-TE)<br />
device          amr             # AMI MegaRAID<br />
device          arcmsr          # Areca SATA II RAID<br />
device          asr             # DPT SmartRAID V, VI and Adaptec SCSI RAID<br />
device          ciss            # Compaq Smart RAID 5*<br />
device          dpt             # DPT Smartcache III, IV &#8211; See NOTES for options<br />
device          hptmv           # Highpoint RocketRAID 182x<br />
device          rr232x          # Highpoint RocketRAID 232x<br />
device          iir             # Intel Integrated RAID<br />
device          ips             # IBM (Adaptec) ServeRAID<br />
device          mly             # Mylex AcceleRAID/eXtremeRAID<br />
device          twa             # 3ware 9000 series PATA/SATA RAID<br />
device          aac             # Adaptec FSA RAID<br />
device          aacp            # SCSI passthrough for aac (requires CAM)<br />
device          ida             # Compaq Smart RAID<br />
device          mfi             # LSI MegaRAID SAS<br />
device          mlx             # Mylex DAC960 family<br />
device          pst             # Promise Supertrak SX6000<br />
device          twe             # 3ware ATA RAID<br />
device          atkbdc          # AT keyboard controller<br />
device          atkbd           # AT keyboard<br />
device          psm             # PS/2 mouse<br />
device          kbdmux          # keyboard multiplexer<br />
device          vga             # VGA video card driver<br />
device          splash          # Splash screen and screen saver support<br />
device          sc<br />
device          agp             # support several AGP chipsets<br />
device          pmtimer<br />
device          cbb             # cardbus (yenta) bridge<br />
device          pccard          # PC Card (16-bit) bus<br />
device          cardbus         # CardBus (32-bit) bus<br />
device          sio             # 8250, 16[45]50 based serial ports<br />
device          ppc<br />
device          ppbus           # Parallel port bus (required)<br />
device          lpt             # Printer<br />
device          plip            # TCP/IP over parallel<br />
device          ppi             # Parallel port interface device<br />
device          de              # DEC/Intel DC21×4x (“Tulip”)<br />
device          em              # Intel PRO/1000 adapter Gigabit Ethernet Card<br />
device          ixgb            # Intel PRO/10GbE Ethernet Card<br />
device          txp             # 3Com 3cR990 (“Typhoon”)<br />
device          vx              # 3Com 3c590, 3c595 (“Vortex”)<br />
device          miibus          # MII bus support<br />
device          bce             # Broadcom BCM5706/BCM5708 Gigabit Ethernet<br />
device          bfe             # Broadcom BCM440x 10/100 Ethernet<br />
device          bge             # Broadcom BCM570xx Gigabit Ethernet<br />
device          dc              # DEC/Intel 21143 and various workalikes<br />
device          fxp             # Intel EtherExpress PRO/100B (82557, 82558)<br />
device          lge             # Level 1 LXT1001 gigabit Ethernet<br />
device          nge             # NatSemi DP83820 gigabit Ethernet<br />
device          nve             # nVidia nForce MCP on-board Ethernet Networking<br />
device          pcn             # AMD Am79C97x PCI 10/100(precedence over ‘lnc’)<br />
device          re              # RealTek 8139C+/8169/8169S/8110S<br />
device          rl              # RealTek 8129/8139<br />
device          sf              # Adaptec AIC-6915 (“Starfire”)<br />
device          sis             # Silicon Integrated Systems SiS 900/SiS 7016<br />
device          sk              # SysKonnect SK-984x &amp; SK-982x gigabit Ethernet<br />
device          ste             # Sundance ST201 (D-Link DFE-550TX)<br />
device          stge            # Sundance/Tamarack TC9021 gigabit Ethernet<br />
device          ti              # Alteon Networks Tigon I/II gigabit Ethernet<br />
device          tl              # Texas Instruments ThunderLAN<br />
device          tx              # SMC EtherPower II (83c170 “EPIC”)<br />
device          vge             # VIA VT612x gigabit Ethernet<br />
device          vr              # VIA Rhine, Rhine II<br />
device          wb              # Winbond W89C840F<br />
device          xl              # 3Com 3c90x (“Boomerang”, “Cyclone”)<br />
device          cs              # Crystal Semiconductor CS89×0 NIC<br />
device          ed              # NE[12]000, SMC Ultra, 3c503, DS8390 cards<br />
device          ex              # Intel EtherExpress Pro/10 and Pro/10+<br />
device          ep              # Etherlink III based cards<br />
device          fe              # Fujitsu MB8696x based cards<br />
device          ie              # EtherExpress 8/16, 3C507, StarLAN 10 etc.<br />
device          lnc             # NE2100, NE32-VL Lance Ethernet cards<br />
device          sn              # SMC’s 9000 series of Ethernet chips<br />
device          xe              # Xircom pccard Ethernet<br />
device          wlan            # 802.11 support<br />
device          wlan_wep        # 802.11 WEP support<br />
device          wlan_ccmp       # 802.11 CCMP support<br />
device          wlan_tkip       # 802.11 TKIP support<br />
device          an              # Aironet 4500/4800 802.11 wireless NICs.<br />
device          ath             # Atheros pci/cardbus NIC’s<br />
device          ath_hal         # Atheros HAL (Hardware Access Layer)<br />
device          ath_rate_sample # SampleRate tx rate control for ath<br />
device          awi             # BayStack 660 and others<br />
device          ral             # Ralink Technology RT2500 wireless NICs.<br />
device          wi              # WaveLAN/Intersil/Symbol 802.11 wireless NICs.<br />
device          loop            # Network loopback<br />
device          random          # Entropy device<br />
device          ether           # Ethernet support<br />
device          sl              # Kernel SLIP<br />
device          ppp             # Kernel PPP<br />
device          tun             # Packet tunnel.<br />
device          pty             # Pseudo-ttys (telnet etc)<br />
device          md              # Memory “disks”<br />
device          gif             # IPv6 and IPv4 tunneling<br />
device          faith           # IPv6-to-IPv4 relaying (translation)<br />
device          bpf             # Berkeley packet filter<br />
device          uhci            # UHCI PCI-&gt;USB interface<br />
device          ohci            # OHCI PCI-&gt;USB interface<br />
device          ehci            # EHCI PCI-&gt;USB interface (USB 2.0)<br />
device          usb             # USB Bus (required)<br />
device          ugen            # Generic<br />
device          uhid            # “Human Interface Devices”<br />
device          ukbd            # Keyboard<br />
device          ulpt            # Printer<br />
device          umass           # Disks/Mass storage &#8211; Requires scbus and da<br />
device          ums             # Mouse<br />
device          ural            # Ralink Technology RT2500USB wireless NICs<br />
device          urio            # Diamond Rio 500 MP3 player<br />
device          uscanner        # Scanners<br />
device          aue             # ADMtek USB Ethernet<br />
device          axe             # ASIX Electronics USB Ethernet<br />
device          cdce            # Generic USB over Ethernet<br />
device          cue             # CATC USB Ethernet<br />
device          kue             # Kawasaki LSI USB Ethernet<br />
device          rue             # RealTek RTL8150 USB Ethernet<br />
device          firewire        # FireWire bus code<br />
device          sbp             # SCSI over FireWire (Requires scbus and da)<br />
device          fwe             # Ethernet over FireWire (non-standard!)</p>
<p>#Enable IPFW in Kernel to DROP packets by default rule</p>
<p>options         IPFIREWALL              #firewall<br />
options         IPFIREWALL_VERBOSE      #enable logging to syslogd(8)<br />
options         IPFIREWALL_FORWARD      #enable transparent proxy support<br />
options         IPFIREWALL_VERBOSE_LIMIT=500    #limit verbosity<br />
options         IPSTEALTH               #support for stealth forwarding<br />
options         DUMMYNET<br />
options         NETGRAPH</p>
<p>options DEVICE_POLLING<br />
options HZ=1000</p>
<p>options         SHMSEG=128<br />
options         SHMMNI=256<br />
options         SHMMAX=50331648 # max shared memory segment size (bytes)<br />
options         SHMALL=16384    # max amount of shared memory (pages)<br />
options         MSGMNB=16384    # max # of bytes in a queue<br />
options         MSGMNI=48       # number of message queue identifiers<br />
options         MSGSEG=768      # number of message segments<br />
options         MSGSSZ=64       # size of a message segment<br />
options         MSGTQL=4096     # max messages in system</p>
<p><strong>(3.)     Configure and compile your new kernel</strong></p>
<p>(a.)       config        SQUID_WCCP</p>
<p>(b.)   cd        ../compile/SQUID_WCCP/</p>
<p>(c.)       make       cleandepend</p>
<p>(d.)      make      depend</p>
<p>(e.)       make</p>
<p>(f.)      make     install</p>
<p>(g.)      reboot</p>
<p>If all goes well, your kernel has been compiled!!!. Reboot with your new kernel.</p>
<p><strong>(4.)    Create the GRE tunnel on your FreeBSD-6.x box</strong></p>
<p>ifconfig      gre0      create<br />
ifconfig gre0 IP.OF.SQUID.BOX 10.20.30.40 netmask 255.255.255.255 link2 tunnel IP.OF.SQUID.BOX IP.OF.CISCO.ROUTER up</p>
<p><strong>(3.)  Configuring WCCP on your squid box. Add the following in your squid.conf</strong></p>
<p>wccp2_router   IP.OF.CISCO.ROUTER<br />
#wccp2_router   LoopBack.IP.OF.CISCOROUTER</p>
<p>wccp2_forwarding_method  1<br />
wccp2_return_method  1<br />
wccp2_service standard  0<br />
<strong> (4.)  Create the firewall rules to redirect web requests to Squid’s 3128 port via the GRE tunnel.</strong></p>
<p>We will create the script called rc.firewall to save our IPFW rules. Use the script below:</p>
<p>#!/bin/sh</p>
<p>##### Start of rc.firewall script  ######</p>
<p>##Change the network interfaces and IP addresses to match your network!</p>
<p>NET_IF=”em0″<br />
IPFW=”/sbin/ipfw -q”</p>
<p>#IP of Proxy Server<br />
IF_ADDR=”192.168.0.10″</p>
<p>NTP_SERVER=”192.168.0.55″</p>
<p>PROXY_NET=”192.168.0.0/27″</p>
<p>ALL_NET=”192.168.0.0/24″<br />
CLIENT_NET=”192.168.0.128/25″<br />
WIRELESS_NET=”172.16.0.128/25″<br />
ADMIN_NET=”192.168.0.48/28″<br />
SSH_PORT=”12345″</p>
<p>LOCALHOST=”127.0.0.1″</p>
<p>$IPFW -f flush</p>
<p>$IPFW add allow all from any to any via lo0</p>
<p>$IPFW add fwd 127.0.0.1,3128 tcp from any to any 80 via gre0 in</p>
<p>$IPFW add fwd 127.0.0.1,3128 ip from any to any via gre0 in<br />
$IPFW add fwd 127.0.0.1,3128 tcp from any to any 80 in<br />
$IPFW add fwd 127.0.0.1,3128 tcp from any to any http in via gre0</p>
<p>#$IPFW add permit ip from any to any<br />
$IPFW add allow all from $IF_ADDR to any</p>
<p>#$IPFW add fwd 127.0.0.1,3128 ip from any to any via gre0 in<br />
#$IPFW add fwd 127.0.0.1,3128 tcp from any to any http in via gre0<br />
#$IPFW add fwd 127.0.0.1,3128 tcp from any to any 80 in<br />
#$IPFW add permit ip from any to any</p>
<p>#Allow local DNS caching<br />
$IPFW add allow udp from $ALL_NET to any 53</p>
<p>$IPFW add allow udp from any 53 to $IF_ADDR<br />
$IPFW add allow tcp from any 53 to $IF_ADDR</p>
<p>$IPFW add allow all from any to any out via $NET_IF</p>
<p>#######For DNS<br />
#Allow DNS Query<br />
$IPFW add allow udp from $ALL_NET 53 to $IF_ADDR<br />
$IPFW add allow udp from $WIRELESS_NET 53 to $IF_ADDR</p>
<p>#For Proxy access<br />
#$IPFW add fwd 127.0.0.1,3128 tcp from any to any 80 in</p>
<p>$IPFW add allow tcp  from $ALL_NET to any  3128 in via $NET_IF<br />
$IPFW add allow tcp  from $WIRELESS_NET to any  3128 in via $NET_IF</p>
<p>#####Allow Established session<br />
$IPFW add allow tcp from any to any in via $NET_IF established</p>
<p>#$IPFW add allow tcp from any to $IF_ADDR 113</p>
<p>#For ICP Query<br />
$IPFW add allow UDP  from $PROXY_NET  to  $PROXY_NET 3130</p>
<p>$IPFW add allow udp from $NTP_SERVER 123 to $IF_ADDR</p>
<p>###Only needed for Experimental Multicast<br />
#$IPFW add allow all from 224.9.9.1 to any<br />
#$IPFW add allow all from any to 224.9.9.1<br />
#$IPFW add allow all from me to 224.9.9.1</p>
<p>#######For SSH</p>
<p>$IPFW add allow tcp from $ADMIN_NET to $IF_ADDR $SSH_PORT</p>
<p>#for snmpwalk from Admin network<br />
$IPFW add allow udp from $ADMIN_NET  to me 3001<br />
$IPFW add allow udp from $ADMIN_NET  to me 161<br />
$IPFW add allow udp from $ADMIN_NET  to me 161<br />
$IPFW add allow udp from $LOCALHOST   to me 3001<br />
$IPFW add allow udp from $LOCALHOST   to me 161</p>
<p>###########<br />
$IPFW add allow ICMP from $ALL_NET to any<br />
$IPFW add allow ICMP from $WIRELESS_NET to any<br />
#################################################</p>
<p>###Only if you want the world to send ICMP packets to your server!!</p>
<p>#ipfw add allow icmp from any to any icmptypes 8<br />
#ipfw add allow icmp from any to any</p>
<p>$IPFW add allow all from $ADMIN_NET to me<br />
$IPFW add allow all from me to $ADMIN_NET</p>
<p>$IPFW add 65533 deny log  all  from any to any</p>
<p>############# End of rc.firewall ###############</p>
<p><strong>(5.)    Configure WCCP on your Cisco router</strong></p>
<p>Global Configuration</p>
<pre>Router (config)#  ip wccp version 2</pre>
<pre>Router (config)#  ip wccp web-cache redirect-list 160</pre>
<p>Access-List 160</p>
<pre>permit ip 192.168.0.0 0.0.0.255 any</pre>
<pre>permit ip 172.16.0.0 0.0.0.255 any</pre>
<pre>Router (config)#   interface fastethernet 0/0
Router(config-if)# ip wccp web-cache redirect in</pre>
<pre>Router# write</pre>
<p>END of Router WCCP confiruration.</p>
<p><strong>(6.) Restart Squid and reload your firewall. If all goes well, you will have a working WCCP2 on your FreeBSD Box with Squid-2.6.STABLE18.</strong></p>
<p>Happy Proxying with Squid + FreeBSD + Cisco WCCP !!!</p>
<p>squid.conf</p>
<p>##Start of squid.conf###</p>
<p>cache_effective_user squid<br />
cache_effective_group squid</p>
<p>wccp2_router IP.ADDRESS.OF.ROUTER<br />
wccp2_router LoopBackIP.ADDRESS.OF.ROUTER<br />
#wccp2_version 4<br />
wccp2_forwarding_method 1<br />
wccp2_return_method 1<br />
wccp2_service standard 0</p>
<p>acl all src all</p>
<p>#icp_query_timeout 2000</p>
<p>high_memory_warning 500 MB</p>
<p>visible_hostname mycache.domain.com</p>
<p>cache_mem 128 MB</p>
<p>cache_replacement_policy heap LFUDA<br />
memory_replacement_policy heap GDSF</p>
<p>cache_swap_low  90<br />
cache_swap_high 95</p>
<p>maximum_object_size 131072 KB</p>
<p>########New test — Default is 8<br />
maximum_object_size_in_memory 24 KB</p>
<p>#minimum_object_size 1 KB<br />
#store_avg_object_size 20 KB</p>
<p>tcp_recv_bufsize 65535 bytes</p>
<p>ipcache_size 8192<br />
fqdncache_size 8192</p>
<p>high_page_fault_warning 10<br />
high_response_time_warning 2000<br />
client_persistent_connections off<br />
server_persistent_connections on<br />
half_closed_clients off</p>
<p>cache_dir diskd /cache1 6144 16 256 Q1=72 Q2=64<br />
cache_dir diskd /cache2 6144 16 256 Q1=72 Q2=64</p>
<p>log_icp_queries off</p>
<p>access_log /var/log/squid/access.log<br />
cache_log /var/log/squid/cache.log<br />
cache_store_log none</p>
<p>emulate_httpd_log on</p>
<p>cache_mgr info@sabinshrestha.com.np</p>
<p>refresh_pattern         ^ftp:           1440    30%     10080<br />
refresh_pattern         ^gopher:        1440    0%      1440<br />
refresh_pattern         .               0       40%     4320</p>
<p>hierarchy_stoplist cgi-bin ?</p>
<p>acl QUERY urlpath_regex cgi-bin \?<br />
no_cache deny QUERY</p>
<p>#Configure downloading even after aborted requests.<br />
quick_abort_min 0 KB<br />
quick_abort_max 0 KB<br />
#quick_abort_pct 99</p>
<p>negative_dns_ttl 2 minutes</p>
<p>acl mynetwork src 192.168.0.0/24<br />
acl admin src 192.168.0.85<br />
acl manager proto cache_object<br />
acl localhost src 127.0.0.1/255.255.255.255<br />
acl SSL_ports port 443 563 2082 2083 2087 2093 2096<br />
acl Safe_ports port 80 21 443 563 70 210 3128 8000 11999 8080 2082 2083 2087 209                       6 8082 8090<br />
acl CONNECT method CONNECT</p>
<p>http_port 3128 transparent</p>
<p>http_access allow manager localhost<br />
http_access allow manager admin<br />
http_access deny manager<br />
http_access deny !Safe_ports<br />
http_access deny CONNECT !SSL_ports<br />
http_access allow mynetwork</p>
<p>acl PURGE method PURGE<br />
http_access allow PURGE localhost<br />
http_access allow PURGE admin<br />
http_access deny PURGE</p>
<p>http_access deny all</p>
<p>snmp_access deny all</p>
<p>icp_access allow mynetwork<br />
icp_access deny all</p>
<p>miss_access allow all</p>
<p>ie_refresh on</p>
<p>###End of squid.conf###</p>
<p>Indeed I had made a typo mistake.</p>
<p>Router (config)#  ip wccp web-cache redirect-list 360</p>
<p>should have been:<br />
Router (config)#  ip wccp web-cache redirect-list 160</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sabinshrestha.com.np/linux-downloads/squid-freebsd-cisco-wccp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco PIX Firewall</title>
		<link>http://www.sabinshrestha.com.np/cisco/cisco-pix-firewall/</link>
		<comments>http://www.sabinshrestha.com.np/cisco/cisco-pix-firewall/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 09:27:26 +0000</pubDate>
		<dc:creator>sabin</dc:creator>
				<category><![CDATA[Cisco]]></category>

		<guid isPermaLink="false">http://www.sabinshrestha.com.np/?p=51</guid>
		<description><![CDATA[The basics of a Cisco PIX firewall A Cisco PIX firewall is meant to protect one network from another. There are PIX firewalls for small home networks and PIX firewalls for huge campus or corporate networks. In this example, we will be configuring a PIX 501 firewall. The 501 model is meant for a small [...]]]></description>
			<content:encoded><![CDATA[<p> <strong>The basics of a Cisco PIX firewall</strong></p>
<p>A Cisco PIX firewall is meant to protect one network from another. There are PIX firewalls for small home networks and PIX firewalls for huge campus or corporate networks. In this example, we will be configuring a PIX 501 firewall. The 501 model is meant for a small home network or a small business.</p>
<p>PIX firewalls have the concept of inside and outside interfaces. The inside interface is the internal, usually private, network. The outside interface is the external, usually public, network. You are trying to protect the inside network from the outside network.</p>
<p>PIX firewalls also use the adaptive security algorithm (ASA). This algorithm assigns security levels to interfaces and says that no traffic can flow from a lower-level interface (like the outside interface) to a higher-level interface (like the inside interface) without a rule allowing it. The outside interface has a security level of zero and the inside interface has a security level of 100.</p>
<p><span class="a3"> Here is what the output of the <strong>show nameif</strong> command looks like:<br />
pixfirewall# <strong>show nameif</strong><br />
nameif ethernet0 outside security0<br />
nameif ethernet1 inside security100<br />
pixfirewall#</p>
<p>Notice the ethernet0 interface is the outside interface (its default name) and the security level is 0. On the other hand, the ethernet1 interface is named inside (the default) and has a security level of 100.</p>
<p><strong>Guidelines</strong></p>
<p>Before beginning the configuration, your boss has given you some guidelines that you need to follow. Here they are:</p>
<ul>
<li> All passwords should be set to &#8220;cisco&#8221; (in reality, you make these whatever you want, but not &#8220;cisco&#8221;).</li>
<li> The inside network is 10.0.0.0 with a 255.0.0.0 subnet mask. The inside IP address for this PIX should be 10.1.1.1.</li>
<li> The outside network is 1.1.1.0 with a 255.255.255.0 subnet mask. The outside IP address for this PIX should be 1.1.1.1.</li>
<li> You want to create a rule to allow all inside clients on the 10.0.0.0 network to do port address translation and connect to the outside network. They will all share the global IP address 1.1.1.2.</li>
<li> However, clients should only have access to port 80 (Web browsing).</li>
<li> The default route for the outside (Internet) network will be 1.1.1.254.</li>
</ul>
<p><strong>The configuration</strong></p>
<p><span class="a3"> You will be prompted to answer YES or NO as to whether or not you want to configure the PIX through interactive prompts. Answer NO to this question because you want to learn how to really configure the PIX firewall, not just answer a series of questions. After that, you will be sent to a prompt that looks like this:<br />
pixfirewall&gt;</p>
<p>With the &#8220;greater than&#8221; symbol at the end of the prompt, you are in the PIX user mode. Change to privileged mode with the <strong>en</strong> or <strong>enable</strong> command. Press &#8220;enter&#8221; at the Password prompt. Here is an example:</p>
<p>pixfirewall&gt; en<br />
Password:<br />
pixfirewall#</p>
<p>You now have administrative mode to show things but would have to go into global configuration mode to configure the PIX.</p>
<p>Now, let&#8217;s move on to basic configuration of the PIX:</p>
<p><strong>Basic PIX configuration</strong></p>
<p>What I am calling basic configuration is made up of three things:</p>
<ul>
<li> Set the hostname</li>
<li> Set passwords (login and enable)</li>
<li> Configure IP addresses on interfaces</li>
<li> Enable interfaces</li>
<li> Configure a default route</li>
</ul>
<p>Before you can do any of these things, you need to go into global configuration mode. To do this, type:</p>
<p>pixfirewall# <strong>config t</strong><br />
pixfirewall(config)#</p>
<p>To set the hostname, use the hostname command, like this:</p>
<p>pixfirewall(config)# <strong>hostname PIX1</strong><br />
PIX1(config)#</p>
<p>Notice that the prompt changed to the name that you set.</p>
<p>Next, set the login password to cisco, like this:</p>
<p>PIX1(config)# <strong>password cisco</strong><br />
PIX1(config)#</p>
<p>This is the password required to gain any access to the PIX except administrative access.</p>
<p>Now, configure the enable mode password, used to gain administrative mode access.</p>
<p>PIX1(config)# <strong>enable password cisco</strong><br />
PIX1(config)#</p>
<p>Now we need to configure IP addresses on interfaces and enable those interfaces. The PIX, unlike a router, has no concept of interface configuration mode. To configure the IP address on the inside interface, use this command:</p>
<p>PIX1(config)# <strong>ip address inside 10.1.1.1 255.0.0.0</strong><br />
PIX1(config)#</p>
<p>Now, configure the outside interface IP address:<br />
PIX1(config)# <strong>ip address outside 1.1.1.1 255.255.255.0</strong><br />
PIX1(config)#</p>
<p>Next, enable both the inside and outside interfaces. Make sure that the Ethernet cable, on each interface, is connected to a switch. Note that the ethernet0 interface is the outside interface, and it is only a 10base-T interface on a PIX 501. The ethernet1 interface is the inside interface, and it is a 100Base-T interface. Here is how you enable these interfaces:</p>
<p>PIX1(config)# <strong>interface ethernet0 10baset</strong><br />
PIX1(config)# <strong>interface ethernet1 100full </strong><br />
PIX1(config)#</p>
<p>Note that you can do a <strong>show interfaces</strong> command, right from the global configuration prompt line.</p>
<p>Finally, let&#8217;s configure a default route so that all traffic sent to the PIX will flow to the next upstream router (the 1.1.1.254 IP address that we were given). Here is how you do this:</p>
<p>PIX1(config)# <strong>route outside 0 0 1.1.1.254</strong><br />
PIX1(config)#</p>
<p>The PIX firewall can, of course, support dynamic routing protocols as well (such as RIP and OSPF).</p>
<p>Now, let&#8217;s move on to some more advanced configuration.</p>
<p><strong>Network Address Translation</strong></p>
<p>Now that we have IP address connectivity, we need to use Network Address Translation (NAT) to allow inside users to connect to the outside. We will use a type of NAT, called PAT or NAT Overload, so that all inside devices can share one public IP address (the outside IP address of the PIX firewall). To do this, enter these commands:</p>
<p>PIX1(config)# <strong>nat (inside) 1 10.0.0.0 255.0.0.0</strong><br />
PIX1(config)# <strong>global (outside) 1 1.1.1.2          </strong><br />
Global 1.1.1.2 will be Port Address Translated<br />
PIX1(config)#</p>
<p>With this, all inside clients are able to connect to devices on the public network and share IP address 1.1.1.2. However, clients don&#8217;t yet have any rule allowing them to do this.</p>
<p><strong>Firewall rules</strong></p>
<p>These clients on the inside network have a NAT translation, but that doesn&#8217;t necessarily mean that they are allowed access. They now need a rule to allow them to access the outside network (the Internet). That rule will also allow the return traffic to come back in.</p>
<p>To make a rule to allow these clients port 80 (Web browsing), you would type this:</p>
<p>PIX1(config)# <strong>access-list outbound permit tcp 10.0.0.0 255.0.0.0 any eq 80</strong><br />
PIX1(config)# <strong>access-group outbound in interface inside     </strong><br />
PIX1(config)#</p>
<p>Note that PIX access lists, unlike router access lists, use a normal subnet mask, not a wildcard mask.</p>
<p>With this access list, you have restricted the inside hosts to accessing Web servers only on the outside network (routers).</p>
<p><strong>Showing and saving the configuration</strong></p>
<p>Now that you have configured the PIX firewall, you can show your configuration with the <strong>show run</strong> command.</p>
<p>Make sure that you save your configuration with the <strong>write memory</strong> or <strong>wr m</strong> command. If you don&#8217;t, your configuration will be lost when the PIX is powered off.</p>
<p></span></p>
<p></span></p>
<h2> What Does a PIX Do?</h2>
<p>The PIX is a firewall appliance based on a hardened, specially built operating  system, PIX OS, minimizing possible OS-specific security holes. The PIX has received ICSA Firewall and IPsec certification as well as Common Criteria  EAL4 evaluation status.PIX firewalls provide a wide range of security and networking services  including:</p>
<ul>
<li> Network Address Translation (NAT) or Port Address Translation (PAT)</li>
<li> content filtering (Java/ActiveX)</li>
<li> URL filtering</li>
<li> IPsec VPN</li>
<li> support for leading X.509 PKI solutions</li>
<li> DHCP client/server</li>
<li> PPPoE support</li>
<li> advanced security services for multimedia applications and protocols including Voice over IP (VoIP), H.323, SIP, Skinny and Microsoft NetMeeting</li>
<li> AAA (RADIUS/TACACS+) integration</li>
</ul>
<p><font color="#000000">PIX can be graphically managed using the integrated  Web-based management interface known as the PIX Device Manager (PDM) or by the Cisco Secure Policy Manager 2.3f and 3.0f (not to be confused with CSPM 2.3.3i which is for intrusion detection system management).  The PDM is a PIX-specific device configuration and management tool whereas CSPM is generally used as part of a larger security management infrastructure and allows one to correlate organizational security policies with a PIX configuration. Management interfaces include command-line interface (CLI), telnet, Secure Shell (SSH 1.5), console port, SNMP, and syslog.</font></p>
<h2> Cisco PIX Models</h2>
<table border="2" cellpadding="2" cellspacing="2" width="100%">
<tr>
<td bgcolor="#99ffff"><font color="#000000"><strong>Cisco PIX</strong><br />
<strong>Model</strong></font></td>
<td bgcolor="#99ffff"><font color="#000000"><strong>Rated </strong><br />
<strong>Throughput</strong></font></td>
<td bgcolor="#99ffff"><font color="#000000"><strong>Concurrent</strong><br />
<strong>Connections</strong></font></td>
<td bgcolor="#99ffff"><font color="#000000"><strong>Description</strong></font></td>
</tr>
<tr>
<td>PIX 535</td>
<td>1 Gbps +Up to 95 Mbps 3DES VPN, 2000 IPsec tunnels</td>
<td>500,000</td>
<td>Some models include stateful high-availability capabilities, as well  as integrated hardware acceleration for VPN. Modular chassis, up to 10 10/100 Fast Ethernet interfaces or 9 Gigabit Ethernet interfaces.</td>
</tr>
<tr>
<td>PIX 525</td>
<td>360 Mbps +Up to 70 Mbps 3DES VPN, 2000 IPsec tunnels</td>
<td>280,000</td>
<td>Some models include stateful high-availability capabilities, as well  as integrated hardware acceleration for VPN. Modular chassis, up to 8 10/100  Fast Ethernet interfaces or 3 Gigabit Ethernet interfaces.</td>
</tr>
<tr>
<td>PIX 515E</td>
<td>188 Mbps +</td>
<td>125,000</td>
<td>Some models include stateful high-availability capabilities and integrate  support for 2,000 IPsec tunnels. Modular chassis, up to six 10/100 Fast Ethernet interfaces.</td>
</tr>
<tr>
<td>PIX 506E</td>
<td>20 Mbps +,<br />
16 Mbps 3DES VPN</td>
<td bgcolor="#cccccc"></td>
<td>Compact desktop chassis, two auto-sensing 10Base-T interfaces.</td>
</tr>
<tr>
<td>PIX 501</td>
<td>10 Mbps +,<br />
3 Mbps 3DES VPN</td>
<td bgcolor="#cccccc"></td>
<td>Compact plug-n-play security appliance,  integrated 4-port Fast Ethernet (10/100) switch and one 10Base-T interface.</td>
</tr>
</table>
<p>See <a href="http://www.cisco.com/warp/customer/cc/pd/fw/sqfw500/">http://www.cisco.com/warp/customer/cc/pd/fw/sqfw500/</a>   for information about the PIX product line in general, or for more details  or the latest models added to this product line.</p>
<h2> PIX Terminology and Background Information</h2>
<p>The following diagram shows a multi-port PIX connected to various networks.  We will use this diagram as we build up a PIX configuration in this and any subsequent PIX articles.<img src="http://www.netcraftsmen.net/welcher/papers/fig200202a.gif" height="459" width="576" /></p>
<p>PIX terminology: we generally refer to the user segment as the Inside subnet. The interface connected to the Internet router is the outside subnet. As shown, we probably have DMZ (De-Militarized Zone) subnet, the subnet where we quarantine all servers that are accessible from the outside. We might also have a separate management subnet and a subnet tying to a redundant PIX for failover (if supported/licensed).</p>
<p>The PIX Command-Line Interface (CLI) is somewhat like the Cisco IOS interface, but different. Use colon (&#8220;:&#8221;) for comments (which, as usual, are not retained).  Newer PIX OS uses ACL&#8217;s, replacing the former conduits (which were arguably more confusing to experienced Cisco router administrators).</p>
<p>PIX interfaces are normally shutdown until the administrator activates  them.</p>
<p>PIX interfaces have an associated security level. Two interfaces at same level can&#8217;t send packets to each other. We&#8217;ll shortly see that you set levels with nameif command. Connections and traffic are normally permitted from higher to lower security level interfaces, although you do have to put in some basic configuration to allow traffic to flow. Connections the other way (from low to high security) are disallowed unless the configuration explicitly permits them.</p>
<p><font color="#000000">You actually do not have to put any ACL if going  from a higher security level to a lower. Everything will be allowed. Best  practice is to put an ACL on all interfaces even if the ACL permits everything  to flow using &#8220;ip any any&#8221;.  An ACL put inbound (PIX only does inbound ACLs) to the inside interface can control traffic destined going outbound. If an admin wants to only have www and dns traffic outbound he would allow only tcp on 80 and udp on 53 then everything else like real audio would be denied as it goes out.)</font></p>
<p><font color="#000000">To let traffic flow from a high security level to a lower level, use the <strong>nat</strong> and <strong>global</strong> commands. For the opposite direction, from lower to higher, use the <strong>static</strong> and <strong>access-list</strong>  commands. We suggest using nat and global when going from any non-outside  interface to the outside interface (Internet usually unless the PIX is used as a border between business units) which is a little different than the first sentence above.  We also suggest using statics from any non-outside interface to any other non-outside interface (like inside to management or ethernet3 to ethernet4, below.)</font></p>
<p><font color="#000000">The PIX normally uses stateful NAT connections and stateful security, referred to as the Adaptive Security Algorithm (ASA). The PIX does not pass multicast traffic. (Can you say &#8220;DVMRP tunnel&#8221;?)</font></p>
<p><font color="#000000">Cisco and we recommend you do not dynamic routing  to or through the PIX. The PIX does support RIP, but the authors both loathe  RIP. And static routing is more secure, cannot be as easily fooled.</font></p>
<h2> PIX Configuration</h2>
<p>We&#8217;ll start off with good housekeeping. Enter configuration mode with &#8220;config  t&#8221;. You&#8217;ll want to assign a hostname / prompt name so you can tell which device you&#8217;re on. You&#8217;ll also want to set up passwords.<br />
<center></p>
<table style="border-style: none; border-width: medium; table-layout: fixed; border-collapse: collapse" border="2" cellpadding="2" cellspacing="2">
<tr>
<td style="padding: 1.5pt" bgcolor="#99ffff">
<div class="MsoNormal"><font color="#000000"><strong>Command</strong></font></div>
</td>
<td style="border-style: inset inset inset none; border-width: 0.75pt 0.75pt 0.75pt medium; padding: 1.5pt" bgcolor="#99ffff">
<div class="MsoNormal"><font color="#000000"><strong>Command Explanation</strong></font></div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>enable password <em>myEnableSecret </em><strong> encrypted</strong></tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"><font color="#000000">Set the enable password (displays encrypted). Displays in encrypted form, with the word &#8220;encrypted&#8221; at the end. Note that when entering the command <u>leave off</u>  &#8220;encrypted&#8221;  keyword or the PIX will assume that the string you are putting in is the encryption of the actual password. </font></div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>passwd <em>myLoginSecret</em> <strong>encrypted</strong></tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"><font color="#000000">Set the user mode password,  the first password challenge when using Telnet.  Note that when executing  the command <u>leave off</u> the &#8220;encrypted&#8221; keyword or the PIX will assume  that the string you are putting in is the encryption of the actual password.</font></div>
</td>
</tr>
<tr>
<td style="border-style: none inset; border-width: medium 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>hostname UNIT1</tt></div>
</td>
<td style="border-style: none inset none none; border-width: medium 0.75pt medium medium; padding: 1.5pt">
<div class="MsoNormal">Set the name of the host. It is best to make this name innocuous so that it does not give away the type of device this is.</div>
</td>
</tr>
</table>
<p></center>The PIX does allow you to set up a hosts table as a management convenience.  Because there is no connection to DNS or /etc/hosts on UNIX servers, use of this command is a mixed blessing. It makes configurations much more readable but introduces another level of administration. Not only do you have to add and delete IP addresses to your configuration as you do now. But with this command, you also need to ensure that the host names match existing names.<br />
<center></p>
<table style="border-style: none; border-width: medium; border-collapse: collapse" border="2" cellpadding="2" cellspacing="2" width="100%">
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt" bgcolor="#99ffff">
<div class="MsoNormal"><font color="#000000"><strong>Command</strong></font></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt" bgcolor="#99ffff">
<div class="MsoNormal"><font color="#000000"><strong>Command Explanation</strong></font></div>
</td>
</tr>
<tr>
<td>
<div class="MsoNormal"><tt>name 10.3.3.22 DMZWEBSERVER</tt></div>
</td>
<td>Map address to name</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>name 10.1.1.82 INTERNALDNSHOST</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt"></td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>name 10.1.1.79 INTERNALORACLEHOST</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt"></td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>name 10.1.1.71 INTERNALNTPHOST</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt"></td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>name 1.1.1.5 EXTERNALSMTPHOST</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt"></td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>name 1.1.1.22 EXTERNALWWWHOSTNAME</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt"></td>
</tr>
</table>
<p></center>To start adjusting the default PIX configuration, one usually names the interfaces and assigns them security levels. (0 = least trusted; 100 = most trusted). We then specify the speed for each interface, carefully leaving off the default <strong><tt>shutdown</tt></strong> keyword at the end to activate (enable) the interface. We do this for each interface we&#8217;re going to use. We have one extra unused interface which we shutdown.</p>
<p>We also need to assign IP addresses to the interfaces that will be carrying  IP traffic. One trick you can use on a shutdown interface is to assign it the loopback address, 127.0.0.1. <font color="#000000">This prevents accidental forwarding of traffic through that interface.</font><br />
<center></p>
<table style="border-style: none; border-width: medium; margin-left: 1.2pt; border-collapse: collapse" border="2" cellpadding="2" cellspacing="2">
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt" bgcolor="#99ffff">
<div class="MsoNormal"><font color="#000000"><strong>Command</strong></font></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt" bgcolor="#99ffff">
<div class="MsoNormal"><font color="#000000"><strong>Command Explanation</strong></font></div>
</td>
</tr>
<tr>
<td><tt>nameif ethernet0 outside security0</tt></td>
<td>Define the name of ethernet 0 and security level.</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>nameif ethernet1 inside security100</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"></div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>nameif ethernet2 management security90</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"></div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>nameif ethernet3 dmz security30</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"></div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>nameif ethernet4 pix_failover security40</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt" u1:str="Defines the name of ethernet 4 and security level. 0 = least trusted; 100 = most trusted.  ">
<div class="MsoNormal">We&#8217;ve connected ethernet4 to another failover-capable  PIX. The name reflects this.</div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>nameif ethernet5 not_in_use security20</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal">Not currently in use.</div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>interface ethernet0 100full</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal">Identify network interface speed and duplex. Activate the interface.</div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>interface ethernet1 100full</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"></div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>interface ethernet2 100full</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"></div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>interface ethernet3 100full</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"></div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>interface ethernet4 100full</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal">Identify network interface speed and duplex. Note that this interface <strong>must</strong> be set to 100 and full duplex for proper  operation of failover, which may be explained in another article.</div>
</td>
</tr>
<tr>
<td style="border-style: none inset; border-width: medium 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>interface ethernet5 100full shutdown</tt></div>
</td>
<td style="border-style: none inset none none; border-width: medium 0.75pt medium medium; padding: 1.5pt">
<div class="MsoNormal">Note that this interface is shutdown.</div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>ip address outside 1.1.1.1 255.255.255.0</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal">Assign IP address and subnet mask for the interface</div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>ip address inside 10.1.1.1 255.255.255.0</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"></div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>ip address management 10.2.2.1 255.255.255.0</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"></div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>ip address dmz 10.3.3.1 255.255.255.0</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"></div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>ip address pix_failover 10.4.4.1 255.255.255.0</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"></div>
</td>
</tr>
</table>
<p></center>After the PIX has been addressed, we need to think about what it is to do with the addresses of other devices. Do we wish to use Network Address  Translation (NAT)? Network Address Translation (NAT) lets your network have any IP addressing scheme and the firewall protects these addresses from visibility on the external network. If we have global Internet addressing and do not wish to re-address our computers, we can assign NAT ID 0 within the PIX to disable NAT. Let&#8217;s assume for our sample configuration that we do wish to perform NAT. (Looking at the above diagram, we have to do NAT, network 10.0.0.0  /8 is a private address range.</p>
<p>We generally put a <strong><tt>global</tt></strong> command on each lower security  interface we want our internal users to have access to, although statics can be preferable for internal-internal access (see below). The main decision  (other than addressing design) is whether to use one or multiple NAT ID&#8217;s.  Using unique NAT ID&#8217;s limits access to specific interfaces. Using one NAT  ID is simpler and assumes the PIX will sort out which <strong><tt>nat</tt></strong>  command (below) pairs up with which <strong><tt>global</tt></strong> command on which  interface.</p>
<p>We put <strong><tt>nat</tt></strong> commands on the higher security interfaces,  allowing users to start connections to lower security level interfaces with <strong><tt>global</tt></strong> commands on them. The NAT ID ties the inside addresses in the <strong><tt>nat</tt></strong> command to the pool of addresses in one or more <strong><tt>global</tt></strong> commands with the same NAT ID.</p>
<p>Port Address Translation is where all inside addresses appear as one outside address, with shifted ports. PAT has some restrictions, for example it cannot support H.323 or caching nameserver use, so you may want to use it to augment a range of global addresses rather than using it as your sole global address.</p>
<p>Let&#8217;s see what that looks like:<br />
<center></p>
<table style="border-style: none; border-width: medium; margin-left: 1.6pt; border-collapse: collapse" border="2" cellpadding="2" cellspacing="2">
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>global (outside) 1 <font color="#000000"> 1.1.1.51</font>-1.1.1.100 netmask 255.255.255.0</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal">Defines the routable addresses to be used for outbound connections. This pool defines 1.1.1.51 through .100 as being available  on a first come first served basis. As connections are torn down the addresses  become available again for use. These addresses are used before the PAT address specified below is used. The number &#8220;1&#8243; is the NAT ID for this pool.</div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>global (outside) 1 <font color="#000000"> 1.1.1.50 ne</font>tmask 255.255.255.0</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal">Defines the port address translation (PAT) address  to be used by outbound connections after all one-to-one translation address  (defined above) are exhausted. This continues NAT ID (pool) 1.</div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>nat (inside) 0 access-list 101</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"><font color="#000000">A &#8220;NAT 0&#8243; means no NAT-ing is happening. This entry is used for the IPsec connection defined in the configuration. The nat command with access list lets you exempt traffic that is matched by the access-list command statements from the NAT services. Access list 101 (not shown) specifies IPsec traffic. This row may confuse users and if we are not going to touch IPsec now, I would leave it out. We&#8217;ll cover  IPsec on the PIX in a future article.</font></div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt><font color="#000000">nat (inside) 1 10.1.1.0  255.255.255.0 0 0</font></tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt" u1:str="This command connects the global pool 1 to the networks allowed to tap into that pool.  Network 10.1.1.0 on the inside interface will be allowed to use global pool 1 for its outbound connections.The nat command lets you enable or disable address translation for one or more internal addresses. Address translation means that when a host starts an outbound connection, the IP addresses in the internal network are translated into global addresses. Network Address Translation (NAT) lets your network have any IP addressing scheme and the firewall protects these addresses from visibility on the external network.  The nat (if_name) 0 access-list acl_name command lets you exempt traffic that is matched by the access-list command statements from the NAT services. ">
<div class="MsoNormal"><font color="#000000">This command connects the global pool 1 to the networks allowed to tap into that pool. Subnet 10.1.1.0 on the inside interface will be allowed to use global pool 1 for its outbound  connections.The nat command lets you enable or disable address translation  for one or more internal addresses. The nat command will disable nat for an inside network if that net is not explicitly defined to use the pool. Address translation means that when a host starts an o</font>utbound connection, the IP addresses in the internal network are translated into global addresses.</div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>nat (management) 1 10.2.2.0 255.255.255.0 0 0</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal">Subnet 10.2.2.0 on the management interface will be allowed to use global pool 1 for its outbound connections.</div>
</td>
</tr>
</table>
<p></center><font color="#000000">Note that if acl 101 is undefined, no IPsec traffic  will match and no traffic will go through the IPsec tunnel. All traffic would then be subjected to NAT.</font></p>
<p>If you&#8217;ve used NAT before, you&#8217;ll recognize that servers on the inside  that need to be connected to from the outside will need static mappings. The <strong><tt>static</tt></strong> command creates a permanent mapping (called a static translation slot or &#8220;xlate&#8221;) between a local IP address and a global IP address. Use the <strong><tt>static</tt></strong> and <strong><tt>access-list</tt></strong> commands when you are accessing an interface of a higher security level from an interface of a lower security level. When NAT exists between two interfaces the command takes the form of &#8220;<tt>static (high,low) low high</tt>&#8221; . Without address translation, the format of the static command becomes different: &#8220;<tt>static (high,low) high high</tt>&#8220;.<br />
<center></p>
<table style="border-style: none; border-width: medium; margin-left: 2pt; border-collapse: collapse" border="2" cellpadding="2" cellspacing="2">
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>static (dmz,outside) 1.1.1.22 10.3.3.22 netmask 255.255.255.255 0 0</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div>You need to specify the IP address users on the lower security interface&#8217;s network will use to access the server  on the higher security level interface&#8217;s network. In this case, we make a DMZ web server at 10.3.3.22 accessible as outside address 1.1.1.22.</div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>static (inside,management) 10.1.1.13 10.1.1.13  netmask 255.255.255.255 0 0</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal"><font color="#000000">This static command allows traffic from inside interface (address 10.1.1.13) to management subnet, or vice versa if an appropriate ACL exists for traffic coming from the lower security interface. There is </font>no NAT change to the address.</div>
</td>
</tr>
</table>
<p></center>We also need some static routing, so the PIX knows which subnets are out which interface. Like Cisco routers, the PIX does know how to route to connected subnets, so you only have to specify subnets or address ranges behind other routers. You can only have one default route for the PIX Firewall.<br />
<center></p>
<table style="border-style: none; border-width: medium; margin-left: 2pt; border-collapse: collapse" border="2" cellpadding="2" cellspacing="2">
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>route outside 0.0.0.0 0.0.0.0 1.1.1.254 1</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal">Specifies a default route out the outside interface  to a router at 1.1.1.254 which is 1 hop away.</div>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-width: medium 0.75pt 0.75pt; padding: 1.5pt">
<div class="MsoNormal"><tt>route management 10.117.220.0 255.255.255.0 10.2.2.254</tt></div>
</td>
<td style="border-style: none inset inset none; border-width: medium 0.75pt 0.75pt medium; padding: 1.5pt">
<div class="MsoNormal">Specifies a route to the 10.117.220.0 network via the management interface with the next hop address set to 10.2.2.254 (assuming 10.117.220.0 is behind a router on the management subnet).</div>
</td>
</tr>
</table>
<p></center></p>
<h1>
<hr width="100%" /></h1>
<p><font color="#000000">TIP: If you use statics you will also be able to go from higher to lower without having to use <strong>nat</strong> and <strong>global</strong>.   Example: suppose management station 10.2.2.2 (NMS) needs to talk to serv1  at 10.1.1.15 on the inside. Configure:</font></p>
<blockquote><p><tt><font color="#000000">static (inside,management) 10.1.1.15  10.1.1.15 netmask 255.255.255.255</font></tt><br />
<tt><font color="#000000">access-list from-management-coming-in permit tcp host 10.2.2.2 host 10.1.1.15 eq 8888</font></tt><br />
<tt><font color="#000000">access-group from-management-coming-in in interface management</font></tt></p></blockquote>
<p><font color="#000000">Because the static exists, 10.1.1.15 can also inititate  connections to 10.2.2.2 but cannot talk to 10.2.2.50 (NMS2) because no method of translation exists.</font><font color="#000000">Another example:</font></p>
<blockquote><p><tt><font color="#000000">static (inside,management) 10.1.1.0  10.1.1.0 netmask 255.255.255.0</font></tt></p></blockquote>
<p><font color="#000000">This allows each network to address the other. The  inside can then talk to everything on the management net and reply packets  are let back through by virtue of stateful inspection but an ACL must exist  for the management net to initiate anything to the inside.</font><font color="#000000">There are some other variations one can do, but statics are more clear and you can predict behaviour because no timeouts  for the connections exist and you still retain ultimate control via the ACL.</font></p>
<p>==========================================</p>
<h3>Network Address Translation (NAT)</h3>
<p class="H3Body">Network address translation is a method used to help conserve the limited number of IP addresses available for internet purposes.  We will return to the NAT discussion, specifically how to configure it, later on this page, but first a very basic introduction on how to configure and use the PIX.</p>
<p><span style="font-size: 10pt; font-family: Arial"><br style="page-break-before: always" clear="all" /> </span></p>
<p class="MsoNormal">&nbsp;</p>
<h3><a name="_Toc70480141"></a><a name="_Toc50175066"></a><a name="_Toc41837040"></a><a name="_Toc41835462"></a><a name="_Toc31558532"></a><a name="_Toc30862095"></a><a name="_Toc30796973"></a><a name="Introduction_on_accessing_the_PIX_comman"></a><a name="_Toc30627957"></a><a name="_Toc30620747"></a><a name="_Toc30525055"></a>Accessing the PIX command line</h3>
<h4><a name="_Toc70480142"></a><a name="_Toc41837041"></a><a name="_Toc41835463"></a><a name="_Toc31558533"></a><a name="_Toc30862096"></a><a name="_Toc30796974"></a><a name="_Toc30620748"></a><a name="_Toc30627958"></a>Via The Console Port</h4>
<p class="H4Body">Your Cisco PIX will come with a console cable that will allow you to configure your PIX using terminal emulation software such as Hyperterm. Once you&#8217;ve set up your PIX with an IP address you&#8217;ll be able to access it via Telnet.</p>
<h4><a name="_Toc70480143"></a><a name="_Toc41837042"></a><a name="_Toc41835464"></a><a name="_Toc31558534"></a><a name="_Toc30862097"></a><a name="_Toc30796975"></a><a name="_Toc30620749"></a><a name="_Toc30627959"></a>Via Telnet</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>One easy way to get access to any device on your network is using the /etc/hosts file. Here you list all the IP addresses of important devices that you may want to access with a corresponding nickname. Here is a sample in which the PIX firewall &#8220;pixfw&#8221; has the default IP address of 192.168.1.1 on its inside protected interface:</p>
<p class="H45Linux">#</p>
<p class="H45Linux"># Do not remove the following line, or various programs<br />
# that require network functionality will fail.<br />
#<br />
127.0.0.1 localhost.localdomain localhost<br />
192.168.1.1 pixfw<br />
192.168.1.100 bigboy mail.my-site.com
</p>
<p class="MsoNormal">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Once connected to the network you can access the PIX via telnet</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">[root@bigboy tmp]# telnet pixfw<br />
Trying 192.168.1.1&#8230;<br />
Connected to pixfw.<br />
Escape character is &#8216;^]&#8217;.
</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>You&#8217;ll be prompted for a password and will need another password to get into the privileged &#8220;enable&#8221; mode. If you are directly connected to the console, you should get a similar prompt too. There is no password in a fresh out of the box PIX and simply hitting the &#8220;Enter&#8221; key will be enough.</p>
<p class="H45Linux">
User Access Verification</p>
<p>Password:<br />
Type help or &#8216;?&#8217; for a list of available commands.<br />
pixfw&gt; enable<br />
Password: ********<br />
pixfw#
</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Use the &#8220;write terminal&#8221; command to see the current configuration. You will want to change your &#8220;password&#8221; and &#8220;enable password&#8221; right after completing your initial configuration, this will be covered later.</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux"># wr term<br />
Building configuration&#8230;<br />
: Saved<br />
:<br />
PIX Version 6.2(2)<br />
nameif ethernet0 outside security0<br />
nameif ethernet1 inside security100<br />
enable password dsjf5sdfgsjrgjwk encrypted<br />
passwd sdffg8324dgrggjd encrypted<br />
hostname pixfw<br />
fixup protocol ftp 21<br />
&#8230;
</p>
<p class="H45Linux">&#8230;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>ALL PIX configuration commands need to be done in configuration mode, by issuing the &#8220;configure terminal&#8221; command from enable mode prompt.</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">pixfw# conf t<br />
pixfw(config)# <em>&#8220;Enter commands here&#8221;</em>
</p>
<p class="H45Linux">pixfw(config)# exit</p>
<p class="H45Linux">pixfw#</p>
<p class="H45Linux">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>You can usually delete commands in the configuration by adding the word &#8220;no&#8221; to the beginning of the command you want to delete. Some commands that can only have a single value won&#8217;t accept a &#8220;no&#8221; to change them and will just be over-written when you issue the new command.</p>
<p class="H45Body">In the example below, we change the PIX&#8217;s name and then delete one of many access control list (ACL) entries attached to the outside (Internet) interface.</p>
<p class="H45Linux">pixfw# conf t<br />
<span style="font-size: 9pt">pixfw(config)# no access-list inbound permit tcp any any eq www</span>
</p>
<p class="H45Linux">pixfw(config)# hostname firewall</p>
<p class="H45Linux">firewall(config)# exit</p>
<p class="H45Linux">firewall#</p>
<p class="H45Linux">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>One of the first things you should do is change the default passwords for the PIX.</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">pixfw# conf t<br />
pixfw(config)# enable password<em> enable-password-here</em>
</p>
<p class="H45Linux">pixfw(config)# passwd <em>telnet-password-here</em></p>
<p class="H45Linux">pixfw(config)# exit</p>
<p class="H45Linux">pixfw#</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Body"><strong>Note:</strong> The console password is the one used to gain access from the console or through telnet.
</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>When you&#8217;ve finished configuring, you can permanently save your changes by using the &#8220;write memory&#8221; command:</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">pixfw# wr mem<br />
Building configuration&#8230;<br />
Cryptochecksum: 3af43873 d35d6f06 51f8c999 180c2342<br />
[OK]<br />
pixfw#
</p>
<p class="H45Linux">&nbsp;</p>
<p><strong><span style="font-size: 10pt; font-family: 'Courier New'"><br style="page-break-before: always" clear="all" /> </span></strong></p>
<p class="H45Linux">&nbsp;</p>
<h3><a name="_Toc70480144"></a><a name="_Toc50175067"></a><a name="_Toc41837043"></a><a name="_Toc41835465"></a><a name="_Toc31558535"></a><a name="_Toc30862098"></a><a name="_Toc30796976"></a><a name="Sample_PIX_configuration_-_DHCP"></a><a name="_Toc30627960"></a><a name="_Toc30620750"></a><a name="_Toc30525056"></a>Sample PIX Configuration: DHCP</h3>
<h4><a name="_Toc70480145"></a><a name="_Toc41837044"></a><a name="_Toc41835466"></a><a name="_Toc31558536"></a><a name="_Toc30862099"></a><a name="_Toc30796977"></a><a name="_Toc30620751"></a><a name="_Toc30627961"></a>Configuring DSL PPPoE DHCP</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>DHCP and DSL require you to get a pppoe password and username from your ISP. Most ISPs have a homepage where you can register to get the username and password, ask customer service for the URL. You should substitute this username and password for &#8220;dsl-username&#8221; and &#8220;dsl-password&#8221; below. The VPDN group statements just assign a username, password, authentication type to a profile, in this case &#8220;ISP&#8221;. The configuration steps are relatively straight forward. (Remember to be in config mode)</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">ip address outside pppoe setroute</p>
<p class="H45Linux">ip address inside 192.168.1.1 255.255.255.0<br />
vpdn group ISP request dialout pppoe<br />
vpdn group ISP localname dsl-username<br />
vpdn group ISP ppp authentication pap<br />
vpdn username dsl-username password dsl-password
</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Body">In this example, the IP address of the PIX is 192.168.1.1. As the PIX will be acting as your default gateway to the internet, you will have to set the default gateway on all your servers to be 192.168.1.1 You <strong>must</strong> be using PIX IOS version 6.2 or greater for this to work.</p>
<h4><a name="_Toc70480146"></a>Configuring Cable Modem DHCP</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>DHCP configuration for cable modems is much simpler, there is no password requirement like with regular DSL. The command to let your PIX get a DHCP IP address from your ISP is as follows:</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">ip address outside dhcp setroute</p>
<p class="H45Linux">ip address inside 192.168.1.1 255.255.255.0</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Body">In this example, the IP address of the PIX is 192.168.1.1. As the PIX will be acting as your default gateway to the internet, you will have to set the default gateway on all your servers to be 192.168.1.1</p>
<h4><a name="_Toc70480147"></a><a name="_Toc41837045"></a><a name="_Toc41835467"></a><a name="_Toc31558537"></a><a name="_Toc30862100"></a><a name="_Toc30796978"></a><a name="_Toc30620752"></a><a name="_Toc30627962"></a>NAT Configuration with DHCP</h4>
<p class="H4Body">Here we allow any traffic coming in on the inside (private/protected) interface to be NAT-ted to the IP address of the outside (Public/unprotected) interface of the firewall. If DSL &#8211; DHCP has assigned an address of 97.158.253.12 to your firewall then the traffic passing through the firewall, from your protected PCs, will appear to be coming from address 97.158.253.12. This is frequently called many-to-one NAT.</p>
<p class="H4Body">&nbsp;</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">global (outside) 1 interface<br />
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
</p>
<p class="H45Linux">&nbsp;</p>
<p><span style="font-size: 16pt; font-family: Arial; color: green"><br style="page-break-before: always" clear="all" /> </span></p>
<h4><a name="_Toc70480148"></a><a name="_Toc41837046"></a><a name="_Toc41835468"></a><a name="_Toc31558538"></a><a name="_Toc30862101"></a><a name="_Toc30796979"></a><a name="_Toc30627963"></a><a name="_Toc30620753"></a><a name="Dynamic_DNS_port_forwarding_entries"></a>Dynamic DNS Port Forwarding Entries</h4>
<p class="H4Body">It is possible to host your own website on a DHCP DSL / cable modem connection using dynamic DNS. There are many providers to choose from.</p>
<p class="H4Body">Once you have registered with a dynamic DNS provider, you will need to configure your firewall. Here we allow all incoming www traffic (on TCP port 80) destined for the firewall&#8217;s interface to be forwarded to the web server at 192.168.1.100 on port 80 (www).</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">access-list inbound permit icmp any any<br />
access-list inbound permit tcp any any eq www</p>
<p class="H45Linux">access-group inbound in interface outside<br />
static (inside,outside) tcp interface www 192.168.1.100 www netmask 255.255.255.255
</p>
<p class="H4Body">Once configured, you will be able to hit your webserver using the firewall&#8217;s outside interface&#8217;s IP address as the destination. eg: http://firewall-outside-ip-address. Remember, it&#8217;s not possible to hit your firewall&#8217;s public NAT IP address from servers on your home network. You&#8217;ll have to ask a friend to check it out.</p>
<h3><a name="_Toc70480149"></a><a name="_Toc50175068"></a><a name="_Toc41837047"></a><a name="_Toc41835469"></a><a name="_Toc31558539"></a><a name="_Toc30862102"></a><a name="_Toc30796980"></a><a name="How_to_get_Static_IPs_for_DSL_cheaply"></a><a name="_Toc30627964"></a><a name="_Toc30620754"></a><a name="_Toc30525057"></a>How To Get Static IPs For DSL Cheaply</h3>
<p class="H3Body">Many ISP DSL providers offer cheap DHCP (dynamic IP) service. Due to competition they&#8217;ll even throw in a DSL modem and even a router for free. This service frequently isn&#8217;t available for users with static IPs which the ISPs frequently feel are businesses. If you really want static IP addresses and are willing to pay the higher monthly fee, then you can reduce your installation costs by:</p>
<p class="H3Bullets">&gt;<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span>Ordering DHCP DSL first with the free modem and/or router</p>
<p class="H3Bullets">&gt;<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span>Upgrade to static IPs a week later. They probably won&#8217;t ask about the modem and/or router, and it becomes bundled in free.</p>
<h3><a name="_Toc70480150"></a><a name="_Toc50175069"></a><a name="_Toc41837048"></a><a name="_Toc41835470"></a><a name="_Toc31558540"></a><a name="_Toc30862103"></a><a name="_Toc30796981"></a><a name="Sample_PIX_configuration_-_Static_IPs"></a><a name="_Toc30627965"></a><a name="_Toc30620755"></a><a name="_Toc30525058"></a>Sample PIX configuration: DSL &#8211; Static IPs</h3>
<p class="H3Body">PPPOE authentication is only required for DSL DHCP. Once you go for static IPs, the vpdn statements won&#8217;t be required. In this example, the ISP has assigned the Internet subnet 97.158.253.24 with a mask of 255.255.255.248 (/29). The IP address selected for the PIX is 97.158.253.25, the default gateway is 97.158.253.30</p>
<p class="H3Body">If you are converting from dynamic to static IP addresses, you do not need the <strong><span style="font-family: 'Courier New'">vpdn</span></strong> PIX command statements for static IPs</p>
<p class="H3Linux">&nbsp;</p>
<p class="H3Linux">ip address outside 97.158.253.25 255.255.255.248<br />
ip address inside 192.168.1.1 255.255.255.0
</p>
<p class="H3Linux">route outside 0.0.0.0 0.0.0.0 97.158.253.30</p>
<p class="H3Linux">&nbsp;</p>
<p class="H3Body">In this example, the IP address of the PIX is 192.168.1.1. As the PIX will be acting as your default gateway to the internet, you will have to set the default gateway on all your servers to be 192.168.1.1</p>
<p class="H3Body">&nbsp;</p>
<p class="H3Body"><strong>Note:</strong> When you receive your own /29 allocation all the  IPs are exclusively yours whether you use them or not. This can be viewed as  being wasteful in the eyes of some ISPs. Some service providers now use PPPoE  with DHCP IP address reservations based on your MAC address. It appears to be an  attempt to conserve on IP addresses by placing many customers on a large shared  network that allows the ISP to add and subtract allocated IPs at will. This  means that the ISP, and not its customers, are in possession of all unused IP  addresses.</p>
<p><span style="font-size: 16pt; font-family: Arial; color: green"><br style="page-break-before: always" clear="all" /> </span></p>
<h4><a name="_Toc70480151"></a><a name="_Toc41837049"></a><a name="_Toc41835471"></a><a name="_Toc31558541"></a><a name="_Toc30862104"></a><a name="_Toc30796982"></a><a name="Outgoing_Connections_NAT_Configuration"></a><a name="_Toc30627966"></a><a name="_Toc30620756"></a>Outgoing Connections NAT Configuration</h4>
<p class="H4Body">Here we allow connections originating from servers connected to the inside (private/protected) interface with an IP address in the range 192.168.1.0 to 192.168.1.255 to be NAT-ted to the IP address of the outside (Public/unprotected) interface of the firewall which is 97.158.253.25 :</p>
<p class="H4Linux">&nbsp;</p>
<p class="H4Linux">global (outside) 1 interface<br />
nat (inside) 1 192.168.1.0 255.255.255.0 0 0
</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Body">This is another application of many-to-one NAT.</p>
<h4><a name="_Toc70480152"></a><a name="_Toc41837050"></a><a name="_Toc41835472"></a><a name="_Toc31558542"></a><a name="_Toc30862105"></a><a name="_Toc30796983"></a><a name="Incoming_Connections_NAT_Configuration"></a><a name="_Toc30627967"></a><a name="_Toc30620757"></a>Incoming Connections NAT Configuration</h4>
<p class="H4Body">It is possible to dedicate a single public IP address to a single server on your home network. This is called one-to-one NAT.</p>
<p class="H4Body">Here we allow the firewall to handle traffic to a second IP address, namely 97.158.253.26. We then allow all incoming traffic to be forwarded to the protected web server which has an IP address of 192.168.1.100. Only www and DNS (Port 53) traffic is allowed to access it via an access control list applied to the outside interface.</p>
<p class="H4Linux">&nbsp;</p>
<p class="H4Linux">access-list inbound permit icmp any any</p>
<p class="H4Linux">access-list inbound permit tcp any host 97.158.253.26 eq www</p>
<p class="H4Linux">access-list inbound permit tcp any host 97.158.253.26 eq 53</p>
<p class="H4Linux">access-list inbound permit udp any host 97.158.253.26 eq 53<br />
access-group inbound in interface outside<br />
static (inside,outside) 97.158.253.26 192.168.1.100 netmask 255.255.255.255 0 0
</p>
<p class="H4Linux">&nbsp;</p>
<p class="H4Body">Once configured, you will be able to hit your webserver using the firewall&#8217;s outside interface&#8217;s IP address as the destination. eg: http://one-to-one-NAT-ip-address. Remember, it&#8217;s not possible to hit your firewall&#8217;s public NAT IP address from servers on your home network. You&#8217;ll have to ask a friend to check it out.</p>
<p class="H4Body">Here are some additional TCP ports you may be interested in:</p>
<p class="MsoNormal">&nbsp;</p>
<div>
<table class="MsoNormalTable" style="border-collapse: collapse" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="border: 1pt inset #111111; padding: 7.5pt; background: green none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" valign="top">
<p class="MsoNormal" style="text-align: center" align="center"><strong><span style="color: white">Protocol</span></strong></p>
</td>
<td style="border-style: inset inset inset none; border-color: rgb(17, 17, 17) rgb(17, 17, 17) rgb(17, 17, 17) -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 7.5pt; background: green none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" valign="top">
<p class="MsoNormal" style="text-align: center" align="center"><strong><span style="color: white">Port</span></strong></p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt; padding: 7.5pt" valign="top">
<p class="MsoNormal">FTP</p>
</td>
<td style="border-style: none inset inset none; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 7.5pt" valign="top">
<p class="MsoNormal" style="text-align: center" align="center">20, 21</p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt; padding: 7.5pt" valign="top">
<p class="MsoNormal">SMTP Mail</p>
</td>
<td style="border-style: none inset inset none; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 7.5pt" valign="top">
<p class="MsoNormal" style="text-align: center" align="center">25</p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt; padding: 7.5pt" valign="top">
<p class="MsoNormal">POP3 Mail</p>
</td>
<td style="border-style: none inset inset none; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 7.5pt" valign="top">
<p class="MsoNormal" style="text-align: center" align="center">110</p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt; padding: 7.5pt" valign="top">
<p class="MsoNormal">HTTPS / SSL</p>
</td>
<td style="border-style: none inset inset none; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 7.5pt" valign="top">
<p class="MsoNormal" style="text-align: center" align="center">443</p>
</td>
</tr>
</table>
</div>
<p class="MsoNormal"><a name="_Toc50175070"></a></p>
<p><u><span style="font-size: 18pt; font-family: Arial; color: green"><br style="page-break-before: always" clear="all" /> </span></u></p>
<h3><a name="_Toc70480153"></a>How To Configure Your PIX To Accept Telnet</h3>
<p class="H3Body">The <strong>telnet</strong> command can be used to configure your PIX to accept telnet sessions. By default, it allows connections on the inside interface from the 192.168.1.0 network, as seen below:</p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="H3Linux">telnet 192.168.2.0 255.255.255.0 inside</p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="H3Body">Of course, if you change the IP address of the inside interface, you may have to change the statement above.</p>
<p class="H3Body">You can also allow access to the outside interface with a similar command. In the case below we&#8217;re allowing access from the network 64.251.19.0. I generally wouldn&#8217;t recommended this, but in some cases the need to do it is unavoidable.</p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="H3Linux">telnet 64.251.19.0 255.255.255.0 outside</p>
<p class="H3Body">&nbsp;</p>
<p class="H3Body">As an added precaution, you can set the PIX to automatically log out telnet sessions that have been inactive for a period of time. Here is an example of a 15 minute timeout period.</p>
<p class="H3Body">&nbsp;</p>
<p class="H3Linux">telnet timeout 15</p>
<h3><a name="_Toc70480154"></a><a name="_Toc50175071"></a>How To Make Your PIX A DHCP Server</h3>
<p class="H3Body">Enabling your PIX to be a DHCP server for your home network requires very few statements. First you have to enable the feature on the desired interface, which is usually the &#8220;inside&#8221; interface. The next step is to set the range of IP addresses the PIX&#8217;s &#8220;inside&#8221; interface will manage, and finally, you need to state the IP address of the DNS server the DHCP clients will use.</p>
<p class="H3Body">The default DNS address the PIX provides its DHCP clients is the IP address of the &#8220;inside&#8221; protected interface. If the PIX is configured to get it&#8217;s Internet IP address from your ISP, then the PIX will automatically become a caching DNS server for your home network. This means that in this case you don&#8217;t have to use the DNS statement.</p>
<p class="H3Body">&nbsp;</p>
<p class="H3Linux">dhcpd enable inside</p>
<p class="H3Linux">dhcpd address 192.168.1.20-192.168.1.30 inside</p>
<p class="H3Linux">dhcpd dns 192.168.1.100</p>
<p class="H3Linux">&nbsp;</p>
<h3><a name="_Toc70480155"></a><a name="_Toc50175072"></a>Basic PIX Troubleshooting</h3>
<h4><a name="_Toc70480156"></a>The &#8220;show interfaces&#8221; Command</h4>
<p class="H4Body">The show interfaces command will show you the basic status of the PIX&#8217;s interfaces. I&#8217;ve included some sample output below:</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Linux">pixfw# show interface</p>
<p class="H4Linux">interface ethernet0 &#8220;outside&#8221; is <span style="color: #ff6600">up</span>, line protocol is <span style="color: #ff6600">up</span></p>
<p class="H4Linux">  Hardware is i82559 ethernet, address is 0009.e89c.fdaa</p>
<p class="H4Linux">  <span style="color: #ff6600">IP address </span>97.158.253.25, subnet mask 255.255.255.248</p>
<p class="H4Linux">  MTU 1500 bytes, BW 10000 Kbit half duplex</p>
<p class="H4Linux">        5776596 packets input, 569192486 bytes, 0 no buffer</p>
<p class="H4Linux">        Received 5315835 broadcasts, 0 runts, 0 giants</p>
<p class="H4Linux">        <span style="color: red">0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort</span></p>
<p class="H4Linux">        435752 packets output, 74618166 bytes, 0 underruns</p>
<p class="H4Linux">        0 output errors, 3988 collisions, 0 interface resets</p>
<p class="H4Linux">        0 babbles, 0 late collisions, 6978 deferred</p>
<p class="H4Linux">        2 lost carrier, 0 no carrier</p>
<p class="H4Linux">        input queue (curr/max blocks): hardware (128/128) (0/77)</p>
<p class="H4Linux">        output queue (curr/max blocks): hardware (0/53) software (0/1)</p>
<p class="H4Linux">&#8230;</p>
<p class="H4Linux">&#8230;</p>
<p class="H4Linux">pixfw#</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Body">Your basic physical connectivity should be OK if the interfaces are seen as being in an &#8220;up&#8221; state with line protocol being &#8220;up&#8221;. If line protocol is down, you probably have your PIX incorrectly cabled to the Internet or your home network.</p>
<p class="H4Body">If the interfaces are seen as &#8220;administratively down&#8221;, then the PIX configuration will most likely have the interfaces configured as being &#8220;shutdown&#8221; like this:</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Linux">interface ethernet0 10baset shutdown</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Body">This can be easily corrected. First use the &#8220;write terminal&#8221; command to confirm the shutdown state. Then you should enter &#8220;config&#8221; mode and reenter the &#8220;interface&#8221; command without the word &#8220;shutdown&#8221; at the end.</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Linux">pixfw(config)# interface ethernet0 10baset</p>
<p class="H3Linux">&nbsp;</p>
<p class="H4Body">The &#8220;show interfaces&#8221; is also important as it shows you whether you have the correct IP addresses assigned to your interfaces and also the amount of traffic and errors associated with each.</p>
<h4><a name="_Toc70480157"></a>The &#8220;show xlate&#8221; Command</h4>
<p class="H4Body">This command will show whether the PIX is doing NAT translations correctly. Double check your configuration if there are no translations immediately after trying to access the Internet. NAT failure could also be due to bad cabling which will prevent Internet bound traffic from reaching the PIX at all.</p>
<p class="H4Linux">aquapix# sh xlate</p>
<p class="H4Linux">3 in use, 463 most used</p>
<p class="H4Linux">PAT Global 97.158.253.25(38448) Local 192.168.1.105(3367)</p>
<p class="H4Linux">PAT Global 97.158.253.25(25838) Local 192.168.1.105(2971)</p>
<p class="H4Linux">PAT Global 97.158.253.25(26306) Local 192.168.1.105(3610)</p>
<p class="H4Linux">aquapix#</p>
<p><strong><span style="font-size: 10pt; font-family: 'Courier New'"><br style="page-break-before: always" clear="all" /> </span></strong></p>
<p class="H4Linux">&nbsp;</p>
<h4><a name="_Toc70480158"></a>Using syslog</h4>
<p class="H4Body">A really good method for troubleshooting access control lists (ACLs) and also to view the types of methods people are using to access your site is to use</p>
<h4><a name="_Toc70480159"></a>Other Things To Check</h4>
<p class="H4Body">Always make sure your PIX has a:</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>correct default route. The default is the one with the lots of zeros.</p>
<p class="H45Linux"><span style="font-size: 9pt">aquapix# show route</span></p>
<p class="H45Linux"><span style="font-size: 9pt">        outside 0.0.0.0 0.0.0.0 97.158.253.30 1 DHCP static</span></p>
<p class="H45Linux"><span style="font-size: 9pt">        outside 12.210.24.0 255.255.252.0 12.210.27.161 1 CONNECT static</span></p>
<p class="H45Linux"><span style="font-size: 9pt">        inside 192.168.1.0 255.255.255.0 192.168.1.1 1 CONNECT static</span></p>
<p class="H45Linux"><span style="font-size: 9pt">aquapix#</span></p>
<p class="H3Linux">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>default gateway that you can &#8220;ping&#8221;. In the case above the gateway is 97.158.253.30.</p>
<p><strong><span style="font-size: 10pt; font-family: 'Courier New'"><br style="page-break-before: always" clear="all" /> </span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sabinshrestha.com.np/cisco/cisco-pix-firewall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Cisco SOHO VPNs</title>
		<link>http://www.sabinshrestha.com.np/cisco/configuring-cisco-soho-vpns/</link>
		<comments>http://www.sabinshrestha.com.np/cisco/configuring-cisco-soho-vpns/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 09:07:54 +0000</pubDate>
		<dc:creator>sabin</dc:creator>
				<category><![CDATA[Cisco]]></category>

		<guid isPermaLink="false">http://www.sabinshrestha.com.np/?p=50</guid>
		<description><![CDATA[Scenario In this example we have two SOHO offices. &#62;        A VPN needs to be created between the two sites so that they can communicate with each other without the fear of eavesdropping. &#62;        For simplicity, neither site is site wants to invest in a CA certificate service or RSA infrastructure. They prefer to use [...]]]></description>
			<content:encoded><![CDATA[<h3><a name="Scenario"></a>Scenario</h3>
<p class="H3Body">In this example we have two SOHO offices.</p>
<p class="H3Bullets">&gt;<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span>A VPN needs to be created between the two sites so that they can communicate with each other without the fear of eavesdropping.</p>
<p class="H3Bullets">&gt;<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span>For simplicity, neither site is site wants to invest in a CA certificate service or RSA infrastructure. They prefer to use pre-shared keys.</p>
<p class="H3Bullets">&gt;<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span>The network administrators at both sites are aware that permanent site � to � site VPNs require fixed Internet IP addresses and have upgraded from their basic DHCP services originally provided by their ISPs.</p>
<p><span style="font-size: 16pt; font-family: Arial; color: green"><br style="page-break-before: always" clear="all" /> </span></p>
<h4><a name="_Toc70480181"></a>Site1</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>uses a private network of 192.168.1.0</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>has a router with an external Internet IP address of <span class="content">97.158.253.25</span></p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>uses a Cisco DSL router with a built in DSL modem like the Cisco 800 series of routers.</p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<h4><a name="_Toc70480182"></a>Site2</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>uses a private network of 192.168.2.0</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>uses a Cisco router with an external DSL modem or a PIX firewall.</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>uses a router (Scenario A) or firewall (Scenario B) with an external Internet IP address of <span class="content">6.25.232.1</span></p>
<h4><a name="_Toc70480183"></a>Other Information</h4>
<p class="H4Body">The administrator at Site 1 wants to be able to access all the protected servers at site 2 by using their real IP addresses and vice versa. For example; Site 1 will refer to Site 2 servers with their 192.168.2.X IP addresses, not the Internet NAT addresses on the 6.25.232.X network.</p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<h3><a name="_Toc70480184"></a><a name="_Toc43217992"></a><a name="VPN_Terminologies"></a></h3>
<p class="H3Body">&nbsp;</p>
<p><u><span style="font-size: 18pt; font-family: Arial; color: green"><br style="page-break-before: always" clear="all" /> </span></u></p>
<h3><a name="_Toc70480185"></a><a name="_Toc43217993"></a><a name="Cisco_Router_VPN_Configuration_Steps"></a>Site 1 &#8211; Router VPN Configuration Steps</h3>
<p class="H3Body">There are a number of steps that need to be done to create the VPN.</p>
<h4> <a name="_Toc70480186"></a>IKE</h4>
<p class="H4Body">Phase 1 of the creation of a VPN tunnel first requires an exchange of the encryption capabilities of the VPN devices at both ends of the tunnel. The second phase involves encrypting the data by either using either:</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Pre-shared keys known to both VPN devices (This is what we&#8217;ll be using in all the examples below) or</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Keys generated via the RSA methodology or</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Keys obtained from Certification Authorities (CAs)</p>
<p class="H4Body">Cisco router / firewall devices usually require you to configure each of the various combinations of key encryption capabilities available. The device will then send <strong>all</strong> of the combinations to the remote VPN as part of the negotiation to decide which one to use.</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Create an IKE key policy. The policy number &#8220;9&#8243; identifies it from all other IKE policies that may be configured. This policy requires a pre-shared key.</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux"> crypto isakmp policy 9</p>
<p class="H45Linux">  hash md5</p>
<p class="H45Linux">  authentication pre-share</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt">&nbsp;</p>
<p class="H45Body">I&#8217;ve chosen only one combination for the sake of simplicity, but you could add more like this. If your device is licensed appropriately, and you intend to establish a connection with a Linux VPN device, then you should consider a <strong>3DES</strong> option which Linux FreeS/WAN prefers. Here is a snippet that includes 3DES and may other policy capabilities.</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt">&nbsp;</p>
<p class="H45Linux"> crypto isakmp policy 1</p>
<p class="H45Linux">  encr 3des</p>
<p class="H45Linux">  authentication pre-share</p>
<p class="H45Linux"> !</p>
<p class="H45Linux"> crypto isakmp policy 4</p>
<p class="H45Linux">  encr 3des</p>
<p class="H45Linux">  authentication pre-share</p>
<p class="H45Linux">  group 2</p>
<p class="H45Linux"> !</p>
<p class="H45Linux"> crypto isakmp policy 5</p>
<p class="H45Linux">  encr 3des</p>
<p class="H45Linux">  hash md5</p>
<p class="H45Linux">  authentication pre-share</p>
<p class="H45Linux">  group 2</p>
<p class="H45Linux"> !</p>
<p class="H45Linux"> crypto isakmp policy 10</p>
<p class="H45Linux">  authentication pre-share</p>
<p class="H45Linux">  group 2</p>
<p class="H45Linux"> !</p>
<p class="H45Linux"> crypto isakmp policy 12</p>
<p class="H45Linux">  authentication pre-share</p>
<p class="H45Linux"> !</p>
<p class="H45Linux"> crypto isakmp policy 20</p>
<p class="H45Linux">  hash md5</p>
<p class="H45Linux">  authentication pre-share</p>
<p class="H45Linux">  group 2</p>
<p class="H45Linux"> !</p>
<p class="H45Linux"> crypto isakmp policy 23</p>
<p class="H45Linux">  encr 3des</p>
<p class="H45Linux">  hash md5</p>
<p class="H45Linux">  authentication pre-share</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>You&#8217;ll then need to configure a VPN shared key that can be used between this site and the VPN site at 6.25.232.1</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt"><strong><span style="font-family: 'Courier New'"> </span></strong></p>
<p class="H45Linux"> crypto isakmp key VPNsecretPASSWORD address 6.25.232.1</p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<h4><a name="_Toc70480187"></a>IPSec</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Set a lifetime for the IPSec Security Associations. A security association is the equivalent of a site � to � site VPN relationship.</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt"><strong><span style="font-family: 'Courier New'"> </span></strong></p>
<p class="H45Linux"> crypto ipsec security-association lifetime seconds 86400</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span><span class="content">Configure an access list to define the valid traffic to be directed through the VPN from 192.168.1.0 to 192.168.2.0</span></p>
<p class="H45Linux"> <span class="content"><span style="font-size: 9pt"> </span></span></p>
<p class="H45Linux"> <span class="content"><span style="font-size: 9pt">access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255</span></span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span><span class="content">Define which encryption transformations will be used to shield the VPN traffic as it passes over the Internet with the &#8220;crypto ipsec transform-set&#8221; command. Each &#8220;single line&#8221; set can be given its own name. In this case we&#8217;ve chosen set <strong>s1s2trans</strong> to use one of the most common combinations, <strong>esp-des</strong> and <strong>esp-md5-hmac</strong>.</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content">crypto ipsec transform-set s1s2trans esp-des esp-md5-hmac</span></p>
<p class="H45Body">&nbsp;</p>
<p class="H45Body">If the remote site prefers to use the more secure 3DES method, (Linux FreeS/WAN only does 3DES) then you may want to replace the above statement with this one:</p>
<p class="H45Linux"> <span class="content"> </span></p>
<p class="H45Linux"> <span class="content">crypto ipsec transform-set s1s2trans esp-3des esp-md5-hmac</span></p>
<p class="H45Linux"> <span class="content"> </span></p>
<p class="H45Body"><span class="content">You can create multiple transform sets depending on your security requirements. For example; you could create a transform set named &#8220;weak&#8221; with regular DES encryption and another named &#8220;strong&#8221; using the better 3DES method.</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Create a crypto-map to match the valid traffic defined by the ACL with the transform set we want to use with VPN peer router/firewall at the other site. This example is creating a map entry of priority &#8220;10&#8243;.</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt"><strong><span style="font-family: 'Courier New'"> </span></strong></p>
<p class="H45Linux"> crypto map to-site2 10 ipsec-isakmp</p>
<p class="H45Linux">  set peer 6.25.232.1</p>
<p class="H45Linux">  set transform-set s1s2trans</p>
<p class="H45Linux">  match address 101</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt">&nbsp;</p>
<p class="H45Body">You can add additional map entries to correspond with tunnels to other remote sites with additional priorities. Just remember to create the appropriate access control lists and pre-shared keys. Here is an example of additional map entries using two different transform sets:</p>
<p class="H45Body">&nbsp;</p>
<p class="H45Linux"> crypto map to-site2  150 ipsec-isakmp</p>
<p class="H45Linux">  set peer 108.112.44.95</p>
<p class="H45Linux">  set transform-set s1s2trans</p>
<p class="H45Linux">  match address 101</p>
<p class="H45Linux"> crypto map to-site2  153 ipsec-isakmp</p>
<p class="H45Linux">  set peer 4.21.116.23</p>
<p class="H45Linux">  set transform-set s1s2trans-strong</p>
<p class="H45Linux">  match address 102</p>
<p class="H45Linux"> crypto map to-site2  158 ipsec-isakmp</p>
<p class="H45Linux">  set peer 223.52.37.25</p>
<p class="H45Linux">  set transform-set s1s2trans-strong</p>
<p class="H45Linux">  set pfs group2</p>
<p class="H45Linux">  match address 103</p>
<p class="H45Linux">&nbsp;</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Bind the crypto-map to the external interface of the router.</p>
<p class="H45Linux"> <span class="content"> </span></p>
<p class="H45Linux"> <span class="content">interface BVI1</span></p>
<p class="H45Linux"> <span class="content">�crypto map to-site2</span></p>
<p class="H45Body">This example assumes you are using a router with a built in DSL modem. In such a case, the external Internet facing interface would most likely be called BVI1 with a &#8220;sister&#8221; interface ATM0. Make sure both are configured correctly.</p>
<p class="H45Body">If you are using a router with an external DSL / Cable modem, then there will only be one Internet facing interface to configure. This interface would be usually named either Ethernet0 or Ethernet1 depending on the type of router. The Site 2 configuration uses an external DSL / Cable modem.</p>
<h4><a name="_Toc70480188"></a><a name="Configuration"></a>Site 1 � Configuration Example</h4>
<div>
<table class="MsoNormalTable" style="border: medium none ; background: white none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; border-collapse: collapse" border="1" cellpadding="0" cellspacing="0">
<tr>
<td style="border: 1pt inset #111111; padding: 2.25pt; background: green none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<p class="MsoNormal" style="margin-top: 6pt; margin-right: 0in; margin-left: 0in; text-align: center" align="center"><strong><span &nbsp;&nbsp;style="font-size:9.0pt">Our </span></strong><strong><span style="font-size: 9pt">SOHO</span></strong><strong><span &nbsp;&nbsp;style="font-size:9.0pt"> Router (Site #1)</span></strong></p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt; width: 6in" width="576">
<p class="MsoNormal"><span style="font-size: 9pt">Current Configuration:</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">version 12.1</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">service timestamps debug   uptime</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">service timestamps log   uptime</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">hostname soho1</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ip subnet-zero</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">no ip domain-lookup</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">bridge irb</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Configure   IKE properties</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">crypto   isakmp policy 9</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> authentication   pre-share</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> hash   md5</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">crypto   isakmp key VPNsecretPASSWORD address 6.25.232.1</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Configure IPSec   properties<br />
</span><span style="font-size: 9pt; font-family: 'Courier New'; color: blue">!</span>
</p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">crypto   ipsec security-association lifetime seconds 86400</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">crypto   ipsec transform-set s1s2trans esp-des esp-md5-hmac</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * If the remote   site prefers to use 3DES, (Linux FreeS/WAN only does 3DES) then you may want   to</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * replace the   above statement with this one:</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">!  </span><span &nbsp;&nbsp;style="font-size:9.0pt;font-family:"Courier New";color:blue">crypto ipsec   transform-set s1s2trans esp-3des esp-md5-hmac</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Define the   Site1 to Site2 traffic to be encrypted<br />
!</span>
</p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">crypto   map to-site2 10 ipsec-isakmp</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> set   peer 6.25.232.1</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> set   transform-set s1s2trans</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> match   address 101</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Give the   protected interface an IP address and</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �and let it   know that it should do NAT as a protected</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �&#8221;inside&#8221;   interface</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">interface Ethernet0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�ip address 192.168.1.1   255.255.255.0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�ip nat inside</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt">interface ATM0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�no ip address</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�no atm ilmi-keepalive</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�pvc 0/35</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�encapsulation aal5snap</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�bundle-enable</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�dsl operating-mode auto</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�bridge-group 1</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Encryption   will be done on interface BVI1 according to</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �the crypto   map statement</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">interface BVI1</span></span><span &nbsp;&nbsp;style="font-size:9.0pt;font-family:"Courier New""><br />
<span class="content"> ip address 97.158.253.25 255.255.255.248</span></span>
</p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">�ip nat outside</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> crypto   map to-site2</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> ip   mtu 1412</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Tells the   router to NAT all traffic that passes through it:</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �1) From the   inside to the outside,</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �2) And whose   IP address matches those in route map &#8220;nonat&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �3) Must get   an outside &#8220;public&#8221; address that is the same as</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! *     interface   BVI1</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! *</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Replaces the   following command used on the <a href="http://www.linuxhomenetworking.com/cisco-hn/dsl-router.htm">basic DSL router page</a></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! *</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �ip nat   inside source list 1 interface BVI1 overload</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ip nat inside source route-map   nonat interface BVI1 overload</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �This   statement performs the static address translation</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �</span></span><span style="font-size: 9pt; color: blue">for   the Web server.</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �With this   statement, users trying to reach 97.158.253.26</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �</span></span><span style="font-size: 9pt; color: blue">�will   be automatically redirected to 192.168.1.100</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �</span></span><span style="font-size: 9pt; color: blue">which   in this case is the Web server.</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ip nat inside source static   192.168.1.100 97.158.253.26</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Set your   default gateway as provided by your ISP</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Set a route   to Site2 via the Tunnel IP of the</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �</span></span><span style="font-size: 9pt; color: blue">router   at Site2</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ip classless</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ip route 0.0.0.0 0.0.0.0   97.158.253.30</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt; color: blue">! * �Encrypt all traffic passing over   the tunnel</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt; color: blue">! * �interface between the two sites</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">access-list   101 permit ip 192.168.1.0 0.0.0.255 <span class="content">192.168.2.0</span>   0.0.0.255</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �ACL used by   route map &#8220;nonat&#8221; to exclude traffic</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �between   Site1 and Site2 from NAT process as this</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �will pass   through the VPN tunnel</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">access-list   150 deny   ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">access-list   150 permit ip 192.168.1.0 0.0.0.255 any</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt"> </span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �Use a route map to define which traffic from the private</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �<span &nbsp;&nbsp;class="content">network</span> should be included in the NAT<span &nbsp;&nbsp;class="content"> process:</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt"> </span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">route-map   nonat permit 10</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">�match ip   address 150</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
</td>
</tr>
</table>
</div>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p><u><span style="font-size: 18pt; font-family: Arial; color: green"><br style="page-break-before: always" clear="all" /> </span></u></p>
<h3><a name="_Toc70480189"></a><a name="_Toc43217994"></a>Site 2 &#8211; Router VPN Configuration Steps (Scenario A)</h3>
<div>
<h4><a name="_Toc70480190"></a>IKE</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Create an IKE key policy. The policy number &#8220;9&#8243; identifies it from all other IKE policies that may be configured. This policy requires a pre-shared key</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux"> crypto isakmp policy 9</p>
<p class="H45Linux">  hash md5</p>
<p class="H45Linux">  authentication pre-share</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Configure a VPN shared key that can be used between this site and the VPN site at 97.158.253.25</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt"><strong><span style="font-family: 'Courier New'"> </span></strong></p>
<p class="H45Linux"> crypto isakmp key VPNsecretPASSWORD address 97.158.253.25</p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<h4><a name="_Toc70480191"></a>IPSec</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Set a lifetime for the IPSec Security Associations</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt"><strong><span style="font-family: 'Courier New'"> </span></strong></p>
<p class="H45Linux"> crypto ipsec security-association lifetime seconds 86400</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span><span class="content">Configure an access list to define the valid traffic to be directed through the VPN from 192.168.1.0 to 192.168.2.0</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content"><span style="font-size: 9pt">access-list 101 permit ip 192.168.1.0 0.0.0.255 192.168.2.0 0.0.0.255</span></span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span><span class="content">Define which transformations will be used to shield the VPN traffic with the &#8220;crypto ipsec transform-set&#8221; command. Each set can be given its own name.</span></p>
<p class="H45Linux"> <span class="content"> </span></p>
<p class="H45Linux"> <span class="content">crypto ipsec transform-set s2s1trans esp-des esp-md5-hmac</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H45Body">If the remote site prefers to use the more secure 3DES method, (Linux FreeS/WAN only does 3DES) then you may want to replace the above statement with this one:</p>
<p class="H45Linux"> <span class="content"> </span></p>
<p class="H45Linux"> <span class="content">crypto ipsec transform-set s1s2trans esp-3des esp-md5-hmac</span></p>
<p class="H45Linux">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Create a crypto-map to match the valid traffic, the transform set, the security-association lifetime with the VPN peer router/firewall at the other site</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt"><strong><span style="font-family: 'Courier New'"> </span></strong></p>
<p class="H45Linux"> crypto map to-site1 10 ipsec-isakmp</p>
<p class="H45Linux">  set peer 6.25.232.1</p>
<p class="H45Linux">  set transform-set s1s2trans</p>
<p class="H45Linux">  match address 101</p>
<p class="MsoNormal" style="margin-bottom: 2.25pt">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Bind the crypto-map to the external interface of the router</p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content">interface Ethernet1</span></p>
<p class="H45Linux"> <span class="content">�crypto map to-site1</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<h4><a name="_Toc70480192"></a>Site 2 � Configuration Example (Scenario A)</h4>
<div>
<table class="MsoNormalTable" style="border: medium none ; background: white none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; border-collapse: collapse" border="1" cellpadding="0" cellspacing="0">
<tr>
<td style="border: 1pt inset #111111; background: green none repeat scroll 0% 50%; width: 5.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" width="528">
<p class="MsoNormal" style="margin-top: 6pt; margin-right: 0in; margin-left: 0in; text-align: center" align="center"><strong><span &nbsp;&nbsp;style="font-size:9.0pt">Their </span></strong><strong><span style="font-size: 9pt">SOHO</span></strong><strong><span &nbsp;&nbsp;style="font-size:9.0pt"> Router<span class="content"><span style="color: white">   (Site #2)</span></span></span></strong></p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt; width: 6in" width="576">
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">Current   Configuration:<br />
!<br />
version 12.1<br />
service timestamps debug uptime<br />
service timestamps log uptime<br />
!<br />
hostname soho2<br />
!<br />
ip subnet-zero<br />
no ip domain-lookup</p>
<p></span>
</p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">! * </span><span style="font-size: 9pt; color: blue">�Configure   IKE properties<br />
</span><span style="font-size: 9pt; font-family: 'Courier New'">!</span>
</p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">crypto   isakmp policy 9</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> authentication   pre-share</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> hash   md5</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">crypto   isakmp key VPNsecretPASSWORD address 97.158.253.25</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Configure IPSec   properties<br />
<span class="content">!</span></span>
</p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">crypto   ipsec security-association lifetime seconds 86400</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">crypto   ipsec transform-set s2s1trans esp-des esp-md5-hmac</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * If the remote   site prefers to use 3DES, (Linux FreeS/WAN only does 3DES) then you may want   to</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * replace the   above statement with this one:</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! *</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * </span><span &nbsp;&nbsp;style="font-size:9.0pt;font-family:"Courier New";color:blue">crypto ipsec   transform-set s2s1trans esp-3des esp-md5-hmac</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">!</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt"> </span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �Define the Site1 to Site2 traffic to be encrypted</span></span><span &nbsp;&nbsp;style="font-size:9.0pt;color:blue"><br />
!</span>
</p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">crypto   map to-site1 10 ipsec-isakmp</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> set   peer 97.158.253.25</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> set   transform-set s2s1trans</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> match   address 101</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Encryption   will be done according to the crypto</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �</span></span><span style="font-size: 9pt; color: blue">map   statement</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">interface   Ethernet1</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> ip   address 6.25.232.1 255.255.255.248</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�ip nat outside</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'"> crypto   map to-site1</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Give the   protected interface an IP address and</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �and let it   know that it should do NAT as a protected</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �&#8221;inside&#8221;   interface</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt">interface Ethernet0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�ip address 192.168.1.1   255.255.255.0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�ip nat inside</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Tells the   router to NAT all traffic that passes through it:</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �1) From the   inside to the outside,</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �2) And whose   IP address matches those in route map &#8220;nonat&#8221;</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �3) Must get   an outside &#8220;public&#8221; address that is the same as</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! *     interface   ethernet1</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! *</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Replaces the   following command used on the <a href="http://www.linuxhomenetworking.com/cisco-hn/dsl-router.htm">basic DSL router page</a></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! *</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �ip nat   inside source list 1 interface ethernet1 overload</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ip nat inside source route-map   nonat interface ethernet1 overload</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Set your   default gateway as provided by your ISP</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Set a route   to Site2 via the Tunnel IP of the router</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �</span></span><span style="font-size: 9pt; color: blue">at   Site2</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ip classless</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ip route 0.0.0.0 0.0.0.0   6.25.232.6</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! </span></span><span style="font-size: 9pt; font-family: 'Courier New'">�* �Encrypt all traffic passing over the tunnel interface</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt; color: blue">! * �</span></span><span &nbsp;&nbsp;style="font-size:9.0pt;font-family:"Courier New";color:blue">between the two   sites</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 'Courier New'">access-list   101 permit ip 192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �ACL used by   route map &#8220;nonat&#8221; to exclude traffic between</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �</span></span><span style="font-size: 9pt; color: blue">Site1   and Site2</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �from NAT   process as this will pass through the VPN tunnel</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">access-list 150 deny   ip   192.168.2.0 0.0.0.255 192.168.1.0 0.0.0.255</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">access-list 150 permit ip   192.168.2.0 0.0.0.255 any</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt"> </span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * �Use a route   map to define which traffic from the private</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �</span></span><span style="font-size: 9pt; color: blue">network   should be included in the NAT process:</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt">route-map nonat permit 10</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">�match ip address 150</span></p>
</td>
</tr>
</table>
</div>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
</div>
<p><u><span style="font-size: 18pt; font-family: Arial; color: green"><br style="page-break-before: always" clear="all" /> </span></u></p>
<h3><a name="_Toc70480193"></a><a name="_Toc43217995"></a><a name="_Toc42869395"></a>Site 2 � PIX Firewall VPN Config. Steps (Scenario B)</h3>
<h4><a name="_Toc70480194"></a><a name="_Toc42868284"></a>IKE</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Plan on creating an IPSec policy with a unique identifier number. The PIX will check each set of configured numbered policies for IKE till it achieves success. In this case we&#8217;ll only use one policy &#8220;20&#8243;.</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Define the type of encryption to be used (DES or 3DES)</p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content">isakmp policy 20 encryption des</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span><span class="content">Define the hashing method for authentication (SHA or MD5)</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content">isakmp policy 20 hash md5</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span><span class="content">Define the overall authentication method (Pre-shared key or rsa-sig). We&#8217;ll use the simpler pre-shared method.</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content">isakmp policy 20 authentication pre-share</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span><span class="content">Define the shared key to be used.</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content"><span style="font-size: 9pt">isakmp key VPNsecretPASSWORD address 97.158.253.25 netmask 255.255.255.255</span></span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span><span class="content">Specify how the hosts will identify themselves to one another (By address or hostname). The same method should be used on both ends.</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content">isakmp identity address</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span><span class="content">Enable ISAKMP on the external interface of the PIX</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content">isakmp enable outside</span></p>
<h4><a name="_Toc70480195"></a><a name="_Toc42868285"></a>IPSec</h4>
</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span><span class="content">Configure an access list to define the valid traffic to be directed through the VPN from 192.168.2.0 to 192.168.1.0</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content"><span style="font-size: 9pt">access-list ipsec permit ip 192.168.2.0 255.255.255.0 192.168.1.0 255.255.255.0</span></span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span><span class="content">Define which transformations will be used to shield the VPN traffic with the &#8220;crypto ipsec transform-set&#8221; command. Each set can be given its own name, in this case &#8220;s2s1trans&#8221;.</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content">crypto ipsec transform-set s2s1trans esp-des esp-md5-hmac</span></p>
<p class="H45Linux"> <span class="content"> </span></p>
<p class="H45Body">If the remote site prefers to use the more secure 3DES method, (Linux FreeS/WAN only does 3DES) then you may want to replace the above statement with this one:</p>
<p class="H45Linux"> <span class="content"> </span></p>
<p class="H45Linux"> <span class="content">crypto ipsec transform-set s1s2trans esp-3des esp-md5-hmac</span></p>
<p class="H45Linux">&nbsp;</p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Create a crypto map to match the valid traffic, the transform set, the security-association lifetime with the VPN peer router/firewall at the other site.</p>
<p style="margin: 0in 0in 2.25pt 0.25in"><strong><span style="font-family: 'Courier New'"> </span></strong></p>
<p class="H45Linux"> crypto map s2s1ipsec 10 match address ipsec<br />
crypto map s2s1ipsec 10 set peer 97.158.253.25<br />
crypto map s2s1ipsec 10 set transform-set s2s1trans
</p>
<p class="H45Linux"> <span style="font-size: 9pt">crypto map s2s1ipsec 10 set security-association lifetime seconds 86400</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H45Body">In this case the crypto map is named &#8220;s2s1ipsec&#8221; and each statement has a sequence number or &#8220;ranking&#8221; of &#8220;10&#8243;. Statements with lower &#8220;sequence numbers&#8221; are considered before those with higher values.</p>
<p class="H45Body">Just like the routers, you can add more statements for tunnels to other remote VPN devices. You just have to remember to make sure that:</p>
<p class="H45Body">&nbsp;</p>
<p class="H6Bullets">+<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span>the <strong>crypto map</strong> statements referring to each remote site uses a unique sequence number,</p>
<p class="H6Bullets">+<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span>that the shared secrets match and</p>
<p class="H6Bullets">+<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span>that corresponding ACLs are created.</p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Bind the crypto-map to the external interface on which VPN traffic will originate</p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content">crypto map s2s1ipsec interface outside</span></p>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Let the PIX&#8217;s ASA always implicitly allow IPSec traffic through</p>
<p style="margin: 0in 0in 2.25pt 0.25in"><span class="content"><strong><span style="font-family: 'Courier New'"> </span></strong></span></p>
<p class="H45Linux"> <span class="content">sysopt connection permit-ipsec</span></p>
<p><u><span style="font-size: 18pt; font-family: Arial; color: green"><br style="page-break-before: always" clear="all" /> </span></u></p>
<h3><a name="_Toc42868286"></a><a name="_Toc70480196"></a>Site 2 � Configuration Example (Scenario B)</h3>
<p class="H3Body">Here is a sample configuration for Site 2 when using a PIX firewall. There are a number of fully commented sample PIX configurations in the <a href="http://www.linuxhomenetworking.com/cisco-hn/appendix.htm">appendix</a> in which each line is explained.</p>
<p class="MsoNormal">&nbsp;</p>
<div>
<table class="MsoNormalTable" style="border: medium none ; background: white none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; border-collapse: collapse" border="1" cellpadding="0" cellspacing="0">
<tr>
<td style="border: 1pt inset #111111; padding: 2.25pt; width: 6in" valign="top" width="576">
<p class="MsoNormal" style="margin-top: 6pt; margin-right: 0in; margin-left: 0in; text-align: center" align="center"><strong><span &nbsp;&nbsp;style="font-size:9.0pt">Our </span></strong><strong><span style="font-size: 9pt">SOHO</span></strong><strong><span &nbsp;&nbsp;style="font-size:9.0pt"> PIX (Site #2)</span></strong></p>
</td>
</tr>
<tr>
<td style="border: 1pt inset #111111; padding: 2.25pt; width: 6in" valign="top" width="576">
<p class="MsoNormal"><span style="font-size: 9pt">PIX Version 6.2(2)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">nameif ethernet0 outside   security0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">nameif ethernet1 inside   security100</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">enable password   uR0ZSMuMGz09CMpz encrypted</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">passwd uR0ZSMuMGz09CMpz   encrypted</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">hostname ciscopix</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">domain-name   stcla1.sfba.home.com</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">fixup protocol ftp 21</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">fixup protocol http 80</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">fixup protocol h323 h225   1720</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">fixup protocol h323 ras 1718-1719</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">fixup protocol ils 389</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">fixup protocol rsh 514</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">fixup protocol rtsp 554</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">fixup protocol smtp 25</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">fixup protocol sqlnet 1521</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">fixup protocol sip 5060</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">fixup protocol skinny 2000</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">names</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt"> </span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �Allow IPSec traffic from Site2&#8242;s private</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �network to Site1&#8242;s private network</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">access-list   ipsec permit ip 192.168.2.0 255.255.255.0 192.168.1.0 255.255.255.0</span></strong></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt"> </span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �Do not Network Address Translate (NAT) traffic</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �originating on Site2&#8242;s private network destined</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �to Site1&#8242;s private network. This ACL is the first</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �step.</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt">access-list nonat permit ip   192.168.2.0 255.255.255.0 192.168.1.0 255.255.255.0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt">pager lines 25</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">logging on</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">logging timestamp</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">logging trap warnings</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">logging history warnings</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">logging facility 22</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">logging host inside   192.168.2.237</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">interface ethernet0 10baset</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">interface ethernet1 10full</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">icmp deny any outside</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">mtu outside 1500</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">mtu inside 1500</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt"> </span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �Setup the IP addresses of the interfaces</span></span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ip address outside   6.25.232.1 255.255.255.248</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ip address inside   192.168.2.1 255.255.255.0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ip audit info action alarm</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ip audit attack action alarm</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">pdm logging informational   100</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">pdm history enable</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">arp timeout 14400</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">global (outside) 1 interface</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �Do not NAT traffic that matches access list &#8220;nonat&#8221;,</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �NAT everything else</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">nat   (inside) 0 access-list nonat</span></strong></span></p>
<p class="MsoNormal"><span style="font-size: 9pt">nat (inside) 1 192.168.2.0   255.255.255.255 0 0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt">route outside 0.0.0.0 0.0.0.0   <span class="content">6.25.232.6</span> 1</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">timeout xlate 0:</span><span style="font-size: 9pt">05:00</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">timeout conn </span><span style="font-size: 9pt">1:00:00</span><span style="font-size: 9pt"> half-closed 0:</span><span style="font-size: 9pt">10:00</span><span style="font-size: 9pt"> udp 0:</span><span style="font-size: 9pt">02:00</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">timeout uauth 0:</span><span style="font-size: 9pt">05:00</span><span style="font-size: 9pt"> absolute</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">aaa-server TACACS+ protocol tacacs+</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">aaa-server RADIUS protocol   radius</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">aaa-server LOCAL protocol   local</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">filter java 80 0.0.0.0 0.0.0.0   0.0.0.0 0.0.0.0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">filter activex 80 0.0.0.0 0.0.0.0   0.0.0.0 0.0.0.0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">filter java 80 0.0.0.0 0.0.0.0   0.0.0.0 0.0.0.0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">filter activex 80 0.0.0.0 0.0.0.0   0.0.0.0 0.0.0.0</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ntp server 192.168.2.237   source inside</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">http server enable</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">http 192.168.2.0   255.255.255.0 inside</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">snmp-server host inside   192.168.2.237</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">no snmp-server location</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">no snmp-server contact</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">snmp-server community passwdboo</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">snmp-server enable traps</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">tftp-server inside   192.168.2.237 /ciscopix-confg</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">floodguard enable</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">no sysopt route dnat</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">telnet 192.168.2.0   255.255.255.0 inside</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">telnet timeout 15</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ssh 192.168.2.0 255.255.255.0   inside</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">ssh timeout 15</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">dhcpd address 192.168.2.20-192.168.2.30   inside</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">dhcpd lease 3600</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">dhcpd ping_timeout 750</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">dhcpd auto_config outside</span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt"> </span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �IPSec policies:</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">�</span></span><span class="content"><strong><span>sysopt connection permit-ipsec</span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">crypto   ipsec transform-set s2s1trans esp-des esp-md5-hmac</span></strong></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * If the remote   site prefers to use the more secure 3DES method, (Linux FreeS/WAN only does   3DES)</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * then you may   want to replace the above statement with this one:</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">!</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">! * crypto ipsec   transform-set s2s1trans esp-3des esp-md5-hmac</span></p>
<p class="MsoNormal"><span style="font-size: 9pt; color: blue">!</span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt"> </span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt"> </span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">crypto   map s2s1ipsec 10 set security-association lifetime seconds 86400</span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">crypto   map s2s1ipsec 10 ipsec-isakmp</span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">crypto   map s2s1ipsec 10 match address ipsec</span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">crypto   map s2s1ipsec 10 set peer 97.158.253.25</span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">crypto   map s2s1ipsec 10 set transform-set s2s1trans</span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">crypto   map s2s1ipsec interface outside</span></strong></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt"> </span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">! * �IKE policies:</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt">!</span></span></p>
<p class="MsoNormal"><span class="content"><span style="font-size: 9pt"> </span></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">isakmp   enable outside</span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">isakmp   key VPNsecretPASSWORD address 97.158.253.25 netmask 255.255.255.255</span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">isakmp   identity address</span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">isakmp   policy 20 authentication pre-share</span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">isakmp   policy 20 encryption des</span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">isakmp   policy 20 hash md5</span></strong></span></p>
<p class="MsoNormal"><span class="content"><strong><span style="font-size: 9pt">isakmp   policy 20 group 1</span></strong></span></p>
<p class="MsoNormal"><span style="font-size: 9pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 9pt">terminal width 80</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">Cryptochecksum:3af43873d35d6f0651f8c999180c2342</span></p>
<p class="MsoNormal"><span style="font-size: 9pt">: end</span></p>
</td>
</tr>
</table>
</div>
<p style="margin: 0in 0in 2.25pt 0.25in">&nbsp;</p>
<p><u><span style="font-size: 18pt; font-family: Arial; color: green"><br style="page-break-before: always" clear="all" /> </span></u></p>
<h3><a name="_Toc70480197"></a>Troubleshooting Cisco VPNs</h3>
<p class="H3Body">Cisco provides a number of commands to test the status of your site � to � site VPN tunnel. If your tunnel fails to be created you&#8217;ll need to ensure that all the parameters are set up correctly. The most common failure I&#8217;ve seen is having mismatched isakmp transform sets.</p>
<h4><a name="_Toc70480198"></a>Displaying the Key Exchange Status</h4>
<p class="H4Body">The &#8220;<strong>show crypto isakmp sa</strong>&#8221; command works on both routers and PIX firewalls and is used to determine whether the first phase of the VPN tunnel establishment (isakmp key exchange) was successful. In the example below Site 1 &amp; 2 have a working tunnel with the status output showing the Internet IP addresses of the VPN devices at both ends of the tunnels.</p>
<p class="H3Body">&nbsp;</p>
<p class="H4Linux">soho1# show crypto isakmp sa</p>
<p class="H4Linux">Total     : 1</p>
<p class="H4Linux">Embryonic : 0</p>
<p class="H4Linux">        dst               src      state     pending  � created</p>
<p class="H4Linux">�6.25.232.1       97.158.253.25    QM_IDLE         0           0</p>
<p class="H4Linux">soho1#</p>
<h4><a name="_Toc70480199"></a>Displaying the IPSec Tunnel Status</h4>
<p class="H4Body">The &#8220;<strong>show crypto ipsec sa</strong>&#8221; command works on both routers and PIX firewalls and is used to determine whether the second phase of the VPN tunnel establishment (IPSec) was successful. In the example below Site 1 &amp; 2 have a working tunnel with the status output showing the Internet IP addresses of the VPN devices at both ends of the tunnels.</p>
<p class="H3Body">&nbsp;</p>
<p class="H4Linux"><span style="font-size: 9pt">soho1# sh crypto ipsec sa</span></p>
<p class="H4Linux"><span style="font-size: 9pt"> </span></p>
<p class="H4Linux"><span style="font-size: 9pt"> </span></p>
<p class="H4Linux"><span style="font-size: 9pt">interface: BVI1</span></p>
<p class="H4Linux"><span style="font-size: 9pt">    Crypto map tag: to-site2, local addr. 6.25.232.1</span></p>
<p class="H4Linux"><span style="font-size: 9pt"> </span></p>
<p class="H4Linux"><span style="font-size: 9pt">   local  ident (addr/mask/prot/port): (192.168.1.0/255.255.255.0/0/0)</span></p>
<p class="H4Linux"><span style="font-size: 9pt">   remote ident (addr/mask/prot/port): (192.168.2.0/255.255.255.0/0/0)</span></p>
<p class="H4Linux"><span style="font-size: 9pt">   current_peer: 97.158.253.25:500</span></p>
<p class="H4Linux"><span style="font-size: 9pt">     PERMIT, flags={origin_is_acl,}</span></p>
<p class="H4Linux"><span style="font-size: 9pt">    #pkts encaps: 871118, #pkts encrypt: 871118, #pkts digest 871118</span></p>
<p class="H4Linux"><span style="font-size: 9pt">    #pkts decaps: 917581, #pkts decrypt: 917581, #pkts verify 917581</span></p>
<p class="H4Linux"><span style="font-size: 9pt">    #pkts compressed: 0, #pkts decompressed: 0</span></p>
<p class="H4Linux"><span style="font-size: 9pt">    #</span><span style="font-size: 8pt">pkts not compressed: 0, #pkts compr. failed: 0, #pkts decompress failed: 0</span></p>
<p class="H4Linux"><span style="font-size: 9pt">    #send errors 99, #recv errors 0</span></p>
<p class="H4Linux"><span style="font-size: 9pt"> </span></p>
<p class="H4Linux"><span style="font-size: 9pt">     local crypto endpt.: 6.25.232.1, remote crypto endpt.: 97.158.253.25</span></p>
<p class="H4Linux"><span style="font-size: 9pt">     path mtu 1500, ipsec overhead 56, media mtu 1500</span></p>
<p class="H4Linux"><span style="font-size: 9pt">     current outbound spi: 95992f5</span></p>
<p class="H4Linux"><span style="font-size: 9pt"> </span></p>
<p class="H4Linux"><span style="font-size: 9pt">     inbound esp sas:</span></p>
<p class="H4Linux"><span style="font-size: 9pt">      </span><span style="font-size: 9pt" lang="ES-MX">spi: 0xe43e931d(3829306141)</span></p>
<p class="H4Linux"><span style="font-size: 9pt" lang="ES-MX">        transform: esp-des esp-md5-hmac ,</span></p>
<p class="H4Linux"><span style="font-size: 9pt" lang="ES-MX">        </span><span style="font-size: 9pt">in use settings ={Tunnel, }</span></p>
<p class="H4Linux"><span style="font-size: 9pt">        slot: 0, conn id: 6, crypto map: to-site2</span></p>
<p class="H4Linux"><span style="font-size: 9pt">        sa timing: remaining key lifetime (k/sec): (4601836/22657)</span></p>
<p class="H4Linux"><span style="font-size: 9pt">        IV size: 8 bytes</span></p>
<p class="H4Linux"><span style="font-size: 9pt">        replay detection support: Y</span></p>
<p class="H4Linux"><span style="font-size: 9pt"> </span></p>
<p class="H4Linux"><span style="font-size: 9pt">     &#8230;</span></p>
<p class="H4Linux"><span style="font-size: 9pt">     &#8230;</span></p>
<p class="H4Linux"><span style="font-size: 9pt"> </span></p>
<p class="H4Linux"><span style="font-size: 9pt">     outbound esp sas:</span></p>
<p class="H4Linux"><span style="font-size: 9pt">      spi: 0x95992f5(156865269)</span></p>
<p class="H4Linux"><span style="font-size: 9pt">        transform: esp-des esp-md5-hmac ,</span></p>
<p class="H4Linux"><span style="font-size: 9pt">        in use settings ={Tunnel, }</span></p>
<p class="H4Linux"><span style="font-size: 9pt">        slot: 0, conn id: 5, crypto map: to-site2</span></p>
<p class="H4Linux"><span style="font-size: 9pt">        sa timing: remaining key lifetime (k/sec): (4605007/22656)</span></p>
<p class="H4Linux"><span style="font-size: 9pt">        IV size: 8 bytes</span></p>
<p class="H4Linux"><span style="font-size: 9pt">        replay detection support: Y</span></p>
<p class="H4Linux"><span style="font-size: 9pt">     &#8230;</span></p>
<p class="H4Linux"><span style="font-size: 9pt">     &#8230;</span></p>
<p class="H4Linux"><span style="font-size: 9pt"> </span></p>
<p class="H4Linux"><span style="font-size: 9pt">soho1#</span></p>
<h4><a name="_Toc70480200"></a>Debugging</h4>
<p class="H4Body">Cisco has the very useful <strong>debug</strong> set of commands which you can use to follow the sequence of events that occur during the establishment of the VPN tunnel. Unfortunately the use of the debug command is beyond the scope of this book.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sabinshrestha.com.np/cisco/configuring-cisco-soho-vpns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Cisco DSL Routers</title>
		<link>http://www.sabinshrestha.com.np/cisco/configuring-cisco-dsl-routers/</link>
		<comments>http://www.sabinshrestha.com.np/cisco/configuring-cisco-dsl-routers/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 09:04:43 +0000</pubDate>
		<dc:creator>sabin</dc:creator>
				<category><![CDATA[Cisco]]></category>

		<guid isPermaLink="false">http://www.sabinshrestha.com.np/?p=49</guid>
		<description><![CDATA[This is a simple guide on how to set up your Cisco DSL router for DHCP using PPPoE. The examples in this chapter also show how to configure NAT so you can also have a home / SOHO based website. This page should be suitable for the following Cisco routers:   With Built In DSL [...]]]></description>
			<content:encoded><![CDATA[<p class="FirstLine"><strong><span style="font-size: 24pt">T</span></strong>his is a simple guide on how to set up your Cisco DSL router for DHCP using PPPoE. The examples in this chapter also show how to configure NAT so you can also have a home / SOHO based website. This page should be suitable for the following Cisco routers:</p>
<p class="MsoNormal" style="text-align: center" align="center"><strong> </strong></p>
<p class="FirstLine">With Built In DSL Modems</p>
<p class="H3Bullets">&gt;<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span>800 series</p>
<p class="H3Bullets">&gt;<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span>1700 / 2600 / 3600 series with the ADSL WIC installed</p>
<p class="MsoNormal">&nbsp;</p>
<p class="FirstLine">With External DSL Modems</p>
<p class="H3Bullets">&gt;<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span>1700 / 2600 / 3600 series</p>
<p class="MsoNormal">&nbsp;</p>
<p><span style="font-size: 10pt; font-family: Arial"><br style="page-break-before: always" clear="all" /> </span></p>
<p class="MsoNormal">&nbsp;</p>
<h3><a name="_Toc70480162"></a><a name="_Toc44121418"></a><a name="_Toc41837053"></a><a name="_Toc41835475"></a><a name="_Toc31558545"></a><a name="_Toc30862108"></a><a name="_Toc30796986"></a><a name="_Toc30527399"></a><a name="_Toc30627970"></a><a name="_Toc30620760"></a>An Introduction to Network Address Translation (NAT)</h3>
<p class="H3Body">Network address translation is a method used to help conserve the limited number of IP addresses available for internet purposes. The <a href="http://www.linuxhomenetworking.com/linux-hn/network-intro.htm">introduction to networking</a> page explains the concept in more detail in addition to other fundamental topics. We will return to the NAT discussion, specifically how to configure it, later in this chapter, but first a very basic introduction on how to configure and use Cisco DSL routers.</p>
<h3><a name="_Toc70480163"></a><a name="_Toc44121419"></a><a name="_Toc41837054"></a><a name="_Toc41835476"></a><a name="_Toc31558546"></a><a name="_Toc30862109"></a><a name="_Toc30796987"></a><a name="Introduction_on_accessing_the_router_com"></a><a name="_Toc30627971"></a><a name="_Toc30620761"></a><a name="_Toc30527400"></a>Introduction to accessing the router command line</h3>
<h4><a name="_Toc70480164"></a><a name="_Toc41837055"></a><a name="_Toc41835477"></a><a name="_Toc31558547"></a><a name="_Toc30862110"></a><a name="_Toc30796988"></a><a name="_Toc30620762"></a><a name="_Toc30627972"></a>Via The Console Port</h4>
<p class="H4Body">Your Cisco router will come with a console cable that will allow you to configure it using terminal emulation software such as Hyperterm. Once you&#8217;ve set up your router with an IP address you&#8217;ll be able to access it via Telnet.</p>
<h4><a name="_Toc70480165"></a><a name="_Toc41837056"></a><a name="_Toc41835478"></a><a name="_Toc31558548"></a><a name="_Toc30862111"></a><a name="_Toc30796989"></a><a name="_Toc30620763"></a><a name="_Toc30627973"></a>Via Telnet</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>One easy way to get access to any device on your network is using the /etc/hosts file. Here you list all the IP addresses of important devices that you may want to access with a corresponding nickname. Here is a sample in which the router &#8220;ciscorouter&#8221; has the IP address 192.168.1.1:</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux"># Do not remove the following line, or various programs<br />
# that require network functionality will fail.<br />
#<br />
127.0.0.1 localhost.localdomain localhost<br />
192.168.1.1 ciscorouter<br />
192.168.1.100 bigboy mail.my-site.com
</p>
<p class="H45Linux">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Once connected to the network you can access the router via telnet</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">[root@bigboy tmp]# telnet ciscorouter<br />
Trying 192.168.1.1&#8230;<br />
Connected to ciscorouter.<br />
Escape character is &#8216;^]&#8217;.
</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>You&#8217;ll be prompted for a password and will need another password to get into the privileged &#8220;enable&#8221; mode. If you are directly connected to the console, you should get a similar prompt too. There is no password in a fresh out of the box Cisco router and simply hitting the &#8220;Enter&#8221; key will be enough.</p>
<p class="H45Linux">
User Access Verification</p>
<p>Password:<br />
Type help or &#8216;?&#8217; for a list of available commands.<br />
ciscorouter&gt; enable<br />
Password: ********<br />
ciscorouter#
</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Use the &#8220;show running&#8221; command to see the current configuration. You will want to change your &#8220;password&#8221; and &#8220;enable password&#8221; right after completing your initial configuration.</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">ciscorouter# show run<br />
Building configuration&#8230;<br />
!<br />
version 12.1<br />
no service pad<br />
service timestamps debug uptime<br />
service timestamps log datetime localtime<br />
service password-encryption<br />
!<br />
hostname ciscorouter<br />
!<br />
no logging console<br />
no logging monitor<br />
logging trap debugging<br />
&#8230;
</p>
<p class="H45Linux">&#8230;</p>
<p class="H45Linux">&#8230;</p>
<p class="H45Linux">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>ALL router configuration commands need to be done in configuration mode, by issuing the &#8220;configure terminal&#8221; command from enable mode prompt.</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">ciscorouter# conf t<br />
ciscorouter(config)# <em>&#8220;Enter commands here&#8221;</em>
</p>
<p class="H45Linux">ciscorouter(config)# exit</p>
<p class="H45Linux">ciscorouter#</p>
<p class="H45Linux">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>You can usually delete commands in the configuration by adding the word &#8220;no&#8221; to the beginning of the command you want to delete. Some commands that can only have a single value, won&#8217;t accept a &#8220;no&#8221; to change them and will just be over-written when you issue the new command.</p>
<p class="H45Body">In the example below, we change the router&#8217;s name and then delete one of its many access control list (ACL) entries.</p>
<p class="H45Linux">ciscorouter# conf t<br />
ciscorouter<span style="font-size: 9pt">(config)# no access-list 150 deny ip host 10.1.2.1 host 10.3.2.5</span>
</p>
<p class="H45Linux">ciscorouter(config)# hostname soho-router</p>
<p class="H45Linux">soho-router(config)# exit</p>
<p class="H45Linux">soho-router #</p>
<p class="H45Linux">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>One of the first things you should do is change the default paswords for the router.</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">ciscorouter# conf t<br />
ciscorouter(config)# enable secret &#8220;enable password here&#8221;
</p>
<p class="H45Linux">ciscorouter(config)# line con 0</p>
<p class="H45Linux">ciscorouter(config-line)# password &#8220;console password here&#8221;</p>
<p class="H45Linux">ciscorouter(config-line)# line vty 0 4</p>
<p class="H45Linux">ciscorouter(config-line)# password &#8220;telnet password here&#8221;</p>
<p class="H45Linux">ciscorouter(config-line)# ^z</p>
<p class="H45Linux">ciscorouter#</p>
<p class="H45Linux">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>When you&#8217;ve finished configuring, you can permanently save your changes by using the &#8220;write memory&#8221; command:</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">ciscorouter# wr mem<br />
Building configuration&#8230;<br />
Cryptochecksum: 3af43873 d35d6f06 51f8c999 180c2342<br />
[OK]<br />
ciscorouter#
</p>
<p class="H45Linux">&nbsp;</p>
<h3><a name="_Toc70480166"></a><a name="_Toc44121420"></a><a name="_Toc41837057"></a><a name="_Toc41835479"></a><a name="_Toc31558549"></a><a name="_Toc30862112"></a><a name="_Toc30796990"></a><a name="_Toc30527401"></a><a name="Sample_router_configuration:_DSL_-_DHCP"></a><a name="_Toc30627974"></a><a name="_Toc30620764"></a>Sample Configurations</h3>
<h4><a name="_Toc70480167"></a><a name="_Toc41837058"></a><a name="_Toc41835480"></a><a name="_Toc31558550"></a><a name="_Toc30862113"></a><a name="_Toc30796991"></a><a name="_Toc30620765"></a><a name="_Toc30627975"></a>DSL Router With Built-In Modem &#8211; DHCP</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>DHCP and DSL requires you to get a pppoe password and username from your ISP. Most ISPs have a homepage where you can register to get the username and password, ask customer service for the URL. You should substitute this username and password for PPP &#8220;username&#8221; and &#8220;password&#8221; listed below.</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Cisco IOS doesn&#8217;t support DHCP DSL and NAT. If this is so, then putting an Internet accessible web server on your home network would be impossible using the routers mentioned above in this configuration.</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Here is a sample configuration for a Cisco home router. Some of the commands listed are part of Cisco&#8217;s default settings. Do the &#8220;show run&#8221; command before starting to configure your router to see what commands you&#8217;ll really need.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Remember to be in &#8220;config&#8221; mode to enter these commands and remember to do a &#8220;write memory&#8221; at the end to permanently save the configuration</p>
<p class="MsoNormal">&nbsp;</p>
<div>
<table class="MsoNormalTable" style="background: white none repeat scroll 0% 50%; width: 80%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; border-collapse: collapse" border="0" cellpadding="0" cellspacing="0" width="80%">
<tr>
<td style="border: 1pt inset #111111; padding: 2.25pt; width: 100%" width="100%">
<p class="MsoNormal" style="text-align: center" align="center"><strong><span &nbsp;&nbsp;style="color:white">Cisco DSL Router With Built-in Modem Configuration</span></strong></p>
<p class="MsoNormal" style="text-align: center" align="center"><strong><span &nbsp;&nbsp;style="color:white">(<span style="background: green none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">DHCP)</span></span></strong></p>
</td>
</tr>
<tr>
<td style="border: 1pt inset #111111; padding: 2.25pt; width: 100%" width="100%">
<pre style="margin-bottom: 2.25pt">!</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">vpdn enable</pre>
<pre style="margin-bottom: 2.25pt">no vpdn logging</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"></pre>
<pre style="margin-bottom: 2.25pt"><span &nbsp;&nbsp;style="color:blue">!--- Configure the router's PPPoE client so that it</span></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><span style="color: blue">!--- can setup a session with the ISP</span></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">vpdn-group pppoe</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> request-dialin</pre>
<pre>  protocol pppoe</pre>
<pre style="margin-bottom: 2.25pt"></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- Configure the home / </span></em><em><span style="color: blue">SOHO</span></em><em><span style="color: blue"> network interface's</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- IP address</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- The "ip nat" statement tells your router that</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- this interface:</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 1) uses NAT</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 2) is the inside "private" interface</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">interface FastEthernet0</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> ip address 192.168.1.1 255.255.255.0</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><strong> ip nat inside</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em> </em></pre>
<pre><em><span style="color: blue">!--- Configure the DSL interface</span></em></pre>
<pre><em><span &nbsp;&nbsp;style="color:blue">!--- Your ISP may provide you with a different pvc</span></em></pre>
<pre><em><span &nbsp;&nbsp;style="color:blue">!--- value not necesarily "1/1"</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">interface ATM0</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> no ip address</pre>
<pre> no atm ilmi-keepalive</pre>
<pre style="margin-bottom: 2.25pt"> bundle-enable</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> dsl operating-mode auto</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> hold-queue 224 in</pre>
<pre>!</pre>
<pre style="margin-bottom: 2.25pt">interface ATM0.1 point-to-point</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><strong> pvc 1/1</strong></pre>
<pre>  pppoe-client dial-pool-number 1</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em> </em></pre>
<pre></pre>
<pre style="margin-bottom: 2.25pt"><em> </em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- Cisco prefers to run the PPPoE client on a virtual</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- "dialer" interface</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- This is tied to the real ATM DSL interface with the !--- "dialer pool" command. The default ethernet MTU</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- size has been reduced from 1500 to accommodate</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- the PPPoE header overhead.</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- The "ip nat" statement tells your router that</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- this interface:</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 1) uses NAT</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 2) is the outside "public" interface</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">interface Dialer1</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> ip address negotiated</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><strong> ip mtu 1492</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> <strong>ip nat outside</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> encapsulation ppp</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><strong> dialer pool 1</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em> </em></pre>
<pre><em><span style="color: blue">!--- Here are the commands to configure authentication</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- with with your ISP. This example uses the "CHAP"</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- method.</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- Commands for using the "PAP" method are included at</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- the end of this box</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt"><strong> ppp authentication chap callin</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><strong> ppp chap hostname &lt;username&gt;</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><strong> ppp chap password &lt;password&gt;</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt"><em><span &nbsp;&nbsp;style="color:blue"> </span></em></pre>
<pre style="margin-bottom: 2.25pt"><em><span &nbsp;&nbsp;style="color:blue"> </span></em></pre>
<pre style="margin-bottom: 2.25pt"><em><span &nbsp;&nbsp;style="color:blue">!--- Tells the router to NAT all traffic that passes</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- through it:</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 1) From the inside to the outside,</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 2) And whose IP address is in the 192.168.1.0 network</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!---    as given in access list 1</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 3) Giving it an outside "public" address that is the</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!---    same as interface Dialer1 gets from the PPPoE</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!---    connection</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt"><strong>ip nat inside source list 1 interface Dialer1 overload</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">ip classless</pre>
<pre>ip route 0.0.0.0 0.0.0.0 dialer1</pre>
<pre style="margin-bottom: 2.25pt">no ip http server</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt"><strong>access-list 1 permit 192.168.1 0.0.0.255</strong></pre>
</td>
</tr>
</table>
</div>
<p class="MsoNormal">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>If your ISP tells you that you need to do the PAP, and not the CHAP, type of authentication then you&#8217;ll have to replace the lines:</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">ppp authentication chap callin<br />
ppp chap hostname &lt;username&gt;<br />
ppp chap password &lt;password&gt;
</p>
<p class="H5Body">with only these two:</p>
<p class="H45Linux">ppp authentication pap callin<br />
ppp pap sent-username &lt;username&gt; password &lt;password&gt;
</p>
<p class="MsoNormal">&nbsp;</p>
<h4><a name="_Toc70480168"></a><a name="_Toc41837059"></a><a name="_Toc41835481"></a><a name="_Toc31558552"></a><a name="_Toc30862114"></a><a name="_Toc30796992"></a><a name="Sample_router_configuration:_DSL_-_Stati"></a><a name="_Toc30627976"></a><a name="_Toc30620766"></a>DSL Router With Built-In Modem - Static IP</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Here is a sample configuration for a Cisco home router with a built-in modem. Some of the commands listed are part of Cisco&#8217;s default settings. Do the &#8220;show run&#8221; command before starting to configure your router to see what commands you&#8217;ll really need.</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>This example also shows how to use NAT so you can have a web server / mail server / FTP server etc. in your home network.</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Remember to be in &#8220;config&#8221; mode to enter these commands and remember to do a &#8220;write memory&#8221; at the end to permanently save the configuration</p>
<p class="MsoNormal" style="text-align: center" align="center"><strong><span style="color: white"> </span></strong></p>
<div>
<table class="MsoNormalTable" style="background: white none repeat scroll 0% 50%; width: 80%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; border-collapse: collapse" border="0" cellpadding="0" cellspacing="0" width="80%">
<tr>
<td style="border: 1pt inset #111111; padding: 2.25pt; background: green none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<p class="MsoNormal" style="text-align: center" align="center"><strong><span &nbsp;&nbsp;style="color:white">Cisco DSL Router With Built-in Modem Configuration</span></strong></p>
<p class="MsoNormal" style="text-align: center" align="center"><strong><span &nbsp;&nbsp;style="color:white">(Static IP)</span></strong></p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt; padding: 2.25pt">
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">Current Configuration:</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">version 12.1</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">service timestamps debug uptime</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">service timestamps log uptime</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">hostname ciscorouter</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">ip subnet-zero</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">no ip domain-lookup</pre>
<pre>!</pre>
<pre style="margin-bottom: 2.25pt">bridge irb</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"></pre>
<pre style="margin-bottom: 2.25pt"><em><span &nbsp;&nbsp;style="color:blue">!--- Configure the home / </span></em><em><span style="color: blue">SOHO</span></em><em><span style="color: blue"> network interface's IP address</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- The "ip nat" statement tells your router that this</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- interface:</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 1) uses NAT</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 2) is the inside "private" interface</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">interface Ethernet0</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">ip address 192.168.1.1 255.255.255.0</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><strong>ip nat inside</strong></pre>
<pre>!</pre>
<pre style="margin-bottom: 2.25pt">interface ATM0</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> no ip address</pre>
<pre> no atm ilmi-keepalive</pre>
<pre style="margin-bottom: 2.25pt"> pvc 0/35</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> encapsulation aal5snap</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> !</pre>
<pre style="margin-bottom: 2.25pt"> bundle-enable</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> dsl operating-mode auto</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> bridge-group 1</pre>
<pre>!</pre>
<pre style="margin-bottom: 2.25pt"><em><span style="color: blue">!--- Cisco prefers to run the PPPoE client on a virtual</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- "BVI" interface</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- This is tied to the real ATM DSL interface with the</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- "bridge-group" command above.</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- (The BVI number always matches the bridge-group number)</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"></pre>
<pre style="margin-bottom: 2.25pt"><em><span &nbsp;&nbsp;style="color:blue">!--- The "ip nat" statement tells your router that</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- this interface:</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 1) uses NAT</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 2) is the outside "public" interface</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">interface BVI1</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> ip address 97.158.253.25 255.255.255.248</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><strong> ip nat outside</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em> </em></pre>
<pre><em><span style="color: blue">!--- Tells the router to NAT all traffic that passes</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- through it:</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 1) From the inside to the outside,</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 2) And whose IP address is in the 192.168.1.0 network</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!---    as given in access list 1</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 3) Must get an outside "public" address that is the</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- same as interface BVI1</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt"><strong>ip nat inside source list 1 interface BVI1 overload</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em> </em></pre>
<pre><em><span &nbsp;&nbsp;style="color:blue">!--- This statement performs the static address</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- translation for the Web server. With this statement,</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- users trying to reach 97.158.253.26 port 80 (www) will be</span></em></pre>
<pre><em><span &nbsp;&nbsp;style="color:blue">!--- automatically redirected to 192.168.1.100 port 80</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- (www), which in this case is the Web server.</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!---</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt"><strong>ip nat inside source static tcp 192.168.1.100 80 97.158.253.26 80 extendable</strong></pre>
<pre><em><span &nbsp;&nbsp;style="color:blue">!--- Set your default gateway as provided by your ISP</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">ip classless</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">ip route 0.0.0.0 0.0.0.0 97.158.253.30</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt"><strong>access-list 1 permit 192.168.1.0 0.0.0.255</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"></pre>
<pre style="margin-bottom: 2.25pt">bridge 1 protocol ieee</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">bridge 1 route ip</pre>
<pre>!</pre>
<pre style="margin-bottom: 2.25pt">end</pre>
</td>
</tr>
</table>
</div>
<p class="MsoNormal">&nbsp;</p>
<h4><a name="_Toc70480169"></a><a name="_Toc41837060"></a><a name="_Toc41835482"></a><a name="_Toc31558553"></a><a name="_Toc30862115"></a><a name="_Toc30796993"></a><a name="Sample_router_configuration:_DSL_router_"></a><a name="_Toc30627977"></a><a name="_Toc30620767"></a>DSL Router With External Modem &#8211; Static IP</h4>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Here is a sample configuration for a Cisco home router with an external modem. Some of the commands listed are part of Cisco&#8217;s default settings. Do the &#8220;show run&#8221; command before starting to configure your router to see what commands you&#8217;ll really need.</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>This example also shows how to use NAT so you can have a web server / mail server / FTP server etc. in your home network.</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>Remember to be in &#8220;config&#8221; mode to enter these commands and remember to do a &#8220;write memory&#8221; at the end to permanently save the configuration</p>
<p class="MsoNormal" style="text-align: center" align="center"><strong> </strong></p>
<div>
<table class="MsoNormalTable" style="background: white none repeat scroll 0% 50%; width: 80%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; border-collapse: collapse" border="0" cellpadding="0" cellspacing="0" width="80%">
<tr>
<td style="border: 1pt inset #111111; padding: 2.25pt; background: green none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial">
<p class="MsoNormal" style="text-align: center" align="center"><strong><span &nbsp;&nbsp;style="color:white">Cisco Router Connected to DSL via External Modem   Configuration</span></strong></p>
<p class="MsoNormal" style="text-align: center" align="center"><strong><span &nbsp;&nbsp;style="color:white">(Static IP)</span></strong></p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt; padding: 2.25pt">
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">Current Configuration:</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">version 12.1</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">service timestamps debug uptime</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">service timestamps log uptime</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">hostname ciscorouter</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">ip subnet-zero</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">no ip domain-lookup</pre>
<pre>!</pre>
<pre style="margin-bottom: 2.25pt"></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- Configure the home / </span></em><em><span style="color: blue">SOHO</span></em><em><span style="color: blue"> network interface's IP address</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- The "ip nat" statement tells your router that</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- this interface:</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 1) uses NAT</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 2) is the inside "private" interface</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">interface Ethernet0</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">ip address 192.168.1.1 255.255.255.0</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><strong>ip nat inside</strong></pre>
<pre><em> </em></pre>
<pre style="margin-bottom: 2.25pt"></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">interface Ethernet1</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"> ip address 97.158.253.25 255.255.255.248</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><strong> ip nat outside</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em> </em></pre>
<pre><em><span style="color: blue">!--- Tells the router to NAT all traffic that passes</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- through it:</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 1) From the inside to the outside,</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 2) And whose IP address is in the 192.168.1.0 network</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!---    as given in access list 1</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 3) Must get an outside "public" address that is the</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!---    same as interface ethernet1</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt"><strong>ip nat inside source list 1 interface ethernet1 overload</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em> </em></pre>
<pre><em><span &nbsp;&nbsp;style="color:blue">!--- This statement performs the static address translation</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- for the Web server.</span></em></pre>
<pre><em><span &nbsp;&nbsp;style="color:blue">!--- With this statement, users trying to reach 97.158.253.26</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- port 80 (www) will be automatically redirected to</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><em><span style="color: blue">!--- 192.168.1.100 port 80 (www), which in this case</span></em></pre>
<pre><em><span &nbsp;&nbsp;style="color:blue">!--- is the Web server.</span></em></pre>
<pre><em><span &nbsp;&nbsp;style="color:blue">!---</span></em></pre>
<pre style="margin-bottom: 2.25pt">!</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><strong>ip nat inside source static tcp 192.168.1.100 80 97.158.253.26 80 extendable</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"></pre>
<pre><em><span style="color: blue">!--- Set your default gateway as provided by your ISP</span></em></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">!</pre>
<pre style="margin-bottom: 2.25pt">ip classless</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">ip route 0.0.0.0 0.0.0.0 97.158.253.30</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"></pre>
<pre style="margin-bottom: 2.25pt">!</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"><strong>access-list 1 permit 192.168.1.0 0.0.0.255</strong></pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt"></pre>
<pre style="margin-bottom: 2.25pt">!</pre>
<pre &nbsp;&nbsp;style="margin-bottom:2.25pt">end</pre>
<pre style="margin-bottom: 2.25pt"></pre>
</td>
</tr>
</table>
</div>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<h3><a name="_Toc70480170"></a><a name="_Toc44121421"></a><a name="_Toc41837061"></a><a name="_Toc41835483"></a><a name="_Toc31558554"></a><a name="_Toc30862116"></a><a name="_Toc30796994"></a><a name="Other_NAT_topics"></a><a name="_Toc30627978"></a><a name="_Toc30620768"></a><a name="_Toc30527402"></a>Other NAT Topics</h3>
<h4><a name="_Toc70480171"></a><a name="_Toc41837062"></a><a name="_Toc41835484"></a><a name="_Toc31558555"></a><a name="_Toc30862117"></a><a name="_Toc30796995"></a><a name="_Toc30620769"></a><a name="_Toc30627979"></a>Commonly Used TCP And UDP Ports</h4>
<p class="H4Body">Here are some additional TCP ports you may be interested in for NAT &#8220;<strong>ip nat inside source static</strong>&#8221; statements:</p>
<p class="MsoNormal">&nbsp;</p>
<div>
<table class="MsoNormalTable" style="border-collapse: collapse" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="border: 1pt inset #111111; background: green none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial" valign="top">
<p class="MsoNormal" style="text-align: center" align="center"><strong><span &nbsp;&nbsp;style="color:white">Protocol</span></strong></p>
</td>
<td style="border-style: inset inset inset none; border-color: rgb(17, 17, 17) rgb(17, 17, 17) rgb(17, 17, 17) -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 7.5pt" valign="top">
<p class="MsoNormal" style="text-align: center" align="center"><strong><span &nbsp;&nbsp;style="color:white">Port</span></strong></p>
</td>
<td style="border-style: inset inset inset none; border-color: rgb(17, 17, 17) rgb(17, 17, 17) rgb(17, 17, 17) -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 7.5pt" valign="top">
<p class="MsoNormal" style="text-align: center" align="center"><strong><span &nbsp;&nbsp;style="color:white">Type</span></strong></p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt" valign="top">
<p class="MsoNormal">FTP</p>
</td>
<td style="border-top: medium none; border-left: medium none; border-bottom: 1pt inset #111111; padding: 7.5pt" valign="top">
<p class="MsoNormal">20, 21</p>
</td>
<td style="border-top: medium none; border-left: medium none; border-bottom: 1pt inset #111111; padding: 7.5pt" valign="top">
<p class="MsoNormal" style="text-align: center" align="center">TCP</p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt" valign="top">
<p class="MsoNormal">SMTP Mail</p>
</td>
<td style="border-top: medium none; border-left: medium none; border-bottom: 1pt inset #111111; padding: 7.5pt" valign="top">
<p class="MsoNormal">25</p>
</td>
<td style="border-top: medium none; border-left: medium none; border-bottom: 1pt inset #111111; padding: 7.5pt" valign="top">
<p class="MsoNormal" style="text-align: center" align="center">TCP</p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt" valign="top">
<p class="MsoNormal">POP3 Mail</p>
</td>
<td style="border-top: medium none; border-left: medium none; border-bottom: 1pt inset #111111; padding: 7.5pt" valign="top">
<p class="MsoNormal">110</p>
</td>
<td style="border-top: medium none; border-left: medium none; border-bottom: 1pt inset #111111; padding: 7.5pt" valign="top">
<p class="MsoNormal" style="text-align: center" align="center">TCP</p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt" valign="top">
<p class="MsoNormal">HTTPS / SSL</p>
</td>
<td style="border-top: medium none; border-left: medium none; border-bottom: 1pt inset #111111; padding: 7.5pt" valign="top">
<p class="MsoNormal">443</p>
</td>
<td style="border-top: medium none; border-left: medium none; border-bottom: 1pt inset #111111; padding: 7.5pt" valign="top">
<p class="MsoNormal" style="text-align: center" align="center">TCP</p>
</td>
</tr>
<tr>
<td style="border-style: none inset inset; border-color: -moz-use-text-color rgb(17, 17, 17) rgb(17, 17, 17); border-width: medium 1pt 1pt" valign="top">
<p class="MsoNormal">DNS</p>
</td>
<td style="border-top: medium none; border-left: medium none; border-bottom: 1pt inset #111111; padding: 7.5pt" valign="top">
<p class="MsoNormal">53</p>
</td>
<td style="border-top: medium none; border-left: medium none; border-bottom: 1pt inset #111111; padding: 7.5pt" valign="top">
<p class="MsoNormal" style="text-align: center" align="center">UDP</p>
</td>
</tr>
</table>
</div>
<p class="MsoNormal">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>So for example, the command for SMTP mail would be:</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">ip nat inside source static tcp 192.168.1.100 25 97.158.253.26 25</p>
<p class="MsoNormal">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>DNS requires a UDP type NAT statement such as:</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">ip nat inside source static udp 192.168.1.100 53 97.158.253.25 53</p>
<p class="MsoNormal">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>To have all traffic trying to reach 97.158.253.26, regardless of port, to be NAT-ted to 192.168.1.100, then you can use the command:</p>
<p class="H45Linux">&nbsp;</p>
<p class="H45Linux">ip nat inside source static 192.168.1.100 97.158.253.25</p>
<p class="H45Linux">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p><span style="font-size: 10pt; font-family: Arial"><br style="page-break-before: always" clear="all" /> </span></p>
<p class="MsoNormal">&nbsp;</p>
<h4><a name="_Toc70480172"></a><a name="_Toc41837063"></a><a name="_Toc41835485"></a><a name="_Toc31558556"></a><a name="_Toc30862118"></a><a name="How_to_verify_that_NAT_is_working_corr1"></a>How To Verify That NAT Is Working Correctly</h4>
<p class="H4Body">You can use the show ip nat translation command to determine whether NAT is actually occurring as expected:</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Linux">ciscorouter&gt; enable<br />
Password: ********</p>
<p class="H4Linux">ciscorouter#show ip nat translation<br />
Pro Inside global     Inside local      Outside local      Outside global<br />
tcp 97.158.253.26:80  192.168.1.100:80  &#8212; &#8212;<br />
tcp 97.158.253.26:80  192.168.1.100:80  67.34.217.6:5698  67.34.217.6:5698<br />
ciscorouter#</p>
<p class="H4Body">
Cisco uses the following terms for the various IP addresses you&#8217;ll find in any NAT translation process.
</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>The Inside local address is the actual IP address of the local server on your home network.</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>The Inside global address is the IP address of the server presented to the Internet after NAT.</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>The Outside local the actual IP address of the remote computer on its local network.</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>The Outside global the IP address of the remote computer as presented on the Internet.</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Body">As you can see, in this case, NAT seems to be functioning properly for the web server 192.168.1.100 on the home network</p>
<h4><a name="_Toc70480173"></a><a name="_Toc41837064"></a><a name="_Toc41835486"></a><a name="_Toc31558557"></a><a name="_Toc30862119"></a><a name="How_to_troubleshoot_NAT1"></a>How To Troubleshoot NAT</h4>
<p class="H4Body">To troubleshoot NAT after you have logged into the router via Telnet requires you to first activate logging to the telnet terminal with the terminal monitor command and then using the debug ip nat detailed command to visualize the translation process. The example below shows that translation occurs for port 80 traffic (HTTP / www) from address 97.158.253.26 to 192.168.1.100, and more specifically that remote host 67.34.217.6 was communicating with the inside global address of 97.158.253.26.</p>
<p class="H4Linux">
ciscorouter&gt; enable<br />
Password: ********<br />
ciscorouter#term mon<br />
ciscorouter#debug ip nat detailed<br />
IP NAT detailed debugging is on<br />
ciscorouter#<br />
03:29:49: NAT: creating portlist proto 6 globaladdr 97.158.253.26<br />
03:29:49: NAT: Allocated Port for 192.168.1.100 -&gt; 97.158.253.26: wanted 80 got 80<br />
03:29:49: NAT: o: tcp (198.133.219.1, 5698) -&gt; (97.158.253.26, 80) [0]<br />
&#8230;<br />
&#8230;<br />
&#8230;
</p>
<p class="H4Linux">&nbsp;</p>
<h3><a name="_Toc70480174"></a><a name="_Toc44121422"></a>Basic Troubleshooting Topics</h3>
<h4><a name="_Toc70480175"></a>The &#8220;show interfaces&#8221; Command</h4>
<p class="H4Body">The show interfaces command will show you the basic status of the router&#8217;s interfaces. I&#8217;ve included some sample output below:</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Linux">ciscorouter&gt;show interface</p>
<p class="H4Linux">Ethernet0/0 is <span style="color: red">up</span>, line protocol is <span style="color: red">up</span></p>
<p class="H4Linux">  Hardware is AmdP2, address is 0008.e3a0.7e80 (bia 0008.e3a0.7e80)</p>
<p class="H4Linux">  <span style="color: red">Internet address</span> is 172.16.1.1/24</p>
<p class="H4Linux">  MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,</p>
<p class="H4Linux">  Encapsulation ARPA, loopback not set</p>
<p class="H4Linux">  Keepalive set (10 sec)</p>
<p class="H4Linux">  ARP type: ARPA, ARP Timeout 04:00:00</p>
<p class="H4Linux">  Last input 00:00:00, output 00:00:00, output hang never</p>
<p class="H4Linux">  Last clearing of &#8220;show interface&#8221; counters never</p>
<p class="H4Linux">  Input queue: 1/75/0/0 (size/max/drops/flushes); Total output drops: 0</p>
<p class="H4Linux">  Queueing strategy: fifo</p>
<p class="H4Linux">  Output queue :0/40 (size/max)</p>
<p class="H4Linux">  5 minute input rate 0 bits/sec, 1 packets/sec</p>
<p class="H4Linux">  5 minute output rate 0 bits/sec, 0 packets/sec</p>
<p class="H4Linux">     303 packets input, 19256 bytes, 0 no buffer</p>
<p class="H4Linux">     <span style="color: red">Received 13 broadcasts, 0 runts, 0 giants, 0 throttles</span></p>
<p class="H4Linux"><span style="color: red">     1 input errors, 1 CRC, 1 frame, 0 overrun, 0 ignored</span></p>
<p class="H4Linux">     0 input packets with dribble condition detected</p>
<p class="H4Linux">     60718 packets output, 5770201 bytes, 0 underruns</p>
<p class="H4Linux">     0 output errors, 0 collisions, 2 interface resets</p>
<p class="H4Linux">     0 babbles, 0 late collision, 0 deferred</p>
<p class="H4Linux">     0 lost carrier, 0 no carrier</p>
<p class="H4Linux">     0 output buffer failures, 0 output buffers swapped out</p>
<p class="H4Linux">&#8230;</p>
<p class="H4Linux">&#8230;</p>
<p class="H4Linux">&#8230;</p>
<p class="H4Linux">&nbsp;</p>
<p class="H4Linux">ciscorouter&gt;</p>
<p class="H4Body">Your basic physical connectivity should be OK if the interfaces are seen as being in an &#8220;up&#8221; state with line protocol being &#8220;up&#8221;. If line protocol is down, you probably have your router incorrectly cabled to the Internet or your home network.</p>
<p class="H4Body">If the interfaces are seen as &#8220;administratively down&#8221;, then the router configuration will most likely have the interfaces configured as being &#8220;shutdown&#8221; like this:</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Linux">&#8230;</p>
<p class="H4Linux">&#8230;</p>
<p class="H4Linux">&#8230;</p>
<p class="H4Linux">interface ethernet0</p>
<p class="H4Linux">�shutdown</p>
<p class="H4Linux">&#8230;</p>
<p class="H4Linux">&#8230;</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Body">This can be easily corrected. First use the &#8220;show running&#8221; command to confirm the shutdown state. Then you should enter &#8220;config&#8221; mode and enter the &#8220;no shutdown&#8221; command. Here is an example for interface ethernet0.</p>
<p class="H4Body">&nbsp;</p>
<p class="H4Linux">ciscorouter(config)# interface ethernet0</p>
<p class="H4Linux">ciscorouter(config-if)# no shutdown</p>
<p class="H4Linux">ciscorouter(config-if)#end</p>
<p class="H4Linux">ciscorouter# write memory</p>
<p class="H4Linux">&nbsp;</p>
<p class="H3Linux">&nbsp;</p>
<p class="H4Body">The &#8220;show interfaces&#8221; is also important as it shows you whether you have the correct IP addresses assigned to your interfaces and also the amount of traffic and errors associated with each.</p>
<h4><a name="_Toc70480176"></a>Using syslog</h4>
<p class="H4Body">A really good method for troubleshooting access control lists (ACLs) and also to view the types of methods people are using to access your site is to use syslog</p>
<h4><a name="_Toc70480177"></a>Other Things To Check</h4>
<p class="H4Body">Always make sure your router has a:</p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>correct default route. The default is the one with the lots of zeros.</p>
<p class="H45Linux">ciscorouter<span style="font-size: 9pt">&gt;sh ip route</span></p>
<p class="H45Linux"><span style="font-size: 9pt">Codes: C &#8211; connected, S &#8211; static, I &#8211; IGRP, R &#8211; RIP, M &#8211; mobile, B &#8211; BGP</span></p>
<p class="H45Linux"><span style="font-size: 9pt">       D &#8211; EIGRP, EX &#8211; EIGRP external, O &#8211; </span><span style="font-size: 9pt">OSPF</span><span style="font-size: 9pt">, </span><span style="font-size: 9pt">IA</span><span style="font-size: 9pt"> &#8211; OSPF inter area</span></p>
<p class="H45Linux"><span style="font-size: 9pt">       N1 &#8211; OSPF NSSA external type 1, N2 &#8211; OSPF NSSA external type 2</span></p>
<p class="H45Linux"><span style="font-size: 9pt">       </span><span style="font-size: 9pt" lang="ES-MX">E1 &#8211; OSPF external type 1, E2 &#8211; OSPF external type 2, E &#8211; EGP</span></p>
<p class="H45Linux"><span style="font-size: 9pt" lang="ES-MX">       </span><span style="font-size: 9pt">i &#8211; IS-IS, L1 &#8211; IS-IS level-1, L2 &#8211; IS-IS level-2, ia &#8211; IS-IS inter area</span></p>
<p class="H45Linux"><span style="font-size: 9pt">       * &#8211; candidate default, U &#8211; per-user static route, o &#8211; ODR</span></p>
<p class="H45Linux"><span style="font-size: 9pt">       P &#8211; periodic downloaded static route</span></p>
<p class="H45Linux"><span style="font-size: 9pt"> </span></p>
<p class="H45Linux"><span style="font-size: 9pt; color: red">Gateway of last resort is 97.158.253.30 to network 0.0.0.0</span></p>
<p class="H45Linux"><span style="font-size: 9pt"> </span></p>
<p class="H45Linux"><span style="font-size: 9pt">     192.168.0.0/24 is subnetted, 1 subnets</span></p>
<p class="H45Linux"><span style="font-size: 9pt">C       192.168.1.0 is directly connected, Ethernet1</span></p>
<p class="H45Linux"><span style="font-size: 9pt">S*   0.0.0.0/0 [1/0] via 97.158.253.30</span></p>
<p class="H45Linux">ciscorouter<span style="font-size: 9pt">&gt;</span></p>
<p class="H4Bullets"><span style="font-family: 'Courier New'">o<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal">        </span></span>default gateway that you can &#8220;ping&#8221;. In the case above the gateway is 97.158.253.30.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sabinshrestha.com.np/cisco/configuring-cisco-dsl-routers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Syslog with cisco</title>
		<link>http://www.sabinshrestha.com.np/cisco/linux-syslog-with-cisco/</link>
		<comments>http://www.sabinshrestha.com.np/cisco/linux-syslog-with-cisco/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 07:58:47 +0000</pubDate>
		<dc:creator>sabin</dc:creator>
				<category><![CDATA[Cisco]]></category>

		<guid isPermaLink="false">http://www.sabinshrestha.com.np/?p=46</guid>
		<description><![CDATA[syslog syslog is a utility for tracking and logging all manner of system messages from the merely informational to the extremely critical. Each system message sent to the syslog server has two descriptive labels associated with it that makes the message easier to handle: The first describes the function (facility) of the application that generated [...]]]></description>
			<content:encoded><![CDATA[<h3 class="docSection1Title">syslog</h3>
<p class="docText"><tt>syslog</tt> <a title="idd1e2511" name="idd1e2511"></a>is a utility for tracking  and logging all manner of system messages from the merely informational to the  extremely critical. Each <a title="idd1e2512" name="idd1e2512"></a><a title="idd1e2513" name="idd1e2513"></a><a title="idd1e2514" name="idd1e2514"></a>system message sent to the <tt>syslog</tt> server has two  descriptive labels associated with it that makes the message easier to  handle:</p>
<ul>
<li>
<p class="docList">The first describes the function (facility) of the application  that generated it. For example, applications such as <tt>mail</tt> and  <tt>cron</tt> generate messages with easily identifiable facilities named  <tt>mail</tt> and <tt>cron</tt>.</p>
</li>
<li>
<p class="docList">The second describes the degree of severity of the message.  There are eight in all and they are listed in</p>
<p><a title="ch05table01" name="ch05table01"></a></p>
<table class="allBorders" border="1" cellpadding="4" cellspacing="0" rules="all">
<thead>
<th class="thead" scope="col" align="left" valign="top">
<p class="docText"><span class="docEmphStrong">Severity Level</span></p>
</th>
<th class="thead" scope="col" align="left" valign="top">
<p class="docText"><span class="docEmphStrong">Keyword</span></p>
</th>
<th class="thead" scope="col" align="left" valign="top">
<p class="docText"><span class="docEmphStrong">Description</span></p>
</th>
<td class="docTableCell" align="left" valign="top">
<p class="docText">0</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">emergencies</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">System unusable</p>
</td>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">1</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">alerts</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Immediate action required</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">2</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">critical</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Critical condition</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">3</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">errors</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Error conditions</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">4</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">warnings</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Warning conditions</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">5</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">notifications</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Normal but significant conditions</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">6</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">informational</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Informational messages</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">7</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">debugging</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Debugging  messages</p>
</td>
</tr>
</thead>
</table>
</li>
</ul>
<p class="docText">You can configure <tt>syslog</tt>&#8216;s <tt>/etc/syslog.conf</tt>  <a title="idd1e2515" name="idd1e2515"></a>configuration file to place messages of differing severity  and facilities in different files. This procedure will be covered next.</p>
<p><a title="ch05lev2sec1" name="ch05lev2sec1"></a></p>
<h4 class="docSection2Title">The <span class="docEmphasis">/etc/syslog.conf</span>  File</h4>
<p class="docText">The <a title="idd1e2516" name="idd1e2516"></a>files to which <tt>syslog</tt> writes  each type of message received is set in the <tt>/etc/syslog.conf</tt>  configuration file. This file consists of two columns: The first lists the  facilities and severity of messages to expect, and the second lists the files to  which they should be logged. By default, Red Hat/Fedora&#8217;s  <tt>/etc/syslog.conf</tt> file is configured to put most of the messages in the  file <tt>/var/log/messages</tt>. Here is a sample:</p>
<pre>     .info;mail.none;authpriv.none;cron.none           /var/log/messages</pre>
<p class="docText">In this case, all messages of severity &#8220;info&#8221; and above are  logged, but none from the <tt>mail</tt>, <tt>cron</tt>, or authentication  facilities/subsystems. You can make this logging even more sensitive by  replacing the line above with one that captures all messages from debug severity  and above in the <tt>/var/log/messages</tt> file. This may be more suitable for  troubleshooting:</p>
<pre>     *.debug                     /var/log/messages</pre>
<p class="docText">Certain applications will additionally log to their own  application specific log files and directories independent of the  <tt>syslog.conf</tt> file. Here are <a title="idd1e2517" name="idd1e2517"></a>some common  examples:</p>
<p><a title="ch05lev3sec1" name="ch05lev3sec1"></a></p>
<h5 class="docSection3Title">Files</h5>
<pre>     /var/log/maillog           : Mail
     /var/log/httpd/access_log  : Apache web server page access logs</pre>
<p><a title="ch05lev3sec2" name="ch05lev3sec2"></a></p>
<h5 class="docSection3Title">Directories</h5>
<pre>     /var/log
     /var/log/samba                : Samba messages
     /var/log/mrtg                 : MRTG messages
     /var/log/httpd                : Apache webserver messages</pre>
<p><a title="ch05note01" name="ch05note01"></a></p>
<table border="1" cellpadding="5" cellspacing="0" width="90%">
<tr>
<td>
<h2 class="docSidebarTitle">Note</h2>
<p class="docText">In <a title="idd1e2518" name="idd1e2518"></a>some older versions of Linux the  <tt>/etc/syslog.conf</tt> file was very sensitive to spaces and would recognize  only tabs. The use of spaces in the file would cause unpredictable results.  Check the formatting of your <tt>/etc/syslog.conf</tt> file to be  safe.</p>
</td>
</tr>
</table>
<p><a title="ch05lev2sec2" name="ch05lev2sec2"></a></p>
<h4 class="docSection2Title">Activating Changes to the <span class="docEmphasis">syslog</span> Configuration File</h4>
<p class="docText">Changes <a title="idd1e2519" name="idd1e2519"></a>to <tt>/etc/syslog.conf</tt> will  not take effect until you restart <tt>syslog</tt>. Issue this command to do  so:</p>
<pre>     [root@bigboy tmp]# service syslog restart</pre>
<p><a title="ch05lev2sec3" name="ch05lev2sec3"></a></p>
<h4 class="docSection2Title">How to View New Log Entries as They Happen</h4>
<p class="docText">If <a title="idd1e2520" name="idd1e2520"></a><a title="idd1e2521" name="idd1e2521"></a><a title="idd1e2522" name="idd1e2522"></a>you want to get new log entries to scroll on the screen as  they occur, you can use this command:</p>
<pre>     [root@bigboy tmp]# tail -f /var/log/messages</pre>
<p class="docText">Similar commands can be applied to all log files. This is  probably one of the best troubleshooting tools available in Linux. Another good  command to use apart from <tt>tail</tt> is <tt>grep</tt>. <tt>grep</tt> will  help you search for all occurrences of a string in a log file; you can pipe it  through the <tt>more</tt> command so that you only get one screen at a time.  Here is an example:<a title="idd1e2523" name="idd1e2523"></a></p>
<pre>     [root@bigboy tmp]# grep string /var/log/messages | more</pre>
<p class="docText">You can also just use the plain old <tt>more</tt> command to  see one screen at a time of the entire log file without filtering with  <tt>grep</tt>. Here is an example:</p>
<pre>     [root@bigboy tmp]# more /var/log/messages</pre>
<p><a title="ch05lev2sec4" name="ch05lev2sec4"></a></p>
<h4 class="docSection2Title">Logging <span class="docEmphasis">syslog</span>  Messages to a Remote Linux Server</h4>
<p class="docText">Logging <a title="idd1e2524" name="idd1e2524"></a><a title="idd1e2525" name="idd1e2525"></a><a title="idd1e2526" name="idd1e2526"></a>your system messages to a remote server is a good security  practice. With all servers logging to a central <tt>syslog</tt> server, it  becomes easier to correlate events across your company. It also makes covering  up mistakes or malicious activities harder because the purposeful deletion of  log files on a server cannot simultaneously occur on your logging server,  especially if you restrict the user access to the logging server.</p>
<p><a title="ch05lev3sec3" name="ch05lev3sec3"></a></p>
<h5 class="docSection3Title">Configuring the Linux <span class="docEmphasis">syslog</span> Server</h5>
<p class="docText">By <a title="idd1e2527" name="idd1e2527"></a><a title="idd1e2528" name="idd1e2528"></a><a title="idd1e2529" name="idd1e2529"></a>default, <tt>syslog</tt> doesn&#8217;t expect to receive messages  from remote clients. Here&#8217;s how to configure your Linux server to start  listening for these messages.</p>
<p class="docText">As we saw previously, <tt>syslog</tt> checks its  <tt>/etc/syslog.conf</tt> file to determine the expected names and locations of  the log files it should create. It also checks the file  <tt>/etc/sysconfig/syslog</tt> to determine the various modes in which it should  operate. <tt>syslog</tt> will not listen for remote messages unless the  <tt>SYSLOGD_OPTIONS</tt> variable in this <a title="idd1e2530" name="idd1e2530"></a><a title="idd1e2531" name="idd1e2531"></a><a title="idd1e2532" name="idd1e2532"></a>file has an <tt>-r</tt> included in  it:<a title="idd1e2533" name="idd1e2533"></a></p>
<pre>     # Options to syslogd
     # -m 0 disables 'MARK' messages.
     # -r enables logging from remote machines
     # -x disables DNS lookups on messages received with -r
     # See syslogd(8) for more details
     SYSLOGD_OPTIONS="-m 0 -r"
     # Options to klogd
     # -2 prints all kernel oops messages twice; once for klogd to decode,
     and
     #    once for processing with 'ksymoops'
     # -x disables all klogd processing of oops messages entirely
     # See klogd(8) for more details
     KLOGD_OPTIONS="-2"</pre>
<p class="docText">You have to restart <tt>syslog</tt> on the server for the  changes to take effect. The server will now start to listen on UDP port 514,  which you can verify using either one of the following <tt>netstat</tt> command  variations:<a title="idd1e2534" name="idd1e2534"></a><a title="idd1e2535" name="idd1e2535"></a><a title="idd1e2536" name="idd1e2536"></a></p>
<pre>     [root@bigboy tmp]# netstat -a | grep syslog
     udp        0      0 *:syslog                *:*
     [root@bigboy tmp]# netstat -an | grep 514
     udp        0      0 0.0.0.0:514             0.0.0.0:*
     [root@bigboy tmp]#</pre>
<p><a title="ch05lev3sec4" name="ch05lev3sec4"></a></p>
<h5 class="docSection3Title">Configuring the Linux Client</h5>
<p class="docText">The <a title="idd1e2537" name="idd1e2537"></a><a title="idd1e2538" name="idd1e2538"></a><a title="idd1e2539" name="idd1e2539"></a><tt>syslog</tt> server is now expecting to receive  <tt>syslog</tt> messages. You have to configure your remote Linux <a title="idd1e2540" name="idd1e2540"></a><a title="idd1e2541" name="idd1e2541"></a><a title="idd1e2542" name="idd1e2542"></a>client to send  messages to it. This is done by editing the <tt>/etc/hosts</tt> file on the  Linux client named <tt>smallfry</tt>. Here are the steps:<a title="idd1e2543" name="idd1e2543"></a></p>
<p><a title="ch05pro01" name="ch05pro01"></a></p>
<table class="docText" border="0">
<tr>
<td valign="top" width="25">
<div class="docText"><strong>1. </strong></div>
</td>
<td>
<div class="docText">Determine the IP address and fully qualified hostname of your  remote logging host.</div>
</td>
</tr>
<tr>
<td valign="top" width="25">
<div class="docText"><strong>2. </strong></div>
</td>
<td>
<div class="docText">Add an entry in the <tt>/etc/hosts</tt> file in the  format:</p>
<pre>  IP-address    fully-qualified-domain-name    hostname    "loghost"</pre>
<p>Example:</p>
<pre>  192.168.1.100   bigboy.my-web-site.org    bigboy    loghost</pre>
<p>Now your <tt>/etc/hosts</tt> file has a nickname of &#8220;loghost&#8221; for  server <tt>bigboy</tt>.</div>
</td>
</tr>
<tr>
<td valign="top" width="25">
<div class="docText"><strong>3. </strong></div>
</td>
<td>
<div class="docText">The next thing you need to do is edit your  <tt>/etc/syslog.conf</tt> file to make the <tt>syslog</tt> messages get sent to  your new loghost nickname:</p>
<pre>*.debug                     @loghost
*.debug                     /var/log/messages</pre>
</div>
</td>
</tr>
</table>
<p class="docText">You have now configured all debug messages and higher to be  logged to both server <tt>bigboy</tt> (&#8220;loghost&#8221;) and the local file  <tt>/var/log/messages</tt>. Remember to restart <tt>syslog</tt> to get the  remote logging started.</p>
<p class="docText">You can now test to make sure that the <tt>syslog</tt> server  is receiving the messages with a simple test, such <a title="idd1e2544" name="idd1e2544"></a>as  restarting the <tt>lpd</tt> printer daemon and making sure the remote server  sees the messages.<a title="idd1e2545" name="idd1e2545"></a><a title="idd1e2546" name="idd1e2546"></a><a title="idd1e2547" name="idd1e2547"></a></p>
<p><a title="ch05lev3sec5" name="ch05lev3sec5"></a></p>
<h5 class="docSection3Title">Linux Client</h5>
<pre>     [root@smallfry tmp]# service lpd restart
     Stopping lpd: [ OK ]
     Starting lpd: [ OK ]
     [root@smallfry tmp]#</pre>
<p><a title="ch05lev3sec6" name="ch05lev3sec6"></a></p>
<h5 class="docSection3Title">Linux Server</h5>
<pre>     [root@bigboy tmp]# tail /var/log/messages
     ...
     ...
     Apr 11 22:09:35 smallfry lpd: lpd shutdown succeeded
     Apr 11 22:09:39 smallfry lpd: lpd startup succeeded
     ...
     ...
     [root@bigboy tmp]#</pre>
<p><a title="ch05lev2sec5" name="ch05lev2sec5"></a></p>
<h4 class="docSection2Title"><span class="docEmphasis">syslog</span> Configuration  and Cisco Network Devices</h4>
<p class="docText"><tt>syslog</tt> reserves <a title="idd1e2548" name="idd1e2548"></a><a title="idd1e2549" name="idd1e2549"></a><a title="idd1e2550" name="idd1e2550"></a>facilities local0 through local7 for  log messages received from remote servers and network devices. Routers,  switches, firewalls, and load balancerseach logging with a different facilitycan  each have their own log files for easy troubleshooting. <a href="http://www.sabinshrestha.com.np/wp-admin/app04.html#app04" class="docLink">Appendix IV</a> has examples of how to configure  <tt>syslog</tt> to do this with Cisco devices using separate log files for the  routers, switches, PIX firewalls, CSS load balancers, <a title="idd1e2551" name="idd1e2551"></a>and  LocalDirectors.</p>
<p><a title="ch05lev2sec6" name="ch05lev2sec6"></a></p>
<h4 class="docSection2Title"><span class="docEmphasis">syslog</span> and  Firewalls</h4>
<p class="docText"><tt>syslog</tt> <a title="idd1e2552" name="idd1e2552"></a><a title="idd1e2553" name="idd1e2553"></a><a title="idd1e2554" name="idd1e2554"></a>listens by default on UDP port 514. If you are logging to a  remote <tt>syslog</tt> server via a firewall, you have to allow traffic on this  port to pass through the security device. <tt>syslog</tt> messages usually have  UDP port 514 for both their source and destination UDP ports.<a title="idd1e2555" name="idd1e2555"></a></p>
<h2 class="docAppendixTitle"></h2>
<h3 class="docSection1Title">logrotate</h3>
<p class="docText">The <a title="idd1e2556" name="idd1e2556"></a>Linux utility <tt>logrotate</tt>  renames and reuses system error log files on a periodic basis so that they don&#8217;t  occupy excessive disk space.</p>
<p><a title="ch05lev2sec7" name="ch05lev2sec7"></a></p>
<h4 class="docSection2Title">The <span class="docEmphasis">/etc/logrotate.conf</span> File</h4>
<p class="docText">The <a title="idd1e2557" name="idd1e2557"></a><a title="idd1e2558" name="idd1e2558"></a><tt>/etc/logrotate.conf</tt> file is <tt>logrotate</tt>&#8216;s  general configuration file in which you can specify the frequency with which the  files are reused:</p>
<ul>
<li>
<p class="docList">You can specify either a <tt>weekly</tt> or <tt>daily</tt>  rotation parameter. In the case below, the weekly option is commented out with a  #, allowing daily updates.</p>
</li>
<li>
<p class="docList">The <tt>rotate</tt> parameter specifies the number of copies of  log files <tt>logrotate</tt> will maintain. In the case below, the 4 copy option  is commented out with a #, while allowing 7 copies.</p>
</li>
<li>
<p class="docList">The <tt>create</tt> parameter creates a new log file after each  rotation.</p>
</li>
</ul>
<p class="docText">Therefore, our sample configuration file will create daily  archives of <span class="docEmphasis">all</span> the logfiles and store them for  seven days. The files will have the following names, <a title="idd1e2559" name="idd1e2559"></a><a title="idd1e2560" name="idd1e2560"></a>with <tt>logfile</tt> the current active version:</p>
<pre>     logfile
     logfile.0
     logfile.1
     logfile.2
     logfile.3
     logfile.4
     logfile.5
     logfile.6</pre>
<p><a title="ch05lev2sec8" name="ch05lev2sec8"></a></p>
<h4 class="docSection2Title">Sample Contents of <span class="docEmphasis">/etc/logrotate.conf</span></h4>
<pre>     # rotate log files weekly
     #weekly

     # rotate log files daily
     daily

     # keep 4 weeks worth of backlogs
     #rotate 4

     # keep 7 days worth of backlogs
     rotate 7

     # create new (empty) log files after rotating old ones
     create</pre>
<p><a title="ch05lev2sec9" name="ch05lev2sec9"></a></p>
<h4 class="docSection2Title">The <span class="docEmphasis">/etc/logrotate.d</span>  Directory</h4>
<p class="docText">Most <a title="idd1e2561" name="idd1e2561"></a>Linux applications that use  <tt>syslog</tt> put an additional configuration file in this directory to  specify the names of the log files to be rotated. It is a good practice to  verify that all new applications that you want to use the <tt>syslog</tt> log  have configuration files in this directory. Here are some sample files that  define the specific files to be rotated for each application.</p>
<p><a title="ch05lev3sec7" name="ch05lev3sec7"></a></p>
<h5 class="docSection3Title">The <span class="docEmphasis">/etc/logrotate.d/syslog</span> File (for General System  Logging)</h5>
<pre>     /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler
     /var/log/boot.log /var/log/cron {
         sharedscripts
         postrotate
         /bin/kill -HUP `cat /var/run/syslogd.pid 2&gt; /dev/null` 2&gt;
     /dev/null || true
         endscript
     }</pre>
<p><a title="ch05lev3sec8" name="ch05lev3sec8"></a></p>
<h5 class="docSection3Title">The <span class="docEmphasis">/etc/logrotate.d/apache</span> File (for Apache)</h5>
<pre>     /var/log/httpd/access_log /var/log/httpd/agent_log
     /var/log/httpd/error_log /var/log/httpd/referer_log {
         missingok
         sharedscripts
         postrotate
         /bin/kill -HUP `cat /var/run/httpd.pid 2&gt;/dev/null` 2&gt; /dev/null
     || true
         endscript
     }</pre>
<p><a title="ch05lev3sec9" name="ch05lev3sec9"></a></p>
<h5 class="docSection3Title">The <span class="docEmphasis">/etc/logrotate.d/samba</span> File (for Samba)</h5>
<pre>     /var/log/samba/*.log {
         notifempty
         missingok
         sharedscripts
         copytruncate
         postrotate
         /bin/kill -HUP `cat /var/lock/samba/*.pid 2&gt; /dev/null` 2&gt;
     /dev/null || true
         endscript
     }</pre>
<p><a title="ch05lev2sec10" name="ch05lev2sec10"></a></p>
<h4 class="docSection2Title">Activating <span class="docEmphasis">logrotate</span></h4>
<p class="docText">The <tt>logrotate</tt> <a title="idd1e2562" name="idd1e2562"></a>settings in the  last section will not take effect until you issue the following command:</p>
<pre>     [root@bigboy tmp]# logrotate -f</pre>
<p class="docText">If you want <tt>logrotate</tt> to reload only a specific  configuration file, and not all of them, issue the <tt>logrotate</tt> command  with <a title="idd1e2563" name="idd1e2563"></a>just that filename as the argument:</p>
<pre>     [root@bigboy tmp]# logrotate -f /etc/logrotate.d/syslog</pre>
<p><a title="ch05lev2sec11" name="ch05lev2sec11"></a></p>
<h4 class="docSection2Title">Compressing Your Log Files</h4>
<p class="docText">On <a title="idd1e2564" name="idd1e2564"></a><a title="idd1e2565" name="idd1e2565"></a><a title="idd1e2566" name="idd1e2566"></a>busy Web sites the size of your log files can become quite  large. Compression can be activated by editing the <tt>logrotate.conf</tt> file  and adding the <tt>compress</tt> option.<a title="idd1e2567" name="idd1e2567"></a></p>
<pre>     #
     # File: /etc/logrotate.conf
     #

     # Activate log compression
     compress</pre>
<p class="docText">The log files will then start to become archived with the  <tt>gzip</tt> utility, each file having a <tt>.gz</tt> extension.</p>
<pre>     [root@bigboy tmp]# ls /var/log/messages*
     /var/log/messages      /var/log/messages.1.gz /var/log/messages.2.gz
     /var/log/messages.3.gz /var/log/messages.4.gz /var/log/messages.5.gz
     /var/log/messages.6.gz /var/log/messages.7.gz
     [root@bigboy tmp]#</pre>
<p class="docText">Viewing the contents of the files still remains easy because  the <tt>zcat</tt> command can quickly output the contents to <a title="idd1e2568" name="idd1e2568"></a><a title="idd1e2569" name="idd1e2569"></a><a title="idd1e2570" name="idd1e2570"></a><a title="idd1e2571" name="idd1e2571"></a>the screen. Use the command with the compressed file&#8217;s name  as the argument:</p>
<pre>     [root@bigboy tmp]# zcat /var/log/messages.1.gz
     ...
     ...
     Nov 15 04:08:02 bigboy httpd: httpd shutdown succeeded
     Nov 15 04:08:04 bigboy httpd: httpd startup succeeded
     Nov 15 04:08:05 bigboy sendmail[6003]: iACFMLHZ023165:
     to=&lt;tvaughan@clematis4spiders.info&gt;, delay=2+20:45:44,
     xdelay=00:00:02, mailer=esmtp, pri=6388168,
     relay=www.clematis4spiders.info. [222.134.66.34], dsn=4.0.0,
     stat=Deferred: Connection refused by www.clematis4spiders.info.
     [root@bigboy tmp]#</pre>
<p><strong><span class="docEmphasis">syslog</span> Configuration and Cisco Devices</strong></p>
<p class="docText"><tt>syslog</tt> <a title="idd1e8980" name="idd1e8980"></a><a title="idd1e8981" name="idd1e8981"></a>reserves facilities <tt>local0</tt> tHRough <tt>local7</tt>  for log messages received from remote servers and network devices. Routers,  switches, firewalls, and load balancers each logging with a different facility  can each have their own log files for easy troubleshooting. This appendix will  show you how to have a different log file for each class of device. All the  network device configuration examples that follow log to the remote Linux  logging server 192.168.1.100. Remember, if you have a large data center, you may  also want to switch off all logging to <tt>/var/log/messages</tt> for the  home/SOHO environment</p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top"><a title="app04lev1sec1" name="app04lev1sec1"></a></p>
<h3 class="docSection1Title" id="439356-949">Cisco Routers</h3>
<p class="docText">By <a title="idd1e8982" name="idd1e8982"></a><a title="idd1e8983" name="idd1e8983"></a><a title="idd1e8984" name="idd1e8984"></a><a title="idd1e8985" name="idd1e8985"></a>default Cisco routers send  <tt>syslog</tt> messages to their logging server with <a title="idd1e8986" name="idd1e8986"></a><a title="idd1e8987" name="idd1e8987"></a>a default facility of <tt>local7</tt>. Don&#8217;t set the facility  in this case, but do tell the router to timestamp the messages and make the  messages have the source IP address of the loopback interface:</p>
<pre>     service timestamps log datetime localtime
     no logging console
     no logging monitor
     logging 192.168.1.100</pre>
</td>
</tr>
</table>
<h3 class="docSection1Title">Catalyst CAT Switches Running CATOS</h3>
<p class="docText">By default <a title="idd1e8988" name="idd1e8988"></a><a title="idd1e8989" name="idd1e8989"></a><a title="idd1e8990" name="idd1e8990"></a>Cisco switches also send <tt>syslog</tt> messages to their  logging server with a default facility of <tt>local7</tt>. Don&#8217;t change this  facility either, therefore making routers and switches log to the same file.</p>
<pre>     set logging server enable
     set logging server 192.168.1.100
     set logging level all 5
     set logging server severity 6</pre>
<p class="docText">&nbsp;</p>
<h3 class="docSection1Title">Cisco Local Director</h3>
<p class="docText">Local Directors <a title="idd1e8991" name="idd1e8991"></a>use the <tt>syslog  output</tt> command to set the logging facility and severity. The value provided  must be in the format <span class="docEmphStrong">FF.SS</span> (facility.severity)  using the numbering scheme in <a title="idd1e8992" name="idd1e8992"></a><a title="idd1e8993" name="idd1e8993"></a></p>
<p><a title="app04table01" name="app04table01"></a></p>
<table class="allBorders" border="1" cellpadding="4" cellspacing="0" rules="all">
<thead>
<th class="thead" scope="col" align="left" valign="top">
<p class="docText"><span class="docEmphStrong"><a title="idd1e8994" name="idd1e8994"></a><a title="idd1e8995" name="idd1e8995"></a>Facility</span></p>
</th>
<th class="thead" scope="col" align="left" valign="top">
<p class="docText"><span class="docEmphStrong">FF Value</span></p>
</th>
<th class="thead" scope="col" align="left" valign="top"></th>
<th class="thead" scope="col" align="left" valign="top">
<p class="docText"><span class="docEmphStrong">Severity</span></p>
</th>
<th class="thead" scope="col" align="left" valign="top">
<p class="docText"><span class="docEmphStrong">SS Value</span></p>
</th>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local0</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">16</p>
</td>
<td class="docTableCell" align="left" valign="top">&nbsp;</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">System unusable</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">0</p>
</td>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local1</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">17</p>
</td>
<td class="docTableCell" align="left" valign="top">&nbsp;</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Immediate action required</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">1</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local2</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">18</p>
</td>
<td class="docTableCell" align="left" valign="top">&nbsp;</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Critical condition</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">2</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local3</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">19</p>
</td>
<td class="docTableCell" align="left" valign="top">&nbsp;</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Error conditions</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">3</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local4</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">20</p>
</td>
<td class="docTableCell" align="left" valign="top">&nbsp;</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Warning conditions</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">4</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local5</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">21</p>
</td>
<td class="docTableCell" align="left" valign="top">&nbsp;</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Normal but significant conditions</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">5</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local6</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">22</p>
</td>
<td class="docTableCell" align="left" valign="top">&nbsp;</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Informational messages</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">6</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local7</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">23</p>
</td>
<td class="docTableCell" align="left" valign="top">&nbsp;</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">Debugging messages</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">7</p>
</td>
</tr>
</thead>
</table>
<p class="docText">This example uses facility local4 and the logging debugging  messages from</p>
<pre>     syslog output 20.7
     no syslog console
     syslog host 192.168.1.100</pre>
<p class="docText">&nbsp;</p>
<h3 class="docSection1Title" id="439356-992">Cisco PIX Firewalls</h3>
<p class="docText">PIX firewalls <a title="idd1e8996" name="idd1e8996"></a><a title="idd1e8997" name="idd1e8997"></a>use  the numbering scheme in to  <a title="idd1e8998" name="idd1e8998"></a><a title="idd1e8999" name="idd1e8999"></a>determine their logging  facilities.</p>
<p><a title="app04table02" name="app04table02"></a></p>
<table class="allBorders" border="1" cellpadding="4" cellspacing="0" rules="all">
<thead>
<th class="thead" scope="col" align="left" valign="top">
<p class="docText"><span class="docEmphStrong">Facility</span></p>
</th>
<th class="thead" scope="col" align="left" valign="top">
<p class="docText"><span class="docEmphStrong">Logging Facility Command  Value</span></p>
</th>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local0</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">16</p>
</td>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local1</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">17</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local2</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">18</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local3</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">19</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local4</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">20</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local5</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">21</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local6</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">22</p>
</td>
</tr>
<tr>
<td class="docTableCell" align="left" valign="top">
<p class="docText">local7</p>
</td>
<td class="docTableCell" align="left" valign="top">
<p class="docText">23</p>
</td>
</tr>
</thead>
</table>
<p class="docText">This configuration example assumes that the logging server is  connected on the side of the &#8220;inside&#8221; protected interface. It <a title="idd1e9000" name="idd1e9000"></a><a title="idd1e9001" name="idd1e9001"></a>sends log messages to facility  <tt>local3</tt> with a severity level of 5 (Notification) set by the <tt>logging  trap</tt> command.<a title="idd1e9002" name="idd1e9002"></a><a title="idd1e9003" name="idd1e9003"></a></p>
<pre>     logging on
     logging standby
     logging timestamp
     logging trap notifications
     logging facility 19
     logging host inside 192.168.1.100</pre>
<p class="docText">&nbsp;</p>
<h3 class="docSection1Title">Cisco CSS11000 (Arrowpoints)</h3>
<p class="docText">The configuration for the Cisco CSS11000 load balancer series  <a title="idd1e9004" name="idd1e9004"></a><a title="idd1e9005" name="idd1e9005"></a>is more straightforward. You specify  the facility with an intuitive number using the <tt>logging host</tt> command <a title="idd1e9006" name="idd1e9006"></a><a title="idd1e9007" name="idd1e9007"></a>and set the severity with the  <tt>logging subsystem</tt> command. This example <a title="idd1e9008" name="idd1e9008"></a><a title="idd1e9009" name="idd1e9009"></a>shows the CSS11000 logging facility <tt>local6</tt> and  severity level 6 (Informational):</p>
<pre>     logging host 192.168.1.100 facility 6
     set logging subsystem all info-6</pre>
<pre>
     logging commands enable</pre>
<p class="docText">&nbsp;</p>
<h3 class="docSection1Title">The Sample Cisco <span class="docEmphasis">syslog.conf</span> File</h3>
<pre>     #
     # All LOCAL3 messages (debug and above) go to the firewall file
     ciscofw
     #

     local3.debug /var/log/cisco/ciscofw
     #
     # All LOCAL4 messages (debug and above) go to the Local Director file
     ciscold
     #
     local4.debug /var/log/cisco/ciscold

     #
     # All LOCAL6 messages (debug and above) go to the CSS file ciscocss
     #
     local6.debug /var/log/cisco/ciscocss

     #
     # All LOCAL7 messages (debug and above) go to the ciscoacl
     # This includes ACL logs which are logged at severity debug
     #
     local7.debug /var/log/cisco/ciscoacl

     #
     # LOCAL7 messages (notice and above) go to the ciscoinfo
     # This excludes ACL logs which are logged at severity debug
     #
     local7.notice /var/log/cisco/ciscoinfo</pre>
<p class="docText">&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sabinshrestha.com.np/cisco/linux-syslog-with-cisco/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
