09-12-2005 01:42 AM - edited 03-03-2019 10:29 AM
Hi all,
I have a Cisco 2606 router with 2 ethernet interfaces. One of them is connected to the internet. (IP of internetgateway: 192.168.1.1 255.255.255.0) The other interface is connected to a switch with 8 clients, which are in the network : 192.168.0.0 255.255.255.0) How to make it possible to give the clients access to 192.168.1.1.. which routes do i need and how to enter them (newb :) )
Greetz
Heiko
09-19-2005 12:24 AM
hi
i feel this link will be of some help coz it has the whole repository of NAT fundas..
http://cisco.com/en/US/tech/tk648/tk361/tk438/tsd_technology_support_sub-protocol_home.html
regds
09-20-2005 05:20 AM
Hi all / spremkumar
It finally works :)
interface Ethernet0/0
ip address 192.168.0.6 255.255.255.0
ip nat inside
!
interface Ethernet1/0
ip address 192.168.1.6 255.255.255.0
ip nat outside
!
ip local pool setup_pool 192.168.0.1 192.168.0.3
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.1
access-list 1 permit 192.168.0.0 0.0.0.255
Greetz
PS:
Anybody knows why to write
access-list 1 permit 192.168.0.0 0.0.0.255
and not
access-list 1 permit 192.168.0.0 255.255.255.0 ?
09-20-2005 04:16 PM
It may be helpful to briefly review the functionality of masks (both subnet and access list masks). In general the purpose of the mask is to indicate which bits in the address are significant and must match and which bits do not have to match.
In a subnet mask the binary 1 bits indicate significant must match bits. So in a subnet mask 255.255.255.0 says that the first three octets must match and we do not care what is in the fourth octet. A subnet mask of 0.0.0.255 would say that we do not care what is in the first three octets and do care what is in the fourth octet (and this maks is not logical for subnetting).
A mask for access lists is an inverse mask and in these masks the 0 bit indicates that it is significant and must match while a 1 bit means it does not need to match. So in an access list a mask of 0.0.0.255 means that the first three octets must match and the fourth octet does not matter. An access list mask of 255.255.255.0 would mean that we care only about the fourth octet. So the access list of:
access-list 1 permit 192.168.0.0 0.0.0.255
would mean that the first octet must be 192, the second octet must be 168, the third octet must be 0, and the fourth octet can be anything (which is what you want).
The access list of:
access-list 1 permit 192.168.0.0 255.255.255.0
would mean that the first octet can be anything, the second octet can be anything, the third octet can be anything, and the fourth octet must be 0.
There are two kinds of masks. You must remember which kind are used with subnets and which kind are used with access lists.
HTH
Rick
09-20-2005 11:22 PM
Hi Rick,
thank you very much for the explanation.
Greetz
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide