Router(config)#access-list 2 permit host 172.16.10.2
Permits host 172.16.10.2 to Telnet into this router (see line 4 of this ACL)
Router(config)#access-list 2 permit 172.16.20.0 0.0.0.255
Permits anyone from the 172.16.20.x address range to Telnet into this router (see line 4 of this ACL)
Router(config)#line vty 0 4
Denies all other Telnet requests (because of the implicit deny)
Router(config-line)access-class 2 in
Applies this ACL to all five vty virtual interfaces