Archive forNetworking

ASCII

Decimal Hex ASCII EBCDIC Binary
0 0 NUL NUL 0000 0000
1 1 SOH SOH 0000 0001
2 2 STX STX 0000 0010
3 3 ETX ETX 0000 0011
4 4 EOT SEL 0000 0100
5 5 ENQ HT 0000 0101
6 6 ACK RNL 0000 0110
7 7 BEL DEL 0000 0111
8 8 BS GE 0000 1000
9 9 TAB SPS 0000 1001
10 A LF RPT 0000 1010
11 B VT VT 0000 1011
12 C FF FF 0000 1100
13 D CR CR 0000 1101
14 E SO SO 0000 1110
15 F SI SI 0000 1111
16 10 DLE DLE 0001 0000
17 11 DC1 DC1 0001 0001
18 12 DC2 DC2 0001 0010
19 13 DC3 DC3 0001 0011
20 14 DC4 RES/ENP 0001 0100
21 15 NAK NL 0001 0101
22 16 SYN BS 0001 0110
23 17 ETB POC 0001 0111
24 18 CAN CAN 0001 1000
25 19 EM EM 0001 1001
26 1A SUB UBS 0001 1010
27 1B ESC CU1 0001 1011
28 1C FS IFS 0001 1100
29 1D GS IGS 0001 1101
30 1E RS IRS 0001 1110
31 1F US ITB/IUS 0001 1111
32 20 DS 0010 0000
33 21 ! SOS 0010 0001
34 22 " FS 0010 0010
35 23 # WUS 0010 0011
36 24 $ BYP/INP 0010 0100
37 25 % LF 0010 0101
38 26 & ETB 0010 0110
39 27 ESC 0010 0111
40 28 ( SA 0010 1000
41 29 ) SFE 0010 1001
42 2A * SM/SW 0010 1010
43 2B + CSP 0010 1011
44 2C , MFA 0010 1100
45 2D - ENQ 0010 1101
46 2E . ACK 0010 1110
47 2F / BEL 0010 1111
48 30 0   0011 0000
49 31 1   0011 0001
50 32 2 SYN 0011 0010
51 33 3 IR 0011 0011
52 34 4 PP 0011 0100
53 35 5 TRN 0011 0101
54 36 6 NBS 0011 0110
55 37 7 EOT 0011 0111
56 38 8 SBS 0011 1000
57 39 9 IT 0011 1001
58 3A : RFF 0011 1010
59 3B ; CU3 0011 1011
60 3C < DC4 0011 1100
61 3D = NAK 0011 1101
62 3E >   0011 1110
63 3F ? SUB 0011 1111
64 40 @ SP 0100 0000
65 41 A RSP 0100 0001
66 42 B   0100 0010
67 43 C   0100 0011
68 44 D   0100 0100
69 45 E   0100 0101
70 46 F   0100 0110
71 47 G   0100 0111
72 48 H   0100 1000
73 49 I   0100 1001
74 4A J   0100 1010
75 4B K . 0100 1011
76 4C L < 0100 1100
77 4D M ( 0100 1101
78 4E N + 0100 1110
79 4F O | 0100 1111
80 50 P & 0101 0000
81 51 Q   0101 0001
82 52 R   0101 0010
83 53 S   0101 0011
84 54 T   0101 0100
85 55 U   0101 0101
86 56 V   0101 0110
87 57 W   0101 0111
88 58 X   0101 1000
89 59 Y   0101 1001
90 5A Z ! 0101 1010
91 5B [ $ 0101 1011
92 5C \ * 0101 1100
93 5D ] ) 0101 1101
94 5E ^ ; 0101 1110
95 5F _   0101 1111
96 60 ` _ 0110 0000
97 61 a / 0110 0001
98 62 b   0110 0010
99 63 c   0110 0011
100 64 d   0110 0100
101 65 e   0110 0101
102 66 f   0110 0110
103 67 g   0110 0111
104 68 h   0110 1000
105 69 i   0110 1001
106 6A j | 0110 1010
107 6B k , 0110 1011
108 6C l % 0110 1100
109 6D m _ 0110 1101
110 6E n > 0110 1110
111 6F o ? 0110 1111
112 70 p   0111 0000
113 71 q   0111 0001
114 72 r   0111 0010
115 73 s   0111 0011
116 74 t   0111 0100
117 75 u   0111 0101
118 76 v   0111 0110
119 77 w   0111 0111
120 78 x   0111 1000
121 79 y ` 0111 1001
122 7A z : 0111 1010
123 7B { # 0111 1011
124 7C | @ 0111 1100
125 7D } 0111 1101
126 7E ~ = 0111 1110
127 7F DEL " 0111 1111
128 80     1000 0000
129 81   a 1000 0001
130 82   b 1000 0010
131 83   c 1000 0011
132 84   d 1000 0100
133 85   e 1000 0101
134 86   f 1000 0110
135 87   g 1000 0111
136 88   h 1000 1000
137 89   i 1000 1001
138 8A     1000 1010
139 8B   { 1000 1011
140 8C     1000 1100
141 8D     1000 1101
142 8E     1000 1110
143 8F   + 1000 1111
144 90     1001 0000
145 91   j 1001 0001
146 92   k 1001 0010
147 93   l 1001 0011
148 94   m 1001 0100
149 95   n 1001 0101
150 96   o 1001 0110
151 97   p 1001 0111
152 98   q 1001 1000
153 99   r 1001 1001
154 9A     1001 1010
155 9B   } 1001 1011
156 9C     1001 1100
157 9D     1001 1101
158 9E     1001 1110
159 9F     1001 1111
160 A0     1010 0000
161 A1     1010 0001
162 A2   s 1010 0010
163 A3   t 1010 0011
164 A4   u 1010 0100
165 A5   v 1010 0101
166 A6   w 1010 0110
167 A7   x 1010 0111
168 A8   y 1010 1000
169 A9   z 1010 1001
170 AA     1010 1010
171 AB     1010 1011
172 AC     1010 1100
173 AD   [ 1010 1101
174 AE     1010 1110
175 AF     1010 1111
176 B0     1011 0000
177 B1     1011 0001
178 B2     1011 0010
179 B3     1011 0011
180 B4     1011 0100
181 B5     1011 0101
182 B6     1011 0110
183 B7     1011 0111
184 B8     1011 1000
185 B9     1011 1001
186 BA     1011 1010
187 BB     1011 1011
188 BC     1011 1100
189 BD     1011 1101
190 BE     1011 1110
191 BF     1011 1111
192 C0     1100 0000
193 C1   A 1100 0001
194 C2   B 1100 0010
195 C3   C 1100 0011
196 C4   D 1100 0100
197 C5   E 1100 0101
198 C6   F 1100 0110
199 C7   G 1100 0111
200 C8   H 1100 1000
201 C9   I 1100 1001
202 CA     1100 1010
203 CB     1100 1011
204 CC     1100 1100
205 CD     1100 1101
206 CE     1100 1110
207 CF     1100 1111
208 D0     1101 0000
209 D1   J 1101 0001
210 D2   K 1101 0010
211 D3   L 1101 0011
212 D4   M 1101 0100
213 D5   N 1101 0101
214 D6   O 1101 0110
215 D7   P 1101 0111
216 D8   Q 1101 1000
217 D9   R 1101 1001
218 DA     1101 1010
219 DB     1101 1011
220 DC     1101 1100
221 DD     1101 1101
222 DE     1101 1110
223 DF     1101 1111
224 E0     1110 0000
225 E1     1110 0001
226 E2   S 1110 0010
227 E3   T 1110 0011
228 E4   U 1110 0100
229 E5   V 1110 0101
230 E6   W 1110 0110
231 E7   X 1110 0111
232 E8   Y 1110 1000
233 E9   Z 1110 1001
234 EA     1110 1010
235 EB     1110 1011
236 EC     1110 1100
237 ED     1110 1101
238 EE     1110 1110
239 EF     1110 1111
240 F0   0 1111 0000
241 F1   1 1111 0001
242 F2   2 1111 0010
243 F3   3 1111 0011
244 F4   4 1111 0100
245 F5   5 1111 0101
246 F6   6 1111 0110
247 F7   7 1111 0111
248 F8   8 1111 1000
249 F9   9 1111 1001
250 FA     1111 1010
251 FB     1111 1011
252 FC     1111 1100
253 FD     1111 1101
254 FE     1111 1110
255 FF     1111 1111

Comments off

VOIP: Ports pointers

If you plan on using phones or accessing the PBX from remote locations, it’s necessary to forward certain ports back to your PBX. www.portforward.com is a good resource for documentation on how to forward ports on most routers.

The following ports are used by the PBX.

TCP/UDP Port(s) description Used by Remote Phones
UDP 5060 SIP signaling port needed for phones outside your network
UDP 10000-10500 RTP audio ports needed for phones outside your network
Used for accessing the PBX web interface remotely
TCP 80 HTTP port for remote web voicemail access
TCP 443 HTTPS port for remote web admin access
TCP 5222 & 843 SMB Systems Only – ports for using the Switchboard remotely

Comments off

Order of operation… Math operators in Excel

The math operators in Excel have an order of operation, just like in regular math. The order of operation is the order in which they’re processed when multiple operators appear in the same formula. Here are the rules that determine the order:

1. Any operations that are in parentheses, from left to right
2. Exponentiation (^)
3. Multiplication (*) and division (/)
4. Addition (+) and subtraction (-)

Parentheses override everything and go first. So, if you need to execute an operation out of the normal order, you place it in parentheses.

For example, suppose you have this formula:

=5+16/4^2

The order of operation looks like this:

1. The exponentiation (4^2 equals 16)
2. The division (16/16 equals 1)
3. The addition (5+1 equals 6)

The result of the formula is 6.

If you wanted the addition to occur first, you could put parentheses around the addition portion of the equation, like this:

=(5+16)/4^2

This time, the order of operation looks like this:

1. The part in parentheses (5+16 equals 21)
2. The exponentiation (4^2 equals 16)
3. The division (21/16 equals 1.3125)

The result of this formula is 1.3125.

If you wanted to perform the exponentiation last, you could add another set of parentheses, like this:

=((5+16)/4)^2

Now the order is this:

1. The inner parentheses (5+16 equals 21)
2. The outer parentheses (21/4 equals 5.25)
3. The exponentiation (5.25^2 equals 27.5625)

The result of this formula is 27.5625.

If you left off the inner set of parentheses and wrote it like this:

=(5+16/4)^2

The order would be as follows:

1. The division, because it’s the highest-ranking operation inside the parentheses (16/4 equals 4)
2. The rest of the parenthetical operations (5+4 equals 9)
3. The exponent (9^2 equals 81)

The result of this formula is 81.

Comments off

Step-by-Step Procedure: Cisco Password recovery procedure

Step-by-Step Procedure
Follow the below.

Attach a terminal or PC with terminal emulation (for example, Hyper Terminal) to the console port of the switch.

Use the following terminal settings:

Bits per second (baud): 9600

Data bits: 8

Parity: None

Stop bits: 1

Flow Control: Xon/Xoff

Note: For additional information on cabling and connecting a terminal to the console port, refer to Connecting a Terminal to the Console Port on Catalyst Switches.

Unplug the power cable.

Power the switch and bring it to the switch: prompt:

For 2900XL, 3500XL, 2940, 2950, 2960, 2970, 3550, 3560, and 3750 series switches, do this:

Hold down the mode button located on the left side of the front panel, while you reconnect the power cable to the switch.

Catalyst Switch Series
LED Behavior and Mode Button Release Action

2900XL, 3500XL, 3550
Release the Mode button when the LED above Port1x goes out.

2940, 2950
Release the Mode button after approximately 5 seconds when the Status (STAT) LED goes out. When you release the Mode button, the SYST LED blinks amber.

2960, 2970
Release the Mode button when the SYST LED blinks amber and then turns solid green. When you release the Mode button, the SYST LED blinks green.

3560, 3750
Release the Mode button after approximately 15 seconds when the SYST LED turns solid green. When you release the Mode button, the SYST LED blinks green.

Note: LED position may vary slightly depending on the model.

Catalyst 3524XL

Catalyst 2950-24

For 2955 series switches only:

The Catalyst 2955 series switches do not use an external mode button for password recovery. Instead the switch boot loader uses the break-key detection to stop the automatic boot sequence for the password recovery purposes. The break sequence is determined by the terminal application and operating system used. Hyperterm running on Windows 2000 uses Ctrl + Break. On a workstation running UNIX, Ctrl-C is the break key. For more information, refer to Standard Break Key Sequence Combinations During Password Recovery.

The example below uses Hyperterm to break into switch: mode on a 2955.

C2955 Boot Loader (C2955-HBOOT-M) Version 12.1(0.0.514), CISCO DEVELOPMENT TEST
VERSION
Compiled Fri 13-Dec-02 17:38 by madison
WS-C2955T-12 starting…
Base ethernet MAC Address: 00:0b:be:b6:ee:00
Xmodem file system is available.
Initializing Flash…
flashfs[0]: 19 files, 2 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 7741440
flashfs[0]: Bytes used: 4510720
flashfs[0]: Bytes available: 3230720
flashfs[0]: flashfs fsck took 7 seconds.
…done initializing flash.
Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4

*** The system will autoboot in 15 seconds ***
Send break character to prevent autobooting.

!— Wait until you see this message before
!— you issue the break sequence.
!— Ctrl+Break is entered using Hyperterm.

The system has been interrupted prior to initializing the flash file system to finish
loading the operating system software:

flash_init
load_helper
boot
switch:Issue the flash_init command.

switch: flash_init
Initializing Flash…
flashfs[0]: 143 files, 4 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 3612672
flashfs[0]: Bytes used: 2729472
flashfs[0]: Bytes available: 883200
flashfs[0]: flashfs fsck took 86 seconds
….done Initializing Flash.
Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4
switch:

!— This output is from a 2900XL switch. Output from
!— other switches will vary slightly.

Issue the load_helper command.

switch: load_helper
switch:Issue the dir flash: command.

Note: Make sure to type a colon “:” after the dir flash.

The switch file system is displayed:

switch: dir flash:
Directory of flash:/
2 -rwx 1803357 c3500xl-c3h2s-mz.120-5.WC7.bin

!— This is the current version of software.

4 -rwx 1131 config.text

!— This is the configuration file.

5 -rwx 109 info
6 -rwx 389 env_vars
7 drwx 640 html
18 -rwx 109 info.ver
403968 bytes available (3208704 bytes used)
switch:

!— This output is from a 3500XL switch. Output from
!— other switches will vary slightly.

Type rename flash:config.text flash:config.old to rename the configuration file.

switch: rename flash:config.text flash:config.old
switch:

!— The config.text file contains the password
!— definition.

Issue the boot command to boot the system.

switch: boot
Loading “flash:c3500xl-c3h2s-mz.120-5.WC7.bin”…###############################
################################################################################
######################################################################
File “flash:c3500xl-c3h2s-mz.120-5.WC7.bin” uncompressed and installed, entry po
int: 0×3000
executing…

!— Output suppressed.
!— This output is from a 3500XL switch. Output from other switches
!— will vary slightly.

Enter “n” at the prompt to abort the initial configuration dialog.

— System Configuration Dialog —
At any point you may enter a question mark ‘?’ for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets ‘[]‘.
Continue with configuration dialog? [yes/no]: n

!— Type “n” for no.

Press RETURN to get started.

!— Press Return or Enter.

Switch>

!— The Switch> prompt is displayed.

At the switch prompt, type en to enter enable mode.

Switch>en
Switch#Type rename flash:config.old flash:config.text to rename the configuration file with its original name.

Switch#rename flash:config.old flash:config.text
Destination filename [config.text]

!— Press Return or Enter.

Switch#Copy the configuration file into memory.

Switch#copy flash:config.text system:running-config
Destination filename [running-config]?

!— Press Return or Enter.

1131 bytes copied in 0.760 secs
Sw1#The configuration file is now reloaded.

Overwrite the current passwords that you do not know. Choose a strong password with at least one capital letter, one number, and one special character.

Note: Overwrite the passwords which are necessary. You need not overwrite all of the mentioned passwords.

Sw1# conf t

!— To overwrite existing secret password

Sw1(config)#enable secret

!— To overwrite existing enable password

Sw1(config)#enable password

!— To overwrite existing vty password

Sw1(config)#line vty 0 15
Sw1(config-line)#password

Sw1(config-line)#login

!— To overwrite existing console password

Sw1(config-line)#line con 0
Sw1(config-line)#password

Write the running configuration to the configuration file with the write memory command.

Sw1#write memory
Building configuration…
[OK]
Sw1#

Comments off

IP Subnet Cheat Sheet

255.255.255.255 11111111.11111111.11111111.11111111 /32 Host (single address)

255.255.255.254 11111111.11111111.11111111.11111110 /31 Unuseable
255.255.255.252 11111111.11111111.11111111.11111100 /30 2 useable
255.255.255.248 11111111.11111111.11111111.11111000 /29 6 useable
255.255.255.240 11111111.11111111.11111111.11110000 /28 14 useable
255.255.255.224 11111111.11111111.11111111.11100000 /27 30 useable
255.255.255.192 11111111.11111111.11111111.11000000 /26 62 useable
255.255.255.128 11111111.11111111.11111111.10000000 /25 126 useable
255.255.255.0 11111111.11111111.11111111.00000000 /24 “Class C” 254 useable

255.255.254.0 11111111.11111111.11111110.00000000 /23 2 Class C
255.255.252.0 11111111.11111111.11111100.00000000 /22 4 Class C
255.255.248.0 11111111.11111111.11111000.00000000 /21 8 Class C
255.255.240.0 11111111.11111111.11110000.00000000 /20 16 Class C
255.255.224.0 11111111.11111111.11100000.00000000 /19 32 Class C
255.255.192.0 11111111.11111111.11000000.00000000 /18 64 Class C
255.255.128.0 11111111.11111111.10000000.00000000 /17 128 Class C
255.255.0.0 11111111.11111111.00000000.00000000 /16 “Class B”

255.254.0.0 11111111.11111110.00000000.00000000 /15
255.252.0.0 11111111.11111100.00000000.00000000 /14
255.248.0.0 11111111.11111000.00000000.00000000 /13
255.240.0.0 11111111.11110000.00000000.00000000 /12
255.224.0.0 11111111.11100000.00000000.00000000 /11
255.192.0.0 11111111.11000000.00000000.00000000 /10
255.128.0.0 11111111.10000000.00000000.00000000 /9
255.0.0.0 11111111.00000000.00000000.00000000 /8 “Class A”

254.0.0.0 11111110.00000000.00000000.00000000 /7
252.0.0.0 11111100.00000000.00000000.00000000 /6
248.0.0.0 11111000.00000000.00000000.00000000 /5
240.0.0.0 11110000.00000000.00000000.00000000 /4
224.0.0.0 11100000.00000000.00000000.00000000 /3
192.0.0.0 11000000.00000000.00000000.00000000 /2
128.0.0.0 10000000.00000000.00000000.00000000 /1
0.0.0.0 00000000.00000000.00000000.00000000 /0 IP space

# 255.255.255.0 1 Class C
# 255.255.254.0 2 Class Cs
# 255.255.252.0 4 Class Cs
# 255.255.248.0 8 Class Cs
# 255.255.240.0 16 Class Cs
# 255.255.224.0 32 Class Cs
# 255.255.192.0 64 Class Cs
# 255.255.128.0 128 Class Cs
# 255.255.0.0 1 Class B

Comments off

Setup HA on Netscreen

Netscreen A
set interface ethernet1 zone untrust
set interface ethernet1 ip 10.2.1.1/24
set interface ethernet3 zone trust
set interface ethernet3 ip 10.1.1.1/24
set interface ethernet3 manage-ip 10.1.1.20
set nsrp rto-mirror sync
set nsrp monitor interface ethernet1
set nsrp monitor interface ethernet3
set nsrp cluster id 1
save

Netscreen B

set interface ethernet3 zone trust
set interface ethernet3 ip 10.1.1.1/24
set interface ethernet3 manage-ip 10.1.1.21
set nsrp rto-mirror sync
set nsrp monitor interface ethernet1
set nsrp monitor interface ethernet3
set nsrp cluster id 1

save

exec nsrp sync global-config save

reset

exec nsrp sync global-config save

Comments off

Netscreen VPN How to

Open HTTP connection to Netscreen firewall.

Click +VPNs
Click +AutoKey Advanced
Click Gateway

Create your gateway from IP provided in Cybercon VPN Setup Sheet.

Gateway Name: Cisco Pix Gateway
Click Static IP Address: IP Address / Hostname: ip.ip.ip.ip
Enter Preshare Key: CYBERCON

Click Advanced
Security Level ( Match customer supplied Phase 1 Proposal )
pre-g2-3des-sha

Click Return at bottom
Click OK

Click AutoKey IKE
Click New
VPN NAME: Tunnel to Cisco Pix
Remote Gateway: Predefined Cisco Pix Gateway (What we made above in drop down list)
Click Advance
User Defined: Phase 2 Proposal ( Match customer supplied Phase 2 Proposal )
g2-esp-3des-sha
Click Return
Click OK

Click +Objects
Click +Addresses
Click List
Untrust -> New
Address Name: Netblock behind Cisco Pix
IP Address/Domain Name
Click IP/Netmask ip.ip.ip.ip / 24
Zone Untrust
Click OK

Click +Objects
Click +Addresses
Click List
Trust -> New
Address Name: ip.ip.ip.ip/24
IP Address/Domain Name
Click IP ip.ip.ip.ip/24

Create Policy

Click Policies
Untrust to Trust Go
Untrust to Trust, then click “New”
Name: Cisco Pix Tunnel
Source Address Book Entry: Netblock behind Cisco Pix
Destination Address Book Entry: ip.ip.ip.ip/24
Action: Tunnel
Tunnel VPN: Tunnel to Cisco PIX
Check Modify matching bidirectional VPN policy
Check logging
Check Position at Top
Click OK

Notify Customer VPN is setup.

Comments

ACL Tutorial

Access Control Lists (ACL) – A Tutorial with Questions and their Answers

Access lists are essentially lists of conditions that control access. They’re powerful tools that control access both to and from network segments. They can filter unwanted packets and be used to implement security policies. With the right combination of access lists, network managers will be armed with the power to enforce nearly any access policy they can invent.

The IP and IPX access lists work similarly – they’re both packet filters that packets are compared with, categorized by, and acted upon. Once the lists are built, they can be applied to either inbound or outbound traffic on any interface. Applying an access list will then cause the router to analyze every packet crossing that interface in the specified direction and take action accordingly.

What They’re All About
The access list is a group of statements. Each statement defines a pattern that would be found in an IP packet. As each packet comes through an interface with an associated access list, the list is scanned from top to bottom–in the exact order that it was entered–for a pattern that matches the incoming packet. A permit or deny rule associated with the pattern determines that packet’s fate. You also can use a mask, which is like a wild card, to determine how much of an IP source or destination address to apply to the pattern match. The pattern statement also can include a TCP, UDP, Telnet, ftp, or other port numbers.

Access list statements are entered one line at a time, and the list is scanned for a match in that same order. If you must make a change, you have to re-enter the entire list. Also, keep in mind that once you associate the list with an interface, any packet not processed by the list is dropped by default.

Once the access list is entered, you must associate it with the interface on the router where you want to apply the filtering. You can apply the list to incoming packets, (an “in” access list) or outgoing packets (an “out” access list). Think of yourself inside the router and you are filtering packets coming in to you or going out from you through the affected interface or port. In most cases, either list will work. For out access lists, you need to set up the filter only on the one outgoing interface rather than on the individual incoming interfaces. This improves performance because only the network you are protecting will force a lookup on the access list.

There are a few important rules a packet must follow when it’s being compared with an access list:
It’s always compared with each line of the access list in sequential order, i.e., it’ll always start with line 1, then go to line 2, then line 3, and so on.

It’s compared with lines of the access list only until a match is made. Once the packet matches a line of the access list, it’s acted upon, and no further comparisons take place.

There is an implicit “deny” at the end of each access list – this means that if a packet doesn’t match up to any lines in the access list, it’ll be discarded.

Each of these rules has some powerful implications when filtering IP and IPX packets with access lists.
There are two types of access lists used with IP and IPX:

Standard access lists
These use only the source IP address in an IP packet to filter the network. This basically permits or denies an entire suite of protocols. IPX standards can filter on both source and destination IPX address.

Extended access lists
These check for both source and destination IP address, protocol field in the Network layer header, and port number at the Transport layer header. IPX extended access lists use source and destination IPX addresses, Network layer protocol fields, and socket numbers in the Transport layer header.

Once you create an access list, you apply it to an interface with either an inbound or outbound list.

Inbound access lists
Packets are processed through the access list before being routed to the outbound interface.

Outbound access lists
Packets are routed to the outbound interface and then processed through the access list. There are also some access list guidelines that should be followed when creating and implementing access lists on a router:

You can only assign one access list per interface, per protocol, or per direction. This means that if you are creating IP access lists, you can only have one inbound access list and one outbound access list per interface.

Organize your access lists so that the more specific tests are at the top of the access list.

Anytime a new list is added to the access list, it will be placed at the bottom of the list.

You cannot remove one line from an access list. If you try to do this, you will remove the entire list. It is best to copy the access list to a text editor before trying to edit the list. The only exception is when using named access lists.

Unless your access list ends with a permit any command, all packets will be discarded if they do not meet any of the lists’ tests. Every list should have at least one permit statement, or you might as well shut the interface down.

Create access lists and then apply them to an interface. Any access list applied to an interface without an access list present will not filter traffic.

Access lists are designed to filter traffic going through the router. They will not filter traffic originated from the router.

Place IP standard access lists as close to the destination as possible.

Place IP extended access lists as close to the source as possible.

Standard IP Access Lists
Standard IP access lists filter the network by using the source IP address in an IP packet.
You create a standard IP access list by using the access list numbers 1–99.

Here is an example of the access list numbers that you can use to filter your network.
The different protocols that you can use with access lists depend on your IOS version.

RouterA(config)#access-list ?
<1-99> IP standard access list
<100-199> IP extended access list
<200-299> Protocol type-code access list
<300-399> DECnet access list
<400-499> XNS standard access list
<500-599> XNS extended access list
<600-699> Appletalk access list
<700-799> 48-bit MAC address access list
<800-899> IPX standard access list
<900-999> IPX extended access list
<1000-1099> IPX SAP access list
<1100-1199> Extended 48-bit MAC address access list
<1200-1299> IPX summary address access list

By using the access list numbers between 1–99, you tell the router that you want to create a standard IP access list.

RouterA(config)#access-list 10 ?
deny Specify packets to reject
permit Specify packets to forward

After you choose the access list number, you need to decide if you are creating a permit or deny list. For this example, you will create a deny statement:

RouterA(config)#access-list 10 deny ?
Hostname or A.B.C.D Address to match
any Any source host
host A single host address

The next step requires a more detailed explanation. There are three options available. You can use the any command to permit or deny any host or network, you can use an IP address to specify or match a specific network or IP host, or you can use the host command to specify a specific host only.

Here is an example of using the host command:
RouterA(config)#access-list 10 deny host 172.16.30.2

This tells the list to deny any packets from host 172.16.30.2. The default command is host. In other words, if you type access-list 10 deny 172.16.30.2, the router assumes you mean host 172.16.30.2.

However, there is another way to specify a specific host: you can use wildcards. In fact, to specify a network or a subnet, you have no option but to use wildcards in the access list.

Extended IP Access Lists
In the standard IP access list example, notice how you had to block the whole subnet from getting to the finance department. What if you wanted them to gain access to only a certain server on the Finance LAN, but not to other network services, for obvious security reasons? With a standard IP access list, you can’t allow users to get to one network service and not another. However, extended IP access lists allow you to do this. Extended IP access lists allow you to choose your IP source and Destination address as well as the protocol and port number, which identify the upper-layer protocol or application. By using extended IP access lists, you can effectively allow users access to a physical LAN and stop them from using certain services.

Here is an example of an extended IP access list. The first command shows the access list numbers available. You’ll use the extended access list range from 100 to 199.

At this point, you need to decide what type of list entry you are making. For this example, you’ll choose a deny list entry.

RouterA(config)#access-list 110 ?
deny Specify packet
dynamic Specify a DYNAMIC list of PERMITs or DENYs
permit Specify packets to forward

Once you choose the access list type, you must choose a Network layer protocol field entry. It is important to understand that if you want to filter the network by Application layer, you must choose an entry here that allows you to go up through the OSI model. For example, to filter by Telnet or FTP, you must choose TCP here. If you were to choose IP, you would never leave the Network layer, and you would not be allowed to filter by upper-layer applications.

RouterA(config)#access-list 110 deny ?
<0-255> An IP protocol number
eigrp Cisco’s EIGRP routing protocol
gre Cisco’s GRE tunneling
icmp Internet Control Message Protocol
igmp Internet Gateway Message Protocol
igrp Cisco’s IGRP routing protocol
ip Any Internet Protocol
ipinip IP in IP tunneling
nos KA9Q NOS compatible IP over IP tunneling
ospf OSPF routing protocol
tcp Transmission Control Protocol
udp User Datagram Protocol

Once you choose to go up to the Application layer through TCP, you will be prompted for the source IP address of the host or network. You can choose the any command to allow any source address.

RouterA(config)#access-list 110 deny tcp ?
A.B.C.D Source address
any Any source host
host A single source host

After the source address is selected, the destination address is chosen.

RouterA(config)#access-list 110 deny tcp any ?
A.B.C.D Destination address
any Any destination host
eq Match only packets on a given port number
gt Match only packets with a greater port number
host A single destination host
lt Match only packets with a lower port number
neq Match only packets not on a given port number
range Match only packets in the range of port numbers

In the example below, any source IP address that has a destination IP address of 172.16.30.2 has been denied.

RouterA(config)#access-list 110 deny tcp any host 172.16.30.2 ?
eq Match only packets on a given port number
established Match established connections
fragments Check fragments
gt Match only packets with a greater port number
log Log matches against this entry
log-input Log matches against this entry, including input interface
lt Match only packets with a lower port number
neq Match only packets not on a given port number
precedence Match packets with given precedence value
range Match only packets in the range of port numbers
tos Match packets with given TOS value

Now, you can press Enter here and leave the access list as is. However, you can be even more specific: once you have the host addresses in place, you can specify the type of service you are denying. The following help screen gives you the options. You can choose a port number or use the application or even the program name.

RouterA(config)#access-list 110 deny tcp any host 172.16.30.2 eq ?
<0-65535> Port number
bgp Border Gateway Protocol (179)
chargen Character generator (19)
cmd Remote commands (rcmd,514)
daytime Daytime (13)
discard Discard (9)
domain Domain Name Service (53)
echo Echo (7)
exec Exec (rsh,512)
finger Finger (79)
ftp File Transfer Protocol (21)
gopher Gopher (70)
hostname NIC hostname server (101)
ident Ident Protocol (113)
irc Internet Relay Chat (194)
klogin Kerberos login (543)
kshell Kerberos shell (544)
login Login (rlogin,513)
lpd Printer service (515)
nntp Network News Transport Protocol (119)
pop2 Post Office Protocol v2 (109)
pop3 Post Office Protocol v3 (110)
smtp Simple Mail Transport Protocol (25)
sunrpc Sun Remote Procedure Call (111)
syslog Syslog (514)
tacacs TAC Access Control System (49)
talk Talk (517)
telnet Telnet (23)
time Time (37)
uucp Unix-to-Unix Copy Program (540)
whois Nicname (43)
www World Wide Web HTTP,80)

Monitoring IP Access Lists
It is important to be able to verify the configuration on a router. The following commands can be used to verify the configuration:

show access-list Displays all access lists and their parameters configured on the router. This command does not show you which interface the list is set on.

show access-list 110 Shows only the parameters for the access list 110. This command does not show you the interface the list is set on.

show ip access-list Shows only the IP access lists configured on the router.

show ip interface Shows which interfaces have access lists set.

show running-config Shows the access lists and which interfaces have access lists set.

Odd or even hosts
This is one we always seem to get in the classroom:

Given the IP address: 200.8.7.0 (Network Address) with a wildcard mask of 0.0.0.254.
The last octet is 1111 1110, so we are going to ignore everything except the last bit.

If we say: permit tcp 200.8.7.0 0.0.0.254, then we are saying that we have to match that last bit.

For odd numbers, the last bit will always be turned on.
This would permit; explicitly deny even and allows odd

If we wanted to use the same IP address to do the opposite:
permit all odd and deny all even, we could use the deny statement:
deny tcp 200.8.7.0 0.0.0.254

This would explicitly deny odd and allow even.

Below are some exercises to assist in learning about ACLs.

Remember:
A “0″ bit in a wildcard mask means match the corresponding bit in the address.
A “1″ bit in a wildcard mask means ignore the corresponding bit in the address.
The IP address of the source or destination is a bit reference for the wildcard mask.

ACL Q & A Exercises:

Q1. Design an IP access list that permits traffic from host 193.5.2.76, but denies all other IP traffic.

A1. Here are three solutions to this problem:
access-list 2 permit host 193.5.2.76
access-list 1 permit 193.5.2.76 0.0.0.0
access-list 3 permit 193.5.2.76

Any of these three single-line access lists will give the required result. Remember that there is always an implied “deny” following the last line of an access list, and that standard IP access-list numbers can be anything within the range of 1-99. It could also be done with an extended access list, for example:
access-list 101 permit ip host 193.5.2.76 any

but why use an extended list when a standard list will do?

Q2. Design an IP access list that denies traffic from host 11.5.25.239, but permits all other IP traffic.

A2. One solution to this problem:
access-list 7 deny host 11.5.25.239
access-list 7 permit any

Q3. Design an IP access list that permits IP traffic from hosts on network 196.25.1.0/24, and denies other IP traffic.

A3. Since there are 254 possible host addresses on this network, we don’t want to specify them individually. Therefore, we will use a wildcard mask. An access list that meets the requirements is:
access-list 7 permit 196.25.1.0 0.0.0.255

Q4. Design an access list that denies IP traffic from hosts 152.5.35.83 and 104.2.64.33, permits IP traffic from all hosts on network 185.25.0.0/16, and denies all other IP traffic. Invoke your access list inbound on interface E2.

A4. One solution to this problem:
interface e2
ip access-group 13 in

access-list 13 deny host 104.2.64.33
access-list 13 deny host 152.5.35.83
access-list 13 permit 185.25.0.0 0.0.255.255

Again, we can use the keyword “host”, as in “host 104.2.64.33″, or we can use the mask “0.0.0.0″ following a host address, such as “252.5.35.83 0.0.0.0″. Note also that since the first two “denies” are covered by the implicit “deny any” that ends a standard IP access list, we can devise a more efficient solution as follows:
interface e2
ip access-group 13 in

access-list 13 permit 185.25.0.0 0.0.255.255

Q5. Given the statements:
interface ethernet 1
ip access-group 25 in

access-list 25 permit host 101.2.3.40
access-list 25 deny 203.45.0.0 0.0.255.255
access-list 25 permit any

What will the result be?

A5. Access list 25 has been placed inbound on interface E1. Therefore, any IP traffic from host 101.2.3.40 will be allowed into the router via E1. No IP traffic from any of the 256 Class “C” networks starting with 203.45.0.0 will be allowed into E1, but any other IP traffic will be permitted.

Since the traffic from host 101.2.3.40 is also permitted by the last line, the first line is superfluous, and the same result could be obtained by using:
access-list 25 deny 203.45.0.0 0.0.255.255
access-list 25 permit any

Q6. Design an access list that permits IP traffic from hosts 1.2.3.98 and 1.2.3.99, and denies all other IP traffic. Invoke your access list outbound on interface Token Ring 3/1.

A6. The most straightforward solution:
interface token-ring 3/1
ip access-group 66 out

access-list 66 permit host 1.2.3.98
access-list 66 permit host 1.2.3.99

On the other hand, we could get cute and use a wildcard mask. If we examine the bit patterns for the two host addresses, we notice that they are identical in the first three octets, and identical up to the last bit in the fourth octet, where the two possibilities are our two host addresses. Therefore, we can cover both addresses with one line, and an alternative solution is as follows:
interface token-ring 3/1
ip access-group 66 out

access-list 66 permit 1.2.3.98 0.0.0.1

Note that this just might be too clever for our own good, in that it only saved us one line, and it is no longer readily apparent what the access list is doing.

Q7. Design an extended IP access list that denies HTTP traffic intended for the web server at 47.23.67.102, permits HTTP traffic to other web servers, and denies all other IP traffic. Invoke your access list inbound on interface E0, and outbound on FDDI interface 3.

A7. The most straightforward solution:
interface ethernet 0
ip access-group 101 in

interface fddi 3
ip access-group 101 out

access-list 101 deny tcp any host 47.23.67.102 eq www
access-list 101 permit tcp any any eq www

Q8. Given the statements:
interface ethernet 0
ip access-group 95 in

access-list 95 deny host 101.202.3.4
access-list 95 deny 203.45.6.0 0.0.0.255
access-list 95 permit any

What will the result be?

A8. This configuration denies any IP traffic from host 101.202.3.4 from entering interface E0, it denies all IP traffic from any host on network 203.45.6.0/24 from entering interface E0, and it permits any other IP traffic to enter through interface E0.

Q9. Design an IP access list that permits TFTP traffic to TFTP servers that have host addresses ending in even numbers, denies TELNET traffic to TELNET servers that have host addresses ending in odd numbers, permits traffic to other TELNET servers, and denies all other IP traffic. Activate your list inbound on interface E1.

A9. To check for even and odd addresses, we only care that the last bit is a zero or a one, respectively. We can do it with:
interface ethernet 1
ip access-group 102 in

access-list 102 permit udp any 0.0.0.0 255.255.255.254 eq tftp
access-list 102 permit tcp any 0.0.0.0 255.255.255.254 eq telnet

Q10. Design an extended access list that permits all IP traffic from hosts on network 215.23.45.0/24, denies all IP traffic going to subnet 52.54.0.0/16, permits anyone to open a Telnet session with either 14.63.73.66 and 221.63.62.88 (and logs such packets to the console), and denies all other IP traffic. Invoke your list inbound on the first Token Ring interface on the card in slot 2.

A10. One solution:
interface token-ring 2/0
ip access-group 158 in

access-list 158 permit ip 215.23.45.0 0.0.0.255 any
access-list 158 deny ip any 52.54.0.0 0.0.255.255
access-list 158 permit tcp any host 14.63.73.66 eq telnet log
access-list 158 permit tcp any host 221.63.62.88 eq telnet log

Q11. Given the statements:
interface serial 0
ip access-group 164 out

access-list 164 deny tcp 14.3.6.234 0.0.0.0 host 6.5.4.1 eq 23
access-list 164 deny udp any any eq tftp
access-list 164 permit ip any any

What will the result be?

A11. This configuration denies TELNET traffic from 14.3.6.234 bound for host 6.5.4.1 from leaving interface S0, it denies all TFTP traffic bound for TFTP servers, and it permits all other IP traffic. Consistency is a good thing, so, unlike this exercise, use either the keyword “host” or the mask “0.0.0.0″. Don’t mix and match.

Q12. Design an access list that permits web traffic from the server at 101.54.32.2 to all hosts on subnet 149.23.8.0/24, permits pings in either direction between the hosts on network 39.0.0.0/8 and subnet 197.2.5.96/27, and denies everything else. Place this access list in force in the outbound direction on the router’s E2 port.

A12. One solution:
interface ethernet 2
ip access-group 199 out

access-list 199 permit tcp host 101.54.32.2 eq www 149.23.8.0 0.0.0.255
access-list 199 permit icmp 39.0.0.0 0.255.255.255 197.2.5.96 0.0.0.31 echo
access-list 199 permit icmp 39.0.0.0 0.255.255.255 197.2.5.96 0.0.0.31 echo-reply
access-list 199 permit icmp 197.2.5.96 0.0.0.31 39.0.0.0 0.255.255.255 echo
access-list 199 permit icmp 197.2.5.96 0.0.0.31 39.0.0.0 0.255.255.255 echo-reply

Some explanations are in order here.

In the first line of the access list, we are interested in traffic that is coming from the web server, so we place the port identifier after the source address, not the destination address.

The second and third lines take care of pings (ICMP echo) and replies (ICMP echo-reply) leaving 39.0.0.0/8.

The fourth and fifth lines take care of pings and replies leaving 197.2.5.96/27.

Remember, using a “/27″ subnet mask (same as “255.255.255.224″) with a class “C” network means that we have set aside three bits in the fourth octet for subnetting. For the “96″ subnet, the bit pattern is “011XXXXX”, where the X’s mean we don’t care. Since the first three bits must be “011″, and we don’t care about the last five bits, the last octet of the wildcard mask must be “00011111″, which is 31. The first three octets have to match exactly, so the wildcard mask is “0.0.0.31″.

Q13. Given the statements:
interface fddi 3/2
ip access-group 66

access-list 66 permit 100.200.0.0 0.0.255.63

What will the result be?

A13. This configuration permits IP traffic from any host within the range from 100.200.0.0 – 100.200.0.63, 100.200.1.0 – 100.200.1.63 … 100.200.255.0 – 100.200.255.63 to pass outbound (the default direction for “access-group” statements) via FDDI 3/2. By the way, letting it choose “outbound” by default is bad practice. You should specify the direction you desire.

Q14. Design an access list that permits all IP traffic except pings in either direction between subnets 10.20.0.0/16 and 40.50.60.0/24.

A14. One solution:
access-list 197 deny icmp 10.20.0.0 0.0.255.255 40.50.60.0 0.0.0.255 echo
access-list 197 deny icmp 10.20.0.0 0.0.255.255 40.50.60.0 0.0.0.255 echo-reply
access-list 197 deny icmp 40.50.60.0 0.0.0.255 10.20.0.0 0.0.255.255 echo
access-list 197 deny icmp 40.50.60.0 0.0.0.255 10.20.0.0 0.0.255.255 echo-reply
access-list 197 permit ip any any

We need to cover the pings and replies in both directions.

Q15. Given the statements:
interface token-ring 7
ip access-group 13 in
ip access-group 184 out

access-list 13 permit host 201.3.4.2
access-list 13 deny 203.45.0.0 0.0.255.255
access-list 13 deny 84.7.22.240 0.0.0.7
access-list 13 permit any
access-list 184 permit ip any host 101.202.3.4 log
access-list 184 permit tcp 203.45.6.0 0.0.0.255 any eq www
access-list 184 permit udp any any

What will the result be?

A15. This configuration places access list 13 inbound on Token Ring interface 7. Accordingly, all IP traffic from host 201.3.4.2 is allowed in on To7, IP traffic from host addresses 203.45.0.0 through 203.45.255.255 is denied access inbound through To7, IP traffic from host addresses 84.7.22.240 through 84.7.22.247 is denied access inbound through To7, and all other IP traffic is permitted inbound through To7. Since 201.3.4.2 is a subset of the last line of access list 13, the first line of access list 13 is superfluous, and the list could be written more concisely as:

access-list 13 deny 203.45.0.0 0.0.255.255
access-list 13 deny 84.7.22.240 0.0.0.7
access-list 13 permit any

This configuration also places access list 184 outbound on Token Ring interface 7. This allows IP traffic from any host to destination 101.202.3.4 (and logs any such traffic to the console), permits HTTP traffic from hosts on 203.45.6.0/24 from going to any web server, and permits any UDP traffic.

Q16. Design an access list that permits all IP traffic from the hosts on networks 222.111.3.0/24 through 222.111.7.0/24, and denies all other IP traffic.

A16. One efficient solution:
access-list 98 permit 222.111.3.0 0.0.0.255
access-list 98 permit 222.111.4.0 0.0.3.255

The first line covers network 222.111.3.0/24,
and the second line covers networks 222.111.4.0/24 through 222.111.7.0/24.

Q17. Given the statements:
interface token-ring 2/1
ip access-group 23 in

access-list 23 deny host 201.3.4.2
access-list 23 deny 84.7.22.248 0.0.0.7
access-list 23 deny 153.45.0.0 0.0.255.255
access-list 23 deny 203.45.6.0 0.0.0.255

What will the result be?

A17. Because there are no “permit” statements in the list, this configuration will deny all IP traffic inbound via Token Ring interface 2/1.

Q18. Design an access list that denies all FTP traffic from the hosts on subnets 101.202.8.0/24 through 101.202.13/24 that is destined for FTP servers, but permits all other IP traffic.

A18. One solution:
access-list 128 deny tcp 101.202.8.0 0.0.0.255 any eq ftp
access-list 128 deny tcp 101.202.9.0 0.0.0.255 any eq ftp
access-list 128 deny tcp 101.202.10.0 0.0.0.255 any eq ftp
access-list 128 deny tcp 101.202.11.0 0.0.0.255 any eq ftp
access-list 128 deny tcp 101.202.12.0 0.0.0.255 any eq ftp
access-list 128 deny tcp 101.202.13.0 0.0.0.255 any eq ftp
access-list 128 permit ip any any

And yet another using four lines:
access-list 138 deny tcp 101.202.8.0 0.0.3.255 any eq ftp
access-list 138 deny tcp 101.202.12.0 0.0.0.255 any eq ftp
access-list 138 deny tcp 101.202.13.0 0.0.0.255 any eq ftp
access-list 138 permit ip any any

And this one gets it down to three lines, the best we can do:
access-list 148 deny tcp 101.202.8.0 0.0.3.255 any eq ftp
access-list 148 deny tcp 101.202.12.0 0.0.1.255 any eq ftp
access-list 148 permit ip any any

There are other schemes, including:
access-list 158 permit tcp 101.202.14.0 0.0.0.255 any eq ftp
access-list 158 permit tcp 101.202.15.0 0.0.0.255 any eq ftp
access-list 158 deny tcp 101.202.8.0 0.0.7.255 any eq ftp
access-list 158 permit ip any any

Can you see why access lists 128, 138, 148 and 158 give equivalent results?

Q19. Given the statements:
interface ethernet 4
ip access-group 199

access-list 199 permit ip any any
access-list 199 deny ip 106.45.0.0 0.0.255.255 any
access-list 199 deny tcp any 44.7.12.224 0.0.0.15 eq ftp
access-list 199 deny udp 23.145.64.0 0.0.0.255 host 1.2.3.4 eq rip

What will the result be?

A19. Because the first line is a “permit ip any any”, all traffic matches on the first line, and is allowed to pass. The other lines are never checked. If you spot something like this, it is generally a mistake. The “permit ip any any” line was probably intended to be at the end of the access list. The order of the lines can be crucial.

Q20. Design an access list that permits all IP traffic from the hosts on subnets 10.0.0.0/16 through 10.7.0.0/16, permits IP traffic from the hosts on subnets 10.9.0.0/16 through 10.15.0.0/16, and denies all other IP traffic. Place it outbound on E0 and inbound on Token Ring 2.

A20. One solution:
interface ethernet 0
ip access-group 39 out

interface token-ring 2
ip access-group 39 in

access-list 39 permit 10.0.0.0 0.0.255.255
access-list 39 permit 10.1.0.0 0.0.255.255
access-list 39 permit 10.2.0.0 0.0.255.255
access-list 39 permit 10.3.0.0 0.0.255.255
access-list 39 permit 10.4.0.0 0.0.255.255
access-list 39 permit 10.5.0.0 0.0.255.255
access-list 39 permit 10.6.0.0 0.0.255.255
access-list 39 permit 10.7.0.0 0.0.255.255
access-list 39 permit 10.9.0.0 0.0.255.255
access-list 39 permit 10.10.0.0 0.0.255.255
access-list 39 permit 10.11.0.0 0.0.255.255
access-list 39 permit 10.12.0.0 0.0.255.255
access-list 39 permit 10.13.0.0 0.0.255.255
access-list 39 permit 10.14.0.0 0.0.255.255
access-list 39 permit 10.15.0.0 0.0.255.255

That solution is kind of long, but it has the advantage of being straightforward. Another solution is:
interface ethernet 0
ip access-group 49 out

interface token-ring 2
ip access-group 49 in

access-list 49 deny 10.8.0.0 0.0.255.255
access-list 49 permit 10.0.0.0 0.15.255.255

This is concise and relatively easy to understand. Can you see why access lists 39 and 49 give equivalent results?

Q21. Design an access list that permits bi-directional ICMP traffic between subnets 1.0.96.0/20 and 2.0.1.64/27, permits bi-directional IP traffic between the hosts on subnets 131.5.0.0/16 through 131.8.0.0/16 and the hosts on network 239.5.6.0/24, and denies all other IP traffic except IGRP, which must be permitted everywhere.

A21. One solution:
access-list 150 permit icmp 1.0.96.0 0.0.15.255 2.0.1.64 0.0.0.31
access-list 150 permit icmp 2.0.1.64 0.0.0.31 1.0.96.0 0.0.15.255
access-list 150 permit ip 131.5.0.0 0.0.255.255 239.5.6.0 0.0.0.255
access-list 150 permit ip 131.6.0.0 0.0.255.255 239.5.6.0 0.0.0.255
access-list 150 permit ip 131.7.0.0 0.0.255.255 239.5.6.0 0.0.0.255
access-list 150 permit ip 131.8.0.0 0.0.255.255 239.5.6.0 0.0.0.255
access-list 150 permit ip 239.5.6.0 0.0.0.255 131.5.0.0 0.0.255.255
access-list 150 permit ip 239.5.6.0 0.0.0.255 131.6.0.0 0.0.255.255
access-list 150 permit ip 239.5.6.0 0.0.0.255 131.7.0.0 0.0.255.255
access-list 150 permit ip 239.5.6.0 0.0.0.255 131.8.0.0 0.0.255.255
access-list 150 permit igrp any any

A slightly more efficient, although less intuitive, solution:
access-list 160 permit icmp 1.0.96.0 0.0.15.255 2.0.1.64 0.0.0.31
access-list 160 permit icmp 2.0.1.64 0.0.0.31 1.0.96.0 0.0.15.255
access-list 160 permit ip 131.5.0.0 0.0.255.255 239.5.6.0 0.0.0.255
access-list 160 permit ip 131.6.0.0 0.1.255.255 239.5.6.0 0.0.0.255
access-list 160 permit ip 131.8.0.0 0.0.255.255 239.5.6.0 0.0.0.255
access-list 160 permit ip 239.5.6.0 0.0.0.255 131.5.0.0 0.0.255.255
access-list 160 permit ip 239.5.6.0 0.0.0.255 131.6.0.0 0.1.255.255
access-list 160 permit ip 239.5.6.0 0.0.0.255 131.8.0.0 0.0.255.255
access-list 160 permit igrp any any

Another possibility:
access-list 170 permit icmp 1.0.96.0 0.0.15.255 2.0.1.64 0.0.0.31
access-list 170 permit icmp 2.0.1.64 0.0.0.31 1.0.96.0 0.0.15.255
access-list 170 deny ip 131.4.0.0 0.0.255.255 239.5.6.0 0.0.0.255
access-list 170 permit ip 131.4.0.0 0.3.255.255 239.5.6.0 0.0.0.255
access-list 170 permit ip 131.8.0.0 0.0.255.255 239.5.6.0 0.0.0.255
access-list 170 deny ip 239.5.6.0 0.0.0.255 131.4.0.0 0.0.255.255
access-list 170 permit ip 239.5.6.0 0.0.0.255 131.4.0.0 0.3.255.255
access-list 170 permit ip 239.5.6.0 0.0.0.255 131.8.0.0 0.0.255.255
access-list 170 permit igrp any any

This seems to gain us nothing at the expense of complicating the logic. The best solution is probably the first one, which costs us a little in efficiency, but gains us much in the way of clarity. In general, it is better to be inefficient and correct than it is to be efficiently wrong.

Q22. The following statements are executed in the order given:
access-list 1 deny any
access-list 1 permit any

no access-list 1 deny any

access-list 2 deny 1.2.3.4
access-list 2 permit any

interface serial 3
ip access-group 2 in
ip access-group 1 in

What is the result?

A22. Remember the rule: one access list per protocol per direction per interface. Since the last IP access list to be put in force inbound on interface S3 is access list 1, that is the only IP access list in force inbound on interface S3. Also, since at this point access list 1 is empty (it was completely erased by the “no access-list 1 deny any” statement, which acted as a “no access-list 1″), it has no effect. The net result is that all IP traffic is allowed inbound via S3.

Q23. Design a standard IPX access list that allows traffic from network 3A6C to go to network 5BF2, and blocks all other IPX traffic. Place it in force on interface E3 in the inbound direction.

A23. One solution:
interface ethernet 3
ipx access-group 801 in

access-list 801 permit 3A6C 5BF2

Q24. Design an IPX access list that denies traffic in either direction between networks 543210 and ABCDEF, denies traffic between sources on network 1020304 and the host with MAC address 0000.0C12.54FB on network 4B9C2, and permits any other IPX traffic. Place it outbound on FDDI 3.

A24. One solution:
interface fddi 3
ipx access-group 821 out

access-list 821 deny 543210 abcdef
access-list 821 deny abcdef 543210
access-list 821 deny 1020304 4b9c2.0000.0C12.54fb
access-list 821 permit -1

Note that “-1″ is equivalent to “FFFFFFFF”, which means “all IPX networks”. If you input “-1″, the router will automatically translate it into “FFFFFFFF”. Also, hex digits are not case-sensitive.

Q25. Interface S0 is connected to a slow WAN link. Keep the SAP traffic advertising file services on network 2BDEAD from crossing the link.

A25. One solution:
interface serial 0
ipx output-sap-filter 1001

access-list 1001 deny 2bdead 4
access-list 1001 permit -1

Q26. Given the statements:
interface ethernet 1
ip access-group 60 in
ip access-group 161 in

access-list 60 deny host 1.3.5.7 0.0.0.0
access-list 60 deny 10.0.0.0 0.0.0.0
access-list 60 deny 54.78.43.2 255.255.255.255
access-list 60 deny ip host 101.2.5.7 eq telnet
access-list 161 permit ip 205.6.23.6 34.67.22.3
access-list 161 permit ipx a0b1c2 -1
access-list 161 deny telnet
access-list 161 permit ip host 225.0.0.5 any
access-list 161 deny ip any any

How many errors can you find?

A26. Again, one access list (standard or extended) per protocol per direction per interface. This means that access lists 60 and 161 cannot be in inbound on Ethernet 1 at the same time. Other errors are as follows:

access-list 60 deny host 1.3.5.7 0.0.0.0
Don’t use both the keyword “host” and the “0.0.0.0″ mask.

access-list 60 deny 10.0.0.0 0.0.0.0
It’s not likely that “10.0.0.0″ is a host address.

access-list 60 deny 54.78.43.2 255.255.255.255
The mask was probably intended to be “0.0.0.0″, i.e. “host”.

access-list 60 deny ip host 101.2.5.7 eq telnet
We can’t deny specific protocols with a standard access list.
Also, since there is no “permit” statement in access list 60, it denies all IP traffic.

access-list 161 permit ip 205.6.23.6 34.67.22.3
Missing addressing information, the “host” keyword should probably appear before each address.

access-list 161 permit ipx a0b1c2 -1
We can’t specify any IPX information in an IP access list.

access-list 161 deny telnet
Missing addressing and protocol (TCP) information.

access-list 161 permit ip host 225.0.0.5 any
The address “225.0.0.5″ is a multicast address. A multicast or broadcast address can never be a legal
source address.

access-list 161 deny ip any any
While this statement is redundant (because it is implicit at the end of every IP access list), some people do
include it for the sake of clarity. Therefore, it is not an “error”.

Q27. Keep all SAP advertisements received via interface To2 from the NetWare servers named “SUZY” and “CHIPSTER” from being entered into the SAP table.

A27. One solution:
interface token-ring 2
ipx input-sap-filter 1095

access-list 1095 deny -1 0 SUZY
access-list 1095 deny -1 0 CHIPSTER
access-list 1095 permit -1

A SAP type of “0″ means all services. Don’t forget to take advantage of the “?” for help when configuring routers!

Q28. Stop the SAP advertisements for service type 47 on any network from leaving via interface S2, permit all other SAP traffic to leave via S2, and allow only UDP traffic from hosts on IP subnet 201.2.6.0/24 to enter via S5.

A28. One solution:
interface serial 5
ip access-group 134 in
ipx output-sap-filter 1099

access-list 134 permit udp 201.2.6.0 0.0.0.255 any
access-list 1099 deny -1 47
access-list 1099 permit -1

Filtering multiple protocols requires multiple access lists, and also appropriate statements to place them in force in the required direction(s).

Q29. Given the statements:
interface ethernet 4
appletalk access-group 606

access-list 606 deny cable-range 200-205
access-list 606 deny within 303-305
access-list 606 permit other-access

What will the result be?

A29. This configuration denies outbound traffic from cable range 200-205 and from networks 303-305 from leaving via interface Ethernet 4, but permits traffic from other networks to leave via Ethernet 4.

http://216.119.93.21/billings/acltutorial.htm

Comments

Wire Guide

AT&T telephone color code for 25 pair cable
Pair Primary (tip) Secondary (ring)
1 White/Blue Blue/White
2 White/Orange Orange/White
3 White/Green Green/White
4 White/Brown Brown/White
5 White/Slate Slate/White
6 Red/Blue Blue/Red
7 Red/Orange Orange/Red
8 Red/Green Green/Red
9 Red/Brown Brown/Red
10 Red/Slate Slate/Red
11 Black/Blue Blue/Black
12 Black/Orange Orange/Black
13 Black/Green Green/Black
14 Black/Brown Brown/Black
15 Black/Slate Slate/Black
16 Yellow/Blue Blue/Yellow
17 Yellow/Orange Orange/Yellow
18 Yellow/Green Green/Yellow
19 Yellow/Brown Brown/Yellow
20 Yellow/Slate Slate/Yellow
21 Violet/Blue Blue/Violet
22 Violet/Orange Orange/Violet
23 Violet/Green Green/Violet
24 Violet/Brown Brown/Violet
25 Violet/Slate Slate/Violet

RJ-45 wiring guide (TIA 568B or AT&T)
The 568B wiring is used in almost 90% of installations. The pin numbers refer to a RJ-45 telephone type connector. Pin #1 is the one on the left when you hold the tab down with the wire facing you, as you would plug it in. Pin #2 is the next one on the right and lastly, pin #8 is the one all the way to the right.

PIN # COLOR SCREW TYPE COLOR

White/Orange Blue
Orange/White Orange
White/Green Black
Blue/White Red
White/Blue Green
Green/White Yellow
White/Brown Brown
Brown/White White (or gray)
NOTE: This is an RJ-45 wall plate (front view), T568B.

RJ-45 wiring guide (TIA 568A)
The 568A wiring is used when compatibility to telephone wiring systems (USOC) is needed. It is not recommended, as parts are not as commonly available.

PIN # COLOR SCREW TYPE PLATE

White/Green Blue
Green/White Orange
White/Orange Black
Blue/White Red
White/Blue Green
Orange/White Yellow
White/Brown Brown
Brown/White White (or Grey)
NOTE: This is an RJ-45 wall plate (front view), T568A.

USOC wiring diagram
The USOC wiring is used when is most home and office telephone systems. It used either an RJ-11 plug (4 wire) or an RJ-14 plug (6 wire).

For telephone systems the RJ-11 (or RJ-14) wiring is reversed. For most computer systems it is straight through.

PIN # COLOR SCREW TYPE PLATE USED

Green/White White RJ-14
White/Orange Black RJ-11 & RJ-14
Blue/White Red RJ-11 & RJ-14
White/Blue Green RJ-11 & RJ-14
Orange/White Yellow RJ-11 & RJ-14
White/Green Blue RJ-14

DSL (Digital Subscriber Line)
Is growing very fast and replacing 56k modems as the price comes down. As of this month, you can get it for $39.95 per month with a free modem. It is many times faster than a 56k modem for downloads.

Wiring up a DSL line is easy. It uses the same wires that you telephone line uses.

For a RJ-11 connector:

Pin # COLOR CODE OLD STYLE COLOR

3 Blue/White Red

4 White/Blue Green

For an RJ-45 connector:

Pin # COLOR CODE OLD STYLE COLOR

4 Blue/White Red

5 White/Blue Green

A DSL modem is installed to your telephone line, then a CATEGORY 5 RJ-45 basic patch cord is connected from the modem to a Network Interface Card (NIC) in your computer. If more than one computer will be using the line, a hub or a bridge/router can be used to connect multiple PC’s.

ISDN circuit wiring (Integral Services Digital Network)
Two independent telephone lines are supplied on a single twisted pair cable, each capable of carrying up to 64kbs. They are bondable together to create a 128kbs line. A special ISDN modem is required.

The color code of the wires are the same as for a DSL line (see DSL).

T1 circuit wiring
T1 is a high speed digital network (mainly used for businesses) which has speeds of 1.544Mbps. Twenty four voice circuits (or channels) are available on each T1 circuit.

The T1 circuit is installed by the telephone company at the customer’s DEMARK or MPOE (Minimum Point of Entry). From there it is usually the customer’s responsibility to connect to the equipment. If you are extending the DEMARK more than 15 feet, you should follow the following:

Make sure you use D-shield cable, which is CATEGORY 5 shielded. Each pair MUST be shielded, not an overall foil wrap. It you use overall foil wrap cable, you must run 2 lines, one for transmit and one from receive to the extended DEMARK. This minimizes cross talk between pairs.

You must use a CATEGORY 5 patch cord 15 feet or less from your equipment to the RJ-45 (RJ48C-RJ48X) connector.

The following is a wiring diagram for the 8 position jack. Make sure you use a CATEGORY 5 rated RJ-45 jack.

DESCRIPTION PIN # COLOR
Receive from Network (ring) 1 Blue/White
Receive from Network (tip) 2 White/Blue
Transmit from Network (ring) 4 Orange/White
Transmit from Network (tip) 5 White/Orange

Be advised that it is possible that the telephone technician may reverse transmit and receive. It you do not get a link, then try reversing them.

Comments

IP Subnet Cheat Sheet

255.255.255.255 11111111.11111111.11111111.11111111 /32 Host (single address)

255.255.255.254 11111111.11111111.11111111.11111110 /31 Unuseable
255.255.255.252 11111111.11111111.11111111.11111100 /30 2 useable
255.255.255.248 11111111.11111111.11111111.11111000 /29 6 useable
255.255.255.240 11111111.11111111.11111111.11110000 /28 14 useable
255.255.255.224 11111111.11111111.11111111.11100000 /27 30 useable
255.255.255.192 11111111.11111111.11111111.11000000 /26 62 useable
255.255.255.128 11111111.11111111.11111111.10000000 /25 126 useable
255.255.255.0 11111111.11111111.11111111.00000000 /24 “Class C” 254 useable

255.255.254.0 11111111.11111111.11111110.00000000 /23 2 Class C
255.255.252.0 11111111.11111111.11111100.00000000 /22 4 Class C
255.255.248.0 11111111.11111111.11111000.00000000 /21 8 Class C
255.255.240.0 11111111.11111111.11110000.00000000 /20 16 Class C
255.255.224.0 11111111.11111111.11100000.00000000 /19 32 Class C
255.255.192.0 11111111.11111111.11000000.00000000 /18 64 Class C
255.255.128.0 11111111.11111111.10000000.00000000 /17 128 Class C
255.255.0.0 11111111.11111111.00000000.00000000 /16 “Class B”

255.254.0.0 11111111.11111110.00000000.00000000 /15
255.252.0.0 11111111.11111100.00000000.00000000 /14
255.248.0.0 11111111.11111000.00000000.00000000 /13
255.240.0.0 11111111.11110000.00000000.00000000 /12
255.224.0.0 11111111.11100000.00000000.00000000 /11
255.192.0.0 11111111.11000000.00000000.00000000 /10
255.128.0.0 11111111.10000000.00000000.00000000 /9
255.0.0.0 11111111.00000000.00000000.00000000 /8 “Class A”

254.0.0.0 11111110.00000000.00000000.00000000 /7
252.0.0.0 11111100.00000000.00000000.00000000 /6
248.0.0.0 11111000.00000000.00000000.00000000 /5
240.0.0.0 11110000.00000000.00000000.00000000 /4
224.0.0.0 11100000.00000000.00000000.00000000 /3
192.0.0.0 11000000.00000000.00000000.00000000 /2
128.0.0.0 10000000.00000000.00000000.00000000 /1
0.0.0.0 00000000.00000000.00000000.00000000 /0 IP space

# 255.255.255.0 1 Class C
# 255.255.254.0 2 Class Cs
# 255.255.252.0 4 Class Cs
# 255.255.248.0 8 Class Cs
# 255.255.240.0 16 Class Cs
# 255.255.224.0 32 Class Cs
# 255.255.192.0 64 Class Cs
# 255.255.128.0 128 Class Cs
# 255.255.0.0 1 Class B

Comments off

« Previous entries